Interface IRedbService

Namespace: redb.Core
Assembly: redb.Core.dll

Main REDB service interface - composition of all providers.

public interface IRedbService : ISchemeSyncProvider, IObjectStorageProvider, ITreeProvider, IPermissionProvider, IQueryableProvider, IValidationProvider

Properties

CacheDomain

Cache domain identifier for this service instance.

string CacheDomain { get; }

Configuration

Current service configuration.

RedbServiceConfiguration Configuration { get; }

Context

Database context for direct SQL queries.

IRedbContext Context { get; }

dbMigration

Database migration version.

string dbMigration { get; }

dbSize

Database size in MB (optional).

long? dbSize { get; }

dbType

Database type (e.g., "PostgreSQL").

string dbType { get; }

dbVersion

string dbVersion { get; }

ListProvider

Provider for list management.

IListProvider ListProvider { get; }

RoleProvider

Provider for role management.

IRoleProvider RoleProvider { get; }

SecurityContext

Security context for user and permission management.

IRedbSecurityContext SecurityContext { get; }

UserProvider

Provider for user management.

IUserProvider UserProvider { get; }

Methods

CreateSystemContext()

Create temporary system context.

IDisposable CreateSystemContext()

EnsureDatabaseAsync()

Ensures the REDB database schema exists.

Task EnsureDatabaseAsync()

GetEffectiveUserId()

Get effective user ID with fallback logic.

long GetEffectiveUserId()

GetSchemaScript()

Returns the full SQL script that creates the REDB schema.

string GetSchemaScript()

InitializeAsync(bool, params Assembly[])

Initialize REDB system at application startup, optionally creating the database schema first.

Task InitializeAsync(bool ensureCreated, params Assembly[] assemblies)

InitializeAsync(params Assembly[])

Initialize REDB system at application startup.

Task InitializeAsync(params Assembly[] assemblies)

SetCurrentUser(IRedbUser)

Set current user.

void SetCurrentUser(IRedbUser user)

UpdateConfiguration(Action<RedbServiceConfiguration>)

Update configuration.

void UpdateConfiguration(Action<RedbServiceConfiguration> configure)

UpdateConfiguration(Action<RedbServiceConfigurationBuilder>)

Update configuration via builder.

void UpdateConfiguration(Action<RedbServiceConfigurationBuilder> configureBuilder)