Mandatory Class
The factory of the SchemaType object that represents the child element that occurs exactly one times.
public static class Mandatory
- Inheritance
-
Mandatory
Methods
Of<T>() |
Creates the SchemaType object that represents the child element corresponding to the specified class that occurs exactly one times. |
Methods Detail
Of<T>()
Creates the SchemaType object that represents the child element corresponding to the specified class that occurs exactly one times.
public static SchemaType Of<T>()
Type Parameters
- T
-
class
The class annotated with ForElementAttribute, representing the child element that occurs exactly one times.
Returns
The SchemaType object.
Remarks
The SchemaType object for the specified class
that this method returns
must not follow consecutively one that
Multiple.Of<T>() or
Multiple.Of<T>() with the same class returns,
in the parameters of the
Schema.Of(SchemaType[]).
For example, both Schema.Of(Optional.Of<Movie>(),
Mandatory.Of<Movie>())
and
Schema.Of(Multiple.Of<Movie>(),
Mandatory.Of<Movie>())
are invalid.