/// <summary>
        /// Initialises a new instance of the ParamMetadataTableRow class
        /// </summary>
        /// <param name="contents">The contents of the file</param>
        /// <param name="offset">The offset of the current row</param>
        public ParamMetadataTableRow(byte[] contents, Offset offset, byte sizeOfStringIndex)
        {
            this.FileOffset = offset;

            _flags    = (ParamAttributeFlags)FieldReader.ToUInt16(contents, offset.Shift(2));
            _sequence = FieldReader.ToUInt16(contents, offset.Shift(2));
            _name     = new StringIndex(contents, sizeOfStringIndex, offset);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Constructs a ParamDef with the provided details.
 /// </summary>
 /// <param name="name">The name for the parameter</param>
 /// <param name="container">The method that defines and contains the parameter</param>
 /// <param name="sequence">The sequence in the parameter list for this parameter</param>
 /// <param name="definingAssembly">The assembly in which the parameter is defined</param>
 /// <param name="flags">The attribute flags for the parameter</param>
 public ParamDef(string name, MethodDef container, int sequence, AssemblyDef definingAssembly, ParamAttributeFlags flags)
 {
     _constants = new List <ConstantInfo>();
     _method    = container;
     _sequence  = sequence;
     _flags     = flags;
     UniqueId   = definingAssembly.CreateUniqueId();
     Assembly   = definingAssembly;
     Name       = name;
 }
Exemplo n.º 3
0
        private ParamDef CreateWithSpecifiedAttributes(ParamAttributeFlags flags)
        {
            AssemblyDef assembly = new AssemblyDef();

            return(new ParamDef(string.Empty, null, 0, assembly, flags));
        }