Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

View File

@ -0,0 +1,61 @@
//
// AssemblyInfo.cs
//
// Author:
// Joel W. Reed (joelwreed@gmail.com)
//
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Resources;
using System.Security;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about the System.ServiceModel assembly
[assembly: AssemblyVersion (Consts.FxVersion)]
[assembly: SatelliteContractVersion (Consts.FxVersion)]
[assembly: AssemblyTitle ("System.ServiceModel.Routing.dll")]
[assembly: AssemblyDescription ("System.ServiceModel.Routing.dll")]
[assembly: AssemblyConfiguration ("Development version")]
[assembly: AssemblyCompany ("MONO development team")]
[assembly: AssemblyProduct ("MONO CLI")]
[assembly: AssemblyCopyright ("(c) 2003 Various Authors")]
[assembly: AssemblyTrademark ("")]
[assembly: CLSCompliant (true)]
[assembly: AssemblyDefaultAlias ("System.ServiceModel.Routing.dll")]
[assembly: AssemblyInformationalVersion ("3.5.594.0")]
[assembly: NeutralResourcesLanguage ("en-US")]
[assembly: ComVisible (false)]
[assembly: AssemblyDelaySign (true)]
#if NET_2_1
[assembly: AssemblyKeyFile ("../silverlight.pub")]
#else
[assembly: AssemblyKeyFile("../winfx.pub")]
#endif

View File

@ -0,0 +1,3 @@
2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
* AssemblyInfo.cs : initial checkin.

View File

@ -0,0 +1,4 @@
2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
* Makefile, System.ServiceModel.Routing.dll.sources :
initial checkin.

View File

@ -0,0 +1,24 @@
thisdir = class/System.ServiceModel.Routing
SUBDIRS =
include ../../build/rules.make
LIBRARY = System.ServiceModel.Routing.dll
LIB_MCS_FLAGS = -r:System.dll -r:System.Xml.dll -r:System.Runtime.Serialization.dll -r:System.ServiceModel.dll -r:System.Core.dll
ifneq (2.1, $(FRAMEWORK_VERSION))
LIB_MCS_FLAGS += -d:NET_3_5 -d:NET_3_0 \
-r:System.Configuration.dll
endif
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
EXTRA_DISTFILES = $(RESOURCE_FILES)
VALID_PROFILE := $(filter 2 4, $(FRAMEWORK_VERSION_MAJOR))
ifndef VALID_PROFILE
LIBRARY_NAME = dummy-System.ServiceModel.Routing.dll
NO_INSTALL = yes
NO_SIGN_ASSEMBLY = yes
endif
include ../../build/library.make

View File

@ -0,0 +1,4 @@
2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
* EndpointNameMessageFilter.cs StrictAndMessageFilter.cs:
initial checkin.

View File

@ -0,0 +1,32 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Dispatcher
{
public class EndpointNameMessageFilter : MessageFilter
{
public EndpointNameMessageFilter (string endpointName)
{
Name = endpointName;
}
internal string Name { get; private set; }
[MonoTODO]
public override bool Match (Message message)
{
throw new NotImplementedException ();
}
[MonoTODO]
public override bool Match (MessageBuffer buffer)
{
throw new NotImplementedException ();
}
}
}

View File

@ -0,0 +1,36 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Dispatcher
{
public class StrictAndMessageFilter : MessageFilter
{
MessageFilter filter1, filter2;
public StrictAndMessageFilter (MessageFilter filter1, MessageFilter filter2)
{
if (filter1 == null)
throw new ArgumentNullException ("filter1");
if (filter2 == null)
throw new ArgumentNullException ("filter2");
this.filter1 = filter1;
this.filter2 = filter2;
}
public override bool Match (Message message)
{
return filter1.Match (message) && filter2.Match (message);
}
public override bool Match (MessageBuffer buffer)
{
return filter1.Match (buffer) && filter2.Match (buffer);
}
}
}

View File

@ -0,0 +1,51 @@
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
{
[ConfigurationCollection (typeof (BackupEndpointElement))]
public class BackupEndpointCollection : ConfigurationElementCollection
{
[ConfigurationProperty ("name", DefaultValue = null, Options = ConfigurationPropertyOptions.IsRequired)]
public string Name {
get { return (string) base ["name"]; }
set { base ["name"] = value; }
}
public BackupEndpointCollection ()
{
}
public void Add (BackupEndpointElement element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new BackupEndpointElement ();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((BackupEndpointElement) element).EndpointName;
}
public void Remove (BackupEndpointElement element)
{
BaseRemove (element);
}
}
}

View File

@ -0,0 +1,21 @@
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 class BackupEndpointElement : ConfigurationElement
{
[ConfigurationProperty ("endpointName", DefaultValue = null, Options = ConfigurationPropertyOptions.IsRequired)]
public string EndpointName {
get { return (string) base ["endpointName"]; }
set { base ["endpointName"] = value; }
}
}
}

View File

@ -0,0 +1,50 @@
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
{
[ConfigurationCollection (typeof (BackupEndpointCollection), AddItemName = "backupList")]
public class BackupListCollection : ConfigurationElementCollection
{
public void Add (BackupEndpointCollection element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new BackupEndpointElement ();
}
protected override Object GetElementKey (ConfigurationElement element)
{
return ((BackupEndpointElement) element).EndpointName;
}
public void Remove (BackupEndpointCollection element)
{
BaseRemove (element);
}
public new BackupEndpointCollection this [string name] {
get {
foreach (BackupEndpointCollection c in this)
if (c.Name == name)
return c;
return null;
}
}
}
}

View File

@ -0,0 +1,40 @@
2010-06-03 Atsushi Enomoto <atsushi@ximian.com>
* 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.
2010-03-02 Raja R Harinath <harinath@hurrynot.org>
* BackupListCollection.cs, FilterTableCollection.cs: Add indexer.
2009-12-11 Atsushi Enomoto <atsushi@ximian.com>
* RoutingSection.cs : sorted out most of the configuration stuff.
* FilterElementCollection.cs : added missing indexer.
2009-12-10 Atsushi Enomoto <atsushi@ximian.com>
* BackupEndpointCollection.cs
BackupEndpointElement.cs
BackupListCollection.cs
FilterElement.cs
FilterElementCollection.cs
FilterTableCollection.cs
FilterTableEntryCollection.cs
FilterTableEntryElement.cs
FilterType.cs
NamespaceElement.cs
NamespaceElementCollection.cs
RoutingExtensionElement.cs
RoutingSection.cs
SoapProcessingExtensionElement.cs : initial checkin.

View File

@ -0,0 +1,51 @@
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 class FilterElement : ConfigurationElement
{
[ConfigurationProperty ("customType", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string CustomType {
get { return (string) base ["customType"]; }
set { base ["customType"] = value; }
}
[ConfigurationProperty ("filter1", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string Filter1 {
get { return (string) base ["filter1"]; }
set { base ["filter1"] = value; }
}
[ConfigurationProperty ("filter2", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string Filter2 {
get { return (string) base ["filter2"]; }
set { base ["filter2"] = value; }
}
[ConfigurationProperty ("filterData", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string FilterData {
get { return (string) base ["filterData"]; }
set { base ["filterData"] = value; }
}
[ConfigurationProperty ("filterType", DefaultValue = null, Options = ConfigurationPropertyOptions.IsRequired)]
public FilterType FilterType {
get { return (FilterType) base ["filterType"]; }
set { base ["filterType"] = value; }
}
[ConfigurationProperty ("name", DefaultValue = null, Options = ConfigurationPropertyOptions.None | ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string Name {
get { return (string) base ["name"]; }
set { base ["name"] = value; }
}
}
}

View File

@ -0,0 +1,61 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Configuration;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.ServiceModel.Dispatcher;
namespace System.ServiceModel.Routing.Configuration
{
[ConfigurationCollection (typeof(FilterElement), AddItemName = "filter")]
public class FilterElementCollection : ConfigurationElementCollection
{
public void Add (FilterElement element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new FilterElement ();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((FilterElement) element).Name;
}
public new FilterElement this [string name] {
get {
foreach (FilterElement fe in this)
if (fe.Name == name)
return fe;
return null;
}
}
public FilterElement this [int index] {
get { return (FilterElement) BaseGet (index); }
}
public override bool IsReadOnly ()
{
return base.IsReadOnly ();
}
public void Remove (FilterElement element)
{
BaseRemove (element);
}
}
}

View File

@ -0,0 +1,45 @@
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
{
[ConfigurationCollection (typeof (FilterTableEntryCollection), AddItemName = "filterTable")]
public class FilterTableCollection : ConfigurationElementCollection
{
public void Add (FilterTableEntryCollection element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new FilterTableEntryCollection ();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((FilterTableEntryCollection) element).Name;
}
public void Remove (FilterTableEntryCollection element)
{
BaseRemove (element);
}
public new FilterTableEntryCollection this [string name] {
get { return (FilterTableEntryCollection) BaseGet (name); }
}
}
}

View File

@ -0,0 +1,48 @@
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
{
[ConfigurationCollection (typeof(FilterTableEntryElement))]
public class FilterTableEntryCollection : ConfigurationElementCollection
{
[ConfigurationProperty ("name", DefaultValue = null, Options = ConfigurationPropertyOptions.None | ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string Name {
get { return (string) base ["name"]; }
set { base ["name"] = value; }
}
public void Add (FilterTableEntryElement element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new FilterTableEntryElement ();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((FilterTableEntryElement) element).EndpointName;
}
public void Remove (FilterTableEntryElement element)
{
BaseRemove (element);
}
}
}

View File

@ -0,0 +1,40 @@
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 class FilterTableEntryElement : ConfigurationElement
{
[ConfigurationProperty ("backupList", DefaultValue = null, Options = ConfigurationPropertyOptions.None)]
public string BackupList {
get { return (string) base ["backupList"]; }
set { base ["backupList"] = value; }
}
[ConfigurationProperty ("endpointName", DefaultValue = null, Options = ConfigurationPropertyOptions.None | ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string EndpointName {
get { return (string) base ["endpointName"]; }
set { base ["endpointName"] = value; }
}
[ConfigurationProperty ("filterName", DefaultValue = null, Options = ConfigurationPropertyOptions.None | ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string FilterName {
get { return (string) base ["filterName"]; }
set { base ["filterName"] = value; }
}
[ConfigurationProperty ("priority", Options = ConfigurationPropertyOptions.None)]
public int Priority {
get { return (int) base ["priority"]; }
set { base ["priority"] = value; }
}
}
}

View File

@ -0,0 +1,14 @@
namespace System.ServiceModel.Routing.Configuration
{
public enum FilterType
{
Action,
EndpointAddress,
PrefixEndpointAddress,
And,
Custom,
EndpointName,
MatchAll,
XPath
}
}

View File

@ -0,0 +1,27 @@
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 class NamespaceElement : ConfigurationElement
{
[ConfigurationProperty ("namespace", DefaultValue = null, Options = ConfigurationPropertyOptions.IsRequired)]
public string Namespace {
get { return (string) base ["namespace"]; }
set { base ["namespace"] = value; }
}
[ConfigurationProperty ("prefix", DefaultValue = null, Options = ConfigurationPropertyOptions.None | ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
public string Prefix {
get { return (string) base ["prefix"]; }
set { base ["prefix"] = value; }
}
}
}

View File

@ -0,0 +1,59 @@
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
{
[ConfigurationCollection (typeof(NamespaceElement))]
public class NamespaceElementCollection : ConfigurationElementCollection
{
public void Add (NamespaceElement element)
{
BaseAdd (element);
}
public void Clear ()
{
BaseClear ();
}
protected override ConfigurationElement CreateNewElement ()
{
return new NamespaceElement ();
}
protected override object GetElementKey (ConfigurationElement element)
{
return ((NamespaceElement) element).Prefix;
}
public new NamespaceElement this [string name] {
get {
foreach (NamespaceElement ne in this)
if (ne.Namespace == name)
return ne;
return null;
}
}
public NamespaceElement this [int index] {
get { return (NamespaceElement) BaseGet (index); }
}
public override bool IsReadOnly ()
{
return base.IsReadOnly ();
}
public void Remove (NamespaceElement element)
{
BaseRemove (element);
}
}
}

View File

@ -0,0 +1,45 @@
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 internal override object CreateBehavior ()
{
var table = RoutingSection.CreateFilterTable (FilterTableName);
var cfg = new RoutingConfiguration (table, RouteOnHeadersOnly) { SoapProcessingEnabled = this.SoapProcessingEnabled };
return new RoutingBehavior (cfg);
}
}
}

Some files were not shown because too many files have changed in this diff Show More