mscorlib(4.0.0.0) API with additions
SoapFieldAttribute.cs
1 using System.Reflection;
3 
5 {
7  [AttributeUsage(AttributeTargets.Field)]
8  [ComVisible(true)]
9  public sealed class SoapFieldAttribute : SoapAttribute
10  {
11  [Serializable]
12  [Flags]
13  private enum ExplicitlySet
14  {
15  None = 0x0,
16  XmlElementName = 0x1
17  }
18 
19  private ExplicitlySet _explicitlySet;
20 
21  private string _xmlElementName;
22 
23  private int _order;
24 
27  public string XmlElementName
28  {
29  get
30  {
31  if (_xmlElementName == null && ReflectInfo != null)
32  {
33  _xmlElementName = ((FieldInfo)ReflectInfo).Name;
34  }
35  return _xmlElementName;
36  }
37  set
38  {
39  _xmlElementName = value;
40  _explicitlySet |= ExplicitlySet.XmlElementName;
41  }
42  }
43 
46  public int Order
47  {
48  get
49  {
50  return _order;
51  }
52  set
53  {
54  _order = value;
55  }
56  }
57 
61  public bool IsInteropXmlElement()
62  {
63  return (_explicitlySet & ExplicitlySet.XmlElementName) != ExplicitlySet.None;
64  }
65  }
66 }
object ReflectInfo
A reflection object used by attribute classes derived from the T:System.Runtime.Remoting....
Discovers the attributes of a field and provides access to field metadata.
Definition: FieldInfo.cs:15
bool IsInteropXmlElement()
Returns a value indicating whether the current attribute contains interop XML element values.
Definition: __Canon.cs:3
int Order
Gets or sets the order of the current field attribute.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
string XmlElementName
Gets or sets the XML element name of the field contained in the T:System.Runtime.Remoting....
Customizes SOAP generation and processing for a field. This class cannot be inherited.
Specifies that the class can be serialized.
Provides default functionality for all SOAP attributes.
Definition: SoapAttribute.cs:7