Metalama 1.0 / / Metalama Documentation / Aspect API Documentation / Metalama.​Framework.​Dependency­Injection / Dependency­Injection­Options / Register­Framework

Method RegisterFramework

RegisterFramework(IDependencyInjectionFramework)

Registers an implementation of the IDependencyInjectionFramework interface with highest priority. The registration is ignored if another framework of the same was already registered. This method is typically called from the transitive project fabric of libraries that implement a specific dependency injection framework so that they are registered first by default. In a user project, you should rather set the RegisteredFrameworks property.

Declaration
public bool RegisterFramework(IDependencyInjectionFramework framework)
Parameters
Type Name Description
IDependencyInjectionFramework framework
Returns
Type Description
Boolean

true if framework was registered, or false if a framework of the same type was already registered.