Table of Contents

Class CloudStorageOrmOptionsExtensionInfo

Namespace
CloudStorageORM.Extensions
Assembly
CloudStorageORM.dll

EF Core extension metadata used to describe CloudStorageORM options in logging and service-provider caching.

public class CloudStorageOrmOptionsExtensionInfo : DbContextOptionsExtensionInfo
Inheritance
CloudStorageOrmOptionsExtensionInfo
Inherited Members

Constructors

CloudStorageOrmOptionsExtensionInfo(CloudStorageOrmOptionsExtension)

EF Core extension metadata used to describe CloudStorageORM options in logging and service-provider caching.

public CloudStorageOrmOptionsExtensionInfo(CloudStorageOrmOptionsExtension extension)

Parameters

extension CloudStorageOrmOptionsExtension

Properties

Extension

Gets the typed CloudStorageORM options extension.

public CloudStorageOrmOptionsExtension Extension { get; }

Property Value

CloudStorageOrmOptionsExtension

IsDatabaseProvider

Gets a value indicating this extension represents a database provider.

public override bool IsDatabaseProvider { get; }

Property Value

bool

LogFragment

Gets a short provider-specific log fragment used by EF diagnostics.

public override string LogFragment { get; }

Property Value

string

Methods

GetServiceProviderHashCode()

Computes a stable hash code based on provider-specific option values.

public override int GetServiceProviderHashCode()

Returns

int

A hash code used by EF Core service-provider caching.

Examples

var hash = extensionInfo.GetServiceProviderHashCode();

PopulateDebugInfo(IDictionary<string, string>)

Adds provider-specific option values to EF Core debug information.

public override void PopulateDebugInfo(IDictionary<string, string> debugInfo)

Parameters

debugInfo IDictionary<string, string>

Dictionary populated with diagnostics values.

Examples

var debugInfo = new Dictionary<string, string>();
extensionInfo.PopulateDebugInfo(debugInfo);

ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo)

Determines whether EF Core can reuse the same internal service provider for another extension instance.

public override bool ShouldUseSameServiceProvider(DbContextOptionsExtensionInfo other)

Parameters

other DbContextOptionsExtensionInfo

The other extension info instance to compare.

Returns

bool

false because CloudStorageORM always forces a distinct service provider.

Examples

var canReuse = extensionInfo.ShouldUseSameServiceProvider(otherInfo);