本文整理汇总了C#中IEdmType.IsODataComplexTypeKind方法的典型用法代码示例。如果您正苦于以下问题:C# IEdmType.IsODataComplexTypeKind方法的具体用法?C# IEdmType.IsODataComplexTypeKind怎么用?C# IEdmType.IsODataComplexTypeKind使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IEdmType
的用法示例。
在下文中一共展示了IEdmType.IsODataComplexTypeKind方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsBindingTypeValid
/// <summary>
/// Is this a valid binding type. i.e. is this an entity, entity colleciton, or complex type.
/// </summary>
/// <param name="bindingType">the binding type</param>
/// <returns>true if this binding type is valid</returns>
public static bool IsBindingTypeValid(IEdmType bindingType)
{
return bindingType == null || bindingType.IsEntityOrEntityCollectionType() || bindingType.IsODataComplexTypeKind();
}
示例2: GetCollectionType
/// <summary>
/// Returns the IEdmCollectionType implementation with the given IEdmTypeReference as element type.
/// </summary>
/// <param name="itemType">IEdmTypeReference instance which is the element type.</param>
/// <returns>An <see cref="IEdmCollectionType"/> instance using the <paramref name="itemType"/> as Collection item type.</returns>
internal static IEdmCollectionType GetCollectionType(IEdmType itemType)
{
DebugUtils.CheckNoExternalCallers();
Debug.Assert(itemType != null, "itemType != null");
IEdmTypeReference itemTypeReference;
if (itemType.IsODataPrimitiveTypeKind() || itemType.IsODataComplexTypeKind())
{
itemTypeReference = itemType.ToTypeReference();
}
else
{
throw new ODataException(Strings.EdmLibraryExtensions_CollectionItemCanBeOnlyPrimitiveOrComplex);
}
return new EdmCollectionType(itemTypeReference);
}
示例3: GetCollectionType
internal static IEdmCollectionType GetCollectionType(IEdmType itemType)
{
if (!itemType.IsODataPrimitiveTypeKind() && !itemType.IsODataComplexTypeKind())
{
throw new ODataException(Microsoft.Data.OData.Strings.EdmLibraryExtensions_CollectionItemCanBeOnlyPrimitiveOrComplex);
}
return new EdmCollectionType(itemType.ToTypeReference());
}