Exemple #1
0
 protected override void IceWrite(OutputStream ostr, bool firstSlice)
 {
     Debug.Assert(firstSlice);
     Debug.Assert(_slicedData.HasValue); // Can only be called on an instance previously filled by IceRead.
     if (!ostr.WriteSlicedData(_slicedData.Value))
     {
         // Could be for example attempting to marshal this instance into a compact-format encapsulation.
         throw new MarshalException(
                   $"Failed to marshal an {nameof(UnknownSlicedClass)} with type ID {TypeId}");
     }
 }
Exemple #2
0
 protected override void IceWrite(OutputStream ostr, bool firstSlice)
 {
     Debug.Assert(firstSlice);
     Debug.Assert(_slicedData.HasValue); // Can only be called on an instance previously filled by IceRead.
     ostr.WriteSlicedData(_slicedData.Value);
 }