tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
IDatabaseContextFactory.cs
Go to the documentation of this file.
1using System;
2using System.Threading.Tasks;
3
5{
9 public interface IDatabaseContextFactory
10 {
16 ValueTask UseContext(Func<IDatabaseContext, ValueTask> operation);
17
23 ValueTask UseContextTaskReturn(Func<IDatabaseContext, Task> operation);
24 }
25}
Factory for scoping usage of IDatabaseContexts. Meant for use by Components.
ValueTask UseContextTaskReturn(Func< IDatabaseContext, Task > operation)
Run an operation in the scope of an IDatabaseContext.
ValueTask UseContext(Func< IDatabaseContext, ValueTask > operation)
Run an operation in the scope of an IDatabaseContext.