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
- ToolStripAdornerWindowService.cs
- WindowsFormsHostPropertyMap.cs
- AutomationPatternInfo.cs
- Fx.cs
- ExpressionBindings.cs
- MessageFault.cs
- XmlNodeReader.cs
- DocumentsTrace.cs
- ButtonBase.cs
- pingexception.cs
- SafeUserTokenHandle.cs
- MenuCommandService.cs
- TargetControlTypeAttribute.cs
- DecoderFallbackWithFailureFlag.cs
- UnmanagedMarshal.cs
- NotifyIcon.cs
- DesignerSerializationOptionsAttribute.cs
- DbSourceCommand.cs
- XPathDocumentIterator.cs
- MessageBox.cs
- ipaddressinformationcollection.cs
- DataControlPagerLinkButton.cs
- RightsManagementPermission.cs
- AuthorizationRule.cs
- XmlnsPrefixAttribute.cs
- XmlSerializer.cs
- RangeValuePattern.cs
- BaseDataBoundControl.cs
- Expression.cs
- XmlStreamNodeWriter.cs
- ServiceOperationHelpers.cs
- FileSystemEventArgs.cs
- TypedTableGenerator.cs
- Image.cs
- PasswordBoxAutomationPeer.cs
- TypeSemantics.cs
- ResourceContainer.cs
- LineMetrics.cs
- SvcMapFile.cs
- CanonicalFontFamilyReference.cs
- Wildcard.cs
- WebPartDeleteVerb.cs
- EventSchemaTraceListener.cs
- Missing.cs
- LeafCellTreeNode.cs
- sqlnorm.cs
- CmsInterop.cs
- RewritingPass.cs
- RecognitionResult.cs
- _Win32.cs
- TextLine.cs
- DynamicDataManager.cs
- TextBoxDesigner.cs
- Char.cs
- Debugger.cs
- ManipulationPivot.cs
- WorkflowNamespace.cs
- PathSegment.cs
- ByteKeyFrameCollection.cs
- ConversionValidationRule.cs
- InternalMappingException.cs
- SortAction.cs
- AssemblyInfo.cs
- DbMetaDataColumnNames.cs
- ClientScriptManagerWrapper.cs
- SimpleExpression.cs
- EntityClientCacheEntry.cs
- ZipIOExtraField.cs
- ConfigurationPropertyAttribute.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- DateTimeConstantAttribute.cs
- MenuEventArgs.cs
- UTF8Encoding.cs
- RouteItem.cs
- XmlParserContext.cs
- DataGridViewLayoutData.cs
- MediaPlayerState.cs
- XmlSchemaExporter.cs
- TextEndOfLine.cs
- RegistrationServices.cs
- WindowsListView.cs
- Converter.cs
- fixedPageContentExtractor.cs
- StructureChangedEventArgs.cs
- FontResourceCache.cs
- StringHelper.cs
- PageContent.cs
- ObjectCloneHelper.cs
- XmlRootAttribute.cs
- SAPIEngineTypes.cs
- RawStylusActions.cs
- Parser.cs
- OverlappedContext.cs
- XamlDesignerSerializationManager.cs
- DataException.cs
- Polyline.cs
- MsmqUri.cs
- SpellerStatusTable.cs
- SelectionWordBreaker.cs
- HttpException.cs