public static OpenOrCreateForWriting ( string fullName ) : |
||
fullName | string | |
return |
public static FileEventStore OpenExistingForWriting(string root, EventStoreId storeId) { var folder = Path.Combine(root, storeId.Name); var check = FileEventPointer.OpenOrCreateForWriting(Path.Combine(folder, "stream.chk")); var store = FileEventStoreChunk.OpenExistingForWriting(Path.Combine(folder, "stream.dat"), check.Read()); return(new FileEventStore(storeId, store, check)); }
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)); }