MultipleAttribute Class
Marks a constructor parameter to be bound to an XML element that can occur zero or more times.
C#
[AttributeUsage(System.AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
public sealed class MultipleAttribute : Attribute
- Inheritance
- Attributes
Remarks
If the Oxbinder<T> finds matching XML child elements, it creates objects bound to those elements, and then populates the annotated parameter with a collection of these objects.
This attribute must mark a constructor parameter. The class containing this constructor must be annotated with ForElementAttribute.
The parameter must be of type IEnumerable<T> or IEnumerable<T>, where
T
is a class annotated with ForElementAttribute. If no
matching child elements are found, an empty collection is provided.
After a parameter with MultipleAttribute, you cannot specify another parameter for the same element name.
Properties
Methods
Equals(object) | (Inherited from Attribute) |
GetHashCode() | (Inherited from Attribute) |
IsDefaultAttribute() | (Inherited from Attribute) |
Match(object) | (Inherited from Attribute) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |