You've already forked linux-packaging-mono
Imported Upstream version 4.6.0.125
Former-commit-id: a2155e9bd80020e49e72e86c44da02a8ac0e57a4
This commit is contained in:
parent
a569aebcfd
commit
e79aa3c0ed
@ -0,0 +1,34 @@
|
||||
//----------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace System.ServiceModel.Routing.Configuration
|
||||
{
|
||||
using System;
|
||||
using System.ServiceModel;
|
||||
using System.ServiceModel.Description;
|
||||
|
||||
sealed class ClientEndpointLoader : ChannelFactory
|
||||
{
|
||||
ClientEndpointLoader(string configurationName)
|
||||
{
|
||||
base.InitializeEndpoint(configurationName, null);
|
||||
base.Endpoint.Name = configurationName;
|
||||
}
|
||||
|
||||
public static ServiceEndpoint LoadEndpoint(string configurationName)
|
||||
{
|
||||
using (ClientEndpointLoader loader = new ClientEndpointLoader(configurationName))
|
||||
{
|
||||
return loader.Endpoint;
|
||||
}
|
||||
}
|
||||
|
||||
protected override ServiceEndpoint CreateDescription()
|
||||
{
|
||||
ServiceEndpoint ep = new ServiceEndpoint(new ContractDescription("contract"));
|
||||
ep.Contract.ConfigurationName = "*";
|
||||
return ep;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
//----------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace System.ServiceModel.Routing.Configuration
|
||||
{
|
||||
static class ConfigurationStrings
|
||||
{
|
||||
internal const string BackupList = "backupList";
|
||||
internal const string BackupLists = "backupLists";
|
||||
internal const string CustomType = "customType";
|
||||
internal const string EndpointName = "endpointName";
|
||||
internal const string Endpoints = "endpoints";
|
||||
internal const string Entries = "entries";
|
||||
internal const string Filter = "filter";
|
||||
internal const string Filter1 = "filter1";
|
||||
internal const string Filter2 = "filter2";
|
||||
internal const string FilterData = "filterData";
|
||||
internal const string FilterName = "filterName";
|
||||
internal const string Filters = "filters";
|
||||
internal const string FilterTable = "filterTable";
|
||||
internal const string FilterTableName = "filterTableName";
|
||||
internal const string FilterTables = "filterTables";
|
||||
internal const string FilterType = "filterType";
|
||||
//internal const string Impersonation = "impersonation";
|
||||
internal const string Name = "name";
|
||||
internal const string Namespace = "namespace";
|
||||
internal const string NamespaceTable = "namespaceTable";
|
||||
internal const string Prefix = "prefix";
|
||||
internal const string Priority = "priority";
|
||||
internal const string ProcessMessages = "processMessages";
|
||||
internal const string RouteOnHeadersOnly = "routeOnHeadersOnly";
|
||||
internal const string SoapProcessingEnabled = "soapProcessingEnabled";
|
||||
internal const string EnsureOrderedDispatch = "ensureOrderedDispatch";
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
//----------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace System.ServiceModel.Routing.Configuration
|
||||
{
|
||||
using System;
|
||||
|
||||
public enum FilterType
|
||||
{
|
||||
Action,
|
||||
EndpointAddress,
|
||||
PrefixEndpointAddress,
|
||||
And,
|
||||
Custom,
|
||||
EndpointName,
|
||||
MatchAll,
|
||||
XPath
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
//----------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace System.ServiceModel.Routing.Configuration
|
||||
{
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Configuration;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime;
|
||||
using System.ServiceModel.Channels;
|
||||
using System.ServiceModel.Configuration;
|
||||
using System.ServiceModel.Description;
|
||||
|
||||
public sealed class RoutingExtensionElement : BehaviorExtensionElement
|
||||
{
|
||||
public RoutingExtensionElement()
|
||||
{
|
||||
this.RouteOnHeadersOnly = RoutingConfiguration.DefaultRouteOnHeadersOnly;
|
||||
}
|
||||
|
||||
[SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationPropertyAttributeRule, Justification = "this is not a configuration property")]
|
||||
public override Type BehaviorType
|
||||
{
|
||||
get { return typeof(RoutingBehavior); }
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ConfigurationStrings.RouteOnHeadersOnly, DefaultValue = RoutingConfiguration.DefaultRouteOnHeadersOnly, Options = ConfigurationPropertyOptions.None)]
|
||||
public bool RouteOnHeadersOnly
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[ConfigurationStrings.RouteOnHeadersOnly];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[ConfigurationStrings.RouteOnHeadersOnly] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationValidatorAttributeRule, Justification = "fxcop didn't like [StringValidator(MinLength = 0)]")]
|
||||
[ConfigurationProperty(ConfigurationStrings.FilterTableName, DefaultValue = null)]
|
||||
public string FilterTableName
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)this[ConfigurationStrings.FilterTableName];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[ConfigurationStrings.FilterTableName] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ConfigurationStrings.SoapProcessingEnabled, DefaultValue = RoutingConfiguration.DefaultSoapProcessingEnabled)]
|
||||
public bool SoapProcessingEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[ConfigurationStrings.SoapProcessingEnabled];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[ConfigurationStrings.SoapProcessingEnabled] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ConfigurationStrings.EnsureOrderedDispatch, DefaultValue = RoutingConfiguration.DefaultEnsureOrderedDispatch)]
|
||||
public bool EnsureOrderedDispatch
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[ConfigurationStrings.EnsureOrderedDispatch];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[ConfigurationStrings.EnsureOrderedDispatch] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected internal override object CreateBehavior()
|
||||
{
|
||||
RoutingConfiguration config;
|
||||
if (string.IsNullOrEmpty(this.FilterTableName))
|
||||
{
|
||||
config = new RoutingConfiguration();
|
||||
config.RouteOnHeadersOnly = this.RouteOnHeadersOnly;
|
||||
}
|
||||
else
|
||||
{
|
||||
config = new RoutingConfiguration(RoutingSection.CreateFilterTable(this.FilterTableName), this.RouteOnHeadersOnly);
|
||||
}
|
||||
|
||||
config.SoapProcessingEnabled = this.SoapProcessingEnabled;
|
||||
config.EnsureOrderedDispatch = this.EnsureOrderedDispatch;
|
||||
RoutingBehavior behavior = new RoutingBehavior(config);
|
||||
//behavior.Impersonation = this.Impersonation;
|
||||
return behavior;
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,41 @@
|
||||
//----------------------------------------------------------------
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
//----------------------------------------------------------------
|
||||
|
||||
namespace System.ServiceModel.Routing.Configuration
|
||||
{
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime;
|
||||
using System.ServiceModel.Configuration;
|
||||
using System.Configuration;
|
||||
|
||||
public class SoapProcessingExtensionElement : BehaviorExtensionElement
|
||||
{
|
||||
[SuppressMessage(FxCop.Category.Configuration, FxCop.Rule.ConfigurationPropertyAttributeRule, Justification = "this is not a configuration property")]
|
||||
public override Type BehaviorType
|
||||
{
|
||||
get { return typeof(SoapProcessingBehavior); }
|
||||
}
|
||||
|
||||
protected internal override object CreateBehavior()
|
||||
{
|
||||
SoapProcessingBehavior behavior = new SoapProcessingBehavior();
|
||||
behavior.ProcessMessages = this.ProcessMessages;
|
||||
return behavior;
|
||||
}
|
||||
|
||||
[ConfigurationProperty(ConfigurationStrings.ProcessMessages, DefaultValue = true, Options = ConfigurationPropertyOptions.None)]
|
||||
public bool ProcessMessages
|
||||
{
|
||||
get
|
||||
{
|
||||
return (bool)this[ConfigurationStrings.ProcessMessages];
|
||||
}
|
||||
set
|
||||
{
|
||||
this[ConfigurationStrings.ProcessMessages] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user