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
- DynamicScriptObject.cs
- AttachedAnnotation.cs
- SecurityResources.cs
- ExpandableObjectConverter.cs
- ItemsPresenter.cs
- PageVisual.cs
- StickyNoteHelper.cs
- InnerItemCollectionView.cs
- Selector.cs
- StructuralObject.cs
- HttpCookie.cs
- BufferedConnection.cs
- SqlDataSourceView.cs
- ObjectConverter.cs
- ListBoxItemWrapperAutomationPeer.cs
- DesignerDataSchemaClass.cs
- BamlLocalizer.cs
- ListSortDescriptionCollection.cs
- VarRefManager.cs
- ProcessHostMapPath.cs
- HashHelper.cs
- Thread.cs
- FilterException.cs
- User.cs
- SoapTypeAttribute.cs
- ResXBuildProvider.cs
- FileDialog.cs
- UseAttributeSetsAction.cs
- ZipIOLocalFileDataDescriptor.cs
- SectionXmlInfo.cs
- ConfigurationProperty.cs
- ObjectViewEntityCollectionData.cs
- Formatter.cs
- ProfileSection.cs
- BinaryObjectInfo.cs
- PersonalizationStateQuery.cs
- UpdateCommand.cs
- ClientBuildManagerTypeDescriptionProviderBridge.cs
- mansign.cs
- ApplicationFileCodeDomTreeGenerator.cs
- InstalledFontCollection.cs
- UserValidatedEventArgs.cs
- HashCryptoHandle.cs
- OdbcTransaction.cs
- CodeMemberField.cs
- XPathNodeHelper.cs
- DataTableMappingCollection.cs
- PipeSecurity.cs
- EditorZoneAutoFormat.cs
- sqlstateclientmanager.cs
- TreeNodeCollection.cs
- SecurityState.cs
- MimeBasePart.cs
- FileDialogPermission.cs
- Window.cs
- CompilationUtil.cs
- dbenumerator.cs
- Vector3DAnimation.cs
- StorageSetMapping.cs
- VectorCollection.cs
- SamlSerializer.cs
- ConnectionPoint.cs
- WeakHashtable.cs
- BitmapFrameEncode.cs
- GridItemPattern.cs
- XPathAxisIterator.cs
- TrustSection.cs
- MultiBinding.cs
- WindowsEditBoxRange.cs
- DragCompletedEventArgs.cs
- InvalidCommandTreeException.cs
- DesignColumnCollection.cs
- RegexTypeEditor.cs
- CommandManager.cs
- ConstructorBuilder.cs
- MemberDescriptor.cs
- LinkConverter.cs
- FileEnumerator.cs
- ProfileService.cs
- ObjectManager.cs
- ApplicationException.cs
- ColumnMapVisitor.cs
- ToolZone.cs
- SqlStream.cs
- ImageListStreamer.cs
- LongTypeConverter.cs
- DataGridViewRowPrePaintEventArgs.cs
- PersonalizableTypeEntry.cs
- CharConverter.cs
- LOSFormatter.cs
- XamlSerializationHelper.cs
- PasswordTextContainer.cs
- DropDownList.cs
- SapiGrammar.cs
- Query.cs
- RemoveStoryboard.cs
- securitycriticaldataClass.cs
- XmlSchemaSet.cs
- ModuleBuilderData.cs
- ScriptManagerProxy.cs