/// <summary> /// Get the <see cref="IEdmEntityTypeReference"/> of the item type of the <paramref name="typeReference"/>. /// </summary> /// <param name="typeReference">The collection type to get the item type for.</param> /// <returns>The item type of the <paramref name="typeReference"/>.</returns> internal static IEdmTypeReference GetCollectionItemType(this IEdmTypeReference typeReference) { DebugUtils.CheckNoExternalCallers(); IEdmCollectionTypeReference collectionType = typeReference.AsCollectionOrNull(); return collectionType == null ? null : collectionType.ElementType(); }
internal static IEdmTypeReference GetCollectionItemType(this IEdmTypeReference typeReference) { IEdmCollectionTypeReference type = typeReference.AsCollectionOrNull(); if (type != null) { return type.ElementType(); } return null; }