private LegacyMetadata.TypeUsage GetLegacyTypeUsage(TypeUsage typeUsage) { Debug.Assert(typeUsage != null, "typeUsage != null"); return (typeUsage.EdmType.GetDataSpace() == DataSpace.CSpace ? typeUsage.ToLegacyEdmTypeUsage() : typeUsage.ToLegacyStoreTypeUsage( _storeItemCollection.GetItems <LegacyMetadata.EdmType>().ToArray())); }
public override TypeUsage GetEdmType(TypeUsage storeTypeUsage) { Debug.Assert(storeTypeUsage != null, "storeTypeUsage != null"); Debug.Assert(storeTypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "Primitive type expected."); Debug.Assert(storeTypeUsage.EdmType.GetDataSpace() == DataSpace.SSpace, "Expected SSpace type."); try { var legacyEdmTypeUsage = _wrappedProviderManifest.GetEdmType(storeTypeUsage.ToLegacyStoreTypeUsage(_legacyStoreTypes)); return(ConvertFromLegacyEdmTypeUsage(legacyEdmTypeUsage)); } catch (SystemData.ProviderIncompatibleException exception) { throw new ProviderIncompatibleException(exception.Message, exception.InnerException); } }
public override TypeUsage GetEdmType(TypeUsage storeTypeUsage) { Debug.Assert(storeTypeUsage != null, "storeTypeUsage != null"); Debug.Assert(storeTypeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "Primitive type expected."); Debug.Assert(storeTypeUsage.EdmType.GetDataSpace() == DataSpace.SSpace, "Expected SSpace type."); try { var legacyEdmTypeUsage = _wrappedProviderManifest.GetEdmType(storeTypeUsage.ToLegacyStoreTypeUsage(_legacyStoreTypes)); return ConvertFromLegacyEdmTypeUsage(legacyEdmTypeUsage); } catch (SystemData.ProviderIncompatibleException exception) { throw new ProviderIncompatibleException(exception.Message, exception.InnerException); } }