| | | 1 | | // Copyright (c) ZeroC, Inc. |
| | | 2 | | |
| | | 3 | | namespace ZeroC.Slice; |
| | | 4 | | |
| | | 5 | | /// <summary>Assigns a Slice type ID to a class, interface, or struct.</summary> |
| | | 6 | | /// <remarks>The Slice compiler assigns Slice type IDs to classes, interfaces and structs it generates from Slice |
| | | 7 | | /// classes, interfaces, structs, and exceptions.</remarks> |
| | | 8 | | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.Struct, Inherited = false)] |
| | | 9 | | public sealed class SliceTypeIdAttribute : Attribute |
| | | 10 | | { |
| | | 11 | | /// <summary>Gets the Slice type ID.</summary> |
| | | 12 | | /// <value>The Slice type ID string.</value> |
| | 228 | 13 | | public string Value { get; } |
| | | 14 | | |
| | | 15 | | /// <summary>Constructs a Slice type ID attribute.</summary> |
| | | 16 | | /// <param name="value">The Slice type ID.</param>> |
| | 456 | 17 | | public SliceTypeIdAttribute(string value) => Value = value; |
| | | 18 | | } |
| | | 19 | | |
| | | 20 | | /// <summary>Assigns a compact Slice type ID to a class.</summary> |
| | | 21 | | /// <remarks>The Slice compiler assigns both a Slice type ID and a compact Slice type ID to the mapped class of a Slice |
| | | 22 | | /// class that specifies a compact type ID.</remarks> |
| | | 23 | | [AttributeUsage(AttributeTargets.Class, Inherited = false)] |
| | | 24 | | public sealed class CompactSliceTypeIdAttribute : Attribute |
| | | 25 | | { |
| | | 26 | | /// <summary>Gets the compact Slice type ID.</summary> |
| | | 27 | | /// <value>The compact Slice type ID numeric value.</value> |
| | | 28 | | public int Value { get; } |
| | | 29 | | |
| | | 30 | | /// <summary>Constructs a compact Slice type ID attribute.</summary> |
| | | 31 | | /// <param name="value">The compact type ID.</param>> |
| | | 32 | | public CompactSliceTypeIdAttribute(int value) => Value = value; |
| | | 33 | | } |