/// <summary>
 ///		Adds a new <see cref="ElseExpressionScopeDocumentItem"/> and enters it.
 /// </summary>
 public static MorestachioDocumentFluentApi AddElseAndEnter(this MorestachioDocumentFluentApi api)
 {
     return(api
            .AddChildAndEnter(builder => new ElseExpressionScopeDocumentItem()));
 }
 /// <summary>
 ///		Adds a new <see cref="InvertedExpressionScopeDocumentItem"/> and enters it.
 /// </summary>
 public static MorestachioDocumentFluentApi AddInvertedScopeAndEnter(this MorestachioDocumentFluentApi api,
                                                                     Func <MorestachioExpressionBuilderBaseRootApi, MorestachioExpressionBuilder> condition)
 {
     return(api.AddChildAndEnter(builder => new InvertedExpressionScopeDocumentItem(condition(builder).Compile())));
 }
Exemplo n.º 3
0
 /// <summary>
 ///		Adds a new <see cref="InvertedExpressionScopeDocumentItem"/> and enters it.
 /// </summary>
 public static MorestachioDocumentFluentApi AddInvertedScopeAndEnter(this MorestachioDocumentFluentApi api,
                                                                     Func <MorestachioExpressionBuilderBaseRootApi, MorestachioExpressionBuilder> condition)
 {
     return(api.AddChildAndEnter(builder => new InvertedExpressionScopeDocumentItem(CharacterLocation.Unknown, condition(builder).Compile(), Enumerable.Empty <ITokenOption>())));
 }