示例#1
0
        public static async Task <IEventLogStorage?> CreateAsync(
            EventLogStorageOptions options,
            ISystemClock?systemClock = default)
        {
            var result = new EventLogStorage(options, systemClock);
            await result.InitializeAsync();

            return(result);
        }
示例#2
0
        public static Task <IEventLogStorage?> CreateAsync(
            EventLogStorageOptions options,
            IJsonSerializerFacade jsonSerializerFacade,
            ILocalFileSystem?localFileSystem = default,
            ISystemClock?systemClock         = default)
        {
            var result = new EventLogStorage(options, jsonSerializerFacade, localFileSystem, systemClock);

            result.Initialize();
            //await result.InitializeAsync();
            return(Task.FromResult <IEventLogStorage?>(result));
        }
示例#3
0
 public EventLogStorage(
     EventLogStorageOptions options,
     IJsonSerializerFacade jsonSerializerFacade,
     ILocalFileSystem?localFileSystem = default,
     ISystemClock?systemClock         = default
     )
 {
     this._BaseFolder           = options.BaseFolder;
     this._JsonSerializerFacade = jsonSerializerFacade;
     this._LocalFileSystem      = localFileSystem ?? new LocalFileSystem();
     this._SystemClock          = systemClock ?? new SystemClock();
     this._LastWrite            = AsyncQueue.Create();
 }
 public Task <IEventLogStorage?> CreateAsync(EventLogStorageOptions options)
 {
     return(EventLogStorage.CreateAsync(options, this._SystemClock));
 }
 public bool IsValidFor(EventLogStorageOptions options)
 {
     return(string.Equals("FASTER", options.Implementation, StringComparison.OrdinalIgnoreCase));
 }
 public Task <IEventLogStorage?> CreateAsync(EventLogStorageOptions options)
 {
     return(EventLogStorage.CreateAsync(options, this._JsonSerializerFacade, this._LocalFileSystem, this._SystemClock));
 }
 public bool IsValidFor(EventLogStorageOptions options)
 {
     return(string.IsNullOrEmpty(options.Implementation) ||
            string.Equals("Readable", options.Implementation, StringComparison.OrdinalIgnoreCase));
     //return string.IsNullOrEmpty(options.BaseFolder);
 }
示例#8
0
 public EventLogStorage(EventLogStorageOptions options, ISystemClock?systemClock = default)
 {
     this._BaseFolder  = options.BaseFolder;
     this._SystemClock = systemClock ?? new SystemClock();
 }