Show / Hide Table of Contents

Class TenantSettingsManager

Provides the APIs for managing tenant settings in a persistence store.

Inheritance
Object
TenantSettingsManager
Inherited Members
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity
Assembly: IRM.AspNetCore.Identity.dll
Syntax
public class TenantSettingsManager

Constructors

TenantSettingsManager(ITenantSettingsStore, IEnumerable<ITenantSettingsValidator>, IHttpContextAccessor, ILogger<TenantSettingsManager>)

Initializes a new instance of TenantSettingsManager.

Declaration
public TenantSettingsManager(ITenantSettingsStore store, IEnumerable<ITenantSettingsValidator> settingsValidators, IHttpContextAccessor contextAccessor, ILogger<TenantSettingsManager> logger)
Parameters
ITenantSettingsStore store

The persistence store the manager will operate over.

IEnumerable<ITenantSettingsValidator> settingsValidators

Microsoft.AspNetCore.Http.IHttpContextAccessor contextAccessor

The accessor used to access the Microsoft.AspNetCore.Http.HttpContext.

Microsoft.Extensions.Logging.ILogger<TenantSettingsManager> logger

Properties

Logger

Gets the Microsoft.Extensions.Logging.ILogger used to log messages from the manager.

Declaration
public virtual ILogger Logger { get; set; }
Property Value
Microsoft.Extensions.Logging.ILogger

SettingsValidators

Gets a list of validators for modules to call before persistence.

Declaration
public IEnumerable<ITenantSettingsValidator> SettingsValidators { get; }
Property Value
IEnumerable<ITenantSettingsValidator>

Store

Gets the persistence store the manager operates over.

Declaration
protected ITenantSettingsStore Store { get; }
Property Value
ITenantSettingsStore

The persistence store the manager operates over.

Methods

Dispose()

Releases all resources used by the organisation manager.

Declaration
public void Dispose()

Dispose(Boolean)

Releases the unmanaged resources used by the organisation manager and optionally releases the managed resources.

Declaration
protected virtual void Dispose(bool disposing)
Parameters
Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources.

FindByIdAsync(Guid)

Retrieves the TenantSettings for the specified tenant.

Declaration
public Task<TenantSettings> FindByIdAsync(Guid tenantId)
Parameters
System.Guid tenantId

The unique identity of the tenant.

Returns
System.Threading.Tasks.Task<TenantSettings>

The System.Threading.Tasks.Task for the asynchronous operation, containing the TenantSettings.

FindByUniqueUrl(String)

Retrieves the TenantSettings for the specified tenant.

Declaration
public Task<TenantSettings> FindByUniqueUrl(string uniqueUrl)
Parameters
String uniqueUrl

The unique url identifying a tenant.

Returns
System.Threading.Tasks.Task<TenantSettings>

The System.Threading.Tasks.Task for the asynchronous operation, containing the TenantSettings.

SaveAsync(TenantSettings)

Updates the specified settings.

Declaration
public async Task<IdentityResult> SaveAsync(TenantSettings settings)
Parameters
TenantSettings settings

The TenantSettings to update.

Returns
System.Threading.Tasks.Task<IdentityResult>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the IdentityResult for the update.

ThrowIfDisposed()

Throws an System.ObjectDisposedException if the organisation manager is disposed.

Declaration
protected void ThrowIfDisposed()

ValidateSettingsAsync(TenantSettings)

Should return Microsoft.AspNetCore.Identity.IdentityResult.Success if validation is successful. This is called before saving the settings via SaveAsync(TenantSettings).

Declaration
protected async Task<IdentityResult> ValidateSettingsAsync(TenantSettings settings)
Parameters
TenantSettings settings

The settings.

Returns
System.Threading.Tasks.Task<IdentityResult>

A IdentityResult representing whether validation was successful.

Back to top Generated by DocFX