Inheritance: Microsoft.Build.Utilities.Task
 public ModuleWriter(ModuleReader moduleReader, ProjectKeyReader projectKeyReader, Logger logger, WeavingTask config)
 {
     this.moduleReader = moduleReader;
     this.projectKeyReader = projectKeyReader;
     this.logger = logger;
     this.config = config;
 }
 public AssemblyResolver(WeavingTask config, Logger logger, BuildEnginePropertyExtractor buildEnginePropertyExtractor)
 {
     this.config = config;
     this.logger = logger;
     this.buildEnginePropertyExtractor = buildEnginePropertyExtractor;
     assemblyDefinitionCache = new Dictionary<string, AssemblyDefinition>(StringComparer.OrdinalIgnoreCase);
 }
 public PropertyDataWalker(TypeNodeBuilder typeNodeBuilder, NotifyPropertyDataAttributeReader notifyPropertyDataAttributeReader, Logger logger, WeavingTask weavingTask)
 {
     this.typeNodeBuilder = typeNodeBuilder;
     this.notifyPropertyDataAttributeReader = notifyPropertyDataAttributeReader;
     this.logger = logger;
     this.weavingTask = weavingTask;
 }
    public WeaverHelper(string projectPath, bool tryToWeaveAllTypes)
    {
        this.projectPath = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, @"..\..\..\TestAssemblies", projectPath));

        GetAssemblyPath();

        var newAssembly = assemblyPath.Replace(".dll", "2.dll");
        var pdbFileName = Path.ChangeExtension(assemblyPath, "pdb");
        var newPdbFileName = Path.ChangeExtension(newAssembly, "pdb");
        File.Copy(assemblyPath, newAssembly, true);
        File.Copy(pdbFileName, newPdbFileName, true);

        var buildEngine = Substitute.For<IBuildEngine>();
        buildEngine.ProjectFileOfTaskNode.Returns(projectPath);
        var buildEngineExtensions = Substitute.For<BuildEnginePropertyExtractor>();
        buildEngineExtensions.GetEnvironmentVariable("_DebugSymbolsIntermediatePath", false).Returns(new[] { newPdbFileName });
        buildEngineExtensions.GetProjectPath().Returns(this.projectPath);

        var weavingTask = new WeavingTask
                              {
                                  TargetPath = newAssembly,
                                  BuildEngine = buildEngine,
                                  TryToWeaveAllTypes = tryToWeaveAllTypes,
                                  References = GetReferences(),
                                  CheckForIsChanged = true,
                                  ProcessFields = true,
                                  BuildEnginePropertyExtractor = buildEngineExtensions,
                                  EventInvokerName = "CustomEventInvoker"
                              };

        var execute = weavingTask.Execute();
        if (!execute)
        {
            throw weavingTask.Exception;
        }

        var combine = Path.Combine(new FileInfo(assemblyPath).DirectoryName, "NotifyPropertyWeaver.dll");
        if (File.Exists(combine))
        {
            Assembly.LoadFile(Path.GetFullPath(combine));
        }
        Assembly = Assembly.LoadFile(newAssembly);
    }
 public EventInvokerNameResolver(WeavingTask moduleWeaver)
 {
     this.moduleWeaver = moduleWeaver;
     EventInvokerNames = new List<string> { "OnPropertyChanged", "NotifyOfPropertyChange", "RaisePropertyChanged", "NotifyPropertyChanged", "NotifyChanged" };
 }
 public ModuleReader(WeavingTask config, IAssemblyResolver assemblyResolver, Logger logger)
 {
     this.logger = logger;
     this.config = config;
     this.assemblyResolver = assemblyResolver;
 }
 public ProjectKeyReader(BuildEnginePropertyExtractor buildEnginePropertyExtractor, WeavingTask config)
 {
     this.buildEnginePropertyExtractor = buildEnginePropertyExtractor;
     this.config = config;
 }
 public FileChangedChecker(Logger logger, WeavingTask config, ModuleReader moduleReader)
 {
     namespaceKey = config.GetType().Namespace.Replace(".", string.Empty);
     this.logger = logger;
     this.moduleReader = moduleReader;
 }
 public TargetPathFinder(WeavingTask config, BuildEnginePropertyExtractor buildEnginePropertyExtractor, Logger logger)
 {
     this.config = config;
     this.buildEnginePropertyExtractor = buildEnginePropertyExtractor;
     this.logger = logger;
 }