示例#1
0
        public override bool Execute()
        {
            DateTime start = DateTime.Now;

            Log.LogMessage(MessageImportance.High, "Amending {0}", TargetAssembly.Select(a => a.ItemSpec).ToArray());
            try
            {
                Program.Amend(TargetAssembly.First().ItemSpec, AmendmentAssemblies.Select(a => a.ItemSpec).ToArray(), ReferenceAssemblies.Select(a => a.ItemSpec).ToArray());
            }
            catch (ReflectionTypeLoadException rtle)
            {
                Log.LogErrorFromException(rtle);
                foreach (var le in rtle.LoaderExceptions)
                {
                    Log.LogErrorFromException(le);
                }
            }
            catch (Exception e)
            {
                Log.LogErrorFromException(e);
                throw;
            }
            Log.LogMessage(MessageImportance.High, "Amending Complete ({0:0.000} seconds)", DateTime.Now.Subtract(start).TotalSeconds);
            return(true);
        }
示例#2
0
        public override bool Execute()
        {
            DateTime start = DateTime.Now;

            Log.LogMessage(MessageImportance.High, "Amending {0}", TargetAssembly.Select(a => a.ItemSpec).ToArray());
            Program.Amend(TargetAssembly.First().ItemSpec, AmendmentAssemblies.Select(a => a.ItemSpec).ToArray(), ReferenceAssemblies.Select(a => a.ItemSpec).ToArray());
            Log.LogMessage(MessageImportance.High, "Amending Complete ({0:0.000} seconds)", DateTime.Now.Subtract(start).TotalSeconds);
            return(true);
        }