Make the types public first if it makes sense.
From code:
internal static bool IsUnboundedFacetValue(Facet facet)
{
// TODO: vamshikb
// Use return object.ReferenceEquals(facet.Value, EdmConstants.UnboundedValue);
// when EdmConstants.UnboundedValue is made public.
return (null == facet.Value || facet.IsUnbounded);
}
private static bool IsStoreFunction(EdmFunction function)
{
// TODO: pragyaa. make it public in parent.
// return function.BuiltInAttribute;
return (bool)function.MetadataProperties["BuiltInAttribute"].Value && !TypeHelpers.IsCanonicalFunction(function);
}
internal static TypeUsage GetElementTypeUsage(TypeUsage type)
{
if (TypeSemantics.IsCollectionType(type))
{
return ((CollectionType)type.EdmType).TypeUsage;
}
else if (TypeSemantics.IsReferenceType(type))
{
// TODO: pragyaa. Uncomment code when TypeUsage constructor
// has been made public.
// We should typically not reach this code path anyway.
//
//return new TypeUsage(((RefType)type.EdmType).ElementType);
throw new NotSupportedException(String.Empty);
}
return null;
}
From code:
internal static bool IsUnboundedFacetValue(Facet facet)
{
// TODO: vamshikb
// Use return object.ReferenceEquals(facet.Value, EdmConstants.UnboundedValue);
// when EdmConstants.UnboundedValue is made public.
return (null == facet.Value || facet.IsUnbounded);
}
private static bool IsStoreFunction(EdmFunction function)
{
// TODO: pragyaa. make it public in parent.
// return function.BuiltInAttribute;
return (bool)function.MetadataProperties["BuiltInAttribute"].Value && !TypeHelpers.IsCanonicalFunction(function);
}
internal static TypeUsage GetElementTypeUsage(TypeUsage type)
{
if (TypeSemantics.IsCollectionType(type))
{
return ((CollectionType)type.EdmType).TypeUsage;
}
else if (TypeSemantics.IsReferenceType(type))
{
// TODO: pragyaa. Uncomment code when TypeUsage constructor
// has been made public.
// We should typically not reach this code path anyway.
//
//return new TypeUsage(((RefType)type.EdmType).ElementType);
throw new NotSupportedException(String.Empty);
}
return null;
}