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