public static void SaveAssembly(AssemblyDefinition asm, out byte[] assembly) { MemoryBinaryWriter bw = new MemoryBinaryWriter(); SaveAssembly(asm, bw.BaseStream); assembly = bw.ToArray(); }
public static SR.Assembly CreateReflectionAssembly(AssemblyDefinition asm, AppDomain domain) { using (MemoryBinaryWriter writer = new MemoryBinaryWriter()) { WriteAssembly(asm, writer); return(domain.Load(writer.ToArray())); } }
public byte [] CompressCustomAttribute(CustomAttrib ca, MethodReference ctor) { MemoryBinaryWriter writer = new MemoryBinaryWriter(); CompressCustomAttribute(ca, ctor, writer); return(writer.ToArray()); }
uint GetPointer() { return(m_mdWriter.AddBlob(m_sigWriter.ToArray())); }