Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.WorkflowServices / System / ServiceModel / Activities / Description / WorkflowRuntimeServicesBehavior.cs / 1305376 / WorkflowRuntimeServicesBehavior.cs
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //--------------------------------------------------------------- namespace System.ServiceModel.Activities.Description { using System.Activities.Statements; using System.Collections.ObjectModel; using System.Diagnostics; using System.Globalization; using System.Runtime; using System.ServiceModel.Channels; using System.ServiceModel.Description; using System.ServiceModel.Dispatcher; using System.Runtime.DurableInstancing; using System.Collections.Generic; using System.Threading; using System.ServiceModel.Diagnostics; [Fx.Tag.XamlVisible(false)] class WorkflowRuntimeServicesBehavior : IEndpointBehavior { WorkflowRuntimeServicesExtensionProvider extensionProvider; public WorkflowRuntimeServicesBehavior() { this.extensionProvider = new WorkflowRuntimeServicesExtensionProvider(); } public void AddService(object service) { if (service == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("service"); } this.extensionProvider.AddService(service); } public void RemoveService(object service) { if (service == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("service"); } this.extensionProvider.RemoveService(service); } public object GetService(Type serviceType) { if (serviceType == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("serviceType"); } return this.extensionProvider.GetService(serviceType); } public T GetService() { return this.extensionProvider.GetService (); } public void AddBindingParameters(ServiceEndpoint endpoint, BindingParameterCollection bindingParameters) { } public void ApplyClientBehavior(ServiceEndpoint endpoint, ClientRuntime clientRuntime) { } public void ApplyDispatchBehavior(ServiceEndpoint endpoint, EndpointDispatcher endpointDispatcher) { WorkflowServiceHost serviceHost = endpointDispatcher.ChannelDispatcher.Host as WorkflowServiceHost; if (serviceHost != null) { foreach (OperationDescription operation in endpoint.Contract.Operations) { NetDataContractSerializerOperationBehavior netDataContractSerializerOperationBehavior = NetDataContractSerializerOperationBehavior.ApplyTo(operation); } this.extensionProvider.PopulateExtensions(serviceHost, endpointDispatcher.EndpointAddress.Uri.AbsoluteUri); } } public void Validate(ServiceEndpoint endpoint) { } } } // 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
- EUCJPEncoding.cs
- OutOfProcStateClientManager.cs
- SystemInformation.cs
- DifferencingCollection.cs
- WebPartExportVerb.cs
- ContentPresenter.cs
- RegexNode.cs
- DBDataPermission.cs
- ObjectContext.cs
- Container.cs
- EdmProperty.cs
- ConfigUtil.cs
- Monitor.cs
- XmlAnyAttributeAttribute.cs
- RoleGroupCollection.cs
- Viewport2DVisual3D.cs
- XmlDictionaryReaderQuotas.cs
- ValueConversionAttribute.cs
- GridItemPattern.cs
- RelationshipEndCollection.cs
- _SecureChannel.cs
- TypeConverterAttribute.cs
- ListViewInsertEventArgs.cs
- StringDictionary.cs
- FileRecordSequenceCompletedAsyncResult.cs
- LinearKeyFrames.cs
- StartUpEventArgs.cs
- WeakReference.cs
- DataGridViewCheckBoxCell.cs
- Package.cs
- System.Data_BID.cs
- FigureHelper.cs
- DbProviderConfigurationHandler.cs
- Logging.cs
- CapacityStreamGeometryContext.cs
- ExtenderProvidedPropertyAttribute.cs
- ManagedWndProcTracker.cs
- ToolStripEditorManager.cs
- _TimerThread.cs
- PackagePart.cs
- CodeDirectionExpression.cs
- _NetworkingPerfCounters.cs
- DataGridViewColumnConverter.cs
- CopyEncoder.cs
- LocatorManager.cs
- X509SecurityTokenProvider.cs
- LogicalMethodInfo.cs
- LabelTarget.cs
- EncoderBestFitFallback.cs
- DataGridViewButtonColumn.cs
- PasswordBox.cs
- SessionParameter.cs
- Shape.cs
- wgx_render.cs
- SpStreamWrapper.cs
- SqlConnectionString.cs
- AssociationSetMetadata.cs
- WorkflowOperationErrorHandler.cs
- DynamicExpression.cs
- EntityDataSourceConfigureObjectContext.cs
- ValidatorCollection.cs
- ParallelEnumerableWrapper.cs
- WebUtil.cs
- CompilerInfo.cs
- SHA256.cs
- _NegotiateClient.cs
- _FtpControlStream.cs
- WebResourceUtil.cs
- WarningException.cs
- SchemaHelper.cs
- XsltQilFactory.cs
- TrackBarRenderer.cs
- CallbackValidatorAttribute.cs
- IgnoreFlushAndCloseStream.cs
- WindowVisualStateTracker.cs
- TextElementCollectionHelper.cs
- ApplicationServiceManager.cs
- ActivityBuilderHelper.cs
- Attributes.cs
- IOThreadScheduler.cs
- CfgParser.cs
- AsymmetricAlgorithm.cs
- AmbientLight.cs
- FreezableCollection.cs
- DataSourceCacheDurationConverter.cs
- ItemCollection.cs
- Attributes.cs
- XamlBuildTaskServices.cs
- XmlStreamStore.cs
- GridEntryCollection.cs
- HttpBindingExtension.cs
- MenuStrip.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- SuppressIldasmAttribute.cs
- SubpageParagraph.cs
- Activator.cs
- EntityContainerEmitter.cs
- XmlSchemaExternal.cs
- InternalCache.cs
- CriticalHandle.cs