public override bool Execute()
 {
     AssemComp acomp = new AssemComp(OriginalAssembly.ItemSpec, NewAssembly.ItemSpec);
     AreEquivalent = acomp.AreEquivalent;
     ReasonCode = acomp.Reason;
     return true;
 }
Exemplo n.º 2
0
        public override bool Execute()
        {
            AssemComp acomp = new AssemComp(OriginalAssembly.ItemSpec, NewAssembly.ItemSpec);

            AreEquivalent = acomp.AreEquivalent;
            ReasonCode    = acomp.Reason;
            return(true);
        }
 protected override void BeginProcessing()
 {
     try
     {
         var acomp = new AssemComp(AssemblyA, AssemblyB);
         WriteObject(acomp);
     }
     catch (Exception ex)
     {
         ThrowTerminatingError(
             new ErrorRecord(
                 ex,
                 "OpenIsolatedStorage",
                 ErrorCategory.NotSpecified, this
                 )
             );
     }
 }
        protected override void BeginProcessing()
        {
            try
            {
                var acomp = new AssemComp(AssemblyA, AssemblyB);
                WriteObject(acomp);
            }
            catch (Exception ex)
            {
                ThrowTerminatingError(
                    new ErrorRecord(
                        ex,
                        "OpenIsolatedStorage",
                        ErrorCategory.NotSpecified,this
                        )
                    );

            }
        }
Exemplo n.º 5
0
 public AssemComp(string fileSpecA, string fileSpecB)
 {
     _errorCollector = (a, b) => { Reason += a + b + "\n"; };
     if (AssemComp.CheckFileSize(fileSpecA, fileSpecB))
     {
         IServiceProvider serviceProvider  = new Reflector.ApplicationManager(new FakeReflectorWindowManager());
         IServiceProvider serviceProvider2 = new Reflector.ApplicationManager(new FakeReflectorWindowManager());
         IAssemblyManager assemblyManager  = (IAssemblyManager)serviceProvider.GetService(typeof(IAssemblyManager));
         IAssemblyManager assemblyManager2 = (IAssemblyManager)serviceProvider2.GetService(typeof(IAssemblyManager));
         _assmA = assemblyManager.LoadFile(fileSpecA);
         _assmB = assemblyManager2.LoadFile(fileSpecB);
         if (_assmA == _assmB)
         {
             throw new ArgumentException();
         }
         AreEquivalent = Compare();
     }
     else
     {
         AreEquivalent = false;
         Reason        = "FileSize";
     }
 }
Exemplo n.º 6
0
 public void T1()
 {
     string asmA = @"D:\dev\ILUnMerge\AssemblyEquiv\bin\Debug\AssemblyEquiv.dll";
     AssemComp acomp = new AssemComp(asmA, asmA);
     Assert.True(acomp.AreEquivalent);
 }