mscorlib(4.0.0.0) API with additions
SoapServices.cs
1 using System.Collections;
2 using System.Reflection;
5 using System.Security;
6 using System.Text;
7 
9 {
11  [SecurityCritical]
12  [ComVisible(true)]
13  public class SoapServices
14  {
15  private class XmlEntry
16  {
17  public string Name;
18 
19  public string Namespace;
20 
21  public XmlEntry(string name, string xmlNamespace)
22  {
23  Name = name;
24  Namespace = xmlNamespace;
25  }
26  }
27 
28  private class XmlToFieldTypeMap
29  {
30  private class FieldEntry
31  {
32  public Type Type;
33 
34  public string Name;
35 
36  public FieldEntry(Type type, string name)
37  {
38  Type = type;
39  Name = name;
40  }
41  }
42 
43  private Hashtable _attributes = new Hashtable();
44 
45  private Hashtable _elements = new Hashtable();
46 
47  [SecurityCritical]
48  public void AddXmlElement(Type fieldType, string fieldName, string xmlElement, string xmlNamespace)
49  {
50  _elements[CreateKey(xmlElement, xmlNamespace)] = new FieldEntry(fieldType, fieldName);
51  }
52 
53  [SecurityCritical]
54  public void AddXmlAttribute(Type fieldType, string fieldName, string xmlAttribute, string xmlNamespace)
55  {
56  _attributes[CreateKey(xmlAttribute, xmlNamespace)] = new FieldEntry(fieldType, fieldName);
57  }
58 
59  [SecurityCritical]
60  public void GetFieldTypeAndNameFromXmlElement(string xmlElement, string xmlNamespace, out Type type, out string name)
61  {
62  FieldEntry fieldEntry = (FieldEntry)_elements[CreateKey(xmlElement, xmlNamespace)];
63  if (fieldEntry != null)
64  {
65  type = fieldEntry.Type;
66  name = fieldEntry.Name;
67  }
68  else
69  {
70  type = null;
71  name = null;
72  }
73  }
74 
75  [SecurityCritical]
76  public void GetFieldTypeAndNameFromXmlAttribute(string xmlAttribute, string xmlNamespace, out Type type, out string name)
77  {
78  FieldEntry fieldEntry = (FieldEntry)_attributes[CreateKey(xmlAttribute, xmlNamespace)];
79  if (fieldEntry != null)
80  {
81  type = fieldEntry.Type;
82  name = fieldEntry.Name;
83  }
84  else
85  {
86  type = null;
87  name = null;
88  }
89  }
90  }
91 
92  private static Hashtable _interopXmlElementToType = Hashtable.Synchronized(new Hashtable());
93 
94  private static Hashtable _interopTypeToXmlElement = Hashtable.Synchronized(new Hashtable());
95 
96  private static Hashtable _interopXmlTypeToType = Hashtable.Synchronized(new Hashtable());
97 
98  private static Hashtable _interopTypeToXmlType = Hashtable.Synchronized(new Hashtable());
99 
100  private static Hashtable _xmlToFieldTypeMap = Hashtable.Synchronized(new Hashtable());
101 
102  private static Hashtable _methodBaseToSoapAction = Hashtable.Synchronized(new Hashtable());
103 
104  private static Hashtable _soapActionToMethodBase = Hashtable.Synchronized(new Hashtable());
105 
106  internal static string startNS = "http://schemas.microsoft.com/clr/";
107 
108  internal static string assemblyNS = "http://schemas.microsoft.com/clr/assem/";
109 
110  internal static string namespaceNS = "http://schemas.microsoft.com/clr/ns/";
111 
112  internal static string fullNS = "http://schemas.microsoft.com/clr/nsassem/";
113 
117  public static string XmlNsForClrType => startNS;
118 
122  public static string XmlNsForClrTypeWithAssembly => assemblyNS;
123 
127  public static string XmlNsForClrTypeWithNs => namespaceNS;
128 
132  public static string XmlNsForClrTypeWithNsAndAssembly => fullNS;
133 
134  private SoapServices()
135  {
136  }
137 
138  private static string CreateKey(string elementName, string elementNamespace)
139  {
140  if (elementNamespace == null)
141  {
142  return elementName;
143  }
144  return elementName + " " + elementNamespace;
145  }
146 
152  [SecurityCritical]
153  public static void RegisterInteropXmlElement(string xmlElement, string xmlNamespace, Type type)
154  {
155  _interopXmlElementToType[CreateKey(xmlElement, xmlNamespace)] = type;
156  _interopTypeToXmlElement[type] = new XmlEntry(xmlElement, xmlNamespace);
157  }
158 
164  [SecurityCritical]
165  public static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type)
166  {
167  _interopXmlTypeToType[CreateKey(xmlType, xmlTypeNamespace)] = type;
168  _interopTypeToXmlType[type] = new XmlEntry(xmlType, xmlTypeNamespace);
169  }
170 
174  [SecurityCritical]
175  public static void PreLoad(Type type)
176  {
177  if (type == null)
178  {
179  throw new ArgumentNullException("type");
180  }
181  if (!(type is RuntimeType))
182  {
183  throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeType"));
184  }
185  MethodInfo[] methods = type.GetMethods();
186  MethodInfo[] array = methods;
187  foreach (MethodInfo mb in array)
188  {
190  }
192  if (soapTypeAttribute.IsInteropXmlElement())
193  {
194  RegisterInteropXmlElement(soapTypeAttribute.XmlElementName, soapTypeAttribute.XmlNamespace, type);
195  }
196  if (soapTypeAttribute.IsInteropXmlType())
197  {
198  RegisterInteropXmlType(soapTypeAttribute.XmlTypeName, soapTypeAttribute.XmlTypeNamespace, type);
199  }
200  int num = 0;
201  XmlToFieldTypeMap xmlToFieldTypeMap = new XmlToFieldTypeMap();
202  FieldInfo[] fields = type.GetFields(BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
203  foreach (FieldInfo fieldInfo in fields)
204  {
206  if (soapFieldAttribute.IsInteropXmlElement())
207  {
208  string xmlElementName = soapFieldAttribute.XmlElementName;
209  string xmlNamespace = soapFieldAttribute.XmlNamespace;
210  if (soapFieldAttribute.UseAttribute)
211  {
212  xmlToFieldTypeMap.AddXmlAttribute(fieldInfo.FieldType, fieldInfo.Name, xmlElementName, xmlNamespace);
213  }
214  else
215  {
216  xmlToFieldTypeMap.AddXmlElement(fieldInfo.FieldType, fieldInfo.Name, xmlElementName, xmlNamespace);
217  }
218  num++;
219  }
220  }
221  if (num > 0)
222  {
223  _xmlToFieldTypeMap[type] = xmlToFieldTypeMap;
224  }
225  }
226 
230  [SecurityCritical]
231  public static void PreLoad(Assembly assembly)
232  {
233  if (assembly == null)
234  {
235  throw new ArgumentNullException("assembly");
236  }
237  if (!(assembly is RuntimeAssembly))
238  {
239  throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeAssembly"), "assembly");
240  }
241  Type[] types = assembly.GetTypes();
242  Type[] array = types;
243  foreach (Type type in array)
244  {
245  PreLoad(type);
246  }
247  }
248 
254  [SecurityCritical]
255  public static Type GetInteropTypeFromXmlElement(string xmlElement, string xmlNamespace)
256  {
257  return (Type)_interopXmlElementToType[CreateKey(xmlElement, xmlNamespace)];
258  }
259 
265  [SecurityCritical]
266  public static Type GetInteropTypeFromXmlType(string xmlType, string xmlTypeNamespace)
267  {
268  return (Type)_interopXmlTypeToType[CreateKey(xmlType, xmlTypeNamespace)];
269  }
270 
278  public static void GetInteropFieldTypeAndNameFromXmlElement(Type containingType, string xmlElement, string xmlNamespace, out Type type, out string name)
279  {
280  if (containingType == null)
281  {
282  type = null;
283  name = null;
284  return;
285  }
286  XmlToFieldTypeMap xmlToFieldTypeMap = (XmlToFieldTypeMap)_xmlToFieldTypeMap[containingType];
287  if (xmlToFieldTypeMap != null)
288  {
289  xmlToFieldTypeMap.GetFieldTypeAndNameFromXmlElement(xmlElement, xmlNamespace, out type, out name);
290  return;
291  }
292  type = null;
293  name = null;
294  }
295 
303  public static void GetInteropFieldTypeAndNameFromXmlAttribute(Type containingType, string xmlAttribute, string xmlNamespace, out Type type, out string name)
304  {
305  if (containingType == null)
306  {
307  type = null;
308  name = null;
309  return;
310  }
311  XmlToFieldTypeMap xmlToFieldTypeMap = (XmlToFieldTypeMap)_xmlToFieldTypeMap[containingType];
312  if (xmlToFieldTypeMap != null)
313  {
314  xmlToFieldTypeMap.GetFieldTypeAndNameFromXmlAttribute(xmlAttribute, xmlNamespace, out type, out name);
315  return;
316  }
317  type = null;
318  name = null;
319  }
320 
328  [SecurityCritical]
329  public static bool GetXmlElementForInteropType(Type type, out string xmlElement, out string xmlNamespace)
330  {
331  XmlEntry xmlEntry = (XmlEntry)_interopTypeToXmlElement[type];
332  if (xmlEntry != null)
333  {
334  xmlElement = xmlEntry.Name;
335  xmlNamespace = xmlEntry.Namespace;
336  return true;
337  }
339  if (soapTypeAttribute.IsInteropXmlElement())
340  {
341  xmlElement = soapTypeAttribute.XmlElementName;
342  xmlNamespace = soapTypeAttribute.XmlNamespace;
343  return true;
344  }
345  xmlElement = null;
346  xmlNamespace = null;
347  return false;
348  }
349 
357  [SecurityCritical]
358  public static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace)
359  {
360  XmlEntry xmlEntry = (XmlEntry)_interopTypeToXmlType[type];
361  if (xmlEntry != null)
362  {
363  xmlType = xmlEntry.Name;
364  xmlTypeNamespace = xmlEntry.Namespace;
365  return true;
366  }
368  if (soapTypeAttribute.IsInteropXmlType())
369  {
370  xmlType = soapTypeAttribute.XmlTypeName;
371  xmlTypeNamespace = soapTypeAttribute.XmlTypeNamespace;
372  return true;
373  }
374  xmlType = null;
375  xmlTypeNamespace = null;
376  return false;
377  }
378 
383  [SecurityCritical]
384  public static string GetXmlNamespaceForMethodCall(MethodBase mb)
385  {
387  return soapMethodAttribute.XmlNamespace;
388  }
389 
394  [SecurityCritical]
396  {
398  return soapMethodAttribute.ResponseXmlNamespace;
399  }
400 
404  [SecurityCritical]
406  {
408  if (soapMethodAttribute.SoapActionExplicitySet)
409  {
410  RegisterSoapActionForMethodBase(mb, soapMethodAttribute.SoapAction);
411  }
412  }
413 
418  public static void RegisterSoapActionForMethodBase(MethodBase mb, string soapAction)
419  {
420  if (soapAction != null)
421  {
422  _methodBaseToSoapAction[mb] = soapAction;
423  ArrayList arrayList = (ArrayList)_soapActionToMethodBase[soapAction];
424  if (arrayList == null)
425  {
426  lock (_soapActionToMethodBase)
427  {
428  arrayList = ArrayList.Synchronized(new ArrayList());
429  _soapActionToMethodBase[soapAction] = arrayList;
430  }
431  }
432  arrayList.Add(mb);
433  }
434  }
435 
440  [SecurityCritical]
441  public static string GetSoapActionFromMethodBase(MethodBase mb)
442  {
443  string text = (string)_methodBaseToSoapAction[mb];
444  if (text == null)
445  {
447  text = soapMethodAttribute.SoapAction;
448  }
449  return text;
450  }
451 
458  [SecurityCritical]
459  public static bool IsSoapActionValidForMethodBase(string soapAction, MethodBase mb)
460  {
461  if (mb == null)
462  {
463  throw new ArgumentNullException("mb");
464  }
465  if (soapAction[0] == '"' && soapAction[soapAction.Length - 1] == '"')
466  {
467  soapAction = soapAction.Substring(1, soapAction.Length - 2);
468  }
470  if (string.CompareOrdinal(soapMethodAttribute.SoapAction, soapAction) == 0)
471  {
472  return true;
473  }
474  string text = (string)_methodBaseToSoapAction[mb];
475  if (text != null && string.CompareOrdinal(text, soapAction) == 0)
476  {
477  return true;
478  }
479  string[] array = soapAction.Split('#');
480  if (array.Length == 2)
481  {
482  bool assemblyIncluded;
483  string typeNameForSoapActionNamespace = XmlNamespaceEncoder.GetTypeNameForSoapActionNamespace(array[0], out assemblyIncluded);
484  if (typeNameForSoapActionNamespace == null)
485  {
486  return false;
487  }
488  string value = array[1];
489  RuntimeMethodInfo runtimeMethodInfo = mb as RuntimeMethodInfo;
490  RuntimeConstructorInfo runtimeConstructorInfo = mb as RuntimeConstructorInfo;
491  RuntimeModule runtimeModule;
492  if (runtimeMethodInfo != null)
493  {
494  runtimeModule = runtimeMethodInfo.GetRuntimeModule();
495  }
496  else
497  {
498  if (!(runtimeConstructorInfo != null))
499  {
500  throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeReflectionObject"));
501  }
502  runtimeModule = runtimeConstructorInfo.GetRuntimeModule();
503  }
504  string text2 = mb.DeclaringType.FullName;
505  if (assemblyIncluded)
506  {
507  text2 = text2 + ", " + runtimeModule.GetRuntimeAssembly().GetSimpleName();
508  }
509  if (text2.Equals(typeNameForSoapActionNamespace))
510  {
511  return mb.Name.Equals(value);
512  }
513  return false;
514  }
515  return false;
516  }
517 
526  public static bool GetTypeAndMethodNameFromSoapAction(string soapAction, out string typeName, out string methodName)
527  {
528  if (soapAction[0] == '"' && soapAction[soapAction.Length - 1] == '"')
529  {
530  soapAction = soapAction.Substring(1, soapAction.Length - 2);
531  }
532  ArrayList arrayList = (ArrayList)_soapActionToMethodBase[soapAction];
533  if (arrayList != null)
534  {
535  if (arrayList.Count > 1)
536  {
537  typeName = null;
538  methodName = null;
539  return false;
540  }
541  MethodBase methodBase = (MethodBase)arrayList[0];
542  if (methodBase != null)
543  {
544  RuntimeMethodInfo runtimeMethodInfo = methodBase as RuntimeMethodInfo;
545  RuntimeConstructorInfo runtimeConstructorInfo = methodBase as RuntimeConstructorInfo;
546  RuntimeModule runtimeModule;
547  if (runtimeMethodInfo != null)
548  {
549  runtimeModule = runtimeMethodInfo.GetRuntimeModule();
550  }
551  else
552  {
553  if (!(runtimeConstructorInfo != null))
554  {
555  throw new ArgumentException(Environment.GetResourceString("Argument_MustBeRuntimeReflectionObject"));
556  }
557  runtimeModule = runtimeConstructorInfo.GetRuntimeModule();
558  }
559  typeName = methodBase.DeclaringType.FullName + ", " + runtimeModule.GetRuntimeAssembly().GetSimpleName();
560  methodName = methodBase.Name;
561  return true;
562  }
563  }
564  string[] array = soapAction.Split('#');
565  if (array.Length == 2)
566  {
567  typeName = XmlNamespaceEncoder.GetTypeNameForSoapActionNamespace(array[0], out bool _);
568  if (typeName == null)
569  {
570  methodName = null;
571  return false;
572  }
573  methodName = array[1];
574  return true;
575  }
576  typeName = null;
577  methodName = null;
578  return false;
579  }
580 
586  public static bool IsClrTypeNamespace(string namespaceString)
587  {
588  if (namespaceString.StartsWith(startNS, StringComparison.Ordinal))
589  {
590  return true;
591  }
592  return false;
593  }
594 
601  [SecurityCritical]
602  public static string CodeXmlNamespaceForClrTypeNamespace(string typeNamespace, string assemblyName)
603  {
604  StringBuilder stringBuilder = new StringBuilder(256);
605  if (IsNameNull(typeNamespace))
606  {
607  if (IsNameNull(assemblyName))
608  {
609  throw new ArgumentNullException("typeNamespace,assemblyName");
610  }
611  stringBuilder.Append(assemblyNS);
612  UriEncode(assemblyName, stringBuilder);
613  }
614  else if (IsNameNull(assemblyName))
615  {
616  stringBuilder.Append(namespaceNS);
617  stringBuilder.Append(typeNamespace);
618  }
619  else
620  {
621  stringBuilder.Append(fullNS);
622  if (typeNamespace[0] == '.')
623  {
624  stringBuilder.Append(typeNamespace.Substring(1));
625  }
626  else
627  {
628  stringBuilder.Append(typeNamespace);
629  }
630  stringBuilder.Append('/');
631  UriEncode(assemblyName, stringBuilder);
632  }
633  return stringBuilder.ToString();
634  }
635 
644  [SecurityCritical]
645  public static bool DecodeXmlNamespaceForClrTypeNamespace(string inNamespace, out string typeNamespace, out string assemblyName)
646  {
647  if (IsNameNull(inNamespace))
648  {
649  throw new ArgumentNullException("inNamespace");
650  }
651  assemblyName = null;
652  typeNamespace = "";
653  if (inNamespace.StartsWith(assemblyNS, StringComparison.Ordinal))
654  {
655  assemblyName = UriDecode(inNamespace.Substring(assemblyNS.Length));
656  }
657  else if (inNamespace.StartsWith(namespaceNS, StringComparison.Ordinal))
658  {
659  typeNamespace = inNamespace.Substring(namespaceNS.Length);
660  }
661  else
662  {
663  if (!inNamespace.StartsWith(fullNS, StringComparison.Ordinal))
664  {
665  return false;
666  }
667  int num = inNamespace.IndexOf("/", fullNS.Length);
668  typeNamespace = inNamespace.Substring(fullNS.Length, num - fullNS.Length);
669  assemblyName = UriDecode(inNamespace.Substring(num + 1));
670  }
671  return true;
672  }
673 
674  internal static void UriEncode(string value, StringBuilder sb)
675  {
676  if (value == null || value.Length == 0)
677  {
678  return;
679  }
680  for (int i = 0; i < value.Length; i++)
681  {
682  if (value[i] == ' ')
683  {
684  sb.Append("%20");
685  }
686  else if (value[i] == '=')
687  {
688  sb.Append("%3D");
689  }
690  else if (value[i] == ',')
691  {
692  sb.Append("%2C");
693  }
694  else
695  {
696  sb.Append(value[i]);
697  }
698  }
699  }
700 
701  internal static string UriDecode(string value)
702  {
703  if (value == null || value.Length == 0)
704  {
705  return value;
706  }
707  StringBuilder stringBuilder = new StringBuilder();
708  for (int i = 0; i < value.Length; i++)
709  {
710  if (value[i] == '%' && value.Length - i >= 3)
711  {
712  if (value[i + 1] == '2' && value[i + 2] == '0')
713  {
714  stringBuilder.Append(' ');
715  i += 2;
716  }
717  else if (value[i + 1] == '3' && value[i + 2] == 'D')
718  {
719  stringBuilder.Append('=');
720  i += 2;
721  }
722  else if (value[i + 1] == '2' && value[i + 2] == 'C')
723  {
724  stringBuilder.Append(',');
725  i += 2;
726  }
727  else
728  {
729  stringBuilder.Append(value[i]);
730  }
731  }
732  else
733  {
734  stringBuilder.Append(value[i]);
735  }
736  }
737  return stringBuilder.ToString();
738  }
739 
740  private static bool IsNameNull(string name)
741  {
742  if (name == null || name.Length == 0)
743  {
744  return true;
745  }
746  return false;
747  }
748  }
749 }
string SoapAction
Gets or sets the SOAPAction header field used with HTTP requests sent with this method....
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
abstract Type FieldType
Gets the type of this field object.
Definition: FieldInfo.cs:34
abstract Type DeclaringType
Gets the class that declares this member.
Definition: MemberInfo.cs:36
unsafe override string ToString()
Converts the value of this instance to a T:System.String.
static void PreLoad(Assembly assembly)
Preloads every T:System.Type found in the specified T:System.Reflection.Assembly from the information...
static bool IsSoapActionValidForMethodBase(string soapAction, MethodBase mb)
Determines if the specified SOAPAction is acceptable for a given T:System.Reflection....
Discovers the attributes of a method and provides access to method metadata.
Definition: MethodInfo.cs:13
abstract string FullName
Gets the fully qualified name of the type, including its namespace but not its assembly.
Definition: Type.cs:153
static string CodeXmlNamespaceForClrTypeNamespace(string typeNamespace, string assemblyName)
Returns the common language runtime type namespace name from the provided namespace and assembly name...
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
static IList Synchronized(IList list)
Returns an T:System.Collections.IList wrapper that is synchronized (thread safe).
Definition: ArrayList.cs:3057
static bool DecodeXmlNamespaceForClrTypeNamespace(string inNamespace, out string typeNamespace, out string assemblyName)
Decodes the XML namespace and assembly names from the provided common language runtime namespace.
Discovers the attributes of a field and provides access to field metadata.
Definition: FieldInfo.cs:15
virtual int Count
Gets the number of elements actually contained in the T:System.Collections.ArrayList.
Definition: ArrayList.cs:2255
bool IsInteropXmlElement()
Returns a value indicating whether the current attribute contains interop XML element values.
BindingFlags
Specifies flags that control binding and the way in which the search for members and types is conduct...
Definition: BindingFlags.cs:10
Customizes SOAP generation and processing for target types. This class cannot be inherited.
Definition: __Canon.cs:3
static void RegisterInteropXmlElement(string xmlElement, string xmlNamespace, Type type)
Associates the given XML element name and namespace with a run-time type that should be used for dese...
Provides several methods for using and publishing remoted objects in SOAP format.
Definition: SoapServices.cs:13
string ResponseXmlNamespace
Gets or sets the XML element namesapce used for method response to the target method.
string XmlElementName
Gets or sets the XML element name.
static string XmlNsForClrTypeWithAssembly
Gets the default XML namespace prefix that should be used for XML encoding of a common language runti...
static void GetInteropFieldTypeAndNameFromXmlAttribute(Type containingType, string xmlAttribute, string xmlNamespace, out Type type, out string name)
Retrieves field type from XML attribute name, namespace, and the T:System.Type of the containing obje...
override string XmlNamespace
Gets or sets the XML namespace that is used during serialization of the target object type.
static string XmlNsForClrTypeWithNs
Gets the XML namespace prefix that should be used for XML encoding of a common language runtime class...
static string XmlNsForClrTypeWithNsAndAssembly
Gets the default XML namespace prefix that should be used for XML encoding of a common language runti...
static string GetXmlNamespaceForMethodCall(MethodBase mb)
Retrieves the XML namespace used during remote calls of the method specified in the given T:System....
static bool GetXmlElementForInteropType(Type type, out string xmlElement, out string xmlNamespace)
Returns XML element information that should be used when serializing the given type.
Provides information about, and means to manipulate, the current environment and platform....
Definition: Environment.cs:21
MethodInfo [] GetMethods()
Returns all the public methods of the current T:System.Type.
Definition: Type.cs:1660
StringBuilder Append(char value, int repeatCount)
Appends a specified number of copies of the string representation of a Unicode character to this inst...
static bool IsClrTypeNamespace(string namespaceString)
Returns a Boolean value that indicates whether the specified namespace is native to the common langua...
override string XmlNamespace
Gets or sets the XML namespace that is used during serialization of remote method calls of the target...
Represents a collection of key/value pairs that are organized based on the hash code of the key....
Definition: Hashtable.cs:17
static void PreLoad(Type type)
Preloads the given T:System.Type based on values set in a T:System.Runtime.Remoting....
string XmlTypeNamespace
Gets or sets the XML type namespace for the current object type.
virtual bool UseAttribute
Gets or sets a value indicating whether the target of the current attribute will be serialized as an ...
Represents an assembly, which is a reusable, versionable, and self-describing building block of a com...
Definition: Assembly.cs:22
static bool GetTypeAndMethodNameFromSoapAction(string soapAction, out string typeName, out string methodName)
Determines the type and method name of the method associated with the specified SOAPAction value.
Represents type declarations: class types, interface types, array types, value types,...
Definition: Type.cs:18
Defines utility methods for use by the .NET Framework remoting infrastructure.
static string GetXmlNamespaceForMethodResponse(MethodBase mb)
Retrieves the XML namespace used during the generation of responses to the remote call to the method ...
static Hashtable Synchronized(Hashtable table)
Returns a synchronized (thread-safe) wrapper for the T:System.Collections.Hashtable.
Definition: Hashtable.cs:1397
Provides information about methods and constructors.
Definition: MethodBase.cs:19
abstract string Name
Gets the name of the current member.
Definition: MemberInfo.cs:27
virtual Type [] GetTypes()
Gets the types defined in this assembly.
Definition: Assembly.cs:941
static bool GetXmlTypeForInteropType(Type type, out string xmlType, out string xmlTypeNamespace)
Returns XML type information that should be used when serializing the given T:System....
Represents a mutable string of characters. This class cannot be inherited.To browse the ....
virtual int Add(object value)
Adds an object to the end of the T:System.Collections.ArrayList.
Definition: ArrayList.cs:2381
string XmlElementName
Gets or sets the XML element name of the field contained in the T:System.Runtime.Remoting....
static string XmlNsForClrType
Gets the XML namespace prefix for common language runtime types.
The exception that is thrown when one of the arguments provided to a method is not valid.
virtual string XmlNamespace
Gets or sets the XML namespace name.
static void RegisterSoapActionForMethodBase(MethodBase mb, string soapAction)
Associates the provided SOAPAction value with the given T:System.Reflection.MethodBase for use in cha...
static void GetInteropFieldTypeAndNameFromXmlElement(Type containingType, string xmlElement, string xmlNamespace, out Type type, out string name)
Retrieves the T:System.Type and name of a field from the provided XML element name,...
static Type GetInteropTypeFromXmlElement(string xmlElement, string xmlNamespace)
Retrieves the T:System.Type that should be used during deserialization of an unrecognized object type...
Customizes SOAP generation and processing for a field. This class cannot be inherited.
static SoapAttribute GetCachedSoapAttribute(object reflectionObject)
Gets an appropriate SOAP-related attribute for the specified class member or method parameter.
static string GetSoapActionFromMethodBase(MethodBase mb)
Returns the SOAPAction value associated with the method specified in the given T:System....
static void RegisterInteropXmlType(string xmlType, string xmlTypeNamespace, Type type)
Associates the given XML type name and namespace with the run-time type that should be used for deser...
static void RegisterSoapActionForMethodBase(MethodBase mb)
Associates the specified T:System.Reflection.MethodBase with the SOAPAction cached with it.
Customizes SOAP generation and processing for a method. This class cannot be inherited.
static Type GetInteropTypeFromXmlType(string xmlType, string xmlTypeNamespace)
Retrieves the object T:System.Type that should be used during deserialization of an unrecognized obje...
string XmlTypeName
Gets or sets the XML type name for the target object type.
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...
Definition: ArrayList.cs:14