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;
SerializableReadOnlyDictionary properties = 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
- EdmSchemaAttribute.cs
- ControlTemplate.cs
- LogPolicy.cs
- SessionStateSection.cs
- PresentationSource.cs
- GlobalizationAssembly.cs
- PathFigure.cs
- CloseCollectionAsyncResult.cs
- WaitHandleCannotBeOpenedException.cs
- NeutralResourcesLanguageAttribute.cs
- RegexInterpreter.cs
- GraphicsPath.cs
- BitmapEffectrendercontext.cs
- COMException.cs
- ThemeDictionaryExtension.cs
- ListBindingHelper.cs
- GridViewDeleteEventArgs.cs
- Helpers.cs
- FontWeight.cs
- ReverseInheritProperty.cs
- remotingproxy.cs
- Debugger.cs
- SafeArchiveContext.cs
- ConfigurationPropertyCollection.cs
- FileLoadException.cs
- TextOptionsInternal.cs
- WebBrowserContainer.cs
- GeometryCombineModeValidation.cs
- ItemTypeToolStripMenuItem.cs
- LinearKeyFrames.cs
- FaultConverter.cs
- ListBoxItemAutomationPeer.cs
- StatusBar.cs
- PackageStore.cs
- XslAstAnalyzer.cs
- DeleteMemberBinder.cs
- TableLayoutStyleCollection.cs
- DataSpaceManager.cs
- TypeSystemHelpers.cs
- TextDecorationCollectionConverter.cs
- Collection.cs
- DeclarativeCatalogPart.cs
- ToolStripPanelRow.cs
- AudioFormatConverter.cs
- GeneralTransform3DGroup.cs
- PointLight.cs
- UpWmlMobileTextWriter.cs
- FileChangesMonitor.cs
- TokenBasedSet.cs
- WhitespaceRuleReader.cs
- handlecollector.cs
- SEHException.cs
- TraceSection.cs
- CqlErrorHelper.cs
- Variant.cs
- StringArrayConverter.cs
- Tile.cs
- SharedPerformanceCounter.cs
- EntityCommandDefinition.cs
- FixedHighlight.cs
- BindingFormattingDialog.cs
- XmlBoundElement.cs
- RegexInterpreter.cs
- DataSourceControl.cs
- XamlToRtfWriter.cs
- RectKeyFrameCollection.cs
- AssociationType.cs
- ImageList.cs
- DbParameterCollection.cs
- PeerNameRecord.cs
- NetStream.cs
- RbTree.cs
- TextSyndicationContentKindHelper.cs
- SafeFileHandle.cs
- HwndMouseInputProvider.cs
- ApplyImportsAction.cs
- HealthMonitoringSectionHelper.cs
- ByteStream.cs
- ClosableStream.cs
- Int16Converter.cs
- MessageSmuggler.cs
- TransformerInfo.cs
- ScrollBar.cs
- AuthorizationSection.cs
- CrossAppDomainChannel.cs
- TypeConverterAttribute.cs
- Tuple.cs
- TabletDeviceInfo.cs
- Selector.cs
- InputMethodStateTypeInfo.cs
- TrustSection.cs
- MetadataItem.cs
- BitHelper.cs
- PageRanges.cs
- WithStatement.cs
- RouteCollection.cs
- TcpPortSharing.cs
- ObjectViewListener.cs
- CodeTypeDeclaration.cs
- ProtocolsSection.cs