Show / Hide Table of Contents

    Class ApplicationContext

    Class that represents the common context of the entire application.

    Inheritance
    System.Object
    ApplicationContext
    Implements
    IApplicationContext
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Common
    Assembly: Fibula.Common.dll
    Syntax
    public class ApplicationContext : IApplicationContext

    Constructors

    | Improve this Doc View Source

    ApplicationContext(IOptions<ApplicationContextOptions>, IRsaDecryptor, IItemTypeLoader, IMonsterTypeLoader, TelemetryClient, CancellationTokenSource, Func<IFibulaDbContext>)

    Initializes a new instance of the ApplicationContext class.

    Declaration
    public ApplicationContext(IOptions<ApplicationContextOptions> options, IRsaDecryptor rsaDecryptor, IItemTypeLoader itemTypeLoader, IMonsterTypeLoader monsterTypeLoader, TelemetryClient telemetryClient, CancellationTokenSource cancellationTokenSource, Func<IFibulaDbContext> dbContextGenerationFunc)
    Parameters
    Type Name Description
    Microsoft.Extensions.Options.IOptions<ApplicationContextOptions> options

    A reference to the application configuration.

    IRsaDecryptor rsaDecryptor

    A reference to the RSA decryptor in use.

    IItemTypeLoader itemTypeLoader

    A reference to the item type loader in use.

    IMonsterTypeLoader monsterTypeLoader

    A reference to the monster type loader in use.

    Microsoft.ApplicationInsights.TelemetryClient telemetryClient

    A reference to the telemetry client.

    System.Threading.CancellationTokenSource cancellationTokenSource

    A reference to the master cancellation token source.

    System.Func<IFibulaDbContext> dbContextGenerationFunc

    A reference to a function to generate the database context.

    Properties

    | Improve this Doc View Source

    CancellationTokenSource

    Gets the master cancellation token source.

    Declaration
    public CancellationTokenSource CancellationTokenSource { get; }
    Property Value
    Type Description
    System.Threading.CancellationTokenSource
    | Improve this Doc View Source

    DefaultDatabaseContext

    Gets the default database context to use.

    Declaration
    public IFibulaDbContext DefaultDatabaseContext { get; }
    Property Value
    Type Description
    IFibulaDbContext
    | Improve this Doc View Source

    Options

    Gets the configuration for the application.

    Declaration
    public ApplicationContextOptions Options { get; }
    Property Value
    Type Description
    ApplicationContextOptions
    | Improve this Doc View Source

    RsaDecryptor

    Gets the RSA decryptor to use.

    Declaration
    public IRsaDecryptor RsaDecryptor { get; }
    Property Value
    Type Description
    IRsaDecryptor
    | Improve this Doc View Source

    TelemetryClient

    Gets the Telemetry client in use.

    Declaration
    public TelemetryClient TelemetryClient { get; }
    Property Value
    Type Description
    Microsoft.ApplicationInsights.TelemetryClient

    Methods

    | Improve this Doc View Source

    CreateNewUnitOfWork()

    Creates a new IUnitOfWork<TAccountsRepository, TCharactersRepository, TMonsterTypesRepository, TItemTypesRepository> for data access.

    Declaration
    public IUnitOfWork<IRepository<IAccountEntity>, IRepository<ICharacterEntity>, IReadOnlyRepository<IMonsterTypeEntity>, IReadOnlyRepository<IItemTypeEntity>> CreateNewUnitOfWork()
    Returns
    Type Description
    IUnitOfWork<IRepository<IAccountEntity>, IRepository<ICharacterEntity>, IReadOnlyRepository<IMonsterTypeEntity>, IReadOnlyRepository<IItemTypeEntity>>

    The instance created.

    Implements

    IApplicationContext

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.