/// <summary> /// Constructor /// </summary> internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords) { if (IsEtwSupported) { DebugChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Debug, keywords | PowerShellTraceKeywords.UseAlwaysDebug); AnalyticChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Analytic, keywords | PowerShellTraceKeywords.UseAlwaysAnalytic); OperationalChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Operational, keywords | PowerShellTraceKeywords.UseAlwaysOperational); this.Task = task; this.Keywords = keywords; } else { DebugChannel = NullWriter.Instance; AnalyticChannel = NullWriter.Instance; OperationalChannel = NullWriter.Instance; } }