public string RemoveTypeAssemblyInformation_GivenFullTypeName_AssemblySpecificDataIsRemoved(string fullTypeName)
        {
            var primaryAssembly = AssemblyDefinition.CreateAssembly(
                new AssemblyNameDefinition("MainApp", new Version(1, 0, 0, 0)),
                "MainApp.exe", ModuleKind.Console);

            var otherAssemblies = new[]
            {
                AssemblyDefinition.CreateAssembly(
                    new AssemblyNameDefinition("ClassLibrary", new Version(1, 0)),
                    "ClassLibrary.dll", ModuleKind.Dll)
            };

            var repackContext = Mock.Of <IRepackContext>(c =>
                                                         c.PrimaryAssemblyDefinition == primaryAssembly &&
                                                         c.OtherAssemblies == otherAssemblies);
            var patcher = new BamlResourcePatcher(repackContext);

            return(patcher.RemoveTypeAssemblyInformation(fullTypeName));
        }
Esempio n. 2
0
 public string RemoveTypeAssemblyInformation_GivenFullTypeName_AssemblySpecificDataIsRemoved(string fullTypeName)
 {
     return(BamlResourcePatcher.RemoveTypeAssemblyInformation(fullTypeName));
 }