< Summary

Information
Class: Ice.CompactSliceTypeIdAttribute
Assembly: Ice
File(s): /home/runner/work/ice/ice/csharp/src/Ice/SliceTypeIdAttribute.cs
Tag: 71_18251537082
Line coverage
100%
Covered lines: 2
Uncovered lines: 0
Coverable lines: 2
Total lines: 36
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/ice/ice/csharp/src/Ice/SliceTypeIdAttribute.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3#nullable enable
 4
 5namespace Ice;
 6
 7/// <summary>Assigns a Slice type ID to a class or interface.</summary>
 8/// <remarks>The Slice compiler assigns Slice type IDs to classes and interfaces it generates from Slice classes,
 9/// interfaces, and exceptions.</remarks>
 10// Corresponds to IceRPC's ZeroC.Slice.SliceTypeIdAttribute.
 11[AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
 12public sealed class SliceTypeIdAttribute : Attribute
 13{
 14    /// <summary>Gets the Slice type ID.</summary>
 15    /// <value>The Slice type ID string.</value>
 16    public string Value { get; }
 17
 18    /// <summary>Initializes a new instance of the <see cref="SliceTypeIdAttribute" /> class.</summary>
 19    /// <param name="value">The Slice type ID.</param>>
 20    public SliceTypeIdAttribute(string value) => Value = value;
 21}
 22
 23/// <summary>Assigns a compact Slice type ID to a class.</summary>
 24/// <remarks>The Slice compiler assigns both a Slice type ID and a compact Slice type ID to the mapped class of a Slice
 25/// class that specifies a compact type ID.</remarks>
 26[AttributeUsage(AttributeTargets.Class, Inherited = false)]
 27public sealed class CompactSliceTypeIdAttribute : Attribute
 28{
 29    /// <summary>Gets the compact Slice type ID.</summary>
 30    /// <value>The compact Slice type ID numeric value.</value>
 131    public int Value { get; }
 32
 33    /// <summary>Initializes a new instance of the <see cref="CompactSliceTypeIdAttribute" /> class.</summary>
 34    /// <param name="value">The compact type ID.</param>>
 135    public CompactSliceTypeIdAttribute(int value) => Value = value;
 36}

Methods/Properties

get_Value()
.ctor(int)