C# Class withSIX.Mini.Infra.Data.Services.DbContextScope

Inheritance: IDbContextScope
Datei anzeigen Open project: SIXNetworks/withSIX.Desktop Class Usage Examples

Public Methods

Method Description
ApiContext ( ) : IApiContext
ContentLinkContext ( ) : IContentFolderLinkContext
DbContextScope ( ILocalCache cache, Func apiContextCreator, ISettingsStorage settingsStorage ) : System
Dispose ( ) : void
GameContext ( ) : IGameContext
SaveChanges ( ) : void
SaveChangesAsync ( ) : System.Threading.Tasks.Task
SettingsContext ( ) : ISettingsStorage

Private Methods

Method Description
GetAmbientScope ( ) : DbContextScope

Get the current ambient scope or null if no ambient scope has been setup.

GetIdentifier ( ) : object
HideAmbientScope ( ) : void

Clears the ambient scope from the CallContext but keeps tracking its instance. Call this to temporarily hide the ambient context (e.g. to prevent it from being captured by parallel task).

RemoveAmbientScope ( ) : void

Clears the ambient scope from the CallContext and stops tracking its instance. Call this when a DbContextScope is being disposed.

SetAmbientScope ( DbContextScope newAmbientScope ) : void

Makes the provided 'dbContextScope' available as the the ambient scope via the CallContext.

SetId ( object id ) : void

Method Details

ApiContext() public method

public ApiContext ( ) : IApiContext
return IApiContext

ContentLinkContext() public method

public ContentLinkContext ( ) : IContentFolderLinkContext
return IContentFolderLinkContext

DbContextScope() public method

public DbContextScope ( ILocalCache cache, Func apiContextCreator, ISettingsStorage settingsStorage ) : System
cache ILocalCache
apiContextCreator Func
settingsStorage ISettingsStorage
return System

Dispose() public method

public Dispose ( ) : void
return void

GameContext() public method

public GameContext ( ) : IGameContext
return IGameContext

SaveChanges() public method

public SaveChanges ( ) : void
return void

SaveChangesAsync() public method

public SaveChangesAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

SettingsContext() public method

public SettingsContext ( ) : ISettingsStorage
return ISettingsStorage