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
- TrackingStringDictionary.cs
- PageSettings.cs
- XmlSubtreeReader.cs
- AuthorizationContext.cs
- WindowVisualStateTracker.cs
- FeatureSupport.cs
- SynchronizedKeyedCollection.cs
- LinkTarget.cs
- AssemblyCache.cs
- GradientStop.cs
- dataobject.cs
- StrokeNode.cs
- Stack.cs
- WebPartUtil.cs
- SchemaElementLookUpTable.cs
- WorkflowViewManager.cs
- PbrsForward.cs
- XmlSchemaInclude.cs
- HtmlTableCellCollection.cs
- mactripleDES.cs
- TickBar.cs
- VoiceSynthesis.cs
- AspProxy.cs
- WindowsFormsEditorServiceHelper.cs
- ToReply.cs
- Inflater.cs
- AnnotationResourceChangedEventArgs.cs
- ExclusiveCanonicalizationTransform.cs
- SmtpMail.cs
- HierarchicalDataBoundControlAdapter.cs
- OleStrCAMarshaler.cs
- InfoCardSymmetricAlgorithm.cs
- PagerStyle.cs
- RequestResizeEvent.cs
- WindowsToolbarItemAsMenuItem.cs
- DurableDispatcherAddressingFault.cs
- AlternateView.cs
- RectangleHotSpot.cs
- RewritingSimplifier.cs
- FileCodeGroup.cs
- VisualBrush.cs
- WrappedIUnknown.cs
- InternalRelationshipCollection.cs
- HyperLinkColumn.cs
- KeyProperty.cs
- AQNBuilder.cs
- TextModifier.cs
- SqlConnectionFactory.cs
- SecurityState.cs
- BatchParser.cs
- RepeatEnumerable.cs
- PassportPrincipal.cs
- SQLDecimal.cs
- DataGridViewRowHeaderCell.cs
- SqlDuplicator.cs
- ElementUtil.cs
- WebControlAdapter.cs
- TransportConfigurationTypeElement.cs
- connectionpool.cs
- CriticalFinalizerObject.cs
- SoapFault.cs
- XmlQualifiedName.cs
- ReadOnlyHierarchicalDataSourceView.cs
- MethodImplAttribute.cs
- BaseCollection.cs
- TraversalRequest.cs
- XPathNavigatorKeyComparer.cs
- StateItem.cs
- DnsPermission.cs
- MarginsConverter.cs
- DesignerObjectListAdapter.cs
- RadioButtonAutomationPeer.cs
- DtdParser.cs
- Panel.cs
- LabelLiteral.cs
- HtmlInputRadioButton.cs
- QueryReaderSettings.cs
- ErrorEventArgs.cs
- LineSegment.cs
- Image.cs
- PageAsyncTask.cs
- HtmlImage.cs
- StringArrayConverter.cs
- FileLoadException.cs
- PasswordTextContainer.cs
- FileIOPermission.cs
- DropSourceBehavior.cs
- PermissionSet.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- AttributeConverter.cs
- ScriptMethodAttribute.cs
- ByteFacetDescriptionElement.cs
- EventLogSession.cs
- TraceUtility.cs
- HostedElements.cs
- XPathDocumentNavigator.cs
- AdobeCFFWrapper.cs
- HttpStreamXmlDictionaryReader.cs
- ImportCatalogPart.cs
- RelationHandler.cs