Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / ServiceModel / Dispatcher / ServiceDurableInstanceContextProvider.cs / 1305376 / ServiceDurableInstanceContextProvider.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Dispatcher { using System; using System.Collections.Generic; using System.Collections.ObjectModel; using System.ServiceModel.Channels; using System.ServiceModel.Persistence; using System.Threading; using System.ServiceModel.Description; using System.ServiceModel.Diagnostics; using System.Diagnostics; using System.Runtime.Diagnostics; class ServiceDurableInstanceContextProvider : DurableInstanceContextProvider { TimeSpan operationTimeout; PersistenceProviderFactory providerFactory; DurableRuntimeValidator runtimeValidator; bool saveStateInOperationTransaction; Type serviceType; UnknownExceptionAction unknownExceptionAction; public ServiceDurableInstanceContextProvider( ServiceHostBase serviceHostBase, bool isPercall, Type serviceType, PersistenceProviderFactory providerFactory, bool saveStateInOperationTransaction, UnknownExceptionAction unknownExceptionAction, DurableRuntimeValidator runtimeValidator, TimeSpan operationTimeout) : base(serviceHostBase, isPercall) { if (serviceType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceType"); } if (providerFactory == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("providerFactory"); } if (runtimeValidator == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("runtimeValidator"); } this.serviceType = serviceType; this.providerFactory = providerFactory; this.saveStateInOperationTransaction = saveStateInOperationTransaction; this.unknownExceptionAction = unknownExceptionAction; this.runtimeValidator = runtimeValidator; this.operationTimeout = operationTimeout; } protected override DurableInstance OnCreateNewInstance(Guid instanceId) { if (DiagnosticUtility.ShouldTraceInformation) { string traceText = SR2.GetString(SR2.InstanceContextProviderCreatedNewInstance, "Service", instanceId); TraceUtility.TraceEvent(TraceEventType.Information, TraceCode.ActivatingMessageReceived, SR.GetString(SR.TraceCodeActivatingMessageReceived), new StringTraceRecord("NewInstanceDetail", traceText), this, null); } return new ServiceDurableInstance( this.providerFactory.CreateProvider(instanceId), this, this.saveStateInOperationTransaction, this.unknownExceptionAction, this.runtimeValidator, this.operationTimeout, this.serviceType); } protected override DurableInstance OnGetExistingInstance(Guid instanceId) { return new ServiceDurableInstance( this.providerFactory.CreateProvider(instanceId), this, this.saveStateInOperationTransaction, this.unknownExceptionAction, this.runtimeValidator, this.operationTimeout); } } } // 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
- DoWorkEventArgs.cs
- StrokeNodeData.cs
- StylusButtonEventArgs.cs
- ButtonBaseAutomationPeer.cs
- storepermission.cs
- WindowsStatusBar.cs
- RequestCachingSection.cs
- DispatcherHooks.cs
- AttachedPropertiesService.cs
- WizardPanelChangingEventArgs.cs
- ColorTranslator.cs
- XmlQueryStaticData.cs
- ObjectParameterCollection.cs
- UserCancellationException.cs
- documentsequencetextview.cs
- TreeNodeConverter.cs
- NameValuePermission.cs
- VScrollBar.cs
- XmlSchemaSequence.cs
- UnsafeNetInfoNativeMethods.cs
- File.cs
- DatatypeImplementation.cs
- DeferredReference.cs
- MobileCategoryAttribute.cs
- SqlMethods.cs
- StreamInfo.cs
- DesignTimeTemplateParser.cs
- GCHandleCookieTable.cs
- CharEnumerator.cs
- ManipulationStartedEventArgs.cs
- XmlWhitespace.cs
- ArglessEventHandlerProxy.cs
- AuthorizationRule.cs
- PerformanceCounterLib.cs
- CallContext.cs
- XmlElementAttribute.cs
- Vector3DIndependentAnimationStorage.cs
- HelpEvent.cs
- ExpandCollapseProviderWrapper.cs
- TemplateLookupAction.cs
- Comparer.cs
- IDispatchConstantAttribute.cs
- PolicyStatement.cs
- BitmapEffectGroup.cs
- CapabilitiesPattern.cs
- FileLevelControlBuilderAttribute.cs
- SamlAudienceRestrictionCondition.cs
- AdobeCFFWrapper.cs
- QueryStringParameter.cs
- FtpWebRequest.cs
- EasingFunctionBase.cs
- XmlSchemaComplexType.cs
- Geometry3D.cs
- InternalDuplexBindingElement.cs
- EmptyReadOnlyDictionaryInternal.cs
- UInt64.cs
- SecurityTokenSerializer.cs
- PropertyGridDesigner.cs
- Form.cs
- ArcSegment.cs
- RangeContentEnumerator.cs
- CodePageEncoding.cs
- KnownIds.cs
- WindowsScroll.cs
- HideDisabledControlAdapter.cs
- NullReferenceException.cs
- RequiredFieldValidator.cs
- TextUtf8RawTextWriter.cs
- HttpCachePolicy.cs
- Operator.cs
- CqlBlock.cs
- BulletChrome.cs
- OrderPreservingSpoolingTask.cs
- EditCommandColumn.cs
- DictionarySurrogate.cs
- PersonalizationDictionary.cs
- WmfPlaceableFileHeader.cs
- EnumBuilder.cs
- OleServicesContext.cs
- GC.cs
- GuidConverter.cs
- RadioButtonAutomationPeer.cs
- CurrentChangingEventManager.cs
- Compiler.cs
- WebPartChrome.cs
- CodeVariableDeclarationStatement.cs
- FormViewPagerRow.cs
- RuntimeCompatibilityAttribute.cs
- ClusterRegistryConfigurationProvider.cs
- MenuItemStyle.cs
- XmlValidatingReader.cs
- mansign.cs
- NoneExcludedImageIndexConverter.cs
- MinimizableAttributeTypeConverter.cs
- ChannelSinkStacks.cs
- ControlCachePolicy.cs
- GridViewAutomationPeer.cs
- StreamResourceInfo.cs
- DLinqAssociationProvider.cs
- WorkflowDefinitionContext.cs