Class EntityFrameworkLockSettings
- Namespace
- Silverback.Lock
- Assembly
- Silverback.Storage.EntityFramework.dll
The EntityFrameworkLock settings.
public record EntityFrameworkLockSettings : TableBasedDistributedLockSettings, IValidatableSettings, IEquatable<DistributedLockSettings>, IEquatable<TableBasedDistributedLockSettings>, IEntityFrameworkSettings, IEquatable<EntityFrameworkLockSettings>
- Inheritance
-
EntityFrameworkLockSettings
- Implements
- Inherited Members
Constructors
EntityFrameworkLockSettings(EntityFrameworkLockSettings)
protected EntityFrameworkLockSettings(EntityFrameworkLockSettings original)
Parameters
originalEntityFrameworkLockSettings
EntityFrameworkLockSettings(string, Type, Func<IServiceProvider, ISilverbackContext?, DbContext>)
Initializes a new instance of the EntityFrameworkLockSettings class.
public EntityFrameworkLockSettings(string lockName, Type dbContextType, Func<IServiceProvider, ISilverbackContext?, DbContext> dbContextFactory)
Parameters
lockNamestringThe name of the lock.
dbContextTypeTypeThe type of the DbContext to be used to access the database.
dbContextFactoryFunc<IServiceProvider, ISilverbackContext, DbContext>The factory method that creates the DbContext instance.
Properties
DbContextType
Gets the type of the DbContext to be used to access the database.
public Type DbContextType { get; }
Property Value
EqualityContract
protected override Type EqualityContract { get; }
Property Value
Methods
Equals(EntityFrameworkLockSettings?)
public virtual bool Equals(EntityFrameworkLockSettings? other)
Parameters
Returns
Equals(TableBasedDistributedLockSettings?)
public override sealed bool Equals(TableBasedDistributedLockSettings? other)
Parameters
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetDbContext(IServiceProvider, ISilverbackContext?)
Gets the factory method that creates the DbContext instance.
public DbContext GetDbContext(IServiceProvider serviceProvider, ISilverbackContext? context = null)
Parameters
serviceProviderIServiceProviderThe IServiceProvider to be used to resolve the DbContext.
contextISilverbackContextThe ISilverbackContext.
Returns
GetHashCode()
public override int GetHashCode()
Returns
PrintMembers(StringBuilder)
protected override bool PrintMembers(StringBuilder builder)
Parameters
builderStringBuilder
Returns
ToString()
public override string ToString()
Returns
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
public override void Validate()
Operators
operator ==(EntityFrameworkLockSettings?, EntityFrameworkLockSettings?)
public static bool operator ==(EntityFrameworkLockSettings? left, EntityFrameworkLockSettings? right)
Parameters
Returns
operator !=(EntityFrameworkLockSettings?, EntityFrameworkLockSettings?)
public static bool operator !=(EntityFrameworkLockSettings? left, EntityFrameworkLockSettings? right)