Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / Workflow / Activities / ReceiveContext.cs / 1305376 / ReceiveContext.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.Workflow.Activities { using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.ServiceModel; using System.Xml; using System.ServiceModel.Dispatcher; [Serializable] internal sealed class ReceiveContext { static string emptyGuid = Guid.Empty.ToString(); Guid contextId = Guid.Empty; bool initialized = false; bool isRootContext = false; string name = null; SerializableReadOnlyDictionaryproperties = null; string workflowId = emptyGuid; public ReceiveContext(string name, Guid workflowId, bool isRootContext) { this.name = name; this.workflowId = workflowId.ToString(); this.isRootContext = isRootContext; } [Browsable(false)] public bool Initialized { get { return this.initialized; } } [Browsable(false)] public string Name { get { return this.name; } } [Browsable(false)] internal SerializableReadOnlyDictionary Properties { get { return this.properties; } } public void EnsureInitialized(Guid contextId) { if (this.contextId != contextId) { this.initialized = false; this.contextId = contextId; } if (this.Initialized) { return; } if (!isRootContext) { this.properties = new SerializableReadOnlyDictionary ( new KeyValuePair (WellKnownContextProperties.InstanceId, workflowId), new KeyValuePair (WellKnownContextProperties.ConversationId, Guid.NewGuid().ToString())); } else { this.properties = new SerializableReadOnlyDictionary ( new KeyValuePair (WellKnownContextProperties.InstanceId, workflowId)); } this.initialized = true; } } } // 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
- XmlDataSourceNodeDescriptor.cs
- DashStyle.cs
- ImageDrawing.cs
- VisualBrush.cs
- ProfileWorkflowElement.cs
- StyleSelector.cs
- ScrollContentPresenter.cs
- RowBinding.cs
- XpsS0ValidatingLoader.cs
- InstanceStoreQueryResult.cs
- Identity.cs
- ActiveXContainer.cs
- LogLogRecord.cs
- ManualResetEventSlim.cs
- GeneralTransform2DTo3DTo2D.cs
- DateTimeFormatInfoScanner.cs
- DefaultBindingPropertyAttribute.cs
- ConnectionProviderAttribute.cs
- DetailsViewPagerRow.cs
- CodeChecksumPragma.cs
- ContextMarshalException.cs
- TextEditorSelection.cs
- SerializationFieldInfo.cs
- StringCollection.cs
- Transactions.cs
- TrackingMemoryStreamFactory.cs
- DataBindEngine.cs
- ArrayList.cs
- LoginUtil.cs
- DynamicDataRouteHandler.cs
- updatecommandorderer.cs
- X509ThumbprintKeyIdentifierClause.cs
- AnnotationDocumentPaginator.cs
- PrinterUnitConvert.cs
- Image.cs
- HtmlControlPersistable.cs
- DrawingContextWalker.cs
- BindingSourceDesigner.cs
- CasesDictionary.cs
- SQLDecimal.cs
- ButtonFlatAdapter.cs
- Ray3DHitTestResult.cs
- ListViewGroup.cs
- DataGridViewLinkColumn.cs
- Journaling.cs
- ProgressBarBrushConverter.cs
- SiteMapNodeItem.cs
- SettingsProviderCollection.cs
- DatagridviewDisplayedBandsData.cs
- Translator.cs
- EntityContainer.cs
- AdRotator.cs
- GraphicsContext.cs
- sqlpipe.cs
- DefaultSerializationProviderAttribute.cs
- BrowserCapabilitiesFactory.cs
- BitmapSource.cs
- DataFieldConverter.cs
- SqlExpressionNullability.cs
- ProxyWebPartConnectionCollection.cs
- ResourceWriter.cs
- ProcessHostConfigUtils.cs
- MessageBox.cs
- Geometry.cs
- _RequestCacheProtocol.cs
- StrokeSerializer.cs
- RegexTree.cs
- SHA384Managed.cs
- CodeArrayIndexerExpression.cs
- InstallHelper.cs
- SqlWriter.cs
- ClockController.cs
- StructuredType.cs
- BitmapVisualManager.cs
- DeviceContext2.cs
- MarkedHighlightComponent.cs
- Control.cs
- DataGridViewIntLinkedList.cs
- DuplicateMessageDetector.cs
- SqlRetyper.cs
- BlobPersonalizationState.cs
- DynamicDiscoSearcher.cs
- listitem.cs
- HierarchicalDataBoundControl.cs
- EncodingFallbackAwareXmlTextWriter.cs
- UITypeEditor.cs
- AuthenticationModuleElementCollection.cs
- Compiler.cs
- WebPartDescriptionCollection.cs
- DataFormats.cs
- DbConnectionFactory.cs
- TrailingSpaceComparer.cs
- ColorKeyFrameCollection.cs
- CalloutQueueItem.cs
- EmptyImpersonationContext.cs
- QilCloneVisitor.cs
- MarkupExtensionParser.cs
- CallContext.cs
- Visitors.cs
- ToggleProviderWrapper.cs