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
- ClientTargetCollection.cs
- _Rfc2616CacheValidators.cs
- CancelRequestedQuery.cs
- IndexedSelectQueryOperator.cs
- _UncName.cs
- DiscardableAttribute.cs
- ToolStripItemTextRenderEventArgs.cs
- webbrowsersite.cs
- CancellationToken.cs
- regiisutil.cs
- AnimatedTypeHelpers.cs
- PerfCounterSection.cs
- OptionalColumn.cs
- SvcMapFile.cs
- XmlReflectionImporter.cs
- WindowsListViewItem.cs
- MsmqBindingElementBase.cs
- CodeMemberEvent.cs
- OperationAbortedException.cs
- ISessionStateStore.cs
- RawUIStateInputReport.cs
- ListItem.cs
- XPathParser.cs
- GlyphElement.cs
- MsmqProcessProtocolHandler.cs
- InvalidCommandTreeException.cs
- IdentifierCollection.cs
- ScrollChrome.cs
- EditorPart.cs
- CancellationHandler.cs
- DrawListViewItemEventArgs.cs
- MemberDescriptor.cs
- XmlNodeList.cs
- TableLayoutPanelResizeGlyph.cs
- basecomparevalidator.cs
- CodeBlockBuilder.cs
- HtmlElementCollection.cs
- NodeInfo.cs
- WebPartHeaderCloseVerb.cs
- EpmSourceTree.cs
- XmlHierarchyData.cs
- DefaultAutoFieldGenerator.cs
- ExtendedPropertyCollection.cs
- ProcessingInstructionAction.cs
- CustomAssemblyResolver.cs
- ObjectQueryProvider.cs
- Calendar.cs
- CodeTypeDeclaration.cs
- FontFamily.cs
- Rfc2898DeriveBytes.cs
- WizardForm.cs
- DataGridAddNewRow.cs
- QilTargetType.cs
- ReverseQueryOperator.cs
- InternalPermissions.cs
- DocumentApplicationJournalEntry.cs
- Content.cs
- WindowsContainer.cs
- Parallel.cs
- XhtmlTextWriter.cs
- VirtualizingStackPanel.cs
- Base64WriteStateInfo.cs
- ColorConvertedBitmap.cs
- WindowsStreamSecurityBindingElement.cs
- IssuedTokenParametersElement.cs
- XamlFigureLengthSerializer.cs
- Stack.cs
- SkipStoryboardToFill.cs
- WeakReferenceKey.cs
- IisTraceListener.cs
- invalidudtexception.cs
- DocumentOrderComparer.cs
- DurationConverter.cs
- InputLangChangeEvent.cs
- HierarchicalDataBoundControlAdapter.cs
- PiiTraceSource.cs
- DynamicMethod.cs
- WebPartUtil.cs
- DataGridViewCellValidatingEventArgs.cs
- BaseInfoTable.cs
- FontStyle.cs
- DataGridViewComboBoxCell.cs
- FlowThrottle.cs
- UpnEndpointIdentityExtension.cs
- DBSchemaTable.cs
- SyndicationPerson.cs
- TypeRefElement.cs
- UriExt.cs
- InstanceNotReadyException.cs
- ThreadExceptionEvent.cs
- BufferBuilder.cs
- AppModelKnownContentFactory.cs
- UITypeEditors.cs
- ConfigurationLoader.cs
- KeyManager.cs
- ConfigurationManager.cs
- UnsafeNativeMethods.cs
- ProfileEventArgs.cs
- CollaborationHelperFunctions.cs
- AccessKeyManager.cs