mscorlib(4.0.0.0) API with additions
XmlAnyElementAttribute.cs
2 {
4  [AttributeUsage(AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue, AllowMultiple = true)]
5  [global::__DynamicallyInvokable]
7  {
8  private string name;
9 
10  private string ns;
11 
12  private int order = -1;
13 
14  private bool nsSpecified;
15 
19  [global::__DynamicallyInvokable]
20  public string Name
21  {
22  [global::__DynamicallyInvokable]
23  get
24  {
25  if (name != null)
26  {
27  return name;
28  }
29  return string.Empty;
30  }
31  [global::__DynamicallyInvokable]
32  set
33  {
34  name = value;
35  }
36  }
37 
40  [global::__DynamicallyInvokable]
41  public string Namespace
42  {
43  [global::__DynamicallyInvokable]
44  get
45  {
46  return ns;
47  }
48  [global::__DynamicallyInvokable]
49  set
50  {
51  ns = value;
52  nsSpecified = true;
53  }
54  }
55 
58  [global::__DynamicallyInvokable]
59  public int Order
60  {
61  [global::__DynamicallyInvokable]
62  get
63  {
64  return order;
65  }
66  [global::__DynamicallyInvokable]
67  set
68  {
69  if (value < 0)
70  {
71  throw new ArgumentException(Res.GetString("XmlDisallowNegativeValues"), "Order");
72  }
73  order = value;
74  }
75  }
76 
77  internal bool NamespaceSpecified => nsSpecified;
78 
80  [global::__DynamicallyInvokable]
82  {
83  }
84 
87  [global::__DynamicallyInvokable]
88  public XmlAnyElementAttribute(string name)
89  {
90  this.name = name;
91  }
92 
96  [global::__DynamicallyInvokable]
97  public XmlAnyElementAttribute(string name, string ns)
98  {
99  this.name = name;
100  this.ns = ns;
101  nsSpecified = true;
102  }
103  }
104 }
Specifies that the member (a field that returns an array of T:System.Xml.XmlElement or T:System....
Represents the base class for custom attributes.
Definition: Attribute.cs:15
XmlAnyElementAttribute(string name)
Initializes a new instance of the T:System.Xml.Serialization.XmlAnyElementAttribute class and specifi...
XmlAnyElementAttribute()
Initializes a new instance of the T:System.Xml.Serialization.XmlAnyElementAttribute class.
string Namespace
Gets or sets the XML namespace generated in the XML document.
string Name
Gets or sets the XML element name.
AttributeTargets
Specifies the application elements on which it is valid to apply an attribute.
The exception that is thrown when one of the arguments provided to a method is not valid.
int Order
Gets or sets the explicit order in which the elements are serialized or deserialized.
XmlAnyElementAttribute(string name, string ns)
Initializes a new instance of the T:System.Xml.Serialization.XmlAnyElementAttribute class and specifi...