22 using System.Collections.Generic;
30 namespace Ntp.Analyzer.Config.Syntax
41 var logType = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordType) as
LogTypeNode;
42 var threshold = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordSeverity) as
SeverityNode;
44 var showSeverity = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordShowSeverity) as BooleanSettingNode;
46 var file = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordFile) as StringSettingNode;
61 CheckIsUnique(
new List<Symbol>
65 Symbol.KeywordShowSeverity,
66 Symbol.KeywordShowTimestamp,
71 var type = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordType) as
LogTypeNode;
74 if ((type == null || type.LogType ==
LogType.File) && fileName == null)
76 AddError(
"Log file name is missing.");
82 CheckTypeIs<StringSettingNode>(
Symbol.KeywordTimeFormat);
83 CheckTypeIs<StringSettingNode>(
Symbol.KeywordFile);
84 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordShowTimestamp);
85 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordShowSeverity);
LogSyntaxNode(string name, int line)
override LogConfiguration InternalCompile()
override void ValidateMandatories()
Override to validates the mandatory types in this syntax node.
override void ValidateTypes()
Override to validates the types in this syntax node.