Example #1
0
 internal TypeSpecification(MetadataImage image, MetadataRow <uint> row)
     : base(row.MetadataToken)
 {
     _image     = image;
     _signature = new TaggedLazyValue <RecursionProtection, TypeSignature>(protection =>
     {
         protection.TraversedTokens.Add(row.MetadataToken);
         return(TypeSignature.FromReader(
                    image,
                    image.Header.GetStream <BlobStream>().CreateBlobReader(row.Column1),
                    true,
                    protection));
     },
                                                                           RecursionProtection.Create);
     CustomAttributes = new CustomAttributeCollection(this);
 }
Example #2
0
 public TypeSpecification(TypeSignature signature)
     : base(new MetadataToken(MetadataTokenType.TypeSpec))
 {
     _signature       = new TaggedLazyValue <RecursionProtection, TypeSignature>(signature);
     CustomAttributes = new CustomAttributeCollection(this);
 }