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);
                }
            });
        }
Ejemplo n.º 3
0
 public void Validate(ResolvedTreeRoot resolvedTreeRoot)
 {
     Lesson2CommonValidator.ValidateRepeaterTemplate3(resolvedTreeRoot);
 }
Ejemplo n.º 4
0
 public void Validate(CSharpCompilation compilation, CSharpSyntaxTree tree, SemanticModel model,
                      Assembly assembly)
 {
     Lesson2CommonValidator.ValidateAddTaskMethod(compilation, tree, model, assembly);
 }
Ejemplo n.º 5
0
 public void Validate(ResolvedTreeRoot resolvedTreeRoot)
 {
     Lesson2CommonValidator.ValidateAddTaskControlBindings(resolvedTreeRoot);
 }
Ejemplo n.º 6
0
 public void Validate(ResolvedTreeRoot resolvedTreeRoot)
 {
     Lesson2CommonValidator.ValidateRepeaterControl(resolvedTreeRoot);
 }