Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / WebScriptServiceHost.cs / 1 / 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 { public WebScriptServiceHost(Type serviceType, params Uri[] baseAddresses) : base(serviceType, baseAddresses) { } protected override void OnOpening() { base.OnOpening(); WebServiceHost.AddAutomaticWebHttpBindingEndpoints(this, this.ImplementedContracts, SR2.GetString(SR2.JsonWebScriptServiceHostOneServiceContract, this.ImplementedContracts.Count)); foreach (ServiceEndpoint endpoint in this.Description.Endpoints) { if (endpoint.Binding != null && endpoint.Binding.CreateBindingElements().Find() != null) { if (endpoint.Behaviors.Find () == null) { endpoint.Behaviors.Add(new WebScriptEnablingBehavior()); } } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DesignerActionItemCollection.cs
- __TransparentProxy.cs
- FatalException.cs
- ValueQuery.cs
- WindowsStreamSecurityBindingElement.cs
- MetadataHelper.cs
- GZipStream.cs
- WebZoneDesigner.cs
- PropertyIDSet.cs
- StylusPlugin.cs
- CompilerWrapper.cs
- CallbackHandler.cs
- StrokeCollection.cs
- StatusBarPanelClickEvent.cs
- SiteMapDataSourceView.cs
- CngProvider.cs
- ValidatorCollection.cs
- QilTypeChecker.cs
- DispatchWrapper.cs
- DynamicDataManager.cs
- DeferredTextReference.cs
- ConstantExpression.cs
- XmlSchemaSimpleContent.cs
- TypeBuilder.cs
- CompilerErrorCollection.cs
- ElementMarkupObject.cs
- TraceListeners.cs
- Trace.cs
- DynamicResourceExtensionConverter.cs
- SizeF.cs
- XmlDataDocument.cs
- HMAC.cs
- HMACSHA1.cs
- NativeActivityAbortContext.cs
- ConfigXmlElement.cs
- WebServiceErrorEvent.cs
- TrimSurroundingWhitespaceAttribute.cs
- HtmlAnchor.cs
- CalendarDateRange.cs
- EncoderNLS.cs
- ChangeConflicts.cs
- ErrorWrapper.cs
- LockRecursionException.cs
- Visual3D.cs
- Roles.cs
- BezierSegment.cs
- XPathChildIterator.cs
- FormsAuthenticationCredentials.cs
- PropertyDescriptor.cs
- TreeView.cs
- StaticSiteMapProvider.cs
- ProjectionCamera.cs
- XmlReader.cs
- BufferedGraphics.cs
- Repeater.cs
- WebCategoryAttribute.cs
- BulletedListEventArgs.cs
- latinshape.cs
- Tokenizer.cs
- Size.cs
- ReaderContextStackData.cs
- TextViewSelectionProcessor.cs
- ping.cs
- ConnectionOrientedTransportBindingElement.cs
- LazyTextWriterCreator.cs
- DBPropSet.cs
- DataServiceQueryOfT.cs
- FilterUserControlBase.cs
- WindowPattern.cs
- OdbcConnectionHandle.cs
- ToolStripDesignerAvailabilityAttribute.cs
- ListContractAdapter.cs
- XpsFilter.cs
- BitmapInitialize.cs
- ModelItemCollection.cs
- TrustManagerMoreInformation.cs
- LateBoundChannelParameterCollection.cs
- SimplePropertyEntry.cs
- ImageMap.cs
- DesignSurfaceManager.cs
- TreeNodeCollectionEditor.cs
- GenericWebPart.cs
- WebHttpBehavior.cs
- ThemeDictionaryExtension.cs
- DbProviderFactory.cs
- TimeIntervalCollection.cs
- SerializationAttributes.cs
- PerformanceCounterManager.cs
- RegisteredScript.cs
- SqlDataSourceFilteringEventArgs.cs
- ContractsBCL.cs
- Unit.cs
- TextDecorationLocationValidation.cs
- BitmapEffect.cs
- ChannelManager.cs
- MethodBuilderInstantiation.cs
- CodeDelegateInvokeExpression.cs
- TrackingRecord.cs
- CompositeKey.cs
- ForceCopyBuildProvider.cs