private NativeFormatMethodParameterInfo(MethodBase member, MethodHandle methodHandle, int position, ParameterHandle parameterHandle, QTypeDefRefOrSpec qualifiedParameterTypeHandle, TypeContext typeContext)
     : base(member, position, qualifiedParameterTypeHandle, typeContext)
 {
     _methodHandle = methodHandle;
     _parameterHandle = parameterHandle;
     _parameter = parameterHandle.GetParameter(Reader);
 }
 private RuntimeFatMethodParameterInfo(MethodBase member, MethodHandle methodHandle, int position, ParameterHandle parameterHandle, MetadataReader reader, Handle typeHandle, TypeContext typeContext)
     : base(member, position, reader, typeHandle, typeContext)
 {
     _methodHandle = methodHandle;
     _parameterHandle = parameterHandle;
     _parameter = parameterHandle.GetParameter(reader);
 }
예제 #3
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ParameterHandle[] values)
        {
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            if (count == 0)
            {
                values = s_emptyParameterHandleArray;
            }
            else
            {
                values = new ParameterHandle[count];
                for (uint i = 0; i < count; ++i)
                {
                    ParameterHandle tmp;
                    offset = reader.Read(offset, out tmp);
                    values[i] = tmp;
                }
            }
            return offset;
        } // Read
예제 #4
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ParameterHandle handle)
        {
            uint value;
            offset = reader.DecodeUnsigned(offset, out value);
            handle = new ParameterHandle((int)value);
            handle._Validate();
            return offset;
        } // Read
예제 #5
0
 public abstract IEnumerable<CustomAttributeData> GetPsuedoCustomAttributes(MetadataReader reader, ParameterHandle parameterHandle, MethodHandle declaringMethodHandle);
예제 #6
0
 //==============================================================================================
 // Default Value support.
 //==============================================================================================
 public abstract bool GetDefaultValueIfAny(MetadataReader reader, ParameterHandle parameterHandle, Type declaredType, IEnumerable<CustomAttributeData> customAttributes, out Object defaultValue);
예제 #7
0
        } // IsNull

        internal bool IsNull(ParameterHandle handle)
        {
            return (handle._value & 0x00FFFFFF) == 0;
        } // IsNull
예제 #8
0
        } // ToHandle

        internal Handle ToHandle(ParameterHandle handle)
        {
            return new Handle(handle._value);
        } // ToHandle
예제 #9
0
        } // GetNamespaceReference

        public Parameter GetParameter(ParameterHandle handle)
        {
            var record = new Parameter() { _reader = this, _handle = handle };
            var offset = (uint)handle.Offset;
            offset = _streamReader.Read(offset, out record._flags);
            offset = _streamReader.Read(offset, out record._sequence);
            offset = _streamReader.Read(offset, out record._name);
            offset = _streamReader.Read(offset, out record._defaultValue);
            offset = _streamReader.Read(offset, out record._customAttributes);
            return record;
        } // GetParameter
예제 #10
0
        } // Equals

        public bool Equals(ParameterHandle handle)
        {
            return _value == handle._value;
        } // Equals
예제 #11
0
        } // Read

        public static uint Read(this NativeReader reader, uint offset, out ParameterHandle[] values)
        {
            uint count;
            offset = reader.DecodeUnsigned(offset, out count);
            #if !NETFX_45
            if (count == 0)
            {
                values = Array.Empty<ParameterHandle>();
            }
            else
            #endif
            {
                values = new ParameterHandle[count];
                for (uint i = 0; i < count; ++i)
                {
                    ParameterHandle tmp;
                    offset = reader.Read(offset, out tmp);
                    values[i] = tmp;
                }
            }
            return offset;
        } // Read