/// <summary> /// Preamble of Cmdlet used for initialising parameters to its default values /// </summary> protected override void BeginProcessing() { var moduleName = this.MyInvocation.MyCommand.ModuleName; if (string.IsNullOrWhiteSpace(moduleName)) { moduleName = this.GetType().Namespace; } TraceSource = Logger.Get(moduleName); TraceSource.TraceEvent(TraceEventType.Start, EVENT_ID_START, MyInvocation.InvocationName); SetDefaultValues(); base.BeginProcessing(); }
protected override void EndProcessing() { TraceSource.TraceEvent(TraceEventType.Stop, EVENT_ID_STOP, MyInvocation.InvocationName); base.EndProcessing(); }