mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-19 01:31:17 -10:00
Adding reference source for System.Data System.Data.DataSetExtensions System.Data.Entity System.Data.Entity.Design System.Data.Linq System.Data.SqlXml System.ServiceModel System.ServiceModel.Activation System.ServiceModel.Activities System.ServiceModel.Channels System.ServiceModel.Discovery System.ServiceModel.Internals System.ServiceModel.Routing System.ServiceModel.WasHosting System.ServiceModel.Web System.Web System.Web.ApplicationServices System.Web.DynamicData System.Web.Entity System.Web.Entity.Design System.Web.Extensions System.Web.Mobile System.Web.Routing System.Web.Services System.Xml System.Xml.Linq
83 lines
3.3 KiB
C#
83 lines
3.3 KiB
C#
//------------------------------------------------------------------------------
|
|
// Copyright (c) Microsoft Corporation. All rights reserved.
|
|
//------------------------------------------------------------------------------
|
|
|
|
namespace System.ServiceModel.Configuration
|
|
{
|
|
using System.Configuration;
|
|
using System.Net.Security;
|
|
using System.ServiceModel.Channels;
|
|
|
|
public sealed partial class MsmqTransportElement : MsmqElementBase
|
|
{
|
|
[ConfigurationProperty(ConfigurationStrings.MaxPoolSize, DefaultValue = MsmqDefaults.MaxPoolSize)]
|
|
[IntegerValidator(MinValue = 0)]
|
|
public int MaxPoolSize
|
|
{
|
|
get { return (int)base[ConfigurationStrings.MaxPoolSize]; }
|
|
set { base[ConfigurationStrings.MaxPoolSize] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.QueueTransferProtocol, DefaultValue = MsmqDefaults.QueueTransferProtocol)]
|
|
[ServiceModelEnumValidator(typeof(QueueTransferProtocolHelper))]
|
|
public QueueTransferProtocol QueueTransferProtocol
|
|
{
|
|
get { return (QueueTransferProtocol)base[ConfigurationStrings.QueueTransferProtocol]; }
|
|
set { base[ConfigurationStrings.QueueTransferProtocol] = value; }
|
|
}
|
|
|
|
[ConfigurationProperty(ConfigurationStrings.UseActiveDirectory, DefaultValue = MsmqDefaults.UseActiveDirectory)]
|
|
public bool UseActiveDirectory
|
|
{
|
|
get { return (bool)base[ConfigurationStrings.UseActiveDirectory]; }
|
|
set { base[ConfigurationStrings.UseActiveDirectory] = value; }
|
|
}
|
|
|
|
public override Type BindingElementType
|
|
{
|
|
get { return typeof(MsmqTransportBindingElement); }
|
|
}
|
|
|
|
protected override TransportBindingElement CreateDefaultBindingElement()
|
|
{
|
|
return new MsmqTransportBindingElement();
|
|
}
|
|
|
|
|
|
public override void ApplyConfiguration(BindingElement bindingElement)
|
|
{
|
|
base.ApplyConfiguration(bindingElement);
|
|
|
|
MsmqTransportBindingElement binding = bindingElement as MsmqTransportBindingElement;
|
|
binding.MaxPoolSize = this.MaxPoolSize;
|
|
binding.QueueTransferProtocol = this.QueueTransferProtocol;
|
|
binding.UseActiveDirectory = this.UseActiveDirectory;
|
|
}
|
|
|
|
public override void CopyFrom(ServiceModelExtensionElement from)
|
|
{
|
|
base.CopyFrom(from);
|
|
|
|
MsmqTransportElement source = from as MsmqTransportElement;
|
|
if (null != source)
|
|
{
|
|
this.MaxPoolSize = source.MaxPoolSize;
|
|
this.QueueTransferProtocol = source.QueueTransferProtocol;
|
|
this.UseActiveDirectory = source.UseActiveDirectory;
|
|
}
|
|
}
|
|
|
|
protected internal override void InitializeFrom(BindingElement bindingElement)
|
|
{
|
|
base.InitializeFrom(bindingElement);
|
|
MsmqTransportBindingElement binding = bindingElement as MsmqTransportBindingElement;
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.MaxPoolSize, binding.MaxPoolSize);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.QueueTransferProtocol, binding.QueueTransferProtocol);
|
|
SetPropertyValueIfNotDefaultValue(ConfigurationStrings.UseActiveDirectory, binding.UseActiveDirectory);
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|