public EPModuleTableInitServicesImpl(
     TableCollector namedWindowCollector,
     EventTypeResolver eventTypeResolver)
 {
     TableCollector = namedWindowCollector;
     EventTypeResolver = eventTypeResolver;
 }
 public static Table ExtractorTable(SampleFingerprint fp)
 {
     return(PersistentCache.Get <Table>("extractor-transparency-stats", fp.Path, () =>
     {
         using (var collector = new TableCollector())
         {
             new FingerprintTemplate(fp.Decode());
             return collector.Sum();
         }
     }));
 }
 public static Table ExtractorTable(SampleFingerprint fp)
 {
     return(PersistentCache.Get <Table>("extractor-transparency-stats", fp, () =>
     {
         var image = fp.Load();
         using (var collector = new TableCollector())
         {
             new FingerprintTemplate(fp.Decode());
             return collector.Accumulator.Summarize();
         }
     }));
 }
Example #4
0
 public string DropTable(string Json)
 {
     try
     {
         string TableName = JsonAdapter.TableNameFromJson(Json);
         string sql       = TableCollector.DropTable(TableName);
         NpgController.InvokeQueryWithoutAnswer(sql);
         return(new JObject().AddStatus("Success").ToString());
     }
     catch (Exception ex)
     {
         return(new JObject().AddStatus(ex).ToString());
     }
 }
Example #5
0
 public string CreateTable(string Json)
 {
     try
     {
         Table  table = JsonAdapter.AdaptTableFromJson(Json);
         string Sql   = TableCollector.CreateTable(table);
         NpgController.InvokeQueryWithoutAnswer(Sql);
         return(new JObject().AddStatus("Success").ToString());
     }
     catch (Exception ex)
     {
         return(new JObject().AddStatus(ex).ToString());
     }
 }