Class EntityFrameworkLockSettings
The EntityFrameworkLock settings.
Inheritance
Implements
Inherited Members
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
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
Equals(object?)
The EntityFrameworkLock settings.
Declaration
public override bool Equals(object? obj)
Parameters
| Type | Name | Description |
|---|---|---|
| object | obj |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
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
PrintMembers(StringBuilder)
The EntityFrameworkLock settings.
Declaration
protected override bool PrintMembers(StringBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| StringBuilder | builder |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
ToString()
The EntityFrameworkLock settings.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string |
Overrides
Validate()
Throws a SilverbackConfigurationException if the configuration is not valid.
Declaration
public override void Validate()
Overrides
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 |