| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | #nullable enable |
| | | 4 | | |
| | | 5 | | namespace Ice; |
| | | 6 | | |
| | | 7 | | /// <summary> |
| | | 8 | | /// Holds class slices that cannot be unmarshaled because their types are not known locally. |
| | | 9 | | /// </summary> |
| | | 10 | | /// <param name="slices">The slices of the unknown class, in order of most-derived to least-derived.</param> |
| | | 11 | | public sealed record class SlicedData(SliceInfo[] slices); |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Encapsulates the details of a class slice with an unknown type. |
| | | 15 | | /// </summary> |
| | | 16 | | /// <param name="typeId">The Slice type ID for this slice.</param> |
| | | 17 | | /// <param name="compactId">The Slice compact type ID for this slice, or -1 if the slice has no compact ID.</param> |
| | | 18 | | /// <param name="bytes">The encoded bytes for this slice, including the leading size integer.</param> |
| | | 19 | | /// <param name="hasOptionalMembers">Whether or not the slice contains optional members.</param> |
| | | 20 | | /// <param name="isLastSlice">Whether or not this is the last slice.</param> |
| | 1 | 21 | | public sealed record class SliceInfo( |
| | 1 | 22 | | string typeId, |
| | 1 | 23 | | int compactId, |
| | 1 | 24 | | byte[] bytes, |
| | 1 | 25 | | bool hasOptionalMembers, |
| | 1 | 26 | | bool isLastSlice) |
| | | 27 | | { |
| | | 28 | | /// <summary> |
| | | 29 | | /// Gets or sets the class instances referenced by this slice. |
| | | 30 | | /// </summary> |
| | 1 | 31 | | public Value[] instances { get; set; } = []; |
| | | 32 | | } |