Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / OneWayElement.cs / 1 / OneWayElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Channels; using System.ServiceModel; public sealed partial class OneWayElement : BindingElementExtensionElement { public OneWayElement() { } public override Type BindingElementType { get { return typeof(OneWayBindingElement); } } [ConfigurationProperty(ConfigurationStrings.ChannelPoolSettings)] public ChannelPoolSettingsElement ChannelPoolSettings { get { return (ChannelPoolSettingsElement)base[ConfigurationStrings.ChannelPoolSettings]; } } [ConfigurationProperty(ConfigurationStrings.MaxAcceptedChannels, DefaultValue = OneWayDefaults.MaxAcceptedChannels)] [IntegerValidator(MinValue = 1)] public int MaxAcceptedChannels { get { return (int)base[ConfigurationStrings.MaxAcceptedChannels]; } set { base[ConfigurationStrings.MaxAcceptedChannels] = value; } } [ConfigurationProperty(ConfigurationStrings.PacketRoutable, DefaultValue = OneWayDefaults.PacketRoutable)] public bool PacketRoutable { get { return (bool)base[ConfigurationStrings.PacketRoutable]; } set { base[ConfigurationStrings.PacketRoutable] = value; } } public override void ApplyConfiguration(BindingElement bindingElement) { base.ApplyConfiguration(bindingElement); OneWayBindingElement oneWayBindingElement = (OneWayBindingElement)bindingElement; PropertyInformationCollection propertyInfo = this.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.ChannelPoolSettings].ValueOrigin != PropertyValueOrigin.Default) { #pragma warning suppress 56506 // [....], base.ApplyConfiguration() validates the argument this.ChannelPoolSettings.ApplyConfiguration(oneWayBindingElement.ChannelPoolSettings); } oneWayBindingElement.MaxAcceptedChannels = this.MaxAcceptedChannels; oneWayBindingElement.PacketRoutable = this.PacketRoutable; } public override void CopyFrom(ServiceModelExtensionElement from) { base.CopyFrom(from); OneWayElement source = (OneWayElement)from; #pragma warning suppress 56506 // [....], base.CopyFrom() validates the argument PropertyInformationCollection propertyInfo = source.ElementInformation.Properties; if (propertyInfo[ConfigurationStrings.ChannelPoolSettings].ValueOrigin != PropertyValueOrigin.Default) { this.ChannelPoolSettings.CopyFrom(source.ChannelPoolSettings); } this.MaxAcceptedChannels = source.MaxAcceptedChannels; this.PacketRoutable = source.PacketRoutable; } protected internal override void InitializeFrom(BindingElement bindingElement) { base.InitializeFrom(bindingElement); OneWayBindingElement source = (OneWayBindingElement)bindingElement; this.ChannelPoolSettings.InitializeFrom(source.ChannelPoolSettings); this.MaxAcceptedChannels = source.MaxAcceptedChannels; this.PacketRoutable = source.PacketRoutable; } protected internal override BindingElement CreateBindingElement() { OneWayBindingElement result = new OneWayBindingElement(); this.ApplyConfiguration(result); return result; } } } // 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
- ArraySegment.cs
- PriorityChain.cs
- SignatureResourceHelper.cs
- HasActivatableWorkflowEvent.cs
- StringFormat.cs
- GPRECTF.cs
- QilGeneratorEnv.cs
- SchemaImporterExtensionElementCollection.cs
- CustomAttributeBuilder.cs
- SamlSecurityToken.cs
- CheckBoxFlatAdapter.cs
- Logging.cs
- DataObjectCopyingEventArgs.cs
- InternalBase.cs
- ObservableCollection.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- Image.cs
- WinFormsUtils.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- TimeoutStream.cs
- AppDomainProtocolHandler.cs
- TypedTableBaseExtensions.cs
- DataGridViewTextBoxColumn.cs
- ServiceOperationWrapper.cs
- SkipQueryOptionExpression.cs
- UnsafePeerToPeerMethods.cs
- LabelAutomationPeer.cs
- AccessKeyManager.cs
- DataPagerFieldCollection.cs
- UnsafeNativeMethods.cs
- BufferBuilder.cs
- AuthStoreRoleProvider.cs
- HashHelpers.cs
- SqlDataSourceCustomCommandPanel.cs
- RangeValidator.cs
- SqlClientWrapperSmiStreamChars.cs
- Main.cs
- SchemaElementLookUpTableEnumerator.cs
- OrthographicCamera.cs
- PageBuildProvider.cs
- InputProcessorProfiles.cs
- LinearKeyFrames.cs
- Table.cs
- TrackPointCollection.cs
- x509utils.cs
- PeerEndPoint.cs
- Random.cs
- TargetParameterCountException.cs
- ButtonRenderer.cs
- HttpCachePolicy.cs
- PeerNearMe.cs
- DecoderFallback.cs
- ReadOnlyTernaryTree.cs
- VsPropertyGrid.cs
- TypeForwardedToAttribute.cs
- HtmlPageAdapter.cs
- WrappingXamlSchemaContext.cs
- CodeAttributeArgumentCollection.cs
- UpWmlPageAdapter.cs
- BufferedGraphicsManager.cs
- WindowsTokenRoleProvider.cs
- xmlglyphRunInfo.cs
- EventLogInternal.cs
- CompositeDataBoundControl.cs
- DataGridViewCellEventArgs.cs
- DrawingAttributeSerializer.cs
- ReflectionPermission.cs
- ServicePointManagerElement.cs
- MasterPageParser.cs
- CompilerErrorCollection.cs
- WebBrowsableAttribute.cs
- SqlConnectionPoolGroupProviderInfo.cs
- DataGridDetailsPresenterAutomationPeer.cs
- MetaModel.cs
- ResourceManager.cs
- Dynamic.cs
- QilXmlWriter.cs
- CompilerParameters.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- XmlElementAttributes.cs
- StringUtil.cs
- SourceFileBuildProvider.cs
- ArgIterator.cs
- CheckBoxList.cs
- ReceiveContent.cs
- AlternationConverter.cs
- PackageDigitalSignature.cs
- CatalogPartChrome.cs
- Matrix3DConverter.cs
- MemoryPressure.cs
- WorkflowPageSetupDialog.cs
- TableLayout.cs
- AuthorizationRuleCollection.cs
- cookiecontainer.cs
- DetailsViewInsertEventArgs.cs
- PropertyMap.cs
- DropShadowEffect.cs
- Clock.cs
- SqlDataSourceSelectingEventArgs.cs
- GradientStopCollection.cs