Esempio n. 1
0
 /// <summary>
 /// 创建重复语句块。
 /// </summary>
 /// <param name="context">生成上下文。</param>
 /// <param name="items">数据项集合。</param>
 /// <param name="loader">属性值加载器。</param>
 /// <param name="block">重复的语句块。</param>
 public RepeatBlockFragment(GenerateContext context, IEnumerable items, IPropertyValueLoader loader = null, BlockFragment block = null)
     : base(context)
 {
     Block  = block ?? new BlockFragment(context);
     Items  = items;
     Loader = loader;
 }
Esempio n. 2
0
 /// <summary>
 /// 创建WHILE循环。
 /// </summary>
 /// <param name="context">生成上下文。</param>
 /// <param name="condition">循环条件语句。</param>
 public WhileFragment(GenerateContext context, IExpressionFragment condition)
     : base(context)
 {
     Block     = new BlockFragment(context);
     Condition = condition;
 }