예제 #1
0
 /// <summary>
 /// Populates the <see cref="RuntimeAttribute"/> with the values in <paramref name="car"/>.
 /// </summary>
 /// <param name="module">The metadata module, which defines the attribute.</param>
 /// <param name="car">The custom attribute row From metadata.</param>
 public RuntimeAttribute(IMetadataModule module, CustomAttributeRow car)
 {
     _attribute = null;
     _attributeBlob = car.ValueBlobIdx;
     _ctor = car.TypeIdx;
     _module = module;
 }
예제 #2
0
 /// <summary>
 /// Populates the <see cref="RuntimeAttribute"/> with the values in <paramref name="car"/>.
 /// </summary>
 /// <param name="moduleTypeSystem">The module type system.</param>
 /// <param name="car">The custom attribute row from metadata.</param>
 public RuntimeAttribute(IModuleTypeSystem moduleTypeSystem, CustomAttributeRow car)
 {
     attribute = null;
     attributeBlob = car.ValueBlobIdx;
     ctor = car.TypeIdx;
     this.moduleTypeSystem = moduleTypeSystem;
 }
예제 #3
0
 void IMetadataProvider.Read(TokenTypes token, out CustomAttributeRow result)
 {
     TableHeap theap = (TableHeap)_streams[(int)HeapType.Tables];
     theap.Read(token, out result);
 }
 public CustomAttributeRowExt(IMetadataProvider metadata, CustomAttributeRow row)
     : base(metadata)
 {
     this.row = row;
 }
예제 #5
0
파일: TableHeap.cs 프로젝트: hj1980/Mosa
        /// <summary>
        /// Reads the specified token.
        /// </summary>
        /// <param name="token">The token.</param>
        /// <param name="result">The result.</param>
        public void Read(TokenTypes token, out CustomAttributeRow result)
        {
            if ((token & TokenTypes.TableMask) != TokenTypes.CustomAttribute)
                throw new ArgumentException ("Invalid token type for CustomAttributeRow.", "token");

            using (BinaryReader reader = CreateReaderForToken (token))
            {
                result = new CustomAttributeRow (ReadIndexValue (reader, IndexType.HasCustomAttribute), ReadIndexValue (reader, IndexType.CustomAttributeType), ReadIndexValue (reader, IndexType.BlobHeap));
            }
        }