Exemplo n.º 1
0
		protected bool GetActionAndRemove(out CimBaseAction action)
		{
			return this.actionQueue.TryDequeue(out action);
		}
Exemplo n.º 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));
 }
Exemplo n.º 3
0
		public CmdletActionEventArgs(CimBaseAction action)
		{
			this.Action = action;
		}
Exemplo n.º 4
0
 public CmdletActionEventArgs(CimBaseAction action)
 {
     this.Action = action;
 }
Exemplo n.º 5
0
        /// <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);
        }
Exemplo n.º 6
0
		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;
			}
		}