Table of Contents

Class CanMakeComponent

Namespace
AbanoubNassem.Trinity.Components
Assembly
AbanoubNassem.Trinity.dll
public class CanMakeComponent
Inheritance
CanMakeComponent
Derived
Inherited Members

Properties

Configurations

A reference to TrinityConfigurations in the IServiceProvider.

protected TrinityConfigurations Configurations { get; init; }

Property Value

TrinityConfigurations

ConnectionFactory

A reference to the ConnectionFactory.

protected Func<IDbConnection> ConnectionFactory { get; init; }

Property Value

Func<IDbConnection>

Localizer

A reference to the singleton of TrinityLocalizer.

protected TrinityLocalizer Localizer { get; init; }

Property Value

TrinityLocalizer

Logger

A reference to the current ILogger.

protected ILogger Logger { get; init; }

Property Value

ILogger

ModelState

A reference to the current ModelStateDictionary.

protected ModelStateDictionary ModelState { get; init; }

Property Value

ModelStateDictionary

Request

A reference to the current HttpRequest.

protected HttpRequest Request { get; init; }

Property Value

HttpRequest

ResourceValidator

An instance of the Resource Validator ResourceValidator.

protected ResourceValidator ResourceValidator { get; }

Property Value

ResourceValidator

Response

A reference to the current HttpResponse.

protected HttpResponse Response { get; init; }

Property Value

HttpResponse

ServiceProvider

A reference to the IServiceProvider of the app.

protected IServiceProvider ServiceProvider { get; init; }

Property Value

IServiceProvider

User

A reference to the current User ClaimsPrincipal.

protected ClaimsPrincipal User { get; init; }

Property Value

ClaimsPrincipal

Methods

Make<T>(params object[])

Creates a new instance of the specified component T with the specified arguments.

protected T Make<T>(params object[] args) where T : ITrinityComponent

Parameters

args object[]

The arguments to pass to the component constructor.

Returns

T

A new instance of the specified type T.

Type Parameters

T

The type of component to create.

Exceptions

MissingMethodException

Thrown if a matching constructor for the specified arguments is not found.