You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
356 B
18 lines
356 B
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
namespace Connected.ServiceModel
|
|
{
|
|
internal class ContextProvider : IContextProvider
|
|
{
|
|
public IContext Create()
|
|
{
|
|
var scope = RuntimeStartup.Application.Services.CreateScope();
|
|
var ctx = scope.ServiceProvider.GetService<IContext>() as Context;
|
|
|
|
ctx.Scope = scope;
|
|
|
|
return ctx;
|
|
}
|
|
}
|
|
}
|