示例#1
0
 /// <summary>
 /// Provides the instance of Singleton SyntaxMap.
 /// </summary>
 /// <returns>Instance of Singleton SyntaxMap.</returns>
 public static SyntaxMap GetSyntaxMap()
 {
     if (_instance == null)
     {
         lock (syncLock)
         {
             if (_instance == null)
             {
                 _instance = new SyntaxMap();
             }
         }
     }
     return(_instance);
 }
示例#2
0
文件: Validator.cs 项目: samya-ak/gpl
 /// <summary>
 /// Constructor that initializes mappings of available commands and their types,
 /// along with the passed reference of diagnostics and array of command.
 /// </summary>
 /// <param name="tokens"></param>
 /// <param name="diagnostics"></param>
 public Validator(string[] tokens, ArrayList diagnostics)
 {
     _tokens      = tokens;
     _syntaxMap   = SyntaxMap.GetSyntaxMap();
     _diagnostics = diagnostics;
 }