/// <summary> /// Perform Cmdlet post-processing. /// </summary> protected sealed override void EndProcessing() { ThreadAffinitiveSynchronizationContext.RunSynchronized( () => EndProcessingAsync() ); PowerShellSink.Instance.UnRegister(GetHashCode()); }
/// <summary> /// Perform Cmdlet pre-processing. /// </summary> protected sealed override void BeginProcessing() { PowerShellSink.Instance.Register(this); ThreadAffinitiveSynchronizationContext.RunSynchronized( () => BeginProcessingAsync() ); }
/// <summary> /// Perform Cmdlet processing. /// </summary> protected sealed override void ProcessRecord() { ThreadAffinitiveSynchronizationContext.RunSynchronized( () => ProcessRecordAsync() ); }