Пример #1
0
 public AssemblySetSigner(Assembler assembler, Disassembler disassembler, IlReader ilReader, IlWriter ilWriter, PublicKeyTokenProvider publicKeyTokenProvider)
 {
   _assembler = assembler;
   _disassembler = disassembler;
   _ilReader = ilReader;
   _ilWriter = ilWriter;
   _publicKeyTokenProvider = publicKeyTokenProvider;
 }
Пример #2
0
 public static void Main(string[] args)
 {
   CommandLine commandLine = new CommandLine(args);
   if (!commandLine.IsValid())
   {
     Environment.Exit(1);
     return;
   }
   Configuration configuration = commandLine.ToConfiguration();
   IncomingAssemblyFactory incomingAssemblyFactory = new IncomingAssemblyFactory();
   IncomingAssembly assembly = incomingAssemblyFactory.CreateDependencyGraph(commandLine.RootAssembly);
   ICollection<IncomingAssembly> unsigned = assembly.UnsignedAssemblies;
   foreach (IncomingAssembly toBeCopied in assembly.UnGacedAssemblies)
   {
     Console.WriteLine("Copying " + toBeCopied.Path.FileName);
   }
   foreach (IncomingAssembly toBeSigned in unsigned)
   {
     Console.WriteLine("Signing " + toBeSigned.Path.FileName);
   }
   PublicKeyTokenProvider publicKeyTokenProvider = new PublicKeyTokenProvider();
   AssemblySetSigner signer = new AssemblySetSigner(new Assembler(), new Disassembler(), new IlReader(), new IlWriter(publicKeyTokenProvider), publicKeyTokenProvider);
   signer.SignAssemblies(unsigned, configuration);
 }
Пример #3
0
 public IlWriter(PublicKeyTokenProvider publicKeyTokenProvider)
 {
   _publicKeyTokenProvider = publicKeyTokenProvider;
 }
Пример #4
0
 public AssemblyExternParser(PublicKeyTokenProvider publicKeyTokenProvider, string name)
 {
   _name = name;
   _publicKeyTokenProvider = publicKeyTokenProvider;
 }