Пример #1
0
 /// <summary>
 /// Determines whether the specified type is a complex type or a collection of
 /// complex types.
 /// </summary>
 /// <param name="type">The type to check.</param>
 /// <returns>True if the specified type is a complex type or a collection of
 /// complex types, false otherwise.</returns>
 public static bool IsSupportedComplexType(Type type)
 {
     return(TypeUtility.IsComplexType(type) || TypeUtility.IsComplexTypeCollection(type));
 }
Пример #2
0
 /// <summary>
 /// Determines whether the specified type is one of the supported collection types
 /// with a complex element type.
 /// </summary>
 /// <param name="type">The type to check.</param>
 /// <returns>True if the type is a supported complex collection type, false otherwise.</returns>
 public static bool IsComplexTypeCollection(Type type)
 {
     // This check doesn't include dictionary types, since dictionaries of CTs aren't supported currently
     return(TypeUtility.IsSupportedCollectionType(type) && TypeUtility.IsComplexType(TypeUtility.GetElementType(type)));
 }