IsValid Method
Definition
IsValid<T>(Type, Type)
Determines if a given pair of types are a valid as a dependency.
public static bool IsValid<T>(Type provider, Type contract)
Parameters
Returns
- bool
trueif the specified provider is a valid dependency; otherwise,false.
Type Parameters
TThe type of the service to validate.
Remarks
Dependency formula: provider.HasInterfaces(contract) && provider.IsClass && !provider.IsAbstract && !provider.IsInterface