Method Add
- Namespace
- IntentSharp.Catalog
- Assembly
- IntentSharp.Catalog.dll
Add<T>()
Registers T under its simple, full and assembly-qualified names.
public IntentTypeRegistry Add<T>()
Returns
Type Parameters
T
Exceptions
- ArgumentException
The type's full name or assembly-qualified name already names a different type.
Add(Type)
Registers type under its simple, full and assembly-qualified names. Registering the same type
again changes nothing.
public IntentTypeRegistry Add(Type type)
Parameters
typeType
Returns
Exceptions
- ArgumentNullException
typeis null.- ArgumentException
The type's full name or assembly-qualified name already names a different type.
Add(string, Type)
Registers type under an alias that files can use, for example Invoice for Contoso.Billing.InvoiceV2.
public IntentTypeRegistry Add(string name, Type type)
Parameters
namestringtypeType
Returns
Exceptions
- ArgumentNullException
nameortypeis null.- ArgumentException
nameis empty or white space, or already names another type. An alias may take over a name that is only another type's simple name.