Ejemplo n.º 1
0
            public TestBaseDataHandler() : base(new TestLogger())
            {
                var path = Path.GetDirectoryName(
                    Uri.UnescapeDataString(new UriBuilder(typeof(Testing).Assembly.CodeBase).Path));

                _handler = new ActionHandler(path, "events.json", new TestLogger());
                _handler.AddAction("meteors", typeof(TestAction));
                _handler.AddAction("random", typeof(RandomAction));
                _handler.StartWatching();
            }
Ejemplo n.º 2
0
 public ActionHandler(string path, string fileName, ILogger logger)
 {
     _handler        = this;
     _path           = path;
     _fileName       = fileName;
     _logger         = logger;
     _jsonSerializer = JsonSerializer.CreateDefault(new JsonSerializerSettings
     {
         Context = new StreamingContext(StreamingContextStates.File, this)
     });
 }