예제 #1
0
 public bool Match(SearchFilterNode value, LogDataModel model)
 {
     if (value is TokenNode node &&
         node.Token.GetText().TryToDateTime(out var left) &&
         model.Timestamp.TryToDateTime(out var right))
     {
         return(left <= right);
     }
예제 #2
0
 static SearchFilterNode?CreateNode(SearchFilterNode left, SearchFilterNode?right)
 {
     if (right is null)
     {
         return(left);
     }
     else if (right is SearchFilterNodeList nodeList)
     {
         nodeList.Nodes.Add(left);
         return(nodeList);
     }
     else
     {
         var result = new SearchFilterNodeList();
         result.Nodes.Add(left);
         result.Nodes.Add(right);
         return(result);
     }
 }
예제 #3
0
 public NegationNode(SearchFilterNode node)
 {
     this.Node = node ?? throw new ArgumentNullException(nameof(node));
 }
예제 #4
0
 public RequirementNode(SearchFilterNode key, SearchFilterNode value)
 {
     this.Key   = key ?? throw new ArgumentNullException(nameof(key));
     this.Value = value ?? throw new ArgumentNullException(nameof(value));
 }