Beispiel #1
0
 protected private override void convertSpanImpl(ReadOnlySpan <TSource?> src, Span <TDest?> dst)
 {
     if (s_isUpCast)
     {
         for (int i = 0; i < src.Length; i++)
         {
             dst[i] = (TDest?)(object?)src[i];
         }
     }
     else
     {
         for (int i = 0; i < src.Length; i++)
         {
             dst[i] = ASObject.AS_cast <TDest>(src[i]);
         }
     }
 }
Beispiel #2
0
 private static U referenceConversion <T, U>(T value) where T : class where U : class => ASObject.AS_cast <U>(value);
Beispiel #3
0
 public override TDest?convert(TSource?value) =>
 s_isUpCast ? (TDest?)(object?)value : ASObject.AS_cast <TDest>(value);