FromChildAttribute Class
Marks an instance method to be notified with the XML element.
[AttributeUsage(System.AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
public sealed class FromChildAttribute : Attribute
- Inheritance
- Attributes
Remarks
If the Oxbinder<T> finds the XML child element, it creates the object bound to the element, and invokes the annotated method corresponding to the child element, with that object as a single parameter.
This annotation must mark an instance method, of which the return type
must be void
, and that must have a single
parameter. The type of the parameter 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. And the class that has the instance method must be annotated
with ForElementAttribute.
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 method that returns void
and has the
single parameter whose type is the Director
class is annotated
with FromChildAttribute, there must be no other methods
annotated with FromChildAttribute of which the type of
the single parameter is Director
and also be no fields annotated
with ForChildAttribute whose type is the Director
class.
Methods
Equals(object) | (Inherited from Attribute) |
GetHashCode() | (Inherited from Attribute) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |