2020-05-22 12:42:54 +02:00
|
|
|
using Raven.Client.Documents;
|
2020-10-06 16:00:27 +02:00
|
|
|
using zero.Core.Messages;
|
2020-06-04 15:50:21 +02:00
|
|
|
using zero.Core.Options;
|
2020-05-09 20:05:08 +02:00
|
|
|
|
|
|
|
|
namespace zero.Core.Api
|
|
|
|
|
{
|
|
|
|
|
public class BackofficeStore : IBackofficeStore
|
|
|
|
|
{
|
|
|
|
|
public IDocumentStore Raven { get; private set; }
|
|
|
|
|
|
2020-05-22 12:42:54 +02:00
|
|
|
public IApplicationContext AppContext { get; private set; }
|
2020-05-09 20:05:08 +02:00
|
|
|
|
2020-06-04 15:50:21 +02:00
|
|
|
public IZeroOptions Options { get; private set; }
|
2020-05-09 20:05:08 +02:00
|
|
|
|
2020-08-17 13:23:50 +02:00
|
|
|
public IAuthenticationApi Auth { get; private set; }
|
2020-06-04 15:50:21 +02:00
|
|
|
|
2020-10-06 16:00:27 +02:00
|
|
|
public IMessageAggregator Messages { get; private set; }
|
2020-08-17 13:23:50 +02:00
|
|
|
|
2020-10-06 16:00:27 +02:00
|
|
|
|
|
|
|
|
public BackofficeStore(IDocumentStore raven, IApplicationContext appContext, IZeroOptions options, IAuthenticationApi authenticationApi, IMessageAggregator messages)
|
2020-05-09 20:05:08 +02:00
|
|
|
{
|
|
|
|
|
Raven = raven;
|
2020-05-22 12:42:54 +02:00
|
|
|
AppContext = appContext;
|
2020-06-04 15:50:21 +02:00
|
|
|
Options = options;
|
2020-08-17 13:23:50 +02:00
|
|
|
Auth = authenticationApi;
|
2020-10-06 16:00:27 +02:00
|
|
|
Messages = messages;
|
2020-05-09 20:05:08 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public interface IBackofficeStore
|
|
|
|
|
{
|
|
|
|
|
IDocumentStore Raven { get; }
|
|
|
|
|
|
2020-05-22 12:42:54 +02:00
|
|
|
IApplicationContext AppContext { get; }
|
2020-06-04 15:50:21 +02:00
|
|
|
|
|
|
|
|
IZeroOptions Options { get; }
|
2020-08-17 13:23:50 +02:00
|
|
|
|
|
|
|
|
IAuthenticationApi Auth { get; }
|
2020-10-06 16:00:27 +02:00
|
|
|
|
|
|
|
|
IMessageAggregator Messages { get; }
|
2020-05-09 20:05:08 +02:00
|
|
|
}
|
2020-05-22 12:42:54 +02:00
|
|
|
}
|