Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebScriptServiceHost.cs / 1305376 / WebScriptServiceHost.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel { using System.IO; using System.Collections.Generic; using System.ServiceModel.Description; using System.Diagnostics.CodeAnalysis; using System.Configuration; using System.ServiceModel.Web; using System.Net; using System.ServiceModel.Channels; class WebScriptServiceHost : ServiceHost { static readonly string WebScriptEndpointKind = "webScriptEndpoint"; public WebScriptServiceHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses) { } protected override void OnOpening() { WebServiceHost.AddAutomaticWebHttpBindingEndpoints(this, this.ImplementedContracts, SR2.GetString(SR2.JsonWebScriptServiceHostOneServiceContract, this.ImplementedContracts.Count), WebScriptEndpointKind); foreach (ServiceEndpoint endpoint in this.Description.Endpoints) { if (endpoint.Binding != null && endpoint.Binding.CreateBindingElements().Find() != null) { if (endpoint.Behaviors.Find () == null) { ConfigLoader.LoadDefaultEndpointBehaviors(endpoint); if (endpoint.Behaviors.Find () == null) { endpoint.Behaviors.Add(new WebScriptEnablingBehavior()); } } } } base.OnOpening(); } } } // 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
- TabControl.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- DataSourceSelectArguments.cs
- CodeArrayIndexerExpression.cs
- SurrogateEncoder.cs
- GetLedgerRequest.cs
- AffineTransform3D.cs
- BmpBitmapDecoder.cs
- TextContainerHelper.cs
- WinEventHandler.cs
- DynamicPropertyReader.cs
- ReturnEventArgs.cs
- ButtonFieldBase.cs
- Literal.cs
- OnOperation.cs
- SoundPlayerAction.cs
- WebServiceEnumData.cs
- IssuedTokenClientElement.cs
- MemberRelationshipService.cs
- DataGridCell.cs
- Point3DConverter.cs
- BamlLocalizationDictionary.cs
- SmtpException.cs
- NotCondition.cs
- MaskDesignerDialog.cs
- DoWhile.cs
- SerializationInfoEnumerator.cs
- SymLanguageType.cs
- SessionPageStatePersister.cs
- WebMessageEncodingElement.cs
- DBAsyncResult.cs
- XmlUtil.cs
- HtmlElementEventArgs.cs
- NameSpaceExtractor.cs
- PagedControl.cs
- BStrWrapper.cs
- ObjectMaterializedEventArgs.cs
- XmlDocumentViewSchema.cs
- ResourceCategoryAttribute.cs
- LostFocusEventManager.cs
- LocatorPartList.cs
- InstanceHandle.cs
- LineInfo.cs
- httpapplicationstate.cs
- SecondaryViewProvider.cs
- HttpConfigurationSystem.cs
- ImmutableObjectAttribute.cs
- ReflectionUtil.cs
- MarshalByValueComponent.cs
- DataGridTable.cs
- ApplicationServicesHostFactory.cs
- TextTabProperties.cs
- MessageBox.cs
- DataGridViewCellPaintingEventArgs.cs
- DesignColumnCollection.cs
- ISAPIWorkerRequest.cs
- UdpChannelListener.cs
- Visual3D.cs
- ProxyWebPartManager.cs
- AutomationAttributeInfo.cs
- IpcChannelHelper.cs
- DocumentPageTextView.cs
- DynamicQueryableWrapper.cs
- CollectionViewProxy.cs
- SRDisplayNameAttribute.cs
- SaveFileDialog.cs
- ContextStack.cs
- PropertyPath.cs
- PrePrepareMethodAttribute.cs
- SQLGuidStorage.cs
- DisplayNameAttribute.cs
- Timeline.cs
- StringExpressionSet.cs
- MachineKey.cs
- MessageEventSubscriptionService.cs
- OracleEncoding.cs
- FilteredXmlReader.cs
- RightNameExpirationInfoPair.cs
- SessionStateContainer.cs
- WebBrowserDocumentCompletedEventHandler.cs
- CqlBlock.cs
- ContextMarshalException.cs
- XPathScanner.cs
- EtwTrackingBehavior.cs
- HttpCapabilitiesSectionHandler.cs
- WebEventCodes.cs
- DataAdapter.cs
- WebChannelFactory.cs
- ExpressionBuilderCollection.cs
- Int16.cs
- TransformGroup.cs
- HScrollProperties.cs
- NewArrayExpression.cs
- GPRECT.cs
- ItemAutomationPeer.cs
- ClientType.cs
- StringUtil.cs
- PermissionAttributes.cs
- PixelFormatConverter.cs
- JavaScriptString.cs