Not intended to be used outside Platform.Core itself. Maintains a pointer to a specific event within an event store persisted in a single mutable file (in the filesystem).
상속: IEventPointer
예제 #1
0
        public static FileEventStore OpenForReading(string root, EventStoreId storeId)
        {
            var folder = Path.Combine(root, storeId.Name);
            var check  = FileEventPointer.OpenOrCreateForReading(Path.Combine(folder, "stream.chk"));
            var store  = FileEventStoreChunk.OpenForReading(Path.Combine(folder, "stream.dat"));

            return(new FileEventStore(storeId, store, check));
        }
예제 #2
0
        public static FileEventStore CreateNew(string root, EventStoreId storeId)
        {
            var folder = Path.Combine(root, storeId.Name);

            if (!Directory.Exists(folder))
            {
                Directory.CreateDirectory(folder);
            }

            var check = FileEventPointer.OpenOrCreateForWriting((Path.Combine(folder, "stream.chk")));
            var store = FileEventStoreChunk.CreateNew(Path.Combine(folder, "stream.dat"));

            return(new FileEventStore(storeId, store, check));
        }
예제 #3
0
 public FileEventStore(EventStoreId storeId, FileEventStoreChunk store, FileEventPointer checkpoint)
 {
     StoreId     = storeId;
     _store      = store;
     _checkpoint = checkpoint;
 }
예제 #4
0
 public FileEventStore(EventStoreId storeId, FileEventStoreChunk store, FileEventPointer checkpoint)
 {
     StoreId = storeId;
     _store = store;
     _checkpoint = checkpoint;
 }