| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | using IceRpc.Ice.Codec; |
| | | 4 | | using System.Collections.Immutable; |
| | | 5 | | using System.ComponentModel; |
| | | 6 | | |
| | | 7 | | namespace IceRpc.Ice; |
| | | 8 | | |
| | | 9 | | /// <summary>Represents the base class for classes defined in Ice. The Ice keyword AnyClass maps to this class. |
| | | 10 | | /// </summary> |
| | | 11 | | public abstract class IceClass |
| | | 12 | | { |
| | | 13 | | /// <summary>Gets the unknown slices if the class has a preserved-slice base class and has been sliced-off |
| | | 14 | | /// during decoding.</summary> |
| | 895 | 15 | | public ImmutableList<SliceInfo> UnknownSlices { get; internal set; } = ImmutableList<SliceInfo>.Empty; |
| | | 16 | | |
| | 162 | 17 | | internal void Decode(ref IceDecoder decoder) => DecodeCore(ref decoder); |
| | | 18 | | |
| | 274 | 19 | | internal void Encode(ref IceEncoder encoder) => EncodeCore(ref encoder); |
| | | 20 | | |
| | | 21 | | /// <summary>Decodes the properties of this instance.</summary> |
| | | 22 | | /// <param name="decoder">The Ice decoder.</param> |
| | | 23 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 24 | | protected abstract void DecodeCore(ref IceDecoder decoder); |
| | | 25 | | |
| | | 26 | | /// <summary>Encodes the properties of this instance.</summary> |
| | | 27 | | /// <param name="encoder">The Ice encoder.</param> |
| | | 28 | | [EditorBrowsable(EditorBrowsableState.Never)] |
| | | 29 | | protected abstract void EncodeCore(ref IceEncoder encoder); |
| | | 30 | | } |