private static bool TryGetCommonType(EdmType edmType1, EdmType edmType2, out EdmType commonEdmType) { DebugCheck.NotNull(edmType1); DebugCheck.NotNull(edmType2); if (edmType2 == edmType1) { commonEdmType = edmType1; return(true); } if (Helper.IsPrimitiveType(edmType1) && Helper.IsPrimitiveType(edmType2)) { return(TryGetCommonType( (PrimitiveType)edmType1, (PrimitiveType)edmType2, out commonEdmType)); } else if (Helper.IsCollectionType(edmType1) && Helper.IsCollectionType(edmType2)) { return(TryGetCommonType( (CollectionType)edmType1, (CollectionType)edmType2, out commonEdmType)); } else if (Helper.IsEntityTypeBase(edmType1) && Helper.IsEntityTypeBase(edmType2)) { return(TryGetCommonBaseType( edmType1, edmType2, out commonEdmType)); } else if (Helper.IsRefType(edmType1) && Helper.IsRefType(edmType2)) { return(TryGetCommonType( (RefType)edmType1, (RefType)edmType2, out commonEdmType)); } else if (Helper.IsRowType(edmType1) && Helper.IsRowType(edmType2)) { return(TryGetCommonType( (RowType)edmType1, (RowType)edmType2, out commonEdmType)); } else { commonEdmType = null; return(false); } }
internal static bool IsRowType(TypeUsage type) { return(Helper.IsRowType((GlobalItem)type.EdmType)); }
/// <summary> /// determines if type is a RowType /// </summary> /// <param name="type"> </param> /// <returns> </returns> internal static bool IsRowType(TypeUsage type) { return(Helper.IsRowType(type.EdmType)); }