public void Validate(CSharpCompilation compilation, CSharpSyntaxTree tree, SemanticModel model, Assembly assembly) { var taskdata = "TaskData"; CSharpCommonValidator.ValidateClass(tree, model, taskdata); List <Property> propertiesToValidate = Lesson2CommonValidator.CreateStep5Properties(); CSharpCommonValidator.ValidateProperties(tree, model, propertiesToValidate); }
public void Validate(CSharpCompilation compilation, CSharpSyntaxTree tree, SemanticModel model, Assembly assembly) { Lesson2CommonValidator.ValidateAddTaskMethod(compilation, tree, model, assembly); var methodName = "CompleteTask"; CSharpCommonValidator.ValidateMethod(tree, model, methodName); ValidatorsExtensions.ExecuteSafe(() => { var viewModel = (dynamic)assembly.CreateInstance("DotvvmAcademy.Tutorial.ViewModels.Lesson2ViewModel"); var task = (dynamic)assembly.CreateInstance("DotvvmAcademy.Tutorial.ViewModels.TaskData"); task.Title = "New Task"; task.IsCompleted = false; viewModel.CompleteTask(task); if (!task.IsCompleted) { throw new CodeValidationException(Lesson2Texts.CompleteTaskMethodError); } }); }
public void Validate(ResolvedTreeRoot resolvedTreeRoot) { Lesson2CommonValidator.ValidateRepeaterTemplate3(resolvedTreeRoot); }
public void Validate(CSharpCompilation compilation, CSharpSyntaxTree tree, SemanticModel model, Assembly assembly) { Lesson2CommonValidator.ValidateAddTaskMethod(compilation, tree, model, assembly); }
public void Validate(ResolvedTreeRoot resolvedTreeRoot) { Lesson2CommonValidator.ValidateAddTaskControlBindings(resolvedTreeRoot); }
public void Validate(ResolvedTreeRoot resolvedTreeRoot) { Lesson2CommonValidator.ValidateRepeaterControl(resolvedTreeRoot); }