ActivityStatusChangeEventArgs.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Common / AuthoringOM / ActivityStatusChangeEventArgs.cs / 1305376 / ActivityStatusChangeEventArgs.cs

                            namespace System.Workflow.ComponentModel 
{
    using System;
 	using System.Globalization;
	using System.Collections.Generic; 
	using System.Text;
 
	[Serializable] 
 	public sealed class ActivityExecutionStatusChangedEventArgs : EventArgs
	{ 
 		private ActivityExecutionStatus	status = ActivityExecutionStatus.Initialized;
        private ActivityExecutionResult activityExecutionResult = ActivityExecutionResult.None;
 		private string	activityQualifiedName = null;
		private int		stateId = -1; 

 		[NonSerialized] 
		private IWorkflowCoreRuntime workflowCoreRuntime = null; 

		internal ActivityExecutionStatusChangedEventArgs(ActivityExecutionStatus executionStatus, ActivityExecutionResult executionResult, Activity activity) 
		{
 			this.status = executionStatus;
			this.activityExecutionResult = executionResult;
 			this.activityQualifiedName = activity.QualifiedName; 
 			this.stateId = activity.ContextActivity.ContextId;
		} 
 
 		public ActivityExecutionStatus ExecutionStatus
		{ 
			get
			{
 				return this.status;
			} 
 		}
        public ActivityExecutionResult ExecutionResult 
 		{ 
			get
 			{ 
                return this.activityExecutionResult;
			}
		}
		public Activity Activity 
 		{
			get 
 			{ 
 				Activity activity = null;
				if (this.workflowCoreRuntime != null) 
 				{
					Activity contextActivity = this.workflowCoreRuntime.GetContextActivityForId(this.stateId);
					if (contextActivity != null)
						activity = contextActivity.GetActivityByName(this.activityQualifiedName); 
 				}
				return activity; 
 			} 
 		}
 
		//
 		internal IWorkflowCoreRuntime BaseExecutor
		{
			set 
			{
 				this.workflowCoreRuntime = value; 
			} 
 		}
 		public override string ToString() 
		{
 			return "ActivityStatusChange('" + "(" + this.stateId.ToString(CultureInfo.CurrentCulture) + ")" + this.activityQualifiedName + "', " + Activity.ActivityExecutionStatusEnumToString(this.ExecutionStatus) + ", " + Activity.ActivityExecutionResultEnumToString(this.ExecutionResult) + ")";
		}
	} 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
´╗┐namespace System.Workflow.ComponentModel 
{
    using System;
 	using System.Globalization;
	using System.Collections.Generic; 
	using System.Text;
 
	[Serializable] 
 	public sealed class ActivityExecutionStatusChangedEventArgs : EventArgs
	{ 
 		private ActivityExecutionStatus	status = ActivityExecutionStatus.Initialized;
        private ActivityExecutionResult activityExecutionResult = ActivityExecutionResult.None;
 		private string	activityQualifiedName = null;
		private int		stateId = -1; 

 		[NonSerialized] 
		private IWorkflowCoreRuntime workflowCoreRuntime = null; 

		internal ActivityExecutionStatusChangedEventArgs(ActivityExecutionStatus executionStatus, ActivityExecutionResult executionResult, Activity activity) 
		{
 			this.status = executionStatus;
			this.activityExecutionResult = executionResult;
 			this.activityQualifiedName = activity.QualifiedName; 
 			this.stateId = activity.ContextActivity.ContextId;
		} 
 
 		public ActivityExecutionStatus ExecutionStatus
		{ 
			get
			{
 				return this.status;
			} 
 		}
        public ActivityExecutionResult ExecutionResult 
 		{ 
			get
 			{ 
                return this.activityExecutionResult;
			}
		}
		public Activity Activity 
 		{
			get 
 			{ 
 				Activity activity = null;
				if (this.workflowCoreRuntime != null) 
 				{
					Activity contextActivity = this.workflowCoreRuntime.GetContextActivityForId(this.stateId);
					if (contextActivity != null)
						activity = contextActivity.GetActivityByName(this.activityQualifiedName); 
 				}
				return activity; 
 			} 
 		}
 
		//
 		internal IWorkflowCoreRuntime BaseExecutor
		{
			set 
			{
 				this.workflowCoreRuntime = value; 
			} 
 		}
 		public override string ToString() 
		{
 			return "ActivityStatusChange('" + "(" + this.stateId.ToString(CultureInfo.CurrentCulture) + ")" + this.activityQualifiedName + "', " + Activity.ActivityExecutionStatusEnumToString(this.ExecutionStatus) + ", " + Activity.ActivityExecutionResultEnumToString(this.ExecutionResult) + ")";
		}
	} 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.

                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK