Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.ServiceModel.Activities / System / ServiceModel / Activities / InitializeCorrelation.cs / 1305376 / InitializeCorrelation.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Activities { using System; using System.Activities; using System.Collections.Generic; using System.Runtime.DurableInstancing; using System.ServiceModel.Activities.Dispatcher; using SR2 = System.ServiceModel.Activities.SR; using System.ComponentModel; using System.Windows.Markup; using System.Runtime.Collections; using System.Runtime; [ContentProperty("CorrelationData")] public sealed class InitializeCorrelation : NativeActivity { public InitializeCorrelation() { this.CorrelationData = new OrderedDictionary>(); } [DefaultValue(null)] public InArgument Correlation { get; set; } public IDictionary > CorrelationData { get; private set; } protected override void Execute(NativeActivityContext context) { CorrelationHandle correlationHandle = (this.Correlation == null) ? null : this.Correlation.Get(context); if (correlationHandle == null) { //throw only if ambient correlation handle is also null correlationHandle = context.Properties.Find(CorrelationHandle.StaticExecutionPropertyName) as CorrelationHandle; if (correlationHandle == null) { throw FxTrace.Exception.AsError( new InvalidOperationException(SR2.NullCorrelationHandleInInitializeCorrelation(this.DisplayName))); } } CorrelationExtension extension = context.GetExtension (); if (extension != null) { Dictionary dictionary = new Dictionary (); foreach ( KeyValuePair > pair in this.CorrelationData ) { Fx.Assert(pair.Value != null, "pair.Value should be validated during cache metadata"); dictionary.Add(pair.Key, pair.Value.Get(context)); } correlationHandle.InitializeBookmarkScope(context, extension.GenerateKey(dictionary)); } else { throw FxTrace.Exception.AsError(new InvalidOperationException(SR2.InitializeCorrelationRequiresWorkflowServiceHost(this.DisplayName))); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WriteableBitmap.cs
- OleDbWrapper.cs
- COM2DataTypeToManagedDataTypeConverter.cs
- sortedlist.cs
- EntityStoreSchemaFilterEntry.cs
- InkSerializer.cs
- RunClient.cs
- XPathSelectionIterator.cs
- SqlParameterizer.cs
- SignatureDescription.cs
- InvalidAsynchronousStateException.cs
- EncodingTable.cs
- TabOrder.cs
- GlobalizationSection.cs
- TextLineResult.cs
- KerberosSecurityTokenAuthenticator.cs
- InstanceLockException.cs
- IsolatedStorageFilePermission.cs
- ObjectQueryProvider.cs
- XhtmlBasicPageAdapter.cs
- IntegerFacetDescriptionElement.cs
- HwndStylusInputProvider.cs
- XNodeNavigator.cs
- AdRotator.cs
- safemediahandle.cs
- MSAAWinEventWrap.cs
- ScriptRef.cs
- FormViewUpdatedEventArgs.cs
- Pkcs9Attribute.cs
- lengthconverter.cs
- GenericNameHandler.cs
- SignalGate.cs
- Validator.cs
- StateMachineDesignerPaint.cs
- FormViewModeEventArgs.cs
- WMIInterop.cs
- MailMessage.cs
- Panel.cs
- TemplateBamlTreeBuilder.cs
- FixedSOMTableRow.cs
- HtmlInputControl.cs
- srgsitem.cs
- LeaseManager.cs
- HttpCacheParams.cs
- MenuItemCollection.cs
- CachedTypeface.cs
- RuleInfoComparer.cs
- PropertyDescriptorCollection.cs
- SqlConnectionHelper.cs
- XmlWellformedWriter.cs
- LoginName.cs
- XmlSchemaElement.cs
- DetailsViewInsertedEventArgs.cs
- BitmapMetadataBlob.cs
- DocumentSchemaValidator.cs
- Queue.cs
- SqlUDTStorage.cs
- FormsAuthentication.cs
- RuntimeIdentifierPropertyAttribute.cs
- WebReferencesBuildProvider.cs
- MeshGeometry3D.cs
- NativeActivity.cs
- BufferedGraphicsContext.cs
- HttpCacheVary.cs
- ContainerSelectorBehavior.cs
- TextBoxLine.cs
- WebPartMovingEventArgs.cs
- SQLRoleProvider.cs
- SelfIssuedAuthRSAPKCS1SignatureDeformatter.cs
- DrawingContextWalker.cs
- ComboBoxRenderer.cs
- ParseChildrenAsPropertiesAttribute.cs
- SessionConnectionReader.cs
- MultiTargetingUtil.cs
- MessageQueueConverter.cs
- ImmutableObjectAttribute.cs
- DataGridViewAdvancedBorderStyle.cs
- ControlAdapter.cs
- RolePrincipal.cs
- FontStretchConverter.cs
- TextEffect.cs
- autovalidator.cs
- DataGridViewCellPaintingEventArgs.cs
- NativeWrapper.cs
- OutputCacheEntry.cs
- CompoundFileStreamReference.cs
- StylusPointCollection.cs
- ScriptServiceAttribute.cs
- SafeHandle.cs
- safex509handles.cs
- PathSegment.cs
- InternalMappingException.cs
- EtwTrace.cs
- PropertyGridView.cs
- TraceSwitch.cs
- DataListAutoFormat.cs
- HtmlShim.cs
- TagMapCollection.cs
- KeyValueInternalCollection.cs
- Message.cs