OxbinderFactory Class

A factory for Oxbinder<T> objects.

C#
public sealed class OxbinderFactory
Inheritance
OxbinderFactory

Constructors

OxbinderFactory(bool)

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.

C#
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.

C#
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.

See Also