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