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
- XamlTypeMapper.cs
- AliasedSlot.cs
- ScriptBehaviorDescriptor.cs
- ToolStripSeparator.cs
- UserUseLicenseDictionaryLoader.cs
- TypeDependencyAttribute.cs
- EncodingTable.cs
- PersonalizableTypeEntry.cs
- StickyNoteContentControl.cs
- ValidationErrorInfo.cs
- DataPagerCommandEventArgs.cs
- EntityRecordInfo.cs
- MethodRental.cs
- ListParagraph.cs
- XmlStreamStore.cs
- SocketElement.cs
- InvalidAsynchronousStateException.cs
- GenericEnumConverter.cs
- TypeConverter.cs
- DataSourceComponent.cs
- EntityKey.cs
- EasingQuaternionKeyFrame.cs
- RootBrowserWindow.cs
- ValidatedMobileControlConverter.cs
- AssemblyBuilderData.cs
- MethodInfo.cs
- FocusTracker.cs
- HyperLinkDesigner.cs
- OutputCacheEntry.cs
- TreeWalkHelper.cs
- GridView.cs
- RuleSettingsCollection.cs
- DeploymentExceptionMapper.cs
- HMACSHA512.cs
- EntityClassGenerator.cs
- XhtmlBasicListAdapter.cs
- Compilation.cs
- Button.cs
- ExeContext.cs
- BuiltInExpr.cs
- ObjectSelectorEditor.cs
- SoapProtocolImporter.cs
- DeploymentExceptionMapper.cs
- CodePropertyReferenceExpression.cs
- ADRole.cs
- TableCell.cs
- PlaceHolder.cs
- ViewValidator.cs
- Currency.cs
- ElapsedEventArgs.cs
- PropertyEntry.cs
- EpmContentSerializer.cs
- Error.cs
- GridViewColumnHeader.cs
- RawStylusInputCustomDataList.cs
- MsmqIntegrationMessageProperty.cs
- EditorZoneBase.cs
- DesignerDataConnection.cs
- DragCompletedEventArgs.cs
- NetworkInformationException.cs
- TrustManagerPromptUI.cs
- AssemblyUtil.cs
- EntityDataSourceColumn.cs
- SegmentInfo.cs
- MimeFormImporter.cs
- HyperLink.cs
- QilValidationVisitor.cs
- DropShadowEffect.cs
- Type.cs
- BCryptSafeHandles.cs
- UndoEngine.cs
- File.cs
- StringExpressionSet.cs
- RequestBringIntoViewEventArgs.cs
- DataGridColumnReorderingEventArgs.cs
- WindowsTokenRoleProvider.cs
- Substitution.cs
- DesignTimeHTMLTextWriter.cs
- ObjectNavigationPropertyMapping.cs
- ListView.cs
- InstanceDataCollection.cs
- ErrorEventArgs.cs
- XmlSchemaAnnotation.cs
- StylusButton.cs
- KeyValueConfigurationCollection.cs
- PlanCompiler.cs
- EnumMember.cs
- EncodedStreamFactory.cs
- DataQuery.cs
- DocumentPageView.cs
- OleDbDataReader.cs
- AbandonedMutexException.cs
- DataObjectCopyingEventArgs.cs
- BufferModeSettings.cs
- CompositeScriptReference.cs
- CodeConstructor.cs
- HyperLinkDesigner.cs
- JumpTask.cs
- querybuilder.cs
- SqlWorkflowPersistenceService.cs