private static void InitializeStreams(ActorSelection cepactor) { using (var reader = new StreamReader("./streams.json")) { while (!reader.EndOfStream) { var json = reader.ReadLine(); var definition = JsonConvert.DeserializeObject <Dictionary <string, object> >(json); var map = JsonConvert.DeserializeObject <Dictionary <string, object> >(definition["map"].ToString()); var @event = new AddEventType(definition["eventtype"].ToString(), map); cepactor.Tell(@event); } } }
private void Handle_AddEventType(AddEventType message) { RegisterEventType(message.EventType, message.Map); _log.Info("EventType {0} registered", message.EventType); }