Files
mono/mcs/class/System.ServiceModel.Routing/System.ServiceModel.Routing.Configuration/RoutingExtensionElement.cs
T
Atsushi Eno 0e452537e7 2010-06-03 Atsushi Enomoto <[email protected]>
* BackupEndpointCollection.cs
	  BackupEndpointElement.cs
	  BackupListCollection.cs
	  FilterElement.cs
	  FilterElementCollection.cs
	  FilterTableEntryCollection.cs
	  FilterTableEntryElement.cs
	  NamespaceElement.cs
	  NamespaceElementCollection.cs
	  RoutingExtensionElement.cs
	  RoutingSection.cs
	  SoapProcessingExtensionElement.cs : implement to get working.


svn path=/trunk/mcs/; revision=158382
2010-06-03 06:32:09 +00:00

46 lines
1.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Routing.Configuration
{
public sealed class RoutingExtensionElement : BehaviorExtensionElement
{
public override Type BehaviorType {
get { return typeof (RoutingExtension); }
}
[ConfigurationProperty ("filterTableName", DefaultValue = null)]
public string FilterTableName {
get { return (string) base ["filterTableName"]; }
set { base ["filterTableName"] = value; }
}
[ConfigurationProperty ("routeOnHeadersOnly", DefaultValue = true, Options = ConfigurationPropertyOptions.None)]
public bool RouteOnHeadersOnly {
get { return (bool) base ["routeOnHeadersOnly"]; }
set { base ["routeOnHeadersOnly"] = value; }
}
[ConfigurationProperty ("soapProcessingEnabled", DefaultValue = true)]
public bool SoapProcessingEnabled {
get { return (bool) base ["soapProcessingEnabled"]; }
set { base ["soapProcessingEnabled"] = value; }
}
protected override object CreateBehavior ()
{
var table = RoutingSection.CreateFilterTable (FilterTableName);
var cfg = new RoutingConfiguration (table, RouteOnHeadersOnly) { SoapProcessingEnabled = this.SoapProcessingEnabled };
return new RoutingBehavior (cfg);
}
}
}