src/Shared/EntityFramework/Core/Metadata/Edm/MemberCollection.cs
// <summary>
// Copies the items in this collection to an array
// </summary>
// <param name="array"> The array to copy to </param>
// <param name="arrayIndex"> The index in the array at which to start the copy </param>
// <exception cref="System.ArgumentNullException">Thrown if array argument is null</exception>
// <exception cref="System.ArgumentOutOfRangeException">Thrown if the arrayIndex is less than zero</exception>
// <exception cref="System.ArgumentException">Thrown if the array argument passed in with respect to the arrayIndex passed in not big enough to hold the MemberCollection being copied</exception>
Copies the items in this collection to an array
Copies the items in this collection to an array
public override void CopyTo(EdmMember[] array, int arrayIndex)
        {
            if (arrayIndex < 0)
            {
                throw new ArgumentOutOfRangeException("arrayIndex");
            }
            var baseTypeMemberCount = GetBaseTypeMemberCount();
            if (base.Count + baseTypeMemberCount
                > array.Length - arrayIndex)
            {
                throw new ArgumentOutOfRangeException("arrayIndex");
            }
            if (baseTypeMemberCount > 0)
            {
                ((StructuralType)_declaringType.BaseType).Members.CopyTo(array, arrayIndex);
            }
            base.CopyTo(array, arrayIndex + baseTypeMemberCount);
        }
public override void CopyTo ( EdmMember [ ] array , int arrayIndex ) { if ( arrayIndex < 0 ) { throw new ArgumentOutOfRangeException ( " " ) ; } var baseTypeMemberCount = GetBaseTypeMemberCount ( ) ; if ( base . Count + baseTypeMemberCount > array . Length - arrayIndex ) { throw new ArgumentOutOfRangeException ( " " ) ; } if ( baseTypeMemberCount > 0 ) { ( ( StructuralType ) _declaringType . BaseType ) . Members . CopyTo ( array , arrayIndex ) ; } base . CopyTo ( array , arrayIndex + baseTypeMemberCount ) ; }
Copies the items in this collection to an array
Copies the items in this collection to an array
// Check on the array index // Check if the array together with the array index has enough room to copy // If the base type has any members, copy those first
Thrown if array argument is null
Thrown if array argument is null
Thrown if the arrayIndex is less than zero
Thrown if the arrayIndex is less than zero
Thrown if the array argument passed in with respect to the arrayIndex passed in not big enough to hold the MemberCollection being copied
Thrown if the array argument passed in with respect to the arrayIndex passed in not big enough to hold the MemberCollection being copied
array
EdmMember[]
The array to copy to
The array to copy to
arrayIndex
int
The index in the array at which to start the copy
The index in the array at which to start the copy