AuthoringOM\ActivitiesCollection.cs (88)
12public sealed class ActivityCollection : List<Activity>, IList<Activity>, IList
14private Activity owner = null;
19public ActivityCollection(Activity owner)
23if (!(owner is Activity))
24throw new ArgumentException(SR.GetString(SR.Error_UnexpectedArgumentType, typeof(Activity).FullName), "owner");
41internal Activity Owner
49internal void InnerAdd(Activity activity)
56void IList<Activity>.RemoveAt(int index)
61Activity item = base[index];
69void IList<Activity>.Insert(int index, Activity item)
82Activity IList<Activity>.this[int index]
93Activity oldItem = base[index];
100int IList<Activity>.IndexOf(Activity item)
108bool ICollection<Activity>.IsReadOnly
116bool ICollection<Activity>.Contains(Activity item)
121bool ICollection<Activity>.Remove(Activity item)
138void ICollection<Activity>.Clear()
140ICollection<Activity> children = base.GetRange(0, base.Count);
147void ICollection<Activity>.Add(Activity item)
158int ICollection<Activity>.Count
165void ICollection<Activity>.CopyTo(Activity[] array, int arrayIndex)
174IEnumerator<Activity> IEnumerable<Activity>.GetEnumerator()
186return ((ICollection<Activity>)this).Count;
190public new void Add(Activity item)
192((IList<Activity>)this).Add(item);
197((IList<Activity>)this).Clear();
200public new void Insert(int index, Activity item)
202((IList<Activity>)this).Insert(index, item);
205public new bool Remove(Activity item)
207return ((IList<Activity>)this).Remove(item);
212((IList<Activity>)this).RemoveAt(index);
215public new Activity this[int index]
219return ((IList<Activity>)this)[index];
223((IList<Activity>)this)[index] = value;
227public Activity this[string key]
238public new int IndexOf(Activity item)
240return ((IList<Activity>)this).IndexOf(item);
243public new bool Contains(Activity item)
245return ((IList<Activity>)this).Contains(item);
248public new IEnumerator<Activity> GetEnumerator()
250return ((IList<Activity>)this).GetEnumerator();
258if (!(value is Activity))
260((IList<Activity>)this).Add((Activity)value);
266((IList<Activity>)this).Clear();
271if (!(value is Activity))
273return (((IList<Activity>)this).Contains((Activity)value));
278if (!(value is Activity))
280return ((IList<Activity>)this).IndexOf((Activity)value);
285if (!(value is Activity))
287((IList<Activity>)this).Insert(index, (Activity)value);
302return ((IList<Activity>)this).IsReadOnly;
308if (!(value is Activity))
310((IList<Activity>)this).Remove((Activity)value);
316return ((IList<Activity>)this)[index];
321if (!(value is Activity))
323((IList<Activity>)this)[index] = (Activity)value;
352return (IEnumerator)((IList<Activity>)this).GetEnumerator();
372private ICollection<Activity> addedItems = null;
373private ICollection<Activity> removedItems = null;
377public ActivityCollectionChangeEventArgs(int index, ICollection<Activity> removedItems, ICollection<Activity> addedItems, object owner, ActivityCollectionChangeAction action)
386public ActivityCollectionChangeEventArgs(int index, Activity removedActivity, Activity addedActivity, object owner, ActivityCollectionChangeAction action)
391this.removedItems = new List<Activity>();
392((List<Activity>)this.removedItems).Add(removedActivity);
396this.addedItems = new List<Activity>();
397((List<Activity>)this.addedItems).Add(addedActivity);
403public IList<Activity> RemovedItems
407return (this.removedItems != null) ? new List<Activity>(this.removedItems).AsReadOnly() : new List<Activity>().AsReadOnly();
411public IList<Activity> AddedItems
415return (this.addedItems != null) ? new List<Activity>(this.addedItems).AsReadOnly() : new List<Activity>().AsReadOnly();
AuthoringOM\Activity.cs (209)
35internal delegate Activity ActivityResolveEventHandler(object sender, ActivityResolveEventArgs e);
129[System.Drawing.ToolboxBitmap(typeof(Activity), "Design.Resources.Activity.png")]
136[ActivityExecutor(typeof(ActivityExecutor<Activity>))]
144private static DependencyProperty NameProperty = DependencyProperty.Register("Name", typeof(string), typeof(Activity), new PropertyMetadata("", DependencyPropertyOptions.Metadata, new ValidationOptionAttribute(ValidationOption.Required)));
145private static DependencyProperty DescriptionProperty = DependencyProperty.Register("Description", typeof(string), typeof(Activity), new PropertyMetadata("", DependencyPropertyOptions.Metadata));
146private static DependencyProperty EnabledProperty = DependencyProperty.Register("Enabled", typeof(bool), typeof(Activity), new PropertyMetadata(true, DependencyPropertyOptions.Metadata));
147private static DependencyProperty QualifiedNameProperty = DependencyProperty.Register("QualifiedName", typeof(string), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.Metadata | DependencyPropertyOptions.ReadOnly));
148private static DependencyProperty DottedPathProperty = DependencyProperty.Register("DottedPath", typeof(string), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.Metadata | DependencyPropertyOptions.ReadOnly));
149internal static readonly DependencyProperty WorkflowXamlMarkupProperty = DependencyProperty.Register("WorkflowXamlMarkup", typeof(string), typeof(Activity));
150internal static readonly DependencyProperty WorkflowRulesMarkupProperty = DependencyProperty.Register("WorkflowRulesMarkup", typeof(string), typeof(Activity));
152internal static readonly DependencyProperty SynchronizationHandlesProperty = DependencyProperty.Register("SynchronizationHandles", typeof(ICollection<String>), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.Metadata));
154internal static readonly DependencyProperty ActivityExecutionContextInfoProperty = DependencyProperty.RegisterAttached("ActivityExecutionContextInfo", typeof(ActivityExecutionContextInfo), typeof(Activity));
155public static readonly DependencyProperty ActivityContextGuidProperty = DependencyProperty.RegisterAttached("ActivityContextGuid", typeof(Guid), typeof(Activity), new PropertyMetadata(Guid.Empty));
156internal static readonly DependencyProperty CompletedExecutionContextsProperty = DependencyProperty.RegisterAttached("CompletedExecutionContexts", typeof(IList), typeof(Activity));
157internal static readonly DependencyProperty ActiveExecutionContextsProperty = DependencyProperty.RegisterAttached("ActiveExecutionContexts", typeof(IList), typeof(Activity));
158internal static readonly DependencyProperty CompletedOrderIdProperty = DependencyProperty.Register("CompletedOrderId", typeof(int), typeof(Activity), new PropertyMetadata(new Int32()));
159private static readonly DependencyProperty SerializedStreamLengthProperty = DependencyProperty.RegisterAttached("SerializedStreamLength", typeof(long), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.NonSerialized));
162internal static readonly DependencyProperty ExecutionStatusProperty = DependencyProperty.RegisterAttached("ExecutionStatus", typeof(ActivityExecutionStatus), typeof(Activity), new PropertyMetadata(ActivityExecutionStatus.Initialized, new Attribute[] { new BrowsableAttribute(false), new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden) }));
163internal static readonly DependencyProperty ExecutionResultProperty = DependencyProperty.RegisterAttached("ExecutionResult", typeof(ActivityExecutionResult), typeof(Activity), new PropertyMetadata(ActivityExecutionResult.None, new Attribute[] { new BrowsableAttribute(false), new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden) }));
164internal static readonly DependencyProperty WasExecutingProperty = DependencyProperty.RegisterAttached("WasExecuting", typeof(bool), typeof(Activity), new PropertyMetadata(false, new Attribute[] { new BrowsableAttribute(false), new DesignerSerializationVisibilityAttribute(DesignerSerializationVisibility.Hidden) }));
167private static readonly DependencyProperty LockCountOnStatusChangeProperty = DependencyProperty.RegisterAttached("LockCountOnStatusChange", typeof(int), typeof(Activity), new PropertyMetadata(new Int32()));
168internal static readonly DependencyProperty HasPrimaryClosedProperty = DependencyProperty.RegisterAttached("HasPrimaryClosed", typeof(bool), typeof(Activity), new PropertyMetadata(false));
171private static readonly DependencyProperty NestedActivitiesProperty = DependencyProperty.RegisterAttached("NestedActivities", typeof(IList<Activity>), typeof(Activity));
174internal static readonly DependencyProperty WorkflowDefinitionProperty = DependencyProperty.RegisterAttached("WorkflowDefinition", typeof(Activity), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.NonSerialized));
177internal static readonly DependencyProperty WorkflowRuntimeProperty = DependencyProperty.RegisterAttached("WorkflowRuntime", typeof(IServiceProvider), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.NonSerialized));
182internal static Activity DefinitionActivity = null;
201internal static readonly DependencyProperty CustomActivityProperty = DependencyProperty.Register("CustomActivity", typeof(bool), typeof(Activity), new PropertyMetadata(DependencyPropertyOptions.Metadata));
557public static readonly DependencyProperty StatusChangedEvent = DependencyProperty.Register("StatusChanged", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
572internal static readonly DependencyProperty LockCountOnStatusChangeChangedEvent = DependencyProperty.Register("LockCountOnStatusChangeChanged", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
573internal static readonly DependencyProperty StatusChangedLockedEvent = DependencyProperty.Register("StatusChangedLocked", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
610FireStatusChangedEvents(Activity.LockCountOnStatusChangeChangedEvent, false);
634public static readonly DependencyProperty CancelingEvent = DependencyProperty.Register("Canceling", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
650public static readonly DependencyProperty FaultingEvent = DependencyProperty.Register("Faulting", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
667public static readonly DependencyProperty ClosedEvent = DependencyProperty.Register("Closed", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
683public static readonly DependencyProperty ExecutingEvent = DependencyProperty.Register("Executing", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
699public static readonly DependencyProperty CompensatingEvent = DependencyProperty.Register("Compensating", typeof(EventHandler<ActivityExecutionStatusChangedEventArgs>), typeof(Activity));
756if (dependencyProp != Activity.ExecutingEvent &&
757dependencyProp != Activity.CancelingEvent &&
758dependencyProp != Activity.ClosedEvent &&
759dependencyProp != Activity.CompensatingEvent &&
760dependencyProp != Activity.FaultingEvent &&
761dependencyProp != Activity.StatusChangedEvent &&
762dependencyProp != Activity.StatusChangedLockedEvent &&
763dependencyProp != Activity.LockCountOnStatusChangeChangedEvent)
785if (dependencyProp != Activity.ExecutingEvent &&
786dependencyProp != Activity.CancelingEvent &&
787dependencyProp != Activity.ClosedEvent &&
788dependencyProp != Activity.CompensatingEvent &&
789dependencyProp != Activity.FaultingEvent &&
790dependencyProp != Activity.StatusChangedEvent &&
791dependencyProp != Activity.StatusChangedLockedEvent &&
792dependencyProp != Activity.LockCountOnStatusChangeChangedEvent)
850public Activity GetActivityByName(string activityQualifiedName)
854public Activity GetActivityByName(string activityQualifiedName, bool withinThisActivityOnly)
862Activity resolvedActivity = null;
877private Activity ResolveActivityByName(string activityQualifiedName, bool withinThisActivityOnly)
879Activity resolvedActivity = null;
882Activity rootActivity = this.RootActivity;
918foreach (Activity childActivity in Helpers.GetNestedActivities(parent))
957internal virtual Activity TraverseDottedPath(string dottedPath)
961internal Activity TraverseDottedPathFromRoot(string dottedPathFromRoot)
990Activity thisActivity = this;
1039public Activity Clone()
1051return Activity.Load(memoryStream, this);
1078foreach (Activity activityRoot in ContextIdToActivityMap.Values)
1080IList<Activity> nestedActivities = activityRoot.CollectNestedActivities();
1082activityRoot.SetValue(Activity.NestedActivitiesProperty, nestedActivities);
1090foreach (Activity activityRoot in ContextIdToActivityMap.Values)
1091activityRoot.RemoveProperty(Activity.NestedActivitiesProperty);
1096public static Activity Load(Stream stream, Activity outerActivity)
1100public static Activity Load(Stream stream, Activity outerActivity, IFormatter formatter)
1110Activity returnActivity = null;
1114Activity oldDefinitionActivity = DefinitionActivity;
1127returnActivity = (Activity)formatter.Deserialize(stream);
1130Queue<Activity> deserializedActivityRootsQueue = new Queue<Activity>();
1134Activity deserializedActivityRoot = deserializedActivityRootsQueue.Dequeue();
1137Activity definitionActivity = DefinitionActivity;
1138Activity parentActivity = outerActivity != null ? outerActivity.parent : null;
1143ActivityExecutionContextInfo contextInfo = (ActivityExecutionContextInfo)deserializedActivityRoot.GetValue(Activity.ActivityExecutionContextInfoProperty);
1147Activity parentContextActivity = (Activity)ContextIdToActivityMap[contextInfo.ParentContextId];
1155IList<Activity> deserializedNestedActivityRoots = (IList<Activity>)deserializedActivityRoot.GetValue(Activity.ActiveExecutionContextsProperty);
1158foreach (Activity deserializedNestedActivityRoot in deserializedNestedActivityRoots)
1165IList<Activity> nestedActivities = (IList<Activity>)deserializedActivityRoot.GetValue(Activity.NestedActivitiesProperty);
1168foreach (Activity nestedActivity in nestedActivities)
1175deserializedActivityRoot.RemoveProperty(Activity.NestedActivitiesProperty);
1180returnActivity.SetValue(Activity.WorkflowDefinitionProperty, DefinitionActivity);
1190private static void FillContextIdToActivityMap(Activity seedActivity)
1192Queue<Activity> activityRootsQueue = new Queue<Activity>();
1196Activity activityRoot = activityRootsQueue.Dequeue();
1200IList<Activity> activeActivityRoots = (IList<Activity>)activityRoot.GetValue(Activity.ActiveExecutionContextsProperty);
1203foreach (Activity activeActivityRoot in activeActivityRoots)
1252internal static Activity OnResolveActivityDefinition(Type type, string workflowMarkup, string rulesMarkup, bool createNew, bool initForRuntime, IServiceProvider serviceProvider)
1263Activity activityDefinition = null;
1276internal static ArrayList OnResolveWorkflowChangeActions(string workflowChangesMarkup, Activity root)
1308return this.GetValue(Activity.ActivityExecutionContextInfoProperty) != null;
1315return ((ActivityExecutionContextInfo)this.ContextActivity.GetValue(Activity.ActivityExecutionContextInfoProperty)).ContextId;
1322return ((ActivityExecutionContextInfo)this.ContextActivity.GetValue(Activity.ActivityExecutionContextInfoProperty)).ContextGuid;
1325internal Activity ContextActivity
1329Activity contextActivity = this;
1330while (contextActivity != null && contextActivity.GetValue(Activity.ActivityExecutionContextInfoProperty) == null)
1335internal Activity ParentContextActivity
1339Activity contextActivity = this.ContextActivity;
1340ActivityExecutionContextInfo executionContextInfo = (ActivityExecutionContextInfo)contextActivity.GetValue(Activity.ActivityExecutionContextInfoProperty);
1346internal Activity RootContextActivity
1353internal Activity RootActivity
1357Activity parent = this;
1428internal virtual void FixUpParentChildRelationship(Activity definitionActivity, Activity parentActivity, Hashtable deserializedActivities)
1434internal virtual IList<Activity> CollectNestedActivities()
1455FireStatusChangedEvents(Activity.StatusChangedEvent, transacted);
1459FireStatusChangedEvents(Activity.ClosedEvent, transacted);
1462FireStatusChangedEvents(Activity.ExecutingEvent, transacted);
1465FireStatusChangedEvents(Activity.CancelingEvent, transacted);
1468FireStatusChangedEvents(Activity.FaultingEvent, transacted);
1471FireStatusChangedEvents(Activity.CompensatingEvent, transacted);
1482this.RemoveProperty(Activity.LockCountOnStatusChangeProperty);
1483this.RemoveProperty(Activity.HasPrimaryClosedProperty);
1484this.RemoveProperty(Activity.WasExecutingProperty);
1540foreach (Activity childActivity in ((CompositeActivity)this).Activities)
1556this.FireStatusChangedEvents(Activity.StatusChangedLockedEvent, false);
1626Activity parent = this.parent;
1647Activity parent = this.parent;
1705Activity contextActivity = this.ContextActivity;
1709IList<ActivityExecutionContextInfo> childsCompletedContexts = contextActivity.GetValue(Activity.CompletedExecutionContextsProperty) as IList<ActivityExecutionContextInfo>;
1728static void UninitializeCompletedContext(Activity activity, ActivityExecutionContext executionContext)
1731IList<ActivityExecutionContextInfo> childsCompletedContexts = activity.GetValue(Activity.CompletedExecutionContextsProperty) as IList<ActivityExecutionContextInfo>;
1751Activity[] compensatableChildren = CompensationUtils.GetCompensatableChildren(compositeActivity);
1755Activity compensatableChild = (Activity)compensatableChildren.GetValue(i);
1770IList<ActivityExecutionContextInfo> childsCompletedContexts = this.GetValue(Activity.CompletedExecutionContextsProperty) as IList<ActivityExecutionContextInfo>;
1781Queue<Activity> completedActivities = new Queue<Activity>();
1785Activity completedChild = completedActivities.Dequeue();
1793foreach (Activity completedChild2 in ((CompositeActivity)completedChild).Activities)
1836int completedOrderId = (int)this.RootActivity.GetValue(Activity.CompletedOrderIdProperty);
1837this.RootActivity.SetValue(Activity.CompletedOrderIdProperty, completedOrderId + 1);
1842int completedOrderId = (int)this.RootActivity.GetValue(Activity.CompletedOrderIdProperty);
1843this.RootActivity.SetValue(Activity.CompletedOrderIdProperty, completedOrderId - 1);
1934public CompositeActivity(IEnumerable<Activity> children)
1940foreach (Activity child in children)
1954protected Activity[] GetDynamicActivities(Activity activity)
1965Activity contextActivity = this.ContextActivity;
1966List<Activity> dynamicActivities = new List<Activity>();
1969IList<Activity> activeContextActivities = (IList<Activity>)contextActivity.GetValue(Activity.ActiveExecutionContextsProperty);
1972foreach (Activity activeContextActivity in activeContextActivities)
1990foreach (Activity childActivity in Helpers.GetAllEnabledActivities(this))
2002foreach (Activity childActivity in Helpers.GetAllEnabledActivities(this))
2021foreach (Activity childActivity in Helpers.GetAllEnabledActivities(this))
2033foreach (Activity childActivity in Helpers.GetAllEnabledActivities(this))
2073protected internal virtual void OnActivityChangeAdd(ActivityExecutionContext executionContext, Activity addedActivity)
2084protected internal virtual void OnActivityChangeRemove(ActivityExecutionContext executionContext, Activity removedActivity)
2127public ReadOnlyCollection<Activity> EnabledActivities
2131List<Activity> executableActivities = new List<Activity>();
2132foreach (Activity activity in this.activities)
2145IList<Activity> ISupportAlternateFlow.AlternateFlowActivities
2149List<Activity> secondaryFlowActivities = new List<Activity>();
2150foreach (Activity activity in this.activities)
2159internal override Activity TraverseDottedPath(string dottedPath)
2174Activity nextActivity = this.activities[index];
2193Activity rootActivity = this.RootActivity;
2198foreach (Activity childActivity in (IList)this.activities)
2231foreach (Activity childActivity in this.activities)
2244foreach (Activity childActivity in this.activities)
2270foreach (Activity childActivity in this.activities)
2275internal override void FixUpParentChildRelationship(Activity definitionActivity, Activity parentActivity, Hashtable deserializedActivities)
2294foreach (Activity definitionChildActivity in definitionCompositeActivity.activities)
2296Activity childActivity = (Activity)deserializedActivities[prefix.Length == 0 ? index.ToString(CultureInfo.InvariantCulture) : prefix + "." + index.ToString(CultureInfo.InvariantCulture)];
2304internal override IList<Activity> CollectNestedActivities()
2306List<Activity> nestedActivities = new List<Activity>();
2307Queue<Activity> activityQueue = new Queue<Activity>(this.activities);
2310Activity nestedActivity = activityQueue.Dequeue();
2314foreach (Activity nestedChildActivity in ((CompositeActivity)nestedActivity).activities)
2332if (this.DesignMode && Activity.ActivityType != null && this.GetType() == Activity.ActivityType)
2344Activity parent = this;
2363foreach (Activity activity in e.AddedItems)
2392foreach (Activity activity in e.RemovedItems)
2400foreach (Activity activity in e.AddedItems)
2403Queue<Activity> queue = new Queue<Activity>(e.AddedItems as IEnumerable<Activity>);
2406Activity activity = queue.Dequeue() as Activity;
2409Activity rootActivity = Helpers.GetRootActivity(activity);
2420foreach (Activity activity2 in ((CompositeActivity)activity).Activities)
2473foreach (Activity activity in this.Activities)
AuthoringOM\ActivityExecutor.cs (13)
14public abstract ActivityExecutionStatus Execute(Activity activity, ActivityExecutionContext executionContext);
15public abstract ActivityExecutionStatus Cancel(Activity activity, ActivityExecutionContext executionContext);
16public abstract ActivityExecutionStatus HandleFault(Activity activity, ActivityExecutionContext executionContext, Exception exception);
17public abstract ActivityExecutionStatus Compensate(Activity activity, ActivityExecutionContext executionContext);
20internal class ActivityExecutor<T> : ActivityExecutor where T : Activity
24public sealed override ActivityExecutionStatus Execute(Activity activity, ActivityExecutionContext executionContext)
28public sealed override ActivityExecutionStatus Cancel(Activity activity, ActivityExecutionContext executionContext)
32public sealed override ActivityExecutionStatus HandleFault(Activity activity, ActivityExecutionContext executionContext, Exception exception)
36public sealed override ActivityExecutionStatus Compensate(Activity activity, ActivityExecutionContext executionContext)
89void ISupportWorkflowChanges.OnActivityAdded(ActivityExecutionContext executionContext, Activity addedActivity)
103void ISupportWorkflowChanges.OnActivityRemoved(ActivityExecutionContext executionContext, Activity removedActivity)
152internal static ActivityExecutor[] GetActivityExecutors(Activity activity)
229public static ActivityExecutor GetActivityExecutor(Activity activity)
AuthoringOM\ActivityExecutorDelegateInfo.cs (36)
25public ActivityExecutorDelegateInfo(EventHandler<T> delegateValue, Activity contextActivity)
29public ActivityExecutorDelegateInfo(IActivityEventListener<T> eventListener, Activity contextActivity)
33public ActivityExecutorDelegateInfo(EventHandler<T> delegateValue, Activity contextActivity, bool wantInTransact)
38public ActivityExecutorDelegateInfo(IActivityEventListener<T> eventListener, Activity contextActivity, bool wantInTransact)
43internal ActivityExecutorDelegateInfo(bool useCurrentContext, EventHandler<T> delegateValue, Activity contextActivity)
46Activity target = delegateValue.Target as Activity;
63internal ActivityExecutorDelegateInfo(bool useCurrentContext, IActivityEventListener<T> eventListener, Activity contextActivity)
66Activity target = eventListener as Activity;
124internal void InvokeDelegate(Activity currentContextActivity, T e, bool sync, bool transacted)
126Activity targetContextActivity = currentContextActivity.WorkflowCoreRuntime.GetContextActivityForId(this.contextId);
136public void InvokeDelegate(Activity currentContextActivity, T e, bool transacted)
139Activity targetContextActivity = FindExecutorForActivityUp(currentContextActivity, this.activityQualifiedName);
146private void InvokeDelegate(Activity currentContextActivity, Activity targetContextActivity, T e, bool sync, bool transacted)
157Activity targetActivity = targetContextActivity.GetActivityByName(this.activityQualifiedName);
168Activity targetActivity = targetContextActivity.GetActivityByName(this.activityQualifiedName);
172private bool MayInvokeDelegateNow(Activity currentContextActivity)
185Activity targetContextActivity = currentContextActivity.WorkflowCoreRuntime.GetContextActivityForId(this.contextId);
191Activity targetActivity = targetContextActivity.GetActivityByName(this.activityQualifiedName, true);
206private Activity FindExecutorForActivityUp(Activity contextActivity, string activityQualifiedName)
210Activity activityToFind = contextActivity.GetActivityByName(activityQualifiedName, true);
217private Activity FindExecutorForActivityDown(Activity contextActivity, string activityQualifiedName)
219Queue<Activity> contextActivities = new Queue<Activity>();
223Activity contextActivity2 = contextActivities.Dequeue();
224Activity activityToFind = contextActivity2.GetActivityByName(activityQualifiedName, true);
228IList<Activity> nestedContextActivities = (IList<Activity>)contextActivity2.GetValue(Activity.ActiveExecutionContextsProperty);
231foreach (Activity nestedContextActivity in nestedContextActivities)
300Activity contextActivity = workflowCoreRuntime.GetContextActivityForId(this.ContextId);
317Activity activity = contextActivity.GetActivityByName(this.activityQualifiedName);
AuthoringOM\ActivityInterfaces.cs (20)
46void OnActivityAdded(ActivityExecutionContext rootContext, Activity addedActivity);
47void OnActivityRemoved(ActivityExecutionContext rootContext, Activity removedActivity);
52IList<Activity> AlternateFlowActivities { get; }
125Activity RootActivity { get; }
126Activity CurrentActivity { get; }
127Activity CurrentAtomicActivity { get; }
128IDisposable SetCurrentActivity(Activity activity);
131void ActivityStatusChanged(Activity activity, bool transacted, bool committed);
132void RaiseException(Exception e, Activity activity, string responsibleActivity);
134void RaiseActivityExecuting(Activity activity);
142void RegisterContextActivity(Activity activity);
143void UnregisterContextActivity(Activity activity);
144Activity LoadContextActivity(ActivityExecutionContextInfo contextInfo, Activity outerContextActivity);
145void SaveContextActivity(Activity contextActivity);
146Activity GetContextActivityForId(int id);
147Object GetService(Activity currentActivity, Type serviceType);
148void PersistInstanceState(Activity activity);
160void CheckpointInstanceState(Activity currentActivity);
161void RequestRevertToCheckpointState(Activity currentActivity, EventHandler<EventArgs> callbackHandler, EventArgs callbackData, bool suspendOnRevert, string suspendReason);
AuthoringOM\Bind.cs (40)
37public abstract object GetRuntimeValue(Activity activity);
38public abstract object GetRuntimeValue(Activity activity, Type targetType);
39public abstract void SetRuntimeValue(Activity activity, object value);
41protected virtual void OnRuntimeInitialized(Activity activity)
377public override object GetRuntimeValue(Activity activity, Type targetType)
382public override object GetRuntimeValue(Activity activity)
387public override void SetRuntimeValue(Activity activity, object value)
393protected override void OnRuntimeInitialized(Activity activity)
437public override object GetRuntimeValue(Activity activity, Type targetType)
442public override object GetRuntimeValue(Activity activity)
447public override void SetRuntimeValue(Activity activity, object value)
468public override object GetRuntimeValue(Activity activity, Type targetType)
473public override object GetRuntimeValue(Activity activity)
478public override void SetRuntimeValue(Activity activity, object value)
507internal void SetContext(Activity activity)
554internal static object GetDataSourceObject(Activity activity, string inputName, out string name)
561Activity contextActivity = Helpers.GetDataSourceActivity(activity, inputName, out name);
625public object GetRuntimeValue(Activity activity, Type targetType)
634public object GetRuntimeValue(Activity activity)
641private object InternalGetRuntimeValue(Activity activity, Type targetType)
644Activity referencedActivity = Helpers.ParseActivityForBind(activity, this.Name);
660Activity rootActivity = Helpers.GetRootActivity(activity);
667public void SetRuntimeValue(Activity activity, object value)
672Activity referencedActivity = Helpers.ParseActivityForBind(activity, this.Name);
697private void OnRuntimeInitialized(Activity activity)
699Activity dataSourceActivity = null;
748Activity activity = UserData[UserDataKeys.BindDataContextActivity] as Activity;
828private static ActivityBind GetContextBind(ActivityBind activityBind, Activity activity, out Activity contextActivity)
841Activity resolvedActivity = Helpers.ParseActivityForBind(contextActivity, contextBind.Name);
888internal static string GetRelativePathExpression(Activity parentActivity, Activity childActivity)
892Activity rootActivity = Helpers.GetRootActivity(childActivity);
911Activity activity = PropertyDescriptorUtils.GetComponent(outerPropertyContext) as Activity;
914Activity targetActivity = Helpers.ParseActivityForBind(activity, Name);
940public bool Contains(Activity activity, ActivityBind bind)
959public void Add(Activity activity, ActivityBind bind)
1022internal static object ResolveActivityPath(Activity refActivity, string path)
AuthoringOM\Compiler\Validation\BindValidator.cs (36)
14internal static Type GetActivityType(IServiceProvider serviceProvider, Activity refActivity)
50Activity activity = manager.Context[typeof(Activity)] as Activity;
52throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
90private ValidationErrorCollection ValidateField(ValidationManager manager, Activity activity, FieldBind bind, BindValidationContext validationContext)
95Activity activityContext = Helpers.GetEnclosingActivity(activity);
96Activity dataSourceActivity = activityContext;
235Activity activity = manager.Context[typeof(Activity)] as Activity;
237throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
270private ValidationErrorCollection ValidateBindProperty(ValidationManager manager, Activity activity, PropertyBind bind, BindValidationContext validationContext)
275Activity activityContext = Helpers.GetEnclosingActivity(activity);
276Activity dataSourceActivity = activityContext;
432Activity activity = manager.Context[typeof(Activity)] as Activity;
434throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
472private ValidationErrorCollection ValidateMethod(ValidationManager manager, Activity activity, MethodBind bind, BindValidationContext validationBindContext)
492Activity activityContext = Helpers.GetEnclosingActivity(activity);
493Activity dataSourceActivity = activityContext;
588Activity activity = manager.Context[typeof(Activity)] as Activity;
590throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
605Activity refActivity = Helpers.ParseActivityForBind(activity, bind.Name);
759Activity activity = manager.Context[typeof(Activity)] as Activity;
761throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
799Activity activity = manager.Context[typeof(Activity)] as Activity;
801throw new InvalidOperationException(SR.GetString(SR.Error_ContextStackItemMissing, typeof(Activity).Name));
803Activity refActivity = Helpers.ParseActivityForBind(activity, bind.Name);
AuthoringOM\Design\CompositeActivityDesigner.cs (52)
147foreach (Activity activity in compositeActivity.Activities)
396foreach (Activity childActivity in compositeActivity.Activities)
423public static void InsertActivities(CompositeActivityDesigner compositeActivityDesigner, HitTestInfo insertLocation, ReadOnlyCollection<Activity> activitiesToInsert, string undoTransactionDescription)
451foreach (Activity activity in activitiesToInsert)
485foreach (Activity activity in activitiesToInsert)
500public static void RemoveActivities(IServiceProvider serviceProvider, ReadOnlyCollection<Activity> activitiesToRemove, string transactionDescription)
508Activity nextSelectableActivity = null;
517foreach (Activity activity in activitiesToRemove)
526parentDesigner.RemoveActivities(new List<Activity>(new Activity[] { activity }).AsReadOnly());
545selectionService.SetSelectedComponents(new Activity[] { nextSelectableActivity }, SelectionTypes.Replace);
549public static IDataObject SerializeActivitiesToDataObject(IServiceProvider serviceProvider, Activity[] activities)
566foreach (Activity activity in activities)
580public static Activity[] DeserializeActivitiesFromDataObject(IServiceProvider serviceProvider, IDataObject dataObj)
585internal static Activity[] DeserializeActivitiesFromDataObject(IServiceProvider serviceProvider, IDataObject dataObj, bool addAssemblyReference)
591return new Activity[] { };
631return (Activity[])new ArrayList(activities).ToArray(typeof(Activity));
633return new Activity[] { };
654internal static Activity[] DeserializeActivitiesFromToolboxItem(IServiceProvider serviceProvider, ToolboxItem toolboxItem, bool addAssemblyReference)
671return (Activity[])new ArrayList(activities).ToArray(typeof(Activity));
673return new Activity[] { };
732public virtual bool CanInsertActivities(HitTestInfo insertLocation, ReadOnlyCollection<Activity> activitiesToInsert)
750foreach (Activity activity in activitiesToInsert)
807public virtual void InsertActivities(HitTestInfo insertLocation, ReadOnlyCollection<Activity> activitiesToInsert)
827foreach (Activity activity in activitiesToInsert)
840foreach (Activity activity in activitiesToInsert)
858public virtual bool CanMoveActivities(HitTestInfo moveLocation, ReadOnlyCollection<Activity> activitiesToMove)
871foreach (Activity activity in activitiesToMove)
886public virtual void MoveActivities(HitTestInfo moveLocation, ReadOnlyCollection<Activity> activitiesToMove)
908foreach (Activity activity in activitiesToMove)
931identifierCreationService.EnsureUniqueIdentifiers(compositeActivity, new Activity[] { activity });
940foreach (Activity nestedActivity in Helpers.GetNestedActivities(compositeActivityMoved))
964foreach (Activity nestedActivity in Helpers.GetNestedActivities(compositeActivityMoved))
970foreach (Activity activity in activitiesToMove)
987public virtual bool CanRemoveActivities(ReadOnlyCollection<Activity> activitiesToRemove)
995foreach (Activity activity in activitiesToRemove)
1009public virtual void RemoveActivities(ReadOnlyCollection<Activity> activitiesToRemove)
1018foreach (Activity activity in activitiesToRemove)
1032foreach (Activity nestedActivity in Helpers.GetNestedActivities(activity as CompositeActivity))
1160protected override void Initialize(Activity activity)
1327foreach (Activity activity in compositeActivity.Activities)
1362CompositeActivityDesigner selectedDesigner = ActivityDesigner.GetDesigner(selectedObject as Activity) as CompositeActivityDesigner;
1395CompositeActivityDesigner selectedDesigner = ActivityDesigner.GetDesigner(selectedObject as Activity) as CompositeActivityDesigner;
1405CompositeActivityDesigner nextSelectedDesigner = ActivityDesigner.GetDesigner(nextSelectedObject as Activity) as CompositeActivityDesigner;
1476ActivityDesigner designer = ActivityDesigner.GetDesigner(e.Component as Activity);
1484Activity changedActivity = (referenceService != null) ? referenceService.GetComponent(e.Component) as Activity : e.Component as Activity;
1517Activity activity = activityDesigner.Activity as Activity;
AuthoringOM\Filters\CompensationHandlingFilter.cs (47)
14public override ActivityExecutionStatus Compensate(Activity activity, ActivityExecutionContext executionContext)
42Activity compensationHandler = GetCompensationHandler(context.Activity);
46compensationHandler.RegisterForStatusChange(Activity.ClosedEvent, this);
71e.Activity.UnregisterForStatusChange(Activity.ClosedEvent, this);
79e.Activity.UnregisterForStatusChange(Activity.ClosedEvent, this);
92internal static Activity GetCompensationHandler(Activity activityWithCompensation)
94Activity compensationHandler = null;
98foreach (Activity activity in ((ISupportAlternateFlow)compositeActivity).AlternateFlowActivities)
116internal static bool TryCompensateLastCompletedChildActivity(ActivityExecutionContext context, Activity targetActivity, IActivityEventListener<ActivityExecutionStatusChangedEventArgs> statusChangeHandler)
132private static bool TryCompensateLastCompletedChildActivity(ActivityExecutionContext context, Activity targetActivity, IActivityEventListener<ActivityExecutionStatusChangedEventArgs> statusChangeHandler, bool isimmediateCompensation)
187lastCompensatableTarget.TargetActivity.RegisterForStatusChange(Activity.StatusChangedEvent, statusChangeHandler);
198revokedExecutionContext.Activity.RegisterForStatusChange(Activity.StatusChangedEvent, statusChangeHandler);
205Activity compensatableChild = GetLastCompensatableChild(revokedExecutionContext.Activity as CompositeActivity);
208compensatableChild.RegisterForStatusChange(Activity.StatusChangedEvent, statusChangeHandler);
221Activity compensatableChild = GetLastCompensatableChild(lastCompensatableTarget.TargetExecutionContext.Activity as CompositeActivity);
224compensatableChild.RegisterForStatusChange(Activity.StatusChangedEvent, statusChangeHandler);
235private static void CompleteRevokedExecutionContext(Activity targetActivity, ActivityExecutionContext context)
257private Activity targetActivity = null;
267internal CompensationInfo(Activity targetActivity)
276internal Activity TargetActivity
299Queue<Activity> completedActivities = new Queue<Activity>(Helpers.GetAllEnabledActivities(compositeActivity));
302Activity completedChild = completedActivities.Dequeue();
311sortedListOfCompensatableTargets.Add((int)completedChild.GetValue(Activity.CompletedOrderIdProperty), new CompensationInfo(completedChild));
314foreach (Activity nestedCompletedActivity in Helpers.GetAllEnabledActivities((CompositeActivity)completedChild))
324private static bool CollectCompensatableActiveContexts(ActivityExecutionContext context, Activity targetActivity, SortedDictionary<int, CompensationInfo> sortedListOfCompensatableTargets, bool immediateCompensation)
340Activity[] activities = GetCompensatableChildren(activeContext.Activity as CompositeActivity);
344foreach (Activity childActivity in activities)
346int completedOrderId = (int)childActivity.GetValue(Activity.CompletedOrderIdProperty);
362private static bool IsActivityInBackWorkBranch(Activity targetParent, Activity childActivity)
365Activity immediateChild = childActivity;
375private static void CollectCompensatableCompletedContexts(ActivityExecutionContext context, Activity targetActivity, SortedDictionary<int, CompensationInfo> sortedListOfCompensatableTargets, bool immediateCompensation)
387Activity completedActivity = targetActivity.GetActivityByName(completedActivityInfo.ActivityQualifiedName, true);
394internal static Activity[] GetCompensatableChildren(CompositeActivity compositeActivity)
396SortedDictionary<int, Activity> sortedListOfCompensatableTargets = new SortedDictionary<int, Activity>();
397Queue<Activity> completedActivities = new Queue<Activity>(Helpers.GetAllEnabledActivities(compositeActivity));
400Activity completedChild = completedActivities.Dequeue();
402sortedListOfCompensatableTargets.Add((int)completedChild.GetValue(Activity.CompletedOrderIdProperty), completedChild);
406foreach (Activity nestedCompletedActivity in Helpers.GetAllEnabledActivities((CompositeActivity)completedChild))
410Activity[] ar = new Activity[sortedListOfCompensatableTargets.Count];
414internal static Activity GetLastCompensatableChild(CompositeActivity compositeActivity)
416Activity[] activities = CompensationUtils.GetCompensatableChildren(compositeActivity);
AuthoringOM\ScheduleChanges.cs (85)
32private Activity originalRootActivity = null;
33private Activity clonedRootActivity = null;
42public WorkflowChanges(Activity rootActivity)
53this.originalRootActivity = (Activity)((Activity)rootActivity).GetValue(Activity.WorkflowDefinitionProperty);
58this.clonedRootActivity = (Activity)CloneRootActivity(originalRootActivity);
61ApplyDynamicUpdateMode((Activity)this.clonedRootActivity);
120object originalConditions = ((Activity)this.originalRootActivity).GetValue(ConditionTypeConverter.DeclarativeConditionDynamicProp);
121object changedConditions = ((Activity)this.clonedRootActivity).GetValue(ConditionTypeConverter.DeclarativeConditionDynamicProp);
131ReleaseDynamicUpdateMode((Activity)this.clonedRootActivity);
134ArrayList workflowChanges = (ArrayList)((Activity)this.clonedRootActivity).GetValue(WorkflowChanges.WorkflowChangeActionsProperty);
138((Activity)this.clonedRootActivity).SetValue(WorkflowChanges.WorkflowChangeActionsProperty, workflowChanges);
142((Activity)this.clonedRootActivity).SetValue(WorkflowChanges.WorkflowChangeVersionProperty, Guid.NewGuid());
149internal void ApplyTo(Activity activity)
166if (!CompareWorkflowDefinition((Activity)this.originalRootActivity, (Activity)activity.RootActivity.GetValue(Activity.WorkflowDefinitionProperty)))
179List<Activity> contextActivities = new List<Activity>();
180Queue<Activity> contextActivitiesQueue = new Queue<Activity>();
184Activity contextActivity = contextActivitiesQueue.Dequeue();
188IList<Activity> nestedContextActivities = (IList<Activity>)contextActivity.GetValue(Activity.ActiveExecutionContextsProperty);
191foreach (Activity nestedContextActivity in nestedContextActivities)
202foreach (Activity contextActivity in contextActivities)
229workflowCoreRuntime.RootActivity.SetValue(Activity.WorkflowDefinitionProperty, this.clonedRootActivity);
232foreach (Activity contextActivity in contextActivities)
248Activity clonedActivity = ((Activity)this.clonedRootActivity).GetActivityByName(contextActivity.QualifiedName);
278foreach (Activity removedActivity in e.RemovedItems)
285private void ApplyDynamicUpdateMode(Activity seedActivity)
287Queue<Activity> queue = new Queue<Activity>();
291Activity activity = queue.Dequeue();
308foreach (Activity activity2 in ((CompositeActivity)activity).Activities)
313private void ReleaseDynamicUpdateMode(Activity seedActivity)
315Queue<Activity> queue = new Queue<Activity>();
319Activity activity = queue.Dequeue() as Activity;
335foreach (Activity activity2 in ((CompositeActivity)activity).Activities)
343ActivityCondition dynamicUpdateCondition = ((Activity)workflowCoreRuntime.RootActivity).GetValue(WorkflowChanges.ConditionProperty) as ActivityCondition;
353private void NotifyChangesCompletedToChildExecutors(IWorkflowCoreRuntime workflowCoreRuntime, Activity contextActivity)
372foreach (Activity activity in compositeActivity.Activities)
381internal static bool IsActivityExecutable(Activity activity)
390private void NotifyChangesToChildExecutors(IWorkflowCoreRuntime workflowCoreRuntime, Activity contextActivity, IList<WorkflowChangeAction> changeActions)
411Activity addedActivity = ownerActivity.Activities[((AddedActivityAction)action).Index];
428removedActivityAction.OriginalRemovedActivity.SetValue(Activity.ExecutionResultProperty, ActivityExecutionResult.Uninitialized);
442private static bool CompareWorkflowDefinition(Activity originalWorkflowDefinition, Activity currentWorkflowDefinition)
458IEnumerator<Activity> clonedActivitiesEnum = clonedCompositeActivity.Activities.GetEnumerator();
459IEnumerator<Activity> originalActivitiesEnum = originalCompositeActivity.Activities.GetEnumerator();
464Activity originalActivity = originalActivitiesEnum.Current;
467Activity clonedActivity = clonedActivitiesEnum.Current;
516private static Activity CloneRootActivity(Activity originalRootActivity)
519string xomlText = originalRootActivity.GetValue(Activity.WorkflowXamlMarkupProperty) as string;
521Activity clonedRootActivity = null;
522IServiceProvider serviceProvider = originalRootActivity.GetValue(Activity.WorkflowRuntimeProperty) as IServiceProvider;
526rulesText = originalRootActivity.GetValue(Activity.WorkflowRulesMarkupProperty) as string;
527clonedRootActivity = Activity.OnResolveActivityDefinition(null, xomlText, rulesText, true, false, serviceProvider);
530clonedRootActivity = Activity.OnResolveActivityDefinition(originalRootActivity.GetType(), null, null, true, false, serviceProvider);
536ArrayList workflowChanges = (ArrayList)((Activity)originalRootActivity).GetValue(WorkflowChanges.WorkflowChangeActionsProperty);
545bool result = action.ApplyTo((Activity)clonedRootActivity);
548((Activity)clonedRootActivity).SetValue(WorkflowChanges.WorkflowChangeActionsProperty, workflowChanges);
554private static ArrayList CloneWorkflowChangeActions(ArrayList workflowChanges, Activity rootActivity)
596internal static TypeProvider CreateTypeProvider(Activity rootActivity)
631protected internal abstract bool ApplyTo(Activity rootActivity);
632protected internal abstract ValidationErrorCollection ValidateChanges(Activity activity);
666protected internal override ValidationErrorCollection ValidateChanges(Activity contextActivity)
692private Activity addedActivity = null;
698public AddedActivityAction(CompositeActivity compositeActivity, Activity activityAdded)
722public Activity AddedActivity
734protected internal override bool ApplyTo(Activity rootActivity)
751Activity clonedAddedActivity = this.addedActivity;
782clonedAddedActivity = xomlSerializer.Deserialize(xomlSerializationManager, xmlReader) as Activity;
808private Activity originalRemovedActivity = null;
813public RemovedActivityAction(int removedActivityIndex, Activity originalActivity, CompositeActivity clonedParentActivity)
838public Activity OriginalRemovedActivity
849protected internal override ValidationErrorCollection ValidateChanges(Activity contextActivity)
852Activity removedActivityInContext = contextActivity.TraverseDottedPathFromRoot(this.originalRemovedActivity.DottedPath);
857protected internal override bool ApplyTo(Activity rootActivity)
Shared\CompModHelpers.cs (77)
113if (!(obj is Activity))
127foreach (Activity activity in activities)
145internal static Activity[] GetTopLevelActivities(ICollection activities)
150List<Activity> filteredActivities = new List<Activity>();
153Activity activity = obj as Activity;
157Activity parentActivity = activity.Parent;
179internal static Activity[] GetNestedActivities(CompositeActivity compositeActivity)
185IList<Activity> childActivities = null;
194foreach (Activity activity in childActivities)
201return (Activity[])nestedActivities.ToArray(typeof(Activity));
212IList<Activity> allChildren = GetAllNestedActivities(compositeActivity);
213foreach (Activity activity in allChildren)
220internal static Activity[] GetAllNestedActivities(CompositeActivity compositeActivity)
240foreach (Activity activity in compositeActivity2.Activities)
247foreach (Activity activity in compositeActivity2.EnabledActivities)
258return (Activity[])nestedActivities.ToArray(typeof(Activity));
278internal static Activity GetRootActivity(Activity activity)
383internal static string GetBaseIdentifier(Activity activity)
416internal static Type GetDataSourceClass(Activity activity, IServiceProvider serviceProvider)
446internal static Activity GetDataSourceActivity(Activity activity, string inputName, out string name)
461Activity contextActivity = Helpers.ParseActivityForBind(activity, scopeID);
677internal static bool IsChildActivity(CompositeActivity parent, Activity activity)
679foreach (Activity containedActivity in parent.Activities)
870internal static CompositeActivity GetDeclaringActivity(Activity activity)
891internal static bool IsActivityLocked(Activity activity)
914internal static Activity GetEnclosingActivity(Activity activity)
916Activity enclosingActivity;
928public static IList<Activity> GetAllEnabledActivities(CompositeActivity compositeActivity)
933List<Activity> allActivities = new List<Activity>(compositeActivity.EnabledActivities);
934foreach (Activity childActivity in compositeActivity.Activities)
942public static bool IsFrameworkActivity(Activity activity)
1070internal static Activity ParseActivity(Activity parsingContext, string activityName)
1088Activity currentActivity = GetActivity(parsingContext, currentAtivityName);
1100Activity nextActivity = GetActivity(currentActivity, names[i]);
1133internal static Activity ParseActivityForBind(Activity context, string activityName)
1146Activity activity = context;
1160Activity activity = null;
1161Activity declaringActivity = Helpers.GetDeclaringActivity(context);
1165Activity currentContextActivity = context;
1166Activity parentContextActivity = context.Parent;
1197Activity newCustomActivity = Activator.CreateInstance(declaringActivity.GetType()) as Activity;
1210Activity targetActivity = null;
1211Activity parentActivity = context;
1242private static Guid GetRuntimeContextGuid(Activity currentActivity)
1244Activity contextActivity = currentActivity;
1245Guid contextGuid = (Guid)contextActivity.GetValue(Activity.ActivityContextGuidProperty);
1249contextGuid = (Guid)contextActivity.GetValue(Activity.ActivityContextGuidProperty);
1255private static bool IsDeclaringActivityMatchesContext(Activity currentActivity, Activity context)
1276internal static bool IsAlternateFlowActivity(Activity activity)
1298private static Activity GetActivity(Activity containerActivity, string id)
1306Activity activity = (Activity)activities.Dequeue();
1314foreach (Activity child in ((CompositeActivity)activity).Activities)
1403internal static Activity ParseActivity(Activity parsingContext, string activityName)
1421Activity currentActivity = null;
1439Activity nextActivity = GetActivity(currentActivity, currentActivity.QualifiedName + "." + names[i]);
1471private static Activity GetActivity(Activity containerActivity, string id)
1479Activity activity = (Activity)activities.Dequeue();
1487foreach (Activity child in ((CompositeActivity)activity).Activities)
1496private static bool IsDeclaringActivityMatchesContext(Activity currentActivity, Activity context)
Shared\XomlSerializationHelpers.cs (15)
67public static Activity LoadXomlDocument(WorkflowMarkupSerializationManager xomlSerializationManager, XmlReader textReader, string fileName)
72Activity rootActivity = null;
77rootActivity = new WorkflowMarkupSerializer().Deserialize(xomlSerializationManager, textReader) as Activity;
87internal static Activity LoadXomlDocument(WorkflowMarkupSerializationManager xomlSerializationManager, XmlReader textReader, string fileName, ITypeAuthorizer typeAuthorizer)
92Activity rootActivity = null;
97rootActivity = new WorkflowMarkupSerializer().Deserialize(xomlSerializationManager, textReader) as Activity;
108internal static void ProcessDefTag(WorkflowMarkupSerializationManager serializationManager, XmlReader reader, Activity activity, bool newSegment, string fileName)
210internal static CodeNamespaceCollection GenerateCodeFromXomlDocument(Activity rootActivity, string filePath, string rootNamespace, SupportedLanguages language, IServiceProvider serviceProvider)
238foreach (Activity activity in Helpers.GetNestedActivities((CompositeActivity)rootActivity))
264foreach (Activity nestedActivity in allActivities)
310Activity activity = (Activity)activitiesQueue.Dequeue();
317Activity childActivity = (Activity)childActivities.Dequeue();
320foreach (Activity nestedChildActivity in ((CompositeActivity)childActivity).Activities)