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
- ModelItemCollection.cs
- ButtonChrome.cs
- ToolBar.cs
- EntityDataSourceSelectingEventArgs.cs
- MostlySingletonList.cs
- _ContextAwareResult.cs
- DesigntimeLicenseContext.cs
- ExtendedProtectionPolicyTypeConverter.cs
- Rule.cs
- AncestorChangedEventArgs.cs
- FileUtil.cs
- SHA256Managed.cs
- WSHttpTransportSecurityElement.cs
- DataComponentNameHandler.cs
- TreeNodeCollectionEditor.cs
- MetadataArtifactLoader.cs
- DataServiceClientException.cs
- PriorityBinding.cs
- Math.cs
- AncestorChangedEventArgs.cs
- FontTypeConverter.cs
- DefaultTraceListener.cs
- InvalidDocumentContentsException.cs
- StreamGeometryContext.cs
- IntSecurity.cs
- HMACSHA1.cs
- StringSource.cs
- AppDomainUnloadedException.cs
- sqlser.cs
- DirtyTextRange.cs
- EarlyBoundInfo.cs
- GPPOINTF.cs
- DataReaderContainer.cs
- ConnectionStringSettingsCollection.cs
- MultiTargetingUtil.cs
- UnescapedXmlDiagnosticData.cs
- FrameworkContextData.cs
- UniformGrid.cs
- RadialGradientBrush.cs
- _NegotiateClient.cs
- DBSqlParser.cs
- RelationalExpressions.cs
- PageRanges.cs
- XmlSchemaExternal.cs
- XmlCDATASection.cs
- CustomCredentialPolicy.cs
- DateTimeParse.cs
- SafeNativeMethodsOther.cs
- SQLBytesStorage.cs
- NullableLongMinMaxAggregationOperator.cs
- ReflectionServiceProvider.cs
- FormViewRow.cs
- Gdiplus.cs
- OneToOneMappingSerializer.cs
- RuntimeConfigLKG.cs
- ObjectStorage.cs
- Sorting.cs
- DataExpression.cs
- AddInStore.cs
- Schema.cs
- BindingExpressionUncommonField.cs
- DataGridRowHeader.cs
- SqlClientWrapperSmiStream.cs
- OutputCacheModule.cs
- HtmlTableCellCollection.cs
- HttpCacheVaryByContentEncodings.cs
- SessionEndingCancelEventArgs.cs
- DocumentOrderQuery.cs
- ValidationSummary.cs
- InternalConfigEventArgs.cs
- ConfigurationManagerInternalFactory.cs
- XmlTextReader.cs
- WeakHashtable.cs
- ExchangeUtilities.cs
- ToggleButton.cs
- SqlDataSourceView.cs
- DependencyPropertyValueSerializer.cs
- PageThemeBuildProvider.cs
- DbDataReader.cs
- OleDbConnection.cs
- WebControl.cs
- DefaultProxySection.cs
- followingsibling.cs
- ClientScriptManager.cs
- ServiceDefaults.cs
- HttpHandlersSection.cs
- BitFlagsGenerator.cs
- SchemaElement.cs
- Form.cs
- BinaryParser.cs
- PersonalizationStateInfoCollection.cs
- PhoneCall.cs
- CreateParams.cs
- ResourceSet.cs
- ComplexType.cs
- DateTimeValueSerializerContext.cs
- TextViewDesigner.cs
- Int64Animation.cs
- SurrogateEncoder.cs
- ListViewItemSelectionChangedEvent.cs