示例#1
0
 internal static byte[] Write(ISignatureWriterHelper helper, TypeSig typeSig, BinaryWriterContext context)
 {
     using (var writer = new SignatureWriter(helper, context)) {
         writer.Write(typeSig);
         return(writer.GetResult());
     }
 }
示例#2
0
 SignatureWriter(ISignatureWriterHelper helper, BinaryWriterContext context)
 {
     this.helper           = helper;
     this.recursionCounter = new RecursionCounter();
     this.outStream        = context.OutStream;
     this.writer           = context.Writer;
     this.disposeStream    = false;
     outStream.SetLength(0);
     outStream.Position = 0;
 }
示例#3
0
 CustomAttributeWriter(ICustomAttributeWriterHelper helper, BinaryWriterContext context)
 {
     this.helper           = helper;
     this.recursionCounter = new RecursionCounter();
     this.outStream        = context.OutStream;
     this.writer           = context.Writer;
     this.genericArguments = null;
     this.disposeStream    = false;
     outStream.SetLength(0);
     outStream.Position = 0;
 }
示例#4
0
 PortablePdbCustomDebugInfoWriter(IPortablePdbCustomDebugInfoWriterHelper helper, SerializerMethodContext methodContext, MetaData systemMetaData, BinaryWriterContext context)
 {
     this.helper         = helper;
     this.methodContext  = methodContext;
     this.systemMetaData = systemMetaData;
     this.outStream      = context.OutStream;
     this.writer         = context.Writer;
     outStream.SetLength(0);
     outStream.Position = 0;
 }
示例#5
0
        public static byte[] Write(IPortablePdbCustomDebugInfoWriterHelper helper, SerializerMethodContext methodContext, MetaData systemMetaData, PdbCustomDebugInfo cdi, BinaryWriterContext context)
        {
            var writer = new PortablePdbCustomDebugInfoWriter(helper, methodContext, systemMetaData, context);

            return(writer.Write(cdi));
        }
示例#6
0
 DeclSecurityWriter(ModuleDef module, IWriterError helper, BinaryWriterContext context)
 {
     this.module  = module;
     this.helper  = helper;
     this.context = context;
 }
示例#7
0
 internal static byte[] Write(ModuleDef module, IList <SecurityAttribute> secAttrs, IWriterError helper, BinaryWriterContext context)
 {
     return(new DeclSecurityWriter(module, helper, context).Write(secAttrs));
 }
示例#8
0
 internal static byte[] Write(ICustomAttributeWriterHelper helper, IList <CANamedArgument> namedArgs, BinaryWriterContext context)
 {
     using (var writer = new CustomAttributeWriter(helper, context)) {
         writer.Write(namedArgs);
         return(writer.GetResult());
     }
 }
示例#9
0
 internal static byte[] Write(ICustomAttributeWriterHelper helper, CustomAttribute ca, BinaryWriterContext context)
 {
     using (var writer = new CustomAttributeWriter(helper, context)) {
         writer.Write(ca);
         return(writer.GetResult());
     }
 }
示例#10
0
 internal static byte[] Write(ISignatureWriterHelper helper, CallingConventionSig sig, BinaryWriterContext context)
 {
     using (var writer = new SignatureWriter(helper, context)) {
         writer.Write(sig);
         return(writer.GetResult());
     }
 }