protected virtual async Task <ICommitTrailStore> GetCommitLogsAsync() { var commitLogs = new CommitTrailStore( this._credentials, this._tenant, this._loggerFactory); await commitLogs.InitAsync().ConfigureAwait(false); return(commitLogs); }
public virtual async Task <IEventStream> GetStreamAsync(Tenant tenant, string streamName) { var credentials = new StorageCredentials( (await this._configStore.GetAsync(StorageConstants.TableAccountName).ConfigureAwait(false)), (await this._configStore.GetAsync(StorageConstants.TableAccountKey).ConfigureAwait(false))); var commitLogs = new CommitTrailStore(credentials, tenant, _factory); var stream = new EventStream(credentials, tenant, streamName, commitLogs, _factory); if (!((await commitLogs.InitAsync().ConfigureAwait(false)) && (await stream.Init().ConfigureAwait(false)))) { throw new InvalidProgramException(Exceptions.FailedToCreateEventStream); } return(stream); }