Skip to main content

Definition

Assembly: CloudNimble.EasyAF.Configuration.dll Namespace: CloudNimble.EasyAF.Configuration Inheritance: CloudNimble.EasyAF.Configuration.ConfigurationBase

Syntax

CloudNimble.EasyAF.Configuration.ConfigurationPlusAdminBase

Summary

An extended configuration class that includes both public and administrative endpoint configuration. Inherits from ConfigurationBase and adds support for administrative APIs and applications.

Remarks

This configuration class should be used for applications that need both customer-facing and administrative functionality, such as multi-tenant applications with separate admin interfaces or applications that need to communicate with both public and private APIs.

Examples

// In Program.cs or Startup.cs
builder.Services.AddConfigurationBase<MyAdminConfiguration>(builder.Configuration, "AppSettings");

// Example configuration in appsettings.json
{
  "AppSettings": {
    "ApiRoot": "https://api.mycompany.com",
    "AppRoot": "https://myapp.mycompany.com",
    "AdminApiRoot": "https://admin-api.mycompany.com",
    "AdminAppRoot": "https://admin.mycompany.com",
    "HttpHandlerMode": "Add"
  }
}

// Usage in administrative components
[Inject] public MyAdminConfiguration Config { get; set; }

private async Task CallAdminApi()
{
    var adminClient = HttpClientFactory.CreateClient(Config.AdminApiClientName);
    var response = await adminClient.GetAsync($"{Config.AdminApiRoot}/admin/users");
}

Constructors

.ctor

Syntax

public ConfigurationPlusAdminBase()

.ctor Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase

Syntax

public ConfigurationBase()

.ctor Inherited

Inherited from object

Syntax

public Object()

Properties

AdminApiClientName

The name of the HttpClient that will be used to hit the Admin (Private) API.

Syntax

public string AdminApiClientName { get; set; }

Property Value

Type: string

AdminApiRoot

The root of the Admin (Private) API.

Syntax

public string AdminApiRoot { get; set; }

Property Value

Type: string

Remarks

Most Blazor apps will call at least one API. If you need to call more than one, just inherit from ConfigurationBase and add your own properties.

AdminAppClientName

The name of the HttpClient that will be used to hit the Admin Blazor Controllers.

Syntax

public string AdminAppClientName { get; set; }

Property Value

Type: string

AdminAppRoot

The website your Administrative Blazor app is being served from.

Syntax

public string AdminAppRoot { get; set; }

Property Value

Type: string

Remarks

Sometimes you will need to get information about the app’s deployment before it has been fully-initialized in Program.cs. This is the place to do it.

ApiClientName Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase
The name of the HttpClient that will be used to hit the app’s Public API.

Syntax

public string ApiClientName { get; set; }

Property Value

Type: string

ApiRoot Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase
The root of the API that your Blazor app will call.

Syntax

public string ApiRoot { get; set; }

Property Value

Type: string

Remarks

Most Blazor apps will call at least one API. If you need to call more than one, just inherit from ConfigurationBase and add your own properties.

AppClientName Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase
The name of the HttpClient that will be used to hit the Blazor App’s Controllers.

Syntax

public string AppClientName { get; set; }

Property Value

Type: string

AppRoot Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase
The website your Blazor app is being served from.

Syntax

public string AppRoot { get; set; }

Property Value

Type: string

Remarks

Sometimes you will need to get information about the app’s deployment before it has been fully-initialized in Program.cs. This is the place to do it.

HttpHandlerMode Inherited

Inherited from CloudNimble.EasyAF.Configuration.ConfigurationBase
Determines how HttpClient message handlers are configured when registering HTTP clients. Controls whether handlers are added to existing handlers or replace them entirely.

Syntax

public CloudNimble.EasyAF.Core.HttpHandlerMode HttpHandlerMode { get; set; }

Property Value

Type: CloudNimble.EasyAF.Core.HttpHandlerMode

Methods

Equals Inherited Virtual

Inherited from object

Syntax

public virtual bool Equals(object obj)

Parameters

NameTypeDescription
objobject?-

Returns

Type: bool

Equals Inherited

Inherited from object

Syntax

public static bool Equals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

GetHashCode Inherited Virtual

Inherited from object

Syntax

public virtual int GetHashCode()

Returns

Type: int

GetType Inherited

Inherited from object

Syntax

public System.Type GetType()

Returns

Type: System.Type

MemberwiseClone Inherited

Inherited from object

Syntax

protected internal object MemberwiseClone()

Returns

Type: object

ReferenceEquals Inherited

Inherited from object

Syntax

public static bool ReferenceEquals(object objA, object objB)

Parameters

NameTypeDescription
objAobject?-
objBobject?-

Returns

Type: bool

ToString Inherited Virtual

Inherited from object

Syntax

public virtual string ToString()

Returns

Type: string?