public static void SaveAssembly(AssemblyDefinition asm, out byte[] assembly)
        {
            MemoryBinaryWriter bw = new MemoryBinaryWriter();

            SaveAssembly(asm, bw.BaseStream);
            assembly = bw.ToArray();
        }
예제 #2
0
 public static SR.Assembly CreateReflectionAssembly(AssemblyDefinition asm, AppDomain domain)
 {
     using (MemoryBinaryWriter writer = new MemoryBinaryWriter()) {
         WriteAssembly(asm, writer);
         return(domain.Load(writer.ToArray()));
     }
 }
예제 #3
0
        public byte [] CompressCustomAttribute(CustomAttrib ca, MethodReference ctor)
        {
            MemoryBinaryWriter writer = new MemoryBinaryWriter();

            CompressCustomAttribute(ca, ctor, writer);
            return(writer.ToArray());
        }
예제 #4
0
 uint GetPointer()
 {
     return(m_mdWriter.AddBlob(m_sigWriter.ToArray()));
 }