Execute() 공개 메소드

public Execute ( ) : void
리턴 void
예제 #1
0
    public void Execute()
    {
        templateFinder = new ValidationTemplateFinder
        {
            LogInfo          = LogInfo,
            ModuleDefinition = ModuleDefinition,
        };
        templateFinder.Execute();


        dataErrorInfoFinder = new DataErrorInfoFinder
        {
            ValidationTemplateFinder = templateFinder,
            ModuleDefinition         = ModuleDefinition,
        };
        dataErrorInfoFinder.Execute();

        notifyDataErrorInfoFinder = new NotifyDataErrorInfoFinder
        {
            ValidationTemplateFinder = templateFinder,
            ModuleDefinition         = ModuleDefinition,
        };
        notifyDataErrorInfoFinder.Execute();


        if (!dataErrorInfoFinder.Found && !notifyDataErrorInfoFinder.Found)
        {
            throw new WeavingException("Found ValidationTemplate but it did not implement INotifyDataErrorInfo or IDataErrorInfo");
        }
        ProcessTypes();
        RemoveReference();
    }
예제 #2
0
    public void Execute()
    {
        templateFinder = new ValidationTemplateFinder
                             {
                                 LogInfo = LogInfo,
                                 ModuleDefinition = ModuleDefinition,
                             };
        templateFinder.Execute();

        dataErrorInfoFinder = new DataErrorInfoFinder
                                  {
                                      ValidationTemplateFinder = templateFinder,
                                      ModuleDefinition = ModuleDefinition,
                                  };
        dataErrorInfoFinder.Execute();

        notifyDataErrorInfoFinder = new NotifyDataErrorInfoFinder
                                        {
                                            ValidationTemplateFinder = templateFinder,
                                            ModuleDefinition = ModuleDefinition,
                                        };
        notifyDataErrorInfoFinder.Execute();

        if (!dataErrorInfoFinder.Found && !notifyDataErrorInfoFinder.Found)
        {
            throw new WeavingException("Found ValidationTemplate but it did not implement INotifyDataErrorInfo or IDataErrorInfo");
        }
        ProcessTypes();
        RemoveReference();
    }
예제 #3
0
    public void Execute()
    {
        var allTypes = ModuleDefinition.GetTypes().Where(x => x.IsClass).ToList();

        try
        {
            templateFinder = new ValidationTemplateFinder
            {
                AllTypes         = allTypes,
                ModuleDefinition = ModuleDefinition
            };
            templateFinder.Execute();
        }
        catch (WeavingException)
        {
            var refTypes = GetTypesFromAttributeAssembly(allTypes);
            templateFinder = new ValidationTemplateFinder
            {
                AllTypes         = refTypes,
                ModuleDefinition = ModuleDefinition
            };
            templateFinder.Execute();
        }


        dataErrorInfoFinder = new DataErrorInfoFinder
        {
            ValidationTemplateFinder = templateFinder,
            ModuleDefinition         = ModuleDefinition,
        };
        dataErrorInfoFinder.Execute();
        notifyDataErrorInfoFinder = new NotifyDataErrorInfoFinder
        {
            ValidationTemplateFinder = templateFinder,
            ModuleDefinition         = ModuleDefinition,
        };
        notifyDataErrorInfoFinder.Execute();


        if (!dataErrorInfoFinder.Found && !notifyDataErrorInfoFinder.Found)
        {
            throw new WeavingException("Found ValidationTemplate but it did not implement INotifyDataErrorInfo or IDataErrorInfo");
        }
        ProcessTypes(allTypes);
        RemoveReference();
    }