Exemple #1
0
 public void UpsertRuleSet(AnalyzeRule ruleset)
 {
     using (var client = new DocumentClient(new Uri(EndpointUri), PrimaryKey))
     {
         client.UpsertDocumentAsync(UriFactory.CreateDocumentCollectionUri(DatabaseName, CollectionName), ruleset).Wait(5000);
     }
 }
 public void AddOrReplaceRule(AnalyzeRule rule)
 {
     if (string.IsNullOrWhiteSpace(ProgramName))
     {
         ProgramName = rule.ProgramName;
     }
     if (ProgramName != rule.ProgramName)
     {
         throw new ArgumentException($"This instance of {nameof(ProgramAnalyzer)} is analyzing {ProgramName}. Can not add ruleset for {rule.ProgramName}.");
     }
     Rules.AddOrUpdate(rule.RuleName, rule, (key, oldValue) => rule);
 }
 public void DeleteRuleSet(AnalyzeRule ruleset)
 {
     throw new NotImplementedException();
 }