| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | namespace IceRpc.Ice.Codec; |
| | | 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 Ice type ID or compact ID for this slice. An Ice type ID starts with "::", while a |
| | | 10 | | /// compact ID is a non-negative integer in decimal notation.</summary> |
| | 56 | 11 | | public string TypeId { get; } |
| | | 12 | | |
| | | 13 | | /// <summary>Gets the encoded bytes for this slice, excluding the leading slice size. When the slice has tagged |
| | | 14 | | /// fields, the trailing tag end marker is also excluded.</summary> |
| | 24 | 15 | | public ReadOnlyMemory<byte> Bytes { get; } |
| | | 16 | | |
| | | 17 | | /// <summary>Gets a value indicating whether or not the slice contains tagged fields.</summary> |
| | 24 | 18 | | public bool HasTaggedFields { get; } |
| | | 19 | | |
| | | 20 | | /// <summary>Gets the class instances referenced by this slice.</summary> |
| | 68 | 21 | | public IReadOnlyList<IceClass> Instances { get; internal set; } |
| | | 22 | | |
| | 28 | 23 | | internal SliceInfo( |
| | 28 | 24 | | string typeId, |
| | 28 | 25 | | ReadOnlyMemory<byte> bytes, |
| | 28 | 26 | | IReadOnlyList<IceClass> instances, |
| | 28 | 27 | | bool hasTaggedFields) |
| | 28 | 28 | | { |
| | 28 | 29 | | TypeId = typeId; |
| | 28 | 30 | | Bytes = bytes; |
| | 28 | 31 | | Instances = instances; |
| | 28 | 32 | | HasTaggedFields = hasTaggedFields; |
| | 28 | 33 | | } |
| | | 34 | | } |