コード例 #1
0
 protected virtual void Dispose(bool disposing)
 {
     if (disposing)
     {
         this._tracer.Dispose();
         this.Callback                   = null;
         this.PrepareSession             = null;
         this.HandleRunspaceStateChanged = null;
         this.ActivityObject             = null;
         this.ParameterDefaults          = null;
         this.Input           = null;
         this.Output          = null;
         this.errors          = null;
         this.progress        = null;
         this.WorkflowHost    = null;
         this.ActivityParams  = null;
         this.exceptions      = null;
         this.runningCommands = null;
         this.commandQueue    = null;
         return;
     }
     else
     {
         return;
     }
 }
コード例 #2
0
ファイル: PSActivityContext.cs プロジェクト: nickchal/pash
		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				this._tracer.Dispose();
				this.Callback = null;
				this.PrepareSession = null;
				this.HandleRunspaceStateChanged = null;
				this.ActivityObject = null;
				this.ParameterDefaults = null;
				this.Input = null;
				this.Output = null;
				this.errors = null;
				this.progress = null;
				this.WorkflowHost = null;
				this.ActivityParams = null;
				this.exceptions = null;
				this.runningCommands = null;
				this.commandQueue = null;
				return;
			}
			else
			{
				return;
			}
		}
コード例 #3
0
 internal RunCommandsArguments(ActivityParameters activityParameters, PSDataCollection <PSObject> output, PSDataCollection <PSObject> input, PSActivityContext psActivityContext, PSWorkflowHost workflowHost, bool runInProc, Dictionary <string, object> parameterDefaults, Type activityType, PrepareSessionDelegate prepareSession, object activityObject, ActivityImplementationContext implementationContext)
 {
     this.ActivityParameters = activityParameters;
     this.Output             = output;
     this.Input                 = input;
     this.PSActivityContext     = psActivityContext;
     this.ParameterDefaults     = parameterDefaults;
     this.ActivityType          = activityType;
     this.Delegate              = prepareSession;
     this.ActivityObject        = activityObject;
     this.WorkflowHost          = workflowHost;
     this.ImplementationContext = implementationContext;
     this.CommandExecutionType  = RunCommandsArguments.DetermineCommandExecutionType(implementationContext.ConnectionInfo, runInProc, activityType, psActivityContext);
 }
コード例 #4
0
ファイル: RunCommandsArguments.cs プロジェクト: nickchal/pash
		internal RunCommandsArguments(ActivityParameters activityParameters, PSDataCollection<PSObject> output, PSDataCollection<PSObject> input, PSActivityContext psActivityContext, PSWorkflowHost workflowHost, bool runInProc, Dictionary<string, object> parameterDefaults, Type activityType, PrepareSessionDelegate prepareSession, object activityObject, ActivityImplementationContext implementationContext)
		{
			this.ActivityParameters = activityParameters;
			this.Output = output;
			this.Input = input;
			this.PSActivityContext = psActivityContext;
			this.ParameterDefaults = parameterDefaults;
			this.ActivityType = activityType;
			this.Delegate = prepareSession;
			this.ActivityObject = activityObject;
			this.WorkflowHost = workflowHost;
			this.ImplementationContext = implementationContext;
			this.CommandExecutionType = RunCommandsArguments.DetermineCommandExecutionType(implementationContext.ConnectionInfo, runInProc, activityType, psActivityContext);
		}
コード例 #5
0
ファイル: PSActivity.cs プロジェクト: nickchal/pash
		private static void UpdatePowerShell(ActivityImplementationContext implementationContext, PSActivityContext psActivityContext, Type ActivityType, PrepareSessionDelegate PrepareSession, object activityObject)
		{
			try
			{
				PrepareSession(implementationContext);
				PowerShell powerShellInstance = implementationContext.PowerShellInstance;
				if (implementationContext.PSError != null)
				{
					powerShellInstance.Streams.Error = implementationContext.PSError;
				}
				if (implementationContext.PSProgress != null)
				{
					powerShellInstance.Streams.Progress = implementationContext.PSProgress;
				}
				if (implementationContext.PSVerbose != null)
				{
					powerShellInstance.Streams.Verbose = implementationContext.PSVerbose;
				}
				if (implementationContext.PSDebug != null)
				{
					powerShellInstance.Streams.Debug = implementationContext.PSDebug;
				}
				if (implementationContext.PSWarning != null)
				{
					powerShellInstance.Streams.Warning = implementationContext.PSWarning;
				}
				PSActivity pSActivity = activityObject as PSActivity;
				if (pSActivity.UpdatePreferenceVariable)
				{
					PSActivity.UpdatePreferenceVariables(implementationContext);
				}
			}
			catch (Exception exception1)
			{
				Exception exception = exception1;
				lock (psActivityContext.exceptions)
				{
					psActivityContext.exceptions.Add(exception);
				}
			}
		}