FromModel() public méthode

public FromModel ( NotifyPropertyWeaverProjectInjector, projectInjector, ConfigureWindowModel, configureWindowModel ) : void
projectInjector NotifyPropertyWeaverProjectInjector,
configureWindowModel ConfigureWindowModel,
Résultat void
    void Configure(ConfigureWindowModel model, Project project)
    {
        var directoryInfo = fullPathResolver.GetFullPath(model.ToolsDirectory, project);
        var targetFile    = new FileInfo(Path.Combine(directoryInfo.FullName, "NotifyPropertyWeaverMsBuildTask.dll"));

        if (!targetFile.Exists || VersionChecker.IsVersionNewer(targetFile))
        {
            if (!fileExporter.ExportTask(directoryInfo))
            {
                taskFileReplacer.AddFile(directoryInfo);
            }
        }

        if (model.IncludeAttributeAssembly)
        {
            var frameworkType = FrameworkTypeReader.GetFrameworkType(project.FullName);
            fileExporter.ExportAttribute(fullPathResolver.GetFullPath(model.DependenciesDirectory, project), frameworkType);
        }

        var defaulter       = new Defaulter();
        var projectInjector = new NotifyPropertyWeaverProjectInjector
        {
            ProjectFile = project.FullName
        };

        defaulter.FromModel(projectInjector, model);
        projectInjector.Execute();
    }
Exemple #2
0
    void Configure(ConfigureWindowModel model, Project project)
    {
        var directoryInfo = fullPathResolver.GetFullPath(model.ToolsDirectory, project);
        var targetFile    = new FileInfo(Path.Combine(directoryInfo.FullName, "Costura.dll"));

        if (!targetFile.Exists || VersionChecker.IsVersionNewer(targetFile))
        {
            if (!fileExporter.ExportTask(directoryInfo))
            {
                taskFileReplacer.AddFile(directoryInfo);
            }
        }

        var defaulter       = new Defaulter();
        var projectInjector = new CosturaProjectInjector
        {
            ProjectFile = project.FullName
        };

        defaulter.FromModel(projectInjector, model);
        projectInjector.Execute();
    }
    void Configure(ConfigureWindowModel model, Project project)
    {
        var directoryInfo = fullPathResolver.GetFullPath(model.ToolsDirectory, project);
        var targetFile = new FileInfo(Path.Combine(directoryInfo.FullName, "Costura.dll"));
        if (!targetFile.Exists || VersionChecker.IsVersionNewer(targetFile))
        {
            if (!fileExporter.ExportTask(directoryInfo))
            {
                taskFileReplacer.AddFile(directoryInfo);
            }
        }

        var defaulter = new Defaulter();
        var projectInjector = new CosturaProjectInjector
                                  {
                                      ProjectFile = project.FullName
                                  };
        defaulter.FromModel(projectInjector, model);
        projectInjector.Execute();
    }
    void Configure(ConfigureWindowModel model, Project project)
    {
        var directoryInfo = fullPathResolver.GetFullPath(model.ToolsDirectory, project);
        var targetFile = new FileInfo(Path.Combine(directoryInfo.FullName, "NotifyPropertyWeaverMsBuildTask.dll"));
        if (!targetFile.Exists || VersionChecker.IsVersionNewer(targetFile))
        {
            if (!fileExporter.ExportTask(directoryInfo))
            {
                taskFileReplacer.AddFile(directoryInfo);
            }
        }

        if (model.IncludeAttributeAssembly)
        {
            var frameworkType = FrameworkTypeReader.GetFrameworkType(project.FullName);
            fileExporter.ExportAttribute(fullPathResolver.GetFullPath(model.DependenciesDirectory, project), frameworkType);
        }

        var defaulter = new Defaulter();
        var projectInjector = new NotifyPropertyWeaverProjectInjector
                                  {
                                      ProjectFile = project.FullName
                                  };
        defaulter.FromModel(projectInjector, model);
        projectInjector.Execute();
    }