| | 1 | | // Copyright (c) ZeroC, Inc. |
| | 2 | |
|
| | 3 | | namespace ZeroC.Slice; |
| | 4 | |
|
| | 5 | | /// <summary>Encapsulates the details of a class slice (as in slice of cake) that an <see cref="IActivator" /> could |
| | 6 | | /// not decode.</summary> |
| | 7 | | public sealed class SliceInfo |
| | 8 | | { |
| | 9 | | /// <summary>Gets the Slice type ID or compact ID for this slice.</summary> |
| 56 | 10 | | public string TypeId { get; } |
| | 11 | |
|
| | 12 | | /// <summary>Gets the encoded bytes for this slice, including the leading size integer.</summary> |
| 24 | 13 | | public ReadOnlyMemory<byte> Bytes { get; } |
| | 14 | |
|
| | 15 | | /// <summary>Gets a value indicating whether or not the slice contains tagged fields.</summary> |
| 24 | 16 | | public bool HasTaggedFields { get; } |
| | 17 | |
|
| | 18 | | /// <summary>Gets the class instances referenced by this slice.</summary> |
| 65 | 19 | | public IReadOnlyList<SliceClass> Instances { get; internal set; } |
| | 20 | |
|
| 25 | 21 | | internal SliceInfo( |
| 25 | 22 | | string typeId, |
| 25 | 23 | | ReadOnlyMemory<byte> bytes, |
| 25 | 24 | | IReadOnlyList<SliceClass> instances, |
| 25 | 25 | | bool hasTaggedFields) |
| 25 | 26 | | { |
| 25 | 27 | | TypeId = typeId; |
| 25 | 28 | | Bytes = bytes; |
| 25 | 29 | | Instances = instances; |
| 25 | 30 | | HasTaggedFields = hasTaggedFields; |
| 25 | 31 | | } |
| | 32 | | } |