public EPModuleTableInitServicesImpl(
     TableCollector namedWindowCollector,
     EventTypeResolver eventTypeResolver)
 {
     TableCollector = namedWindowCollector;
     EventTypeResolver = eventTypeResolver;
 }
Пример #2
0
 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();
         }
     }));
 }
Пример #3
0
 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();
         }
     }));
 }
Пример #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());
     }
 }
Пример #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());
     }
 }