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 GetStoreType(TypeUsage typeUsage) { Debug.Assert(typeUsage != null, "typeUsage != null"); Debug.Assert(typeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "Primitive type expected."); Debug.Assert(typeUsage.EdmType.GetDataSpace() == DataSpace.CSpace, "Expected CSpace type."); try { var legacyStoreTypeUsage = _wrappedProviderManifest.GetStoreType(typeUsage.ToLegacyEdmTypeUsage()); return(ConvertFromLegacyStoreTypeUsage(legacyStoreTypeUsage)); } catch (SystemData.ProviderIncompatibleException exception) { throw new ProviderIncompatibleException(exception.Message, exception.InnerException); } }
public override TypeUsage GetStoreType(TypeUsage typeUsage) { Debug.Assert(typeUsage != null, "typeUsage != null"); Debug.Assert(typeUsage.EdmType.BuiltInTypeKind == BuiltInTypeKind.PrimitiveType, "Primitive type expected."); Debug.Assert(typeUsage.EdmType.GetDataSpace() == DataSpace.CSpace, "Expected CSpace type."); try { var legacyStoreTypeUsage = _wrappedProviderManifest.GetStoreType(typeUsage.ToLegacyEdmTypeUsage()); return ConvertFromLegacyStoreTypeUsage(legacyStoreTypeUsage); } catch (SystemData.ProviderIncompatibleException exception) { throw new ProviderIncompatibleException(exception.Message, exception.InnerException); } }