internal static bool IsODataPrimitiveTypeKind(this IEdmType type) { ExceptionUtils.CheckArgumentNotNull <IEdmType>(type, "type"); if (type.TypeKind != EdmTypeKind.Primitive) { return(false); } return(!type.IsStream()); }
/// <summary> /// Checks whether a type refers to an OData primitive type (i.e., a primitive, non-stream type). /// </summary> /// <param name="type">The (non-null) <see cref="IEdmType"/> to check.</param> /// <returns>true if the <paramref name="type"/> is an OData primitive type; otherwise false.</returns> internal static bool IsODataPrimitiveTypeKind(this IEdmType type) { ExceptionUtils.CheckArgumentNotNull(type, "type"); EdmTypeKind typeKind = type.TypeKind; if (typeKind != EdmTypeKind.Primitive) { return(false); } // also make sure it is not a stream return(!type.IsStream()); }