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
- ErrorFormatter.cs
- DockPatternIdentifiers.cs
- UnhandledExceptionEventArgs.cs
- WindowsFormsSectionHandler.cs
- PageCatalogPart.cs
- NullableConverter.cs
- CodeDirectiveCollection.cs
- ToolStripRendererSwitcher.cs
- FileUpload.cs
- StyleModeStack.cs
- State.cs
- StdValidatorsAndConverters.cs
- SqlDependencyUtils.cs
- GroupBoxRenderer.cs
- StorageAssociationSetMapping.cs
- ReadOnlyHierarchicalDataSource.cs
- SqlDataReader.cs
- TemplateManager.cs
- OdbcRowUpdatingEvent.cs
- CancelEventArgs.cs
- RegexMatchCollection.cs
- EnumerableRowCollection.cs
- SqlStream.cs
- BufferedReadStream.cs
- FixedBufferAttribute.cs
- ExecutionTracker.cs
- DefaultAutoFieldGenerator.cs
- TdsParser.cs
- SafeLibraryHandle.cs
- InternalCache.cs
- GenericAuthenticationEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- FragmentQueryProcessor.cs
- DataGridViewMethods.cs
- GridPatternIdentifiers.cs
- ProcessInfo.cs
- AddInAttribute.cs
- externdll.cs
- AuthorizationPolicyTypeElement.cs
- ModuleBuilderData.cs
- Parallel.cs
- FacetValues.cs
- PropertyFilterAttribute.cs
- BigInt.cs
- InvalidateEvent.cs
- ItemCheckEvent.cs
- GridSplitterAutomationPeer.cs
- TextRange.cs
- TextBreakpoint.cs
- OpenTypeLayoutCache.cs
- AlphaSortedEnumConverter.cs
- PrivacyNoticeBindingElement.cs
- UntrustedRecipientException.cs
- TypeDescriptor.cs
- AccessorTable.cs
- UserControlParser.cs
- ListBindingHelper.cs
- ChooseAction.cs
- Size3D.cs
- TypeUnloadedException.cs
- EmulateRecognizeCompletedEventArgs.cs
- MissingMemberException.cs
- ScopelessEnumAttribute.cs
- FileIOPermission.cs
- PasswordRecovery.cs
- CodeDirectiveCollection.cs
- Configuration.cs
- IPPacketInformation.cs
- GroupQuery.cs
- KeyMatchBuilder.cs
- GeometryCombineModeValidation.cs
- PrintPreviewGraphics.cs
- AutoCompleteStringCollection.cs
- RegionInfo.cs
- InputReport.cs
- CommonRemoteMemoryBlock.cs
- Converter.cs
- ApplicationServicesHostFactory.cs
- OleDbPropertySetGuid.cs
- RenamedEventArgs.cs
- DataGridViewRow.cs
- ProcessHostServerConfig.cs
- FamilyTypefaceCollection.cs
- AdvancedBindingPropertyDescriptor.cs
- OleAutBinder.cs
- MDIControlStrip.cs
- ManagementQuery.cs
- IDictionary.cs
- InvalidOleVariantTypeException.cs
- SessionStateContainer.cs
- IndentTextWriter.cs
- ScrollChrome.cs
- ZipPackagePart.cs
- BindingList.cs
- Operand.cs
- SiteMapProvider.cs
- ModelTypeConverter.cs
- CodeParameterDeclarationExpressionCollection.cs
- ArrayConverter.cs
- CombinedGeometry.cs