Example #1
0
 public AlignGroup(XElement node)
     : this()
 {
     Name         = node.Element(nameof(Name)).As <string>();
     LeadingSpace = node.Element(nameof(LeadingSpace)).As <int>();
     Patterns.AddRange(node.Elements(nameof(Patterns), nameof(AlignPattern)).Select(x => x.As <AlignPattern>()));
 }
Example #2
0
 public AlignGroup(string name, int leading_space, params AlignPattern[] patterns)
     : this()
 {
     Name         = name;
     LeadingSpace = leading_space;
     Patterns.AddRange(patterns);
 }
 internal void Merge(PatternTestSummary source)
 {
     Patterns.AddRange(source.Patterns);
     // Note: Options for the same Pattern Summary should be the same, thus no merge - Sara
     MergeFrequencyEvents(source.Frequencies, Frequencies);
     MergeEvents(source.Unexpected, Unexpected);
     MergeEvents(source.KnownIdle, KnownIdle);
     MergeEvents(source.Durations, Durations);
 }
Example #4
0
 public void From(MatchingPattern mp)
 {
     //Creates new instances of all PatternUnits in the source MatchingPattern
     Patterns.AddRange(mp.Patterns.Select(pu => pu.Select(p => p.Clone()).ToArray()));
 }
 public void From(MatchingPattern mp)
 {
     Patterns.AddRange(mp.Patterns);
 }
Example #6
0
 public LuisEntity(List <string> patterns, Func <string, string> postProcess = null)
 {
     Patterns.AddRange(patterns);
     _postProcess = postProcess;
 }