Ejemplo n.º 1
0
 public static (ScriptBlock, Dictionary <string, object>) GetEventHandler(IPsEventControl control, string eventName)
 {
     return(control.PsEventHandlers.ContainsKey(eventName) ? control.PsEventHandlers[eventName] : (null, null));
 }
Ejemplo n.º 2
0
 public static void SetEventHandlerScript(IPsEventControl control, string eventName, ScriptBlock handler)
 {
     control.PsEventHandlers[eventName] = (handler, PsEventControlHelper.CaptureLocalVariables(control.Cmdlet));
 }
Ejemplo n.º 3
0
 public static ScriptBlock GetEventHandlerScript(IPsEventControl control, string eventName)
 {
     return(control.PsEventHandlers.ContainsKey(eventName) ? control.PsEventHandlers[eventName].Item1 : null);
 }