Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / Activities / Executors / Helpers.cs / 1305376 / Helpers.cs
using System; using System.Diagnostics; using System.Reflection; using System.Collections; using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Xml; using System.Workflow.Activities.Common; namespace System.Workflow.Activities { internal static class ActivityHelpers { internal static void InitializeCorrelationTokenCollection(Activity activity, CorrelationToken correlator) { if (correlator != null && !String.IsNullOrEmpty(correlator.OwnerActivityName)) { string ownerActivityId = correlator.OwnerActivityName; Activity owner = activity.GetActivityByName(ownerActivityId); if (owner == null) owner = System.Workflow.Activities.Common.Helpers.ParseActivityForBind(activity, ownerActivityId); if (owner == null) throw new ArgumentException("ownerActivity"); CorrelationTokenCollection collection = owner.GetValue(CorrelationTokenCollection.CorrelationTokenCollectionProperty) as CorrelationTokenCollection; if (collection == null) { collection = new CorrelationTokenCollection(); owner.SetValue(CorrelationTokenCollection.CorrelationTokenCollectionProperty, collection); } if(!collection.Contains(correlator.Name)) { collection.Add( correlator); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- EventMappingSettings.cs
- StylusButton.cs
- PartialCachingControl.cs
- SqlStream.cs
- DispatcherExceptionFilterEventArgs.cs
- SchemaSetCompiler.cs
- Renderer.cs
- ArglessEventHandlerProxy.cs
- SystemParameters.cs
- PropertyDescriptors.cs
- SafeFreeMibTable.cs
- SettingsProperty.cs
- TracingConnectionInitiator.cs
- RewritingPass.cs
- SessionPageStateSection.cs
- WebControlAdapter.cs
- XmlCustomFormatter.cs
- MultipartContentParser.cs
- XmlSchemaElement.cs
- HostingEnvironmentSection.cs
- AdornerPresentationContext.cs
- ToolZone.cs
- TransportationConfigurationTypeInstallComponent.cs
- WaitForChangedResult.cs
- DataReaderContainer.cs
- MultiByteCodec.cs
- TextServicesContext.cs
- AssemblyAttributesGoHere.cs
- RectConverter.cs
- PlanCompiler.cs
- SettingsBindableAttribute.cs
- FontSizeConverter.cs
- WebPartEditVerb.cs
- ColumnPropertiesGroup.cs
- RuntimeArgumentHandle.cs
- Win32Native.cs
- PlanCompiler.cs
- ToolboxComponentsCreatedEventArgs.cs
- DataGridCellItemAutomationPeer.cs
- SqlProviderUtilities.cs
- ServicesExceptionNotHandledEventArgs.cs
- ListenerAdaptersInstallComponent.cs
- TailPinnedEventArgs.cs
- MergablePropertyAttribute.cs
- PersistenceProvider.cs
- SetIndexBinder.cs
- UrlPropertyAttribute.cs
- TreeIterators.cs
- Viewport2DVisual3D.cs
- TextServicesHost.cs
- UInt64Converter.cs
- OdbcConnectionFactory.cs
- SelectionProviderWrapper.cs
- ReadOnlyKeyedCollection.cs
- SerializationAttributes.cs
- Rijndael.cs
- XmlLoader.cs
- CryptoApi.cs
- DataControlPagerLinkButton.cs
- DataTemplate.cs
- QueueProcessor.cs
- NumericUpDownAccelerationCollection.cs
- PrinterSettings.cs
- Freezable.cs
- TablePatternIdentifiers.cs
- ItemChangedEventArgs.cs
- ScrollProperties.cs
- TypefaceMetricsCache.cs
- MenuItemStyleCollection.cs
- TypeDescriptionProviderAttribute.cs
- CultureData.cs
- sqlinternaltransaction.cs
- PartEditor.cs
- WebPartTransformerCollection.cs
- AudioLevelUpdatedEventArgs.cs
- MimeMapping.cs
- TextRunCacheImp.cs
- ReferenceEqualityComparer.cs
- webproxy.cs
- DeclaredTypeElementCollection.cs
- XPathDocumentIterator.cs
- EntryWrittenEventArgs.cs
- XhtmlTextWriter.cs
- GeneratedCodeAttribute.cs
- DynamicContractTypeBuilder.cs
- InkCanvas.cs
- DataGridViewCellMouseEventArgs.cs
- ServerIdentity.cs
- WhitespaceRuleLookup.cs
- CodeCommentStatementCollection.cs
- XPathNavigator.cs
- HasCopySemanticsAttribute.cs
- ConfigurationFileMap.cs
- SkinBuilder.cs
- EventLevel.cs
- MetadataPropertyvalue.cs
- OleDbParameterCollection.cs
- NameObjectCollectionBase.cs
- XmlDeclaration.cs
- Int32Converter.cs