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); }
} // 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
} // 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
public abstract IEnumerable<CustomAttributeData> GetPsuedoCustomAttributes(MetadataReader reader, ParameterHandle parameterHandle, MethodHandle declaringMethodHandle);
//============================================================================================== // Default Value support. //============================================================================================== public abstract bool GetDefaultValueIfAny(MetadataReader reader, ParameterHandle parameterHandle, Type declaredType, IEnumerable<CustomAttributeData> customAttributes, out Object defaultValue);
} // IsNull internal bool IsNull(ParameterHandle handle) { return (handle._value & 0x00FFFFFF) == 0; } // IsNull
} // ToHandle internal Handle ToHandle(ParameterHandle handle) { return new Handle(handle._value); } // ToHandle
} // 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
} // Equals public bool Equals(ParameterHandle handle) { return _value == handle._value; } // Equals
} // 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