public static AzureEventStore CreateNewForWriting(AzureStoreConfiguration config, EventStoreId container) { var blob = config.GetPageBlob(container.Name + "/stream.dat"); blob.Container.CreateIfNotExist(); var store = AzureEventStoreChunk.CreateNewForWriting(blob); var check = AzureEventPointer.OpenWriteable(blob); return new AzureEventStore(container, store, check); }
public void AppendEventsToStore(EventStoreId storeId, string streamId, IEnumerable <byte[]> eventData) { AzureEventStore store; if (!_stores.TryGetValue(storeId.Name, out store)) { store = AzureEventStore.CreateNewForWriting(_config, storeId); _stores.Add(storeId.Name, store); } store.Write(streamId, eventData); }