OxbinderFactory Class
A factory for Oxbinder<T> objects.
public sealed class OxbinderFactory
- Inheritance
-
Oxbinder
Factory
Constructors
Oxbinder |
Initializes a new instance of the OxbinderFactory class. |
Methods
Of<T>() |
Creates an Oxbinder<T> object for the specified class. |
Equals(object) | (Inherited from object) |
GetHashCode() | (Inherited from object) |
GetType() | (Inherited from object) |
MemberwiseClone() | (Inherited from object) |
ToString() | (Inherited from object) |
Constructors Detail
OxbinderFactory(bool)
Initializes a new instance of the OxbinderFactory class.
public OxbinderFactory([bool ignoreWarnings = false])
Parameters
- ignoreWarnings
- bool
If true
, the Of<T>() method ignores warning
messages related to attributes on the target types and their
dependencies. Otherwise, the method treats warnings as errors,
causing a BindException.
Methods Detail
Of<T>()
Creates an Oxbinder<T> object for the specified class.
public Oxbinder<T> Of<T>()
Type Parameters
- T
-
class
The type of the class annotated with ForElementAttribute that represents the root element.
Returns
The Oxbinder<T> object to create new objects of the specified class from XML streams.
Remarks
When this method is called, the factory validates the attribute schema
and dependency graph for the specified type T
and all its transitively referenced types (i.e., types of constructor
parameters annotated with RequiredAttribute, OptionalAttribute, or MultipleAttribute). If any
validation fails or a circular dependency is detected, a BindException is thrown.