Exemplo n.º 1
0
 public static PropertySignature ParsePropertySignature(Blob blob)
 {
     using (var br = blob.ToReader())
     {
         if (br.ReadByte() != 7)
             throw new Exception();
         var ps = new PropertySignature();
         ps.FirstMod = ReadCustomModSignatures(br);
         ps.Type = ParseTypeSignature(br);
         return ps;
     }
 }
Exemplo n.º 2
0
 public static FieldSignature ParseFieldSignature(Blob blob)
 {
     using (var br = blob.ToReader())
     {
         if (br.ReadByte() != 6)
             throw new Exception();
         var fs = new FieldSignature();
         fs.FirstMod = ReadCustomModSignatures(br);
         fs.Type = ParseTypeSignature(br);
         return fs;
     }
 }
Exemplo n.º 3
0
 public static MethodSignature ParseMethodSignature(Blob blob)
 {
     using (var br = blob.ToReader())
     {
         var ms = new MethodSignature();
         ms.CallingConventions = br.Read<CallingConventions>();
         if (ms.CallingConventions.HasFlag(CallingConventions.Generic))
             ms.GenericParamCount = br.ReadCompressedUInt32();
         ms.ParamCount = br.ReadCompressedUInt32();
         ms.ReturnType = ReadReturnTypeSignature(br);
         if (ms.ParamCount > 0)
             ms.FirstParam = ReadParams(br, ms.ParamCount);
         return ms;
     }
 }