} // Read public static uint Read(this NativeReader reader, uint offset, out CustomModifierHandle handle) { uint value; offset = reader.DecodeUnsigned(offset, out value); handle = new CustomModifierHandle((int)value); handle._Validate(); return offset; } // Read
} // Read public static uint Read(this NativeReader reader, uint offset, out CustomModifierHandle[] values) { uint count; offset = reader.DecodeUnsigned(offset, out count); if (count == 0) { values = s_emptyCustomModifierHandleArray; } else { values = new CustomModifierHandle[count]; for (uint i = 0; i < count; ++i) { CustomModifierHandle tmp; offset = reader.Read(offset, out tmp); values[i] = tmp; } } return offset; } // Read
} // IsNull internal bool IsNull(CustomModifierHandle handle) { return (handle._value & 0x00FFFFFF) == 0; } // IsNull
} // ToHandle internal Handle ToHandle(CustomModifierHandle handle) { return new Handle(handle._value); } // ToHandle
} // GetCustomAttribute public CustomModifier GetCustomModifier(CustomModifierHandle handle) { var record = new CustomModifier() { _reader = this, _handle = handle }; var offset = (uint)handle.Offset; offset = _streamReader.Read(offset, out record._isOptional); offset = _streamReader.Read(offset, out record._type); return record; } // GetCustomModifier
} // Equals public bool Equals(CustomModifierHandle handle) { return _value == handle._value; } // Equals
} // Read public static uint Read(this NativeReader reader, uint offset, out CustomModifierHandle[] values) { uint count; offset = reader.DecodeUnsigned(offset, out count); #if !NETFX_45 if (count == 0) { values = Array.Empty<CustomModifierHandle>(); } else #endif { values = new CustomModifierHandle[count]; for (uint i = 0; i < count; ++i) { CustomModifierHandle tmp; offset = reader.Read(offset, out tmp); values[i] = tmp; } } return offset; } // Read