ReflectionServiceGetClassInstanceByAttribute Method |
Tries to get a class instance for a given attribute type. All loaded assemblies are searched for classes that attributeType applies to,
then for all found classes the instantiation of a class is tried, until a instance is created successfully.
Namespace: Altaxo.Main.ServicesAssembly: AltaxoBase (in AltaxoBase.dll) Version: 4.8.3179.0 (4.8.3179.0)
Syntax public static Object? GetClassInstanceByAttribute(
Type attributeType,
Type expectedType,
Object[] creationArgs
)
Parameters
- attributeType Type
- The type of attribute the class(es) to instantiate must be assigned to.
- expectedType Type
- The expected type of return value.
- creationArgs Object
- The creation arguments used to instantiate a class.
Return Value
ObjectThe instance of the first class for which the instantiation was successfull and results in the expectedType. Otherwise null.
See Also