< Summary

Information
Class: Ice.Value
Assembly: Ice
File(s): /home/runner/work/ice/ice/csharp/src/Ice/Value.cs
Tag: 71_18251537082
Line coverage
93%
Covered lines: 15
Uncovered lines: 1
Coverable lines: 16
Total lines: 82
Line coverage: 93.7%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage
90%
Covered methods: 9
Total methods: 10
Method coverage: 90%

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ice_staticId()100%11100%
ice_id()100%210%
ice_preMarshal()100%11100%
ice_postUnmarshal()100%11100%
ice_getSlicedData()100%11100%
iceWrite(...)100%11100%
iceRead(...)100%11100%
iceWriteImpl(...)100%11100%
iceReadImpl(...)100%11100%
Clone()100%11100%

File(s)

/home/runner/work/ice/ice/csharp/src/Ice/Value.cs

#LineLine coverage
 1// Copyright (c) ZeroC, Inc.
 2
 3#nullable enable
 4
 5using System.ComponentModel;
 6
 7namespace Ice;
 8
 9public abstract class Value
 10{
 11    private const string _id = "::Ice::Object";
 12
 13    /// <summary>
 14    /// Returns the Slice type ID of the interface supported by this object.
 15    /// </summary>
 16    /// <returns>The return value is always ::Ice::Object.</returns>
 117    public static string ice_staticId() => _id;
 18
 19    /// <summary>
 20    /// Returns the Slice type ID of the most-derived interface supported by this object.
 21    /// </summary>
 22    /// <returns>The return value is always ::Ice::Object.</returns>
 023    public virtual string ice_id() => _id;
 24
 25    /// <summary>
 26    /// The Ice run time invokes this method prior to marshaling an object's data members. This allows a subclass
 27    /// to override this method in order to validate its data members.
 28    /// </summary>
 29    public virtual void ice_preMarshal()
 30    {
 131    }
 32
 33    /// <summary>
 34    /// This Ice run time invokes this method after unmarshaling an object's data members. This allows a
 35    /// subclass to override this method in order to perform additional initialization.
 36    /// </summary>
 37    public virtual void ice_postUnmarshal()
 38    {
 139    }
 40
 41    /// <summary>
 42    /// Returns the sliced data if the value has a preserved-slice base class and has been sliced during
 43    /// un-marshaling of the value, null is returned otherwise.
 44    /// </summary>
 45    /// <returns>The sliced data or null.</returns>
 146    public SlicedData? ice_getSlicedData() => _slicedData;
 47
 48    [EditorBrowsable(EditorBrowsableState.Never)]
 49    public virtual void iceWrite(OutputStream ostr)
 50    {
 151        ostr.startValue(_slicedData);
 152        iceWriteImpl(ostr);
 153        ostr.endValue();
 154    }
 55
 56    [EditorBrowsable(EditorBrowsableState.Never)]
 57    public virtual void iceRead(InputStream istr)
 58    {
 159        istr.startValue();
 160        iceReadImpl(istr);
 161        _slicedData = istr.endValue();
 162    }
 63
 64    [EditorBrowsable(EditorBrowsableState.Never)]
 65    protected virtual void iceWriteImpl(OutputStream ostr)
 66    {
 167    }
 68
 69    [EditorBrowsable(EditorBrowsableState.Never)]
 70    protected virtual void iceReadImpl(InputStream istr)
 71    {
 172    }
 73
 74    /// <summary>
 75    /// Returns a copy of the object. The cloned object contains field-for-field copies
 76    /// of the state.
 77    /// </summary>
 78    /// <returns>The cloned object.</returns>
 179    public Value Clone() => (Value)MemberwiseClone();
 80
 81    private SlicedData? _slicedData;
 82}