Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / ServiceModel / Description / WorkflowOperationBehavior.cs / 1305376 / WorkflowOperationBehavior.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Description { using System.ServiceModel.Dispatcher; using System.ServiceModel.Channels; using System.ServiceModel.Administration; class WorkflowOperationBehavior : IOperationBehavior, IWmiInstanceProvider { bool canCreateInstance = true; ServiceAuthorizationManager serviceAuthorizationManager; public bool CanCreateInstance { get { return this.canCreateInstance; } set { this.canCreateInstance = value; } } public ServiceAuthorizationManager ServiceAuthorizationManager { get { return this.serviceAuthorizationManager; } set { this.serviceAuthorizationManager = value; } } public void AddBindingParameters(OperationDescription description, BindingParameterCollection parameters) { } public void ApplyClientBehavior(OperationDescription description, ClientOperation proxy) { } public void ApplyDispatchBehavior(OperationDescription description, DispatchOperation dispatch) { if (description == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("description"); } if (dispatch == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("dispatch"); } if (dispatch.Parent == null || dispatch.Parent.ChannelDispatcher == null || dispatch.Parent.ChannelDispatcher.Host == null || dispatch.Parent.ChannelDispatcher.Host.Description == null || dispatch.Parent.ChannelDispatcher.Host.Description.Behaviors == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.DispatchOperationInInvalidState))); } WorkflowRuntimeBehavior workflowRuntimeBehavior = dispatch.Parent.ChannelDispatcher.Host.Description.Behaviors.Find(); if (workflowRuntimeBehavior == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidOperationException(SR2.GetString(SR2.NoWorkflowRuntimeBehavior))); } dispatch.Invoker = new WorkflowOperationInvoker(description, this, workflowRuntimeBehavior.WorkflowRuntime, dispatch.Parent); } void IWmiInstanceProvider.FillInstance(IWmiInstance wmiInstance) { wmiInstance.SetProperty("CanCreateInstance", this.CanCreateInstance); } string IWmiInstanceProvider.GetInstanceType() { return "WorkflowOperationBehavior"; } public void Validate(OperationDescription description) { } } } // 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
- EntitySqlQueryCacheEntry.cs
- EditorPart.cs
- DoubleLinkList.cs
- CustomTypeDescriptor.cs
- AppModelKnownContentFactory.cs
- CodeSubDirectoriesCollection.cs
- OrderedEnumerableRowCollection.cs
- ScriptingRoleServiceSection.cs
- GraphicsContainer.cs
- Application.cs
- TextContainerChangedEventArgs.cs
- StringFreezingAttribute.cs
- ExtensibleClassFactory.cs
- ImageCodecInfo.cs
- DataGridViewImageCell.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ThicknessAnimationUsingKeyFrames.cs
- HtmlInputPassword.cs
- CodeVariableReferenceExpression.cs
- ServiceModelActivationSectionGroup.cs
- DataServicePagingProviderWrapper.cs
- XslCompiledTransform.cs
- GridItemPattern.cs
- RawStylusInput.cs
- Polyline.cs
- RequiredFieldValidator.cs
- ButtonChrome.cs
- MemberRelationshipService.cs
- XmlWriter.cs
- FontStyle.cs
- MetadataItemCollectionFactory.cs
- XmlSerializer.cs
- FormViewCommandEventArgs.cs
- IntPtr.cs
- PageSetupDialog.cs
- SvcMapFileSerializer.cs
- XmlSchemaException.cs
- TextComposition.cs
- WebPartConnectionsConfigureVerb.cs
- Encoding.cs
- ScaleTransform.cs
- RegexReplacement.cs
- Unit.cs
- MultiDataTrigger.cs
- xmlglyphRunInfo.cs
- Single.cs
- NavigatingCancelEventArgs.cs
- ValidationException.cs
- GridViewCommandEventArgs.cs
- PrePrepareMethodAttribute.cs
- Accessible.cs
- DomainUpDown.cs
- ListViewDeleteEventArgs.cs
- ComponentResourceKey.cs
- AttachmentService.cs
- ExtendedPropertiesHandler.cs
- Codec.cs
- TextElementCollection.cs
- SQLDateTimeStorage.cs
- ImageCodecInfo.cs
- ContentFilePart.cs
- MutexSecurity.cs
- HealthMonitoringSection.cs
- MimeObjectFactory.cs
- sqlnorm.cs
- Double.cs
- PkcsUtils.cs
- ObjectDataSource.cs
- _HTTPDateParse.cs
- MediaPlayer.cs
- DBSchemaRow.cs
- SyncMethodInvoker.cs
- CompressionTracing.cs
- WindowVisualStateTracker.cs
- PointCollectionValueSerializer.cs
- ListItemCollection.cs
- ProvidePropertyAttribute.cs
- localization.cs
- ConfigUtil.cs
- DataSpaceManager.cs
- StylusCaptureWithinProperty.cs
- FontDriver.cs
- DateTimeStorage.cs
- CodeDomConfigurationHandler.cs
- GPRECT.cs
- StringUtil.cs
- ProcessModule.cs
- GeometryConverter.cs
- StorageInfo.cs
- BadImageFormatException.cs
- InvalidContentTypeException.cs
- Convert.cs
- TypeSemantics.cs
- Table.cs
- Stackframe.cs
- GlyphsSerializer.cs
- LabelEditEvent.cs
- IndexedEnumerable.cs
- Console.cs
- XmlILTrace.cs