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
- webclient.cs
- RequestCachePolicy.cs
- ToolStripDesignerAvailabilityAttribute.cs
- HttpResponse.cs
- LightweightCodeGenerator.cs
- TextRangeAdaptor.cs
- XmlTextReaderImplHelpers.cs
- MatchingStyle.cs
- XPathDocumentNavigator.cs
- RoleGroupCollection.cs
- StringToken.cs
- Variant.cs
- UrlMappingsSection.cs
- TabControl.cs
- BuilderPropertyEntry.cs
- AxisAngleRotation3D.cs
- ConvertTextFrag.cs
- ExpressionPrefixAttribute.cs
- SimpleRecyclingCache.cs
- GridViewCancelEditEventArgs.cs
- PropertyNames.cs
- MemberPath.cs
- AstTree.cs
- SafeNativeMethods.cs
- DataServices.cs
- ISFTagAndGuidCache.cs
- MemoryResponseElement.cs
- PreviewKeyDownEventArgs.cs
- DataException.cs
- ServiceModelSecurityTokenTypes.cs
- ping.cs
- HWStack.cs
- EntityCollectionChangedParams.cs
- HintTextMaxWidthConverter.cs
- ComponentChangingEvent.cs
- DataTableMapping.cs
- TreeNodeConverter.cs
- MenuScrollingVisibilityConverter.cs
- CalendarDay.cs
- GZipDecoder.cs
- DateTimeConstantAttribute.cs
- CustomErrorCollection.cs
- WindowsFormsSynchronizationContext.cs
- NetworkAddressChange.cs
- EmptyStringExpandableObjectConverter.cs
- FileDialogPermission.cs
- DataService.cs
- BulletedListEventArgs.cs
- WorkflowRuntimeService.cs
- BaseTemplateBuildProvider.cs
- AbsoluteQuery.cs
- RequiredFieldValidator.cs
- RemoteEndpointMessageProperty.cs
- _ScatterGatherBuffers.cs
- RtfToken.cs
- ILGenerator.cs
- NavigatorOutput.cs
- BinaryMethodMessage.cs
- SourceSwitch.cs
- DurationConverter.cs
- TraversalRequest.cs
- PersonalizableTypeEntry.cs
- EntityClientCacheEntry.cs
- CSharpCodeProvider.cs
- AssertUtility.cs
- DataControlImageButton.cs
- ErrorEventArgs.cs
- FontResourceCache.cs
- ApplicationActivator.cs
- AnchoredBlock.cs
- DocumentViewerConstants.cs
- DataRecordInternal.cs
- QilCloneVisitor.cs
- RtfFormatStack.cs
- ThousandthOfEmRealPoints.cs
- Transform.cs
- SoapProtocolImporter.cs
- NonClientArea.cs
- VersionPair.cs
- SafeTokenHandle.cs
- IntegerValidatorAttribute.cs
- ReadWriteSpinLock.cs
- ProtocolsConfigurationHandler.cs
- UpdateManifestForBrowserApplication.cs
- X509Certificate2Collection.cs
- WebBrowserEvent.cs
- MailAddressCollection.cs
- SafeCoTaskMem.cs
- AspCompat.cs
- RuntimeHelpers.cs
- WindowsBrush.cs
- MonthCalendarDesigner.cs
- EntityType.cs
- XmlNodeComparer.cs
- Timer.cs
- DesignerActionListCollection.cs
- StrongNamePublicKeyBlob.cs
- ComponentRenameEvent.cs
- wgx_render.cs
- AddInPipelineAttributes.cs