private bool Trace(PowerShellTraceEvent traceEvent, PowerShellTraceLevel level, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { EventDescriptor eventDescriptor = new EventDescriptor((int) traceEvent, 1, (byte) this._traceChannel, (byte) level, (byte) operationCode, (int) task, (long) this._keywords); if (args != null) { for (int i = 0; i < args.Length; i++) { if (args[i] == null) { args[i] = string.Empty; } } } return _provider.WriteEvent(ref eventDescriptor, args); }
/// <summary> /// TraceCritical /// </summary> public override bool TraceCritical(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return(Trace(traceEvent, PowerShellTraceLevel.Critical, operationCode, task, args)); }
/// <summary> /// TraceDebug /// </summary> public override bool TraceDebug(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { // TODO: There is some error thrown by the custom debug level // hence Informational is being used return(Trace(traceEvent, PowerShellTraceLevel.Informational, operationCode, task, args)); }
private bool Trace(PowerShellTraceEvent traceEvent, PowerShellTraceLevel level, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { EventDescriptor ed = new EventDescriptor((int)traceEvent, 1, (byte)_traceChannel, (byte)level, (byte)operationCode, (int)task, (long)_keywords); /* * Not using locks because the _provider is thread safe itself. **/ if (args != null) { for (int i = 0; i < args.Length; i++) { if (args[i] == null) { args[i] = string.Empty; } } } return(_provider.WriteEvent(ref ed, args)); }
/// <summary> /// TraceCritical /// </summary> public virtual bool TraceCritical(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return(true); }
public virtual bool TraceWarning(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return true; }
public override bool TraceWarning(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return this.Trace(traceEvent, PowerShellTraceLevel.Warning, operationCode, task, args); }
public override bool TraceDebug(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return this.Trace(traceEvent, PowerShellTraceLevel.Informational, operationCode, task, args); }
/// <summary> /// TraceCritical /// </summary> public override bool TraceCritical(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return Trace(traceEvent, PowerShellTraceLevel.Critical, operationCode, task, args); }
/// <summary> /// TraceDebug /// </summary> public override bool TraceDebug(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { // TODO: There is some error thrown by the custom debug level // hence Informational is being used return Trace(traceEvent, PowerShellTraceLevel.Informational, operationCode, task, args); }
private bool Trace(PowerShellTraceEvent traceEvent, PowerShellTraceLevel level, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { EventDescriptor ed = new EventDescriptor((int)traceEvent, 1, (byte)_traceChannel, (byte)level, (byte)operationCode, (int)task, (long)_keywords); /* * Not using locks because the _provider is thread safe itself. **/ if (args != null) { for (int i = 0; i < args.Length; i++) { if (args[i] == null) { args[i] = string.Empty; } } } return _provider.WriteEvent(ref ed, args); }
public override bool TraceWarning(PowerShellTraceEvent traceEvent, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { return(this.Trace(traceEvent, PowerShellTraceLevel.Warning, operationCode, task, args)); }
private bool Trace(PowerShellTraceEvent traceEvent, PowerShellTraceLevel level, PowerShellTraceOperationCode operationCode, PowerShellTraceTask task, params object[] args) { EventDescriptor eventDescriptor = new EventDescriptor((int)traceEvent, 1, (byte)this._traceChannel, (byte)level, (byte)operationCode, (int)task, (long)this._keywords); if (args != null) { for (int i = 0; i < args.Length; i++) { if (args[i] == null) { args[i] = string.Empty; } } } return(_provider.WriteEvent(ref eventDescriptor, args)); }