コード例 #1
0
ファイル: CimAsyncOperation.cs プロジェクト: nickchal/pash
		protected bool GetActionAndRemove(out CimBaseAction action)
		{
			return this.actionQueue.TryDequeue(out action);
		}
コード例 #2
0
 /// <summary>
 /// <para>
 /// Get action object from action queue
 /// </para>
 /// </summary>
 /// <param name="action">Next action to execute.</param>
 /// <returns>True indicates there is an valid action, otherwise false.</returns>
 protected bool GetActionAndRemove(out CimBaseAction action)
 {
     return(this.actionQueue.TryDequeue(out action));
 }
コード例 #3
0
		public CmdletActionEventArgs(CimBaseAction action)
		{
			this.Action = action;
		}
コード例 #4
0
 public CmdletActionEventArgs(CimBaseAction action)
 {
     this.Action = action;
 }
コード例 #5
0
ファイル: CimSessionProxy.cs プロジェクト: 40a/PowerShell
        /// <summary>
        /// <para>
        /// Trigger an event that new action available
        /// </para>
        /// </summary>
        /// <param name="action"></param>
        protected void FireNewActionEvent(CimBaseAction action)
        {
            DebugHelper.WriteLogEx();

            CmdletActionEventArgs actionArgs = new CmdletActionEventArgs(action);
            if (!PreNewActionEvent(actionArgs))
            {
                return;
            }

            NewCmdletActionHandler temp = this.OnNewCmdletAction;
            if (temp != null)
            {
                temp(this.session, actionArgs);
            }
            else
            {
                DebugHelper.WriteLog("Ignore action since OnNewCmdletAction is null.", 5);
            }
            this.PostNewActionEvent(actionArgs);
        }
コード例 #6
0
ファイル: CimSessionProxy.cs プロジェクト: nickchal/pash
		protected void FireNewActionEvent(CimBaseAction action)
		{
			DebugHelper.WriteLogEx();
			CmdletActionEventArgs cmdletActionEventArg = new CmdletActionEventArgs(action);
			if (this.PreNewActionEvent(cmdletActionEventArg))
			{
				CimSessionProxy.NewCmdletActionHandler newCmdletActionHandler = this.OnNewCmdletAction;
				if (newCmdletActionHandler == null)
				{
					DebugHelper.WriteLog("Ignore action since OnNewCmdletAction is null.", 5);
				}
				else
				{
					newCmdletActionHandler(this.session, cmdletActionEventArg);
				}
				this.PostNewActionEvent(cmdletActionEventArg);
				return;
			}
			else
			{
				return;
			}
		}