예제 #1
0
 private static void Clear(IAppendOnlyList <int> list)
 {
     list.Clear();
 }
예제 #2
0
 /// <summary>
 /// Returns an <see cref="IReadOnlyList{T}"/> wrapper around an <see cref="IAppendOnlyList{T}"./>
 /// </summary>
 /// <param name="source">
 /// The <see cref="IAppendOnlyList{T}"/> wrap as an <see cref="IReadOnlyList{T}"/>.
 /// </param>
 public static IReadOnlyList <T> AsReadOnlyList <T>(this IAppendOnlyList <T> source) => new ReadOnlyWrapper <T>(source);
예제 #3
0
 private static void Add(IAppendOnlyList <int> list, int value)
 {
     list.Add(value);
 }
예제 #4
0
 public ReadOnlyWrapper(IAppendOnlyList <T> inner)
 {
     Inner = inner ?? new AppendOnlyList <T>(1);
 }