public void DefaultValueExpression() { IParserContext context = new FlexContext(); context.Set("a", ""); context.Set("b", "z"); Assert.AreEqual("x", _parser.Evaluate <string>("a ?: \"x\"", context)); Assert.AreEqual("z", _parser.Evaluate <string>("b ?: \"x\"", context)); }
public void TestEscapes_Xml() { IParserContext vars = new FlexContext(); string input = "$X"; vars.Set("X", "A>B"); string s = xmlParser.Render(input, vars); Assert.AreEqual("A>B", s); }
public void TestDSDFSDFSDF() { IParserContext vars = new FlexContext(); List <string> items = new List <string>(); items.Add("A"); items.Add("B"); vars.Set("Items", items); string input = @"#foreach (item in Items)${item}#end#foreach (item in Items)${item}#end"; string s = velocityParser.Render(input, vars); Assert.AreEqual("ABAB", s); }
public CreateTrainingPlan(IUserContext userContext, FlexContext dbContext) { this.dbContext = dbContext; this.userContext = userContext; }
public StartTrainingPlan(FlexContext dbContext) { this.dbContext = dbContext; }
public GetTrainingPlanExercises(IUserContext userContext, FlexContext dbContext) { this.dbContext = dbContext; this.userContext = userContext; }
public GetExercises(FlexContext dbContext) { this.dbContext = dbContext; }
public CreateExercise(FlexContext dbContext) { this.dbContext = dbContext; }
public DeleteTrainingPlan(FlexContext dbContext) { this.dbContext = dbContext; }
public RemoveExerciseFromTrainingPlan(FlexContext dbContext) { this.dbContext = dbContext; }
public CreateUser(FlexContext dbContext) { this.dbContext = dbContext; }
public UserContext(IHttpContextAccessor httpContextAccessor, FlexContext context, IMediator mediator) { this.httpContextAccessor = httpContextAccessor; this.context = context; this.mediator = mediator; }
public DeleteExercise(FlexContext dbContext) { this.dbContext = dbContext; }
public AddExerciseToTrainingPlan(IUserContext userContext, FlexContext dbContext) { this.dbContext = dbContext; this.userContext = userContext; }