Exemple #1
0
        public override bool Execute()
        {
            SetupLogging();

            var task_stopwatch = Stopwatch.StartNew();

            WriteMessage("Weaving INotifyPropertyChanged started");

            try
            {
                foreach (var file in Files)
                {
                    var file_stopwatch = Stopwatch.StartNew();
                    WriteMessage(string.Format("Processing {0}", file.ItemSpec));

                    ReaderParameters reader_parameters = new ReaderParameters()
                    {
                        ReadSymbols = true
                    };
                    AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(file.ItemSpec, reader_parameters);

                    var analyzer = new DependencyAnalyzerV2();
                    analyzer.Run(assembly);

                    //var analyzer = new Analyzer(assembly);
                    //analyzer.Execute();

                    //WriterParameters writer_parameters = new WriterParameters() {WriteSymbols = true};
                    //assembly.Write(file.ItemSpec, writer_parameters);

                    file_stopwatch.Stop();
                    WriteMessage(string.Format("Processing took {0} ms", file_stopwatch.ElapsedMilliseconds));
                }
            }
            finally
            {
                task_stopwatch.Stop();
                WriteMessage(string.Format("Weaving INotifyPropertyChanged done after {0} ms", task_stopwatch.ElapsedMilliseconds));
            }

            return(true);
        }
Exemple #2
0
        public override bool Execute()
        {
            SetupLogging();

            var task_stopwatch = Stopwatch.StartNew();
            WriteMessage("Weaving INotifyPropertyChanged started");

            try
            {
                foreach (var file in Files)
                {
                    var file_stopwatch = Stopwatch.StartNew();
                    WriteMessage(string.Format("Processing {0}", file.ItemSpec));

                    ReaderParameters reader_parameters = new ReaderParameters() {ReadSymbols = true};
                    AssemblyDefinition assembly = AssemblyDefinition.ReadAssembly(file.ItemSpec, reader_parameters);

                    var analyzer = new DependencyAnalyzerV2();
                    analyzer.Run(assembly);

                    //var analyzer = new Analyzer(assembly);
                    //analyzer.Execute();

                    //WriterParameters writer_parameters = new WriterParameters() {WriteSymbols = true};
                    //assembly.Write(file.ItemSpec, writer_parameters);

                    file_stopwatch.Stop();
                    WriteMessage(string.Format("Processing took {0} ms", file_stopwatch.ElapsedMilliseconds));
                }
            }
            finally
            {
                task_stopwatch.Stop();
                WriteMessage(string.Format("Weaving INotifyPropertyChanged done after {0} ms", task_stopwatch.ElapsedMilliseconds));
            }

            return true;
        }