2016-08-03 10:59:49 +00:00
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
namespace System.ServiceModel.Configuration
|
|
|
|
{
|
|
|
|
using System.Configuration;
|
|
|
|
using System.ServiceModel.Channels;
|
|
|
|
|
|
|
|
public sealed partial class NamedPipeTransportElement : ConnectionOrientedTransportElement
|
|
|
|
{
|
|
|
|
public NamedPipeTransportElement()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
public override Type BindingElementType
|
|
|
|
{
|
|
|
|
get { return typeof(NamedPipeTransportBindingElement); }
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void ApplyConfiguration(BindingElement bindingElement)
|
|
|
|
{
|
|
|
|
base.ApplyConfiguration(bindingElement);
|
|
|
|
NamedPipeTransportBindingElement binding = (NamedPipeTransportBindingElement)bindingElement;
|
2017-08-21 15:34:15 +00:00
|
|
|
#pragma warning suppress 56506 //Microsoft; base.ApplyConfiguration above checks for bindingElement being null
|
2016-08-03 10:59:49 +00:00
|
|
|
this.ConnectionPoolSettings.ApplyConfiguration(binding.ConnectionPoolSettings);
|
|
|
|
this.PipeSettings.ApplyConfiguration(binding.PipeSettings);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected internal override void InitializeFrom(BindingElement bindingElement)
|
|
|
|
{
|
|
|
|
base.InitializeFrom(bindingElement);
|
2017-08-21 15:34:15 +00:00
|
|
|
#pragma warning suppress 56506 // Microsoft, base.CopyFrom() validates the argument
|
2016-08-03 10:59:49 +00:00
|
|
|
NamedPipeTransportBindingElement binding = (NamedPipeTransportBindingElement)bindingElement;
|
|
|
|
this.ConnectionPoolSettings.InitializeFrom(binding.ConnectionPoolSettings);
|
|
|
|
this.PipeSettings.InitializeFrom(binding.PipeSettings);
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void CopyFrom(ServiceModelExtensionElement from)
|
|
|
|
{
|
|
|
|
base.CopyFrom(from);
|
|
|
|
NamedPipeTransportElement source = (NamedPipeTransportElement)from;
|
2017-08-21 15:34:15 +00:00
|
|
|
#pragma warning suppress 56506 // Microsoft, base.CopyFrom() validates the argument
|
2016-08-03 10:59:49 +00:00
|
|
|
this.ConnectionPoolSettings.CopyFrom(source.ConnectionPoolSettings);
|
|
|
|
this.PipeSettings.CopyFrom(source.PipeSettings);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected override TransportBindingElement CreateDefaultBindingElement()
|
|
|
|
{
|
|
|
|
return new NamedPipeTransportBindingElement();
|
|
|
|
}
|
|
|
|
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.ConnectionPoolSettings)]
|
|
|
|
public NamedPipeConnectionPoolSettingsElement ConnectionPoolSettings
|
|
|
|
{
|
|
|
|
get { return (NamedPipeConnectionPoolSettingsElement)base[ConfigurationStrings.ConnectionPoolSettings]; }
|
|
|
|
set { base[ConfigurationStrings.ConnectionPoolSettings] = value; }
|
|
|
|
}
|
|
|
|
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.PipeSettings)]
|
|
|
|
public NamedPipeSettingsElement PipeSettings
|
|
|
|
{
|
|
|
|
get { return (NamedPipeSettingsElement)base[ConfigurationStrings.PipeSettings]; }
|
|
|
|
set { base[ConfigurationStrings.PipeSettings] = value; }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|