AddProvider adds a new provider to the multi trace session with optional parameters that influence the provider.
(guid windows.GUID, enableStacks bool, options ...Option)
| 215 | // AddProvider adds a new provider to the multi trace session |
| 216 | // with optional parameters that influence the provider. |
| 217 | func (t *Trace) AddProvider(guid windows.GUID, enableStacks bool, options ...Option) { |
| 218 | var opts opts |
| 219 | |
| 220 | for _, opt := range options { |
| 221 | opt(&opts) |
| 222 | } |
| 223 | |
| 224 | t.Providers = append( |
| 225 | t.Providers, |
| 226 | ProviderInfo{GUID: guid, Keywords: opts.keywords, EnableStacks: enableStacks, CaptureState: opts.captureState, stackExtensions: opts.stackexts, eventFilterDescriptors: opts.eventFilterDescriptors}, |
| 227 | ) |
| 228 | } |
| 229 | |
| 230 | // HasProviders determines if this trace contains providers. |
| 231 | func (t *Trace) HasProviders() bool { return len(t.Providers) > 0 } |