Click or drag to resize

FactoryCreateFirst Method (Type)

Creates an instance of the specified type depending on the ComponentAttribute. If multiple implementations are available, the Factory will prefer the implementation with the highest priority.

Namespace:  Cauldron.Activator
Assembly:  Cauldron.Activator (in Cauldron.Activator.dll) Version: 3.2.0.1 (3.2.0.1)
Syntax
C#
public static Object CreateFirst(
	Type contractType
)

Parameters

contractType
Type: SystemType
The Type that contract name derives from

Return Value

Type: Object
A reference to the newly created object.
Exceptions
ExceptionCondition
ArgumentNullException The parameter contractType is null
KeyNotFoundException The contract described by contractType was not found
ExceptionUnknown FactoryCreationPolicy
NotSupportedException An Object with Singleton with an implemented IDisposable must also implement the IDisposableObject interface.
See Also