ForChildAttribute Class
Marks an instance field to be bound with the XML element.
[AttributeUsage(System.AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
public sealed class ForChildAttribute : 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 field with the object.
This annotation must mark an instance field. And the class that has the instance field must be annotated with ForElementAttribute.
The type of the field must be the class annotated with ForElementAttribute and also be one of the classes included in the Schema object, which is the value of the field annotated with ElementSchemaAttribute in that class.
Each class of the instance field marked with the ForChildAttribute and of the single parameter of the method
marked with FromChildAttribute must be unique in one
class. For example, in a class, if an instance field whose type is the
Director
class is annotated with ForChildAttribute, there must be no other fields annotated
with
ForChildAttribute
whose type is the Director
class and also be no methods
annotated with FromChildAttribute of which the type of
the single parameter is Director
.
Methods
Equals(object) | (Inherited from Attribute) |
GetHashCode() | (Inherited from Attribute) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |