Beispiel #1
0
 private ItemResources(ReadOnlyArray <int> semaphoreIncrements)
 {
     SemaphoreIncrements = semaphoreIncrements;
 }
Beispiel #2
0
        /// <summary>
        /// Converts the collection to a read-only array.
        /// </summary>
        /// <typeparam name="T">The type of array elements.</typeparam>
        /// <param name="collection">the collection of elements</param>
        /// <returns>an read only array instance containing the elements in the collection.</returns>
        public static ReadOnlyArray<T> ToReadOnlyArray<T>(this IEnumerable<T> collection)
        {
            Contract.RequiresNotNull(collection);

            return ReadOnlyArray<T>.From(collection);
        }
Beispiel #3
0
 /// <inheritdoc />
 public bool Equals(ReadOnlyArray <T> other)
 {
     return(m_array == other.m_array);
 }
Beispiel #4
0
 /// <inheritdoc />
 public bool Equals([AllowNull] ReadOnlyArray <T> other)
 {
     return(m_array == other.m_array);
 }