Пример #1
0
 /// <summary>
 /// Converts <paramref name="source"/> tuple to fast read-only one.
 /// </summary>
 /// <param name="source">The tuple to convert to fast read-only.</param>
 /// <returns>Fast read-only version of <paramref name="source"/> tuple.</returns>
 public static Tuple ToFastReadOnly(this Tuple source)
 {
     if (source == null)
     {
         return(null);
     }
     if (source.GetType() == typeof(FastReadOnlyTuple))
     {
         return(source);
     }
     return(new FastReadOnlyTuple(source));
 }