public IEnumerable<EventInfo> GetAllEvents() { using (var eventStore = new FolderBlackBox(EventStorePath)) { var events = eventStore.Player.Play(); foreach (var recordedEvent in events) { var eventInfo = CreateEventInfo(recordedEvent); yield return eventInfo; } } }
public SaltedHash LoadCurrentSaltedHash(string login) { var result = new SaltedHash("", ""); using (var eventStore = new FolderBlackBox(EventStorePath)) { var events = eventStore.Player.WithContext(login).Play(); foreach (var recordedEvent in events) { DoCommandWithEvent(recordedEvent, result); } } return result; }
public UserProvider() { blackBox = new FolderBlackBox(".\\user"); }
public void Insert(string login, NameChangedEvent nameChangedEvent) { var jsonData = JsonConvert.SerializeObject(nameChangedEvent); using (var eventStore = new FolderBlackBox(EventStorePath)) { eventStore.Record(NameChangedEventName, login, jsonData); } }