Esempio n. 1
0
 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;
         }
     }
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public UserProvider() {
     blackBox = new FolderBlackBox(".\\user");
 }
Esempio n. 4
0
 public void Insert(string login, NameChangedEvent nameChangedEvent) {
     var jsonData = JsonConvert.SerializeObject(nameChangedEvent);
     using (var eventStore = new FolderBlackBox(EventStorePath)) {
         eventStore.Record(NameChangedEventName, login, jsonData);
     }
 }