Ejemplo n.º 1
0
 internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
     if (this.IsEtwSupported)
     {
         this.debugChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Debug, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysDebug));
         this.analyticChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Analytic, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysAnalytic));
         this.operationsChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Operational, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysOperational));
         this.task = task;
         this.keywords = keywords;
     }
     else
     {
         this.debugChannel = NullWriter.Instance;
         this.analyticChannel = NullWriter.Instance;
         this.operationsChannel = NullWriter.Instance;
     }
 }
Ejemplo n.º 2
0
 internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
     if (this.IsEtwSupported)
     {
         this.debugChannel      = new PowerShellChannelWriter(PowerShellTraceChannel.Debug, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysDebug));
         this.analyticChannel   = new PowerShellChannelWriter(PowerShellTraceChannel.Analytic, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysAnalytic));
         this.operationsChannel = new PowerShellChannelWriter(PowerShellTraceChannel.Operational, keywords | (PowerShellTraceKeywords.None | PowerShellTraceKeywords.UseAlwaysOperational));
         this.task     = task;
         this.keywords = keywords;
     }
     else
     {
         this.debugChannel      = NullWriter.Instance;
         this.analyticChannel   = NullWriter.Instance;
         this.operationsChannel = NullWriter.Instance;
     }
 }
Ejemplo n.º 3
0
        /// <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;
            }
        }
Ejemplo n.º 4
0
 internal PowerShellChannelWriter(PowerShellTraceChannel traceChannel, PowerShellTraceKeywords keywords)
 {
     _traceChannel = traceChannel;
     _keywords     = keywords;
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Returns an instance of BaseChannelWriter.
 /// If the Etw is not supported by the platform it will return NullWriter.Instance
 ///
 /// A Task and a set of Keywords can be specified in the GetTraceSource method (See overloads).
 ///    The supplied task and keywords are used to pass to the Etw provider in case they are
 /// not defined in the manifest file.
 /// </summary>
 public static PowerShellTraceSource GetTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
     return(new PowerShellTraceSource(task, keywords));
 }
Ejemplo n.º 6
0
 internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
 }
Ejemplo n.º 7
0
 /// <summary>
 /// Returns an instance of BaseChannelWriter. 
 /// If the Etw is not supported by the platform it will return NullWriter.Instance
 /// 
 /// A Task and a set of Keywords can be specified in the GetTraceSource method (See overloads).  
 ///    The supplied task and keywords are used to pass to the Etw provider in case they are
 /// not defined in the manifest file.
 /// </summary>
 public static PowerShellTraceSource GetTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
     return new PowerShellTraceSource(task, keywords);
 }
Ejemplo n.º 8
0
 internal PowerShellTraceSource(PowerShellTraceTask task, PowerShellTraceKeywords keywords)
 {
 }
Ejemplo n.º 9
0
 internal PowerShellChannelWriter(PowerShellTraceChannel traceChannel, PowerShellTraceKeywords keywords)
 {
     this._traceChannel = traceChannel;
     this._keywords = keywords;
 }
Ejemplo n.º 10
0
        /// <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;
            }
        }