< Summary

Information
Class: ZeroC.Slice.CompactSliceTypeIdAttribute
Assembly: ZeroC.Slice
File(s): /home/runner/work/icerpc-csharp/icerpc-csharp/src/ZeroC.Slice/SliceTypeIdAttribute.cs
Tag: 275_13775359185
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 33
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
100%
Covered methods: 2
Total methods: 2
Method coverage: 100%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
get_Value()100%11100%
.ctor(...)100%11100%

File(s)

/home/runner/work/icerpc-csharp/icerpc-csharp/src/ZeroC.Slice/SliceTypeIdAttribute.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3namespace 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)]
 9public sealed class SliceTypeIdAttribute : Attribute
 10{
 11    /// <summary>Gets the Slice type ID.</summary>
 12    /// <value>The Slice type ID string.</value>
 13    public string Value { get; }
 14
 15    /// <summary>Constructs a Slice type ID attribute.</summary>
 16    /// <param name="value">The Slice type ID.</param>>
 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)]
 24public sealed class CompactSliceTypeIdAttribute : Attribute
 25{
 26    /// <summary>Gets the compact Slice type ID.</summary>
 27    /// <value>The compact Slice type ID numeric value.</value>
 2228    public int Value { get; }
 29
 30    /// <summary>Constructs a compact Slice type ID attribute.</summary>
 31    /// <param name="value">The compact type ID.</param>>
 4432    public CompactSliceTypeIdAttribute(int value) => Value = value;
 33}

Methods/Properties

get_Value()
.ctor(System.Int32)