예제 #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;
 }