You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -40,20 +40,20 @@ namespace System.ServiceModel.Description
|
||||
{
|
||||
}
|
||||
|
||||
public FaultDescription Find (string name)
|
||||
public FaultDescription Find (string action)
|
||||
{
|
||||
foreach (FaultDescription d in this)
|
||||
if (d.Name == name)
|
||||
if (d.Name == action)
|
||||
return d;
|
||||
return null;
|
||||
}
|
||||
|
||||
public Collection<FaultDescription> FindAll (string name)
|
||||
public Collection<FaultDescription> FindAll (string action)
|
||||
{
|
||||
Collection<FaultDescription> ret =
|
||||
new Collection<FaultDescription> ();
|
||||
foreach (FaultDescription d in this)
|
||||
if (d.Name == name)
|
||||
if (d.Name == action)
|
||||
ret.Add (d);
|
||||
return ret;
|
||||
}
|
||||
|
@@ -35,17 +35,17 @@ namespace System.ServiceModel.Description
|
||||
public interface IServiceBehavior
|
||||
{
|
||||
void AddBindingParameters (
|
||||
ServiceDescription description,
|
||||
ServiceDescription serviceDescription,
|
||||
ServiceHostBase serviceHostBase,
|
||||
Collection<ServiceEndpoint> endpoints,
|
||||
BindingParameterCollection parameters);
|
||||
BindingParameterCollection bindingParameters);
|
||||
|
||||
void ApplyDispatchBehavior (
|
||||
ServiceDescription description,
|
||||
ServiceDescription serviceDescription,
|
||||
ServiceHostBase serviceHostBase);
|
||||
|
||||
void Validate (
|
||||
ServiceDescription description,
|
||||
ServiceDescription serviceDescription,
|
||||
ServiceHostBase serviceHostBase);
|
||||
}
|
||||
}
|
||||
|
@@ -41,9 +41,9 @@ namespace System.ServiceModel.Description
|
||||
XmlSchemaSet xmlSchemas, ICollection<XmlElement> policy);
|
||||
|
||||
void ImportContract (WsdlImporter importer,
|
||||
WsdlContractConversionContext contractContext);
|
||||
WsdlContractConversionContext context);
|
||||
|
||||
void ImportEndpoint (WsdlImporter importer,
|
||||
WsdlEndpointConversionContext endpointContext);
|
||||
WsdlEndpointConversionContext context);
|
||||
}
|
||||
}
|
||||
|
@@ -57,9 +57,9 @@ namespace System.ServiceModel.Description
|
||||
get { return msg; }
|
||||
}
|
||||
|
||||
public override bool Equals (object other)
|
||||
public override bool Equals (object obj)
|
||||
{
|
||||
MetadataConversionError e = other as MetadataConversionError;
|
||||
MetadataConversionError e = obj as MetadataConversionError;
|
||||
return e != null &&
|
||||
e.warning == warning &&
|
||||
e.msg == msg;
|
||||
|
@@ -53,7 +53,7 @@ namespace System.ServiceModel.Description
|
||||
ServiceContractGenerationContext contract,
|
||||
OperationDescription operation,
|
||||
CodeTypeDeclaration declaringType,
|
||||
CodeMemberMethod method,
|
||||
CodeMemberMethod syncMethod,
|
||||
CodeMemberMethod beginMethod,
|
||||
CodeMemberMethod endMethod)
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace System.ServiceModel.Description
|
||||
this.contract = contract;
|
||||
this.operation = operation;
|
||||
declaring_type = declaringType;
|
||||
this.method = method;
|
||||
this.method = syncMethod;
|
||||
this.begin_method = beginMethod;
|
||||
this.end_method = endMethod;
|
||||
}
|
||||
|
@@ -41,45 +41,45 @@ namespace System.ServiceModel.Description
|
||||
{
|
||||
}
|
||||
|
||||
public PolicyAssertionCollection (IEnumerable<XmlElement> list)
|
||||
: base (new List<XmlElement> (list))
|
||||
public PolicyAssertionCollection (IEnumerable<XmlElement> elements)
|
||||
: base (new List<XmlElement> (elements))
|
||||
{
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public bool Contains (string name, string ns)
|
||||
public bool Contains (string localName, string namespaceUri)
|
||||
{
|
||||
foreach (XmlElement el in this)
|
||||
if (el.LocalName == name && el.NamespaceURI == ns)
|
||||
if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public XmlElement Find (string name, string ns)
|
||||
public XmlElement Find (string localName, string namespaceUri)
|
||||
{
|
||||
foreach (XmlElement el in this)
|
||||
if (el.LocalName == name && el.NamespaceURI == ns)
|
||||
if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
|
||||
return el;
|
||||
return null;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Collection<XmlElement> FindAll (string name, string ns)
|
||||
public Collection<XmlElement> FindAll (string localName, string namespaceUri)
|
||||
{
|
||||
Collection<XmlElement> ret =
|
||||
new Collection<XmlElement> ();
|
||||
foreach (XmlElement el in this)
|
||||
if (el.LocalName == name && el.NamespaceURI == ns)
|
||||
if (el.LocalName == localName && el.NamespaceURI == namespaceUri)
|
||||
ret.Add (el);
|
||||
return ret;
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public XmlElement Remove (string name, string ns)
|
||||
public XmlElement Remove (string localName, string namespaceUri)
|
||||
{
|
||||
foreach (XmlElement el in this)
|
||||
if (el.LocalName == name && el.NamespaceURI == ns) {
|
||||
if (el.LocalName == localName && el.NamespaceURI == namespaceUri) {
|
||||
Remove (el);
|
||||
return el;
|
||||
}
|
||||
@@ -87,9 +87,9 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
|
||||
[MonoTODO]
|
||||
public Collection<XmlElement> RemoveAll (string name, string ns)
|
||||
public Collection<XmlElement> RemoveAll (string localName, string namespaceUri)
|
||||
{
|
||||
Collection<XmlElement> list = FindAll (name, ns);
|
||||
Collection<XmlElement> list = FindAll (localName, namespaceUri);
|
||||
foreach (XmlElement el in list)
|
||||
Remove (el);
|
||||
return list;
|
||||
|
@@ -111,23 +111,23 @@ namespace System.ServiceModel.Description
|
||||
{
|
||||
}
|
||||
|
||||
public ServiceContractGenerator (CodeCompileUnit ccu)
|
||||
: this (ccu, null)
|
||||
public ServiceContractGenerator (CodeCompileUnit targetCompileUnit)
|
||||
: this (targetCompileUnit, null)
|
||||
{
|
||||
}
|
||||
|
||||
public ServiceContractGenerator (ConfigurationType config)
|
||||
: this (null, config)
|
||||
public ServiceContractGenerator (ConfigurationType targetConfig)
|
||||
: this (null, targetConfig)
|
||||
{
|
||||
}
|
||||
|
||||
public ServiceContractGenerator (CodeCompileUnit ccu, ConfigurationType config)
|
||||
public ServiceContractGenerator (CodeCompileUnit targetCompileUnit, ConfigurationType targetConfig)
|
||||
{
|
||||
if (ccu == null)
|
||||
if (targetCompileUnit == null)
|
||||
this.ccu = new CodeCompileUnit ();
|
||||
else
|
||||
this.ccu = ccu;
|
||||
this.config = config;
|
||||
this.ccu = targetCompileUnit;
|
||||
this.config = targetConfig;
|
||||
Options |= ServiceContractGenerationOptions.ChannelInterface |
|
||||
ServiceContractGenerationOptions.ClientClass;
|
||||
}
|
||||
|
@@ -81,30 +81,30 @@ namespace System.ServiceModel.Description
|
||||
set { service_type = value; }
|
||||
}
|
||||
|
||||
public static ServiceDescription GetService (Type type)
|
||||
public static ServiceDescription GetService (Type serviceType)
|
||||
{
|
||||
// null Type is not rejected
|
||||
ServiceDescription sd = new ServiceDescription ();
|
||||
sd.ServiceType = type;
|
||||
if (type != null) {
|
||||
var att = type.GetCustomAttribute<ServiceBehaviorAttribute> (true);
|
||||
sd.ServiceType = serviceType;
|
||||
if (serviceType != null) {
|
||||
var att = serviceType.GetCustomAttribute<ServiceBehaviorAttribute> (true);
|
||||
if (att != null) {
|
||||
sd.Name = att.Name;
|
||||
sd.Namespace = att.Namespace;
|
||||
}
|
||||
if (sd.Name == null)
|
||||
sd.Name = type.Name;
|
||||
sd.Name = serviceType.Name;
|
||||
if (sd.Namespace == null)
|
||||
sd.Namespace = "http://tempuri.org/";
|
||||
}
|
||||
return sd;
|
||||
}
|
||||
|
||||
public static ServiceDescription GetService (object wellKnown)
|
||||
public static ServiceDescription GetService (object serviceImplementation)
|
||||
{
|
||||
// null instance is not rejected
|
||||
ServiceDescription sd = new ServiceDescription ();
|
||||
sd.ServiceType = wellKnown != null ? wellKnown.GetType () : null;
|
||||
sd.ServiceType = serviceImplementation != null ? serviceImplementation.GetType () : null;
|
||||
return sd;
|
||||
}
|
||||
}
|
||||
|
@@ -38,27 +38,27 @@ namespace System.ServiceModel.Description
|
||||
{
|
||||
}
|
||||
|
||||
public ServiceEndpoint Find (Type type)
|
||||
public ServiceEndpoint Find (Type contractType)
|
||||
{
|
||||
foreach (ServiceEndpoint e in this)
|
||||
if (e.Contract.ContractType == type)
|
||||
if (e.Contract.ContractType == contractType)
|
||||
return e;
|
||||
return null;
|
||||
}
|
||||
|
||||
public ServiceEndpoint Find (Uri uri)
|
||||
public ServiceEndpoint Find (Uri address)
|
||||
{
|
||||
foreach (ServiceEndpoint e in this)
|
||||
if (e.Address.Uri == uri)
|
||||
if (e.Address.Uri == address)
|
||||
return e;
|
||||
return null;
|
||||
}
|
||||
|
||||
public ServiceEndpoint Find (XmlQualifiedName name)
|
||||
public ServiceEndpoint Find (XmlQualifiedName contractName)
|
||||
{
|
||||
foreach (ServiceEndpoint e in this)
|
||||
if (e.Contract.Name == name.Name &&
|
||||
e.Contract.Namespace == name.Namespace)
|
||||
if (e.Contract.Name == contractName.Name &&
|
||||
e.Contract.Namespace == contractName.Namespace)
|
||||
return e;
|
||||
return null;
|
||||
}
|
||||
@@ -96,13 +96,13 @@ namespace System.ServiceModel.Description
|
||||
return list;
|
||||
}
|
||||
|
||||
public Collection<ServiceEndpoint> FindAll (XmlQualifiedName name)
|
||||
public Collection<ServiceEndpoint> FindAll (XmlQualifiedName contractName)
|
||||
{
|
||||
Collection<ServiceEndpoint> list =
|
||||
new Collection<ServiceEndpoint> ();
|
||||
foreach (ServiceEndpoint e in this)
|
||||
if (e.Contract.Name == name.Name &&
|
||||
e.Contract.Namespace == name.Namespace)
|
||||
if (e.Contract.Name == contractName.Name &&
|
||||
e.Contract.Namespace == contractName.Namespace)
|
||||
list.Add (e);
|
||||
return list;
|
||||
}
|
||||
|
@@ -73,50 +73,50 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type, string action)
|
||||
Type messageContract, string action)
|
||||
{
|
||||
return Create (type, action, TempUri);
|
||||
return Create (messageContract, action, TempUri);
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type, string action,
|
||||
Type messageContract, string action,
|
||||
string defaultNamespace)
|
||||
{
|
||||
return Create (type, action, defaultNamespace, (DataContractFormatAttribute)null);
|
||||
return Create (messageContract, action, defaultNamespace, (DataContractFormatAttribute)null);
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type, string action,
|
||||
Type messageContract, string action,
|
||||
DataContractFormatAttribute formatterAttribute)
|
||||
{
|
||||
return Create (type, action, TempUri, formatterAttribute);
|
||||
return Create (messageContract, action, TempUri, formatterAttribute);
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type,
|
||||
Type messageContract,
|
||||
string action, string defaultNamespace,
|
||||
DataContractFormatAttribute formatterAttribute)
|
||||
{
|
||||
return new DefaultTypedMessageConverter (
|
||||
new DataContractMessagesFormatter (
|
||||
MessageContractToMessagesDescription (type, defaultNamespace, action),
|
||||
MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
|
||||
formatterAttribute));
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type, string action,
|
||||
Type messageContract, string action,
|
||||
XmlSerializerFormatAttribute formatterAttribute)
|
||||
{
|
||||
return Create (type, action, TempUri, formatterAttribute);
|
||||
return Create (messageContract, action, TempUri, formatterAttribute);
|
||||
}
|
||||
|
||||
public static TypedMessageConverter Create (
|
||||
Type type, string action, string defaultNamespace,
|
||||
Type messageContract, string action, string defaultNamespace,
|
||||
XmlSerializerFormatAttribute formatterAttribute)
|
||||
{
|
||||
return new DefaultTypedMessageConverter (
|
||||
new XmlMessagesFormatter (
|
||||
MessageContractToMessagesDescription (type, defaultNamespace, action),
|
||||
MessageContractToMessagesDescription (messageContract, defaultNamespace, action),
|
||||
formatterAttribute));
|
||||
}
|
||||
|
||||
|
@@ -76,7 +76,7 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
|
||||
public MessageDescription GetMessageDescription (
|
||||
MessageBinding message)
|
||||
MessageBinding messageBinding)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
@@ -88,7 +88,7 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
|
||||
public OperationDescription GetOperationDescription (
|
||||
OperationBinding operation)
|
||||
OperationBinding operationBinding)
|
||||
{
|
||||
throw new NotImplementedException ();
|
||||
}
|
||||
|
@@ -441,12 +441,12 @@ namespace System.ServiceModel.Description
|
||||
|
||||
public void ExportEndpoints (
|
||||
IEnumerable<ServiceEndpoint> endpoints,
|
||||
XmlQualifiedName name)
|
||||
XmlQualifiedName wsdlServiceQName)
|
||||
{
|
||||
if (endpoints == null)
|
||||
throw new ArgumentNullException ("endpoints");
|
||||
if (name == null)
|
||||
throw new ArgumentNullException ("name");
|
||||
if (wsdlServiceQName == null)
|
||||
throw new ArgumentNullException ("wsdlServiceQName");
|
||||
|
||||
foreach (ServiceEndpoint ep in endpoints) {
|
||||
if (ep.Contract.Name == ServiceMetadataBehavior.MexContractName)
|
||||
|
@@ -153,9 +153,9 @@ namespace System.ServiceModel.Description
|
||||
beforeImportCalled = true;
|
||||
}
|
||||
|
||||
public SMBinding ImportBinding (WSBinding binding)
|
||||
public SMBinding ImportBinding (WSBinding wsdlBinding)
|
||||
{
|
||||
return ImportBinding (binding, true).Binding;
|
||||
return ImportBinding (wsdlBinding, true).Binding;
|
||||
}
|
||||
|
||||
ServiceEndpoint ImportBinding (WSBinding binding, bool throwOnError)
|
||||
@@ -546,20 +546,20 @@ namespace System.ServiceModel.Description
|
||||
}
|
||||
}
|
||||
|
||||
public ServiceEndpointCollection ImportEndpoints (WSBinding binding)
|
||||
public ServiceEndpointCollection ImportEndpoints (WSBinding wsdlBinding)
|
||||
{
|
||||
var coll = new ServiceEndpointCollection ();
|
||||
ImportEndpoints (coll, binding);
|
||||
ImportEndpoints (coll, wsdlBinding);
|
||||
return coll;
|
||||
}
|
||||
|
||||
public ServiceEndpointCollection ImportEndpoints (PortType portType)
|
||||
public ServiceEndpointCollection ImportEndpoints (PortType wsdlPortType)
|
||||
{
|
||||
var coll = new ServiceEndpointCollection ();
|
||||
|
||||
foreach (WSServiceDescription wsd in wsdl_documents) {
|
||||
foreach (WS.Binding binding in wsd.Bindings) {
|
||||
if (!binding.Type.Name.Equals (portType.Name))
|
||||
if (!binding.Type.Name.Equals (wsdlPortType.Name))
|
||||
continue;
|
||||
|
||||
ImportEndpoints (coll, binding);
|
||||
@@ -569,11 +569,11 @@ namespace System.ServiceModel.Description
|
||||
return coll;
|
||||
}
|
||||
|
||||
public ServiceEndpointCollection ImportEndpoints (Service service)
|
||||
public ServiceEndpointCollection ImportEndpoints (Service wsdlService)
|
||||
{
|
||||
var coll = new ServiceEndpointCollection ();
|
||||
|
||||
foreach (Port port in service.Ports) {
|
||||
foreach (Port port in wsdlService.Ports) {
|
||||
var sep = ImportEndpoint (port, false);
|
||||
if (sep != null)
|
||||
coll.Add (sep);
|
||||
|
@@ -51,13 +51,13 @@ namespace System.ServiceModel.Description
|
||||
|
||||
public XmlSerializerOperationBehavior (
|
||||
OperationDescription operation,
|
||||
XmlSerializerFormatAttribute format)
|
||||
XmlSerializerFormatAttribute attribute)
|
||||
{
|
||||
if (operation == null)
|
||||
throw new ArgumentNullException ("operation");
|
||||
if (format == null)
|
||||
format = new XmlSerializerFormatAttribute ();
|
||||
this.format = format;
|
||||
if (attribute == null)
|
||||
attribute = new XmlSerializerFormatAttribute ();
|
||||
this.format = attribute;
|
||||
this.operation = operation;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user