Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Channels / MessageEncodingBindingElement.cs / 1 / MessageEncodingBindingElement.cs
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------- namespace System.ServiceModel.Channels { using System.Collections.Generic; using System.ServiceModel.Description; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Diagnostics; using System.Xml; public abstract class MessageEncodingBindingElement : BindingElement { protected MessageEncodingBindingElement() { } protected MessageEncodingBindingElement(MessageEncodingBindingElement elementToBeCloned) : base(elementToBeCloned) { } public abstract MessageVersion MessageVersion { get; set; } internal IChannelFactoryInternalBuildChannelFactory (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.BuildInnerChannelFactory (); } internal bool InternalCanBuildChannelFactory (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.CanBuildInnerChannelFactory (); } internal IChannelListener InternalBuildChannelListener (BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.BuildInnerChannelListener (); } internal bool InternalCanBuildChannelListener (BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ArgumentNullException("context")); } #pragma warning suppress 56506 // [....], BindingContext.BindingParameters never be null context.BindingParameters.Add(this); return context.CanBuildInnerChannelListener (); } public abstract MessageEncoderFactory CreateMessageEncoderFactory(); public override T GetProperty (BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } if (typeof(T) == typeof(MessageVersion)) { return (T)(object)this.MessageVersion; } else { return context.GetInnerProperty (); } } internal virtual bool CheckEncodingVersion(EnvelopeVersion version) { return false; } internal override bool IsMatch(BindingElement b) { if (b == null) return false; MessageEncodingBindingElement encoding = b as MessageEncodingBindingElement; if (encoding == null) return false; return true; } } } // 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
- DataListItemEventArgs.cs
- IdentityNotMappedException.cs
- StsCommunicationException.cs
- PropertyCondition.cs
- InternalPolicyElement.cs
- TextDataBindingHandler.cs
- XamlInt32CollectionSerializer.cs
- XmlEnumAttribute.cs
- securitycriticaldataClass.cs
- Msmq4SubqueuePoisonHandler.cs
- XmlDataCollection.cs
- Tag.cs
- DesignerTransactionCloseEvent.cs
- HTTP_SERVICE_CONFIG_URLACL_KEY.cs
- XappLauncher.cs
- DropTarget.cs
- LockingPersistenceProvider.cs
- XmlSchemaProviderAttribute.cs
- DateTimeFormatInfoScanner.cs
- XmlTextReaderImplHelpers.cs
- CqlParser.cs
- ExpressionParser.cs
- ProcessInputEventArgs.cs
- SemaphoreSecurity.cs
- ViewgenGatekeeper.cs
- FontFamilyValueSerializer.cs
- Journaling.cs
- Freezable.cs
- StoreItemCollection.cs
- TogglePatternIdentifiers.cs
- XPathDocumentNavigator.cs
- uribuilder.cs
- StronglyTypedResourceBuilder.cs
- SiteMap.cs
- BasicViewGenerator.cs
- VisualStyleElement.cs
- HandlerFactoryCache.cs
- DataTransferEventArgs.cs
- UriParserTemplates.cs
- HexParser.cs
- XmlComplianceUtil.cs
- StackOverflowException.cs
- SchemaNames.cs
- UnsafeNativeMethods.cs
- SharedConnectionWorkflowTransactionService.cs
- SqlClientWrapperSmiStream.cs
- DiscoveryDocumentSearchPattern.cs
- ModuleBuilderData.cs
- CompilerResults.cs
- ListView.cs
- ResolveNameEventArgs.cs
- RemoteWebConfigurationHost.cs
- InputGestureCollection.cs
- CustomGrammar.cs
- CurrencyWrapper.cs
- ConstructorNeedsTagAttribute.cs
- FixUpCollection.cs
- ProfilePropertySettingsCollection.cs
- DesignerAdapterUtil.cs
- AssemblyName.cs
- WorkflowRuntimeServiceElement.cs
- FunctionOverloadResolver.cs
- XmlMembersMapping.cs
- SqlCacheDependencySection.cs
- ObjectSet.cs
- ImageMapEventArgs.cs
- __Error.cs
- SqlRowUpdatingEvent.cs
- AQNBuilder.cs
- TimeSpanSecondsConverter.cs
- ContentValidator.cs
- HwndAppCommandInputProvider.cs
- AttachedPropertyMethodSelector.cs
- RegionInfo.cs
- ParseHttpDate.cs
- Convert.cs
- CodeIdentifier.cs
- ServiceHostFactory.cs
- AttributeData.cs
- MSAAEventDispatcher.cs
- ColumnResult.cs
- Slider.cs
- DSASignatureFormatter.cs
- HebrewCalendar.cs
- DriveInfo.cs
- _NtlmClient.cs
- HeaderElement.cs
- SspiSecurityToken.cs
- SqlAggregateChecker.cs
- DoubleAnimationClockResource.cs
- RightsManagementLicense.cs
- FlowDecisionDesigner.xaml.cs
- FunctionQuery.cs
- StringCollection.cs
- DocumentPage.cs
- GenerateScriptTypeAttribute.cs
- OdbcConnectionOpen.cs
- StringReader.cs
- DBDataPermissionAttribute.cs
- ExpanderAutomationPeer.cs