Show / Hide Table of Contents

    Class EntityFrameworkLockSettings

    The EntityFrameworkLock settings.

    Inheritance
    object
    DistributedLockSettings
    TableBasedDistributedLockSettings
    EntityFrameworkLockSettings
    Implements
    IValidatableSettings
    IEquatable<DistributedLockSettings>
    IEquatable<TableBasedDistributedLockSettings>
    IEntityFrameworkSettings
    IEquatable<EntityFrameworkLockSettings>
    Inherited Members
    TableBasedDistributedLockSettings.Equals(DistributedLockSettings)
    TableBasedDistributedLockSettings.AcquireInterval
    TableBasedDistributedLockSettings.HeartbeatInterval
    TableBasedDistributedLockSettings.LockTimeout
    DistributedLockSettings.LockName
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    Namespace: Silverback.Lock
    Assembly: Silverback.Storage.EntityFramework.dll
    Syntax
    public record EntityFrameworkLockSettings : TableBasedDistributedLockSettings, IValidatableSettings, IEquatable<DistributedLockSettings>, IEquatable<TableBasedDistributedLockSettings>, IEntityFrameworkSettings, IEquatable<EntityFrameworkLockSettings>

    Constructors

    EntityFrameworkLockSettings(EntityFrameworkLockSettings)

    The EntityFrameworkLock settings.

    Declaration
    protected EntityFrameworkLockSettings(EntityFrameworkLockSettings original)
    Parameters
    Type Name Description
    EntityFrameworkLockSettings original

    EntityFrameworkLockSettings(string, Type, Func<IServiceProvider, ISilverbackContext?, DbContext>)

    Initializes a new instance of the EntityFrameworkLockSettings class.

    Declaration
    public EntityFrameworkLockSettings(string lockName, Type dbContextType, Func<IServiceProvider, ISilverbackContext?, DbContext> dbContextFactory)
    Parameters
    Type Name Description
    string lockName

    The name of the lock.

    Type dbContextType

    The type of the DbContext to be used to access the database.

    Func<IServiceProvider, ISilverbackContext, DbContext> dbContextFactory

    The factory method that creates the DbContext instance.

    Properties

    DbContextType

    Gets the type of the DbContext to be used to access the database.

    Declaration
    public Type DbContextType { get; }
    Property Value
    Type Description
    Type

    EqualityContract

    The EntityFrameworkLock settings.

    Declaration
    protected override Type EqualityContract { get; }
    Property Value
    Type Description
    Type
    Overrides
    TableBasedDistributedLockSettings.EqualityContract

    Methods

    Equals(EntityFrameworkLockSettings?)

    The EntityFrameworkLock settings.

    Declaration
    public virtual bool Equals(EntityFrameworkLockSettings? other)
    Parameters
    Type Name Description
    EntityFrameworkLockSettings other
    Returns
    Type Description
    bool

    Equals(TableBasedDistributedLockSettings?)

    The EntityFrameworkLock settings.

    Declaration
    public override sealed bool Equals(TableBasedDistributedLockSettings? other)
    Parameters
    Type Name Description
    TableBasedDistributedLockSettings other
    Returns
    Type Description
    bool
    Overrides
    TableBasedDistributedLockSettings.Equals(TableBasedDistributedLockSettings?)

    Equals(object?)

    The EntityFrameworkLock settings.

    Declaration
    public override bool Equals(object? obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    TableBasedDistributedLockSettings.Equals(object?)

    GetDbContext(IServiceProvider, ISilverbackContext?)

    Gets the factory method that creates the DbContext instance.

    Declaration
    public DbContext GetDbContext(IServiceProvider serviceProvider, ISilverbackContext? context = null)
    Parameters
    Type Name Description
    IServiceProvider serviceProvider

    The IServiceProvider to be used to resolve the DbContext.

    ISilverbackContext context

    The ISilverbackContext.

    Returns
    Type Description
    DbContext

    The DbContext instance.

    GetHashCode()

    The EntityFrameworkLock settings.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    TableBasedDistributedLockSettings.GetHashCode()

    PrintMembers(StringBuilder)

    The EntityFrameworkLock settings.

    Declaration
    protected override bool PrintMembers(StringBuilder builder)
    Parameters
    Type Name Description
    StringBuilder builder
    Returns
    Type Description
    bool
    Overrides
    TableBasedDistributedLockSettings.PrintMembers(StringBuilder)

    ToString()

    The EntityFrameworkLock settings.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    TableBasedDistributedLockSettings.ToString()

    Validate()

    Throws a SilverbackConfigurationException if the configuration is not valid.

    Declaration
    public override void Validate()
    Overrides
    TableBasedDistributedLockSettings.Validate()

    Operators

    operator ==(EntityFrameworkLockSettings?, EntityFrameworkLockSettings?)

    The EntityFrameworkLock settings.

    Declaration
    public static bool operator ==(EntityFrameworkLockSettings? left, EntityFrameworkLockSettings? right)
    Parameters
    Type Name Description
    EntityFrameworkLockSettings left
    EntityFrameworkLockSettings right
    Returns
    Type Description
    bool

    operator !=(EntityFrameworkLockSettings?, EntityFrameworkLockSettings?)

    The EntityFrameworkLock settings.

    Declaration
    public static bool operator !=(EntityFrameworkLockSettings? left, EntityFrameworkLockSettings? right)
    Parameters
    Type Name Description
    EntityFrameworkLockSettings left
    EntityFrameworkLockSettings right
    Returns
    Type Description
    bool

    Implements

    IValidatableSettings
    IEquatable<T>
    IEquatable<T>
    IEntityFrameworkSettings
    IEquatable<T>
    GitHub E-Mail
    ↑ Back to top © 2026 Sergio Aquilini