RequiredAttribute Class
Marks a constructor parameter to be bound to an XML element that occurs exactly once.
C#
[AttributeUsage(System.AttributeTargets.Parameter, Inherited = false, AllowMultiple = false)]
public sealed class RequiredAttribute : Attribute
- Inheritance
- Attributes
Remarks
If the Oxbinder<T> finds the XML child element, it creates the object bound to the element, and then populates the annotated parameter with the object.
This annotation must mark a constructor parameter. The class containing this constructor must be annotated with ForElementAttribute.
The parameter must be of type T
or BindResult<T>, where T
is a class
annotated with ForElementAttribute. If no matching child
element is found, a BindException is thrown.
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) |