internal static bool IsStoreSpaceOrCanonicalFunction( StoreItemCollection sSpace, EdmFunction function) { if (TypeHelpers.IsCanonicalFunction(function)) { return(true); } return(sSpace.GetCTypeFunctions(function.FullName, false).Contains(function)); }
internal static bool IsStoreSpaceOrCanonicalFunction(StoreItemCollection sSpace, EdmFunction function) { if (TypeHelpers.IsCanonicalFunction(function)) { return(true); } else { // Even if function is declared in s-space, view expression will contain the version of the function // in c-space terms, thus checking function.DataSpace will always give c-space. // In order to determine if the function originates in s-space we need to get check if it belongs // to the list of c-space conversions. var cTypeFunctions = sSpace.GetCTypeFunctions(function.FullName, false); return(cTypeFunctions.Contains(function)); } }