Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / NetFx35 / System.ServiceModel.Web / System / ServiceModel / Configuration / WebHttpBindingCollectionElement.cs / 2 / WebHttpBindingCollectionElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.Web.Configuration; using System.Web.Hosting; using System.ServiceModel; using System.ServiceModel.Channels; using System.Runtime.CompilerServices; public partial class WebHttpBindingCollectionElement : StandardBindingCollectionElement{ protected internal override Binding GetDefault() { return new WebHttpBinding(); } internal static WebHttpBindingCollectionElement GetBindingCollectionElement() { BindingCollectionElement retval = null; BindingsSection bindings = null; string sectionPath = "system.serviceModel/bindings"; if (ServiceHostingEnvironment.IsHosted) { bindings = GetSectionFromWebConfiguration(sectionPath); } else { bindings = (BindingsSection) ConfigurationManager.GetSection(sectionPath); } retval = bindings[WebHttpBinding.WebHttpBindingConfigurationStrings.WebHttpBindingCollectionElementName]; return (WebHttpBindingCollectionElement) retval; } [MethodImpl(MethodImplOptions.NoInlining)] static BindingsSection GetSectionFromWebConfiguration(string sectionPath) { if (HostingEnvironment.ApplicationVirtualPath != null) { return (BindingsSection)WebConfigurationManager.GetSection(sectionPath, HostingEnvironment.ApplicationVirtualPath); } else { return (BindingsSection)WebConfigurationManager.GetSection(sectionPath); } } } } // 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
- LinearKeyFrames.cs
- MD5HashHelper.cs
- EventHandlers.cs
- SparseMemoryStream.cs
- CalendarButtonAutomationPeer.cs
- RuleSet.cs
- AlignmentXValidation.cs
- SaveFileDialog.cs
- InfoCardRSACryptoProvider.cs
- WindowsFormsHostPropertyMap.cs
- SiteMapProvider.cs
- TextDecorations.cs
- StringHandle.cs
- ServiceContractDetailViewControl.cs
- CancelEventArgs.cs
- ToolStripDropDownButton.cs
- ConversionContext.cs
- MenuRenderer.cs
- DispatcherFrame.cs
- XamlFxTrace.cs
- Shape.cs
- XmlWellformedWriter.cs
- WebPartRestoreVerb.cs
- XamlTypeMapper.cs
- CodeBinaryOperatorExpression.cs
- OpenTypeLayout.cs
- Repeater.cs
- DispatchChannelSink.cs
- MsdtcClusterUtils.cs
- FilterableAttribute.cs
- PopupRoot.cs
- NameValuePair.cs
- AutomationEventArgs.cs
- BlurBitmapEffect.cs
- TypeContext.cs
- BaseTemplateParser.cs
- WsatRegistrationHeader.cs
- DataGridViewLinkColumn.cs
- Unit.cs
- StackSpiller.Generated.cs
- SecurityContext.cs
- SettingsBindableAttribute.cs
- QuaternionKeyFrameCollection.cs
- SqlClientWrapperSmiStream.cs
- WebHeaderCollection.cs
- MediaTimeline.cs
- bidPrivateBase.cs
- XmlCompatibilityReader.cs
- ScrollEvent.cs
- SqlFunctionAttribute.cs
- XmlSchemaProviderAttribute.cs
- ChannelFactoryRefCache.cs
- IfAction.cs
- ParameterCollection.cs
- TableItemPattern.cs
- SoundPlayer.cs
- DataGridCaption.cs
- ContainerParagraph.cs
- UnsafeNativeMethods.cs
- GestureRecognitionResult.cs
- StylusCaptureWithinProperty.cs
- AccessDataSourceView.cs
- ObjectItemConventionAssemblyLoader.cs
- LifetimeManager.cs
- GridItemCollection.cs
- BamlBinaryWriter.cs
- UpDownBase.cs
- IconBitmapDecoder.cs
- StrokeNodeEnumerator.cs
- ProxyWebPartManager.cs
- SqlGenerator.cs
- ViewStateException.cs
- EntityDataSourceWrapper.cs
- WaitHandle.cs
- SqlTopReducer.cs
- IndentedTextWriter.cs
- MiniCustomAttributeInfo.cs
- XamlInt32CollectionSerializer.cs
- BigIntegerStorage.cs
- X509SecurityTokenProvider.cs
- BamlWriter.cs
- TimeSpan.cs
- ComboBoxDesigner.cs
- TextBox.cs
- AuthenticationSchemesHelper.cs
- TextEndOfSegment.cs
- PartialClassGenerationTaskInternal.cs
- TextElementEditingBehaviorAttribute.cs
- ParagraphVisual.cs
- DataTableTypeConverter.cs
- UInt16.cs
- RotateTransform3D.cs
- HttpWriter.cs
- ParenthesizePropertyNameAttribute.cs
- LinkClickEvent.cs
- RelatedView.cs
- InkCanvasSelectionAdorner.cs
- WebPartTransformer.cs
- ColorAnimation.cs
- GridViewAutomationPeer.cs