Ejemplo n.º 1
0
 /// <summary>
 /// 上下文
 /// </summary>
 public Context()
 {
     this.resourceDirectories = new List <string>();
     this.currentPath         = null;
     this.throwErrors         = Utility.StringToBoolean(Runtime.GetEnvironmentVariable(nameof(Configuration.IConfig.ThrowExceptions)));
     this.stripWhiteSpace     = Utility.StringToBoolean(Runtime.GetEnvironmentVariable(nameof(Configuration.IConfig.StripWhiteSpace)));
     this.charset             = Runtime.Encoding;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// TemplateLexer
 /// </summary>
 /// <param name="text">待分析内容</param>
 public TemplateLexer(string text)
 {
     this.document         = text;
     this.prefix           = Runtime.GetEnvironmentVariable(nameof(IConfig.TagPrefix));
     this.flag             = Runtime.GetEnvironmentVariable(nameof(IConfig.TagFlag))[0];
     this.suffix           = Runtime.GetEnvironmentVariable(nameof(IConfig.TagSuffix));
     this.disableeLogogram = Utility.StringToBoolean(Runtime.GetEnvironmentVariable(nameof(IConfig.DisableeLogogram)));
     Reset();
 }