private static IEnumerable <TypeUsage> UntypedNullAwareFlattenArgumentType(TypeUsage argType)
 {
     return(argType != null?TypeSemantics.FlattenType(argType) : new TypeUsage[]
     {
         null
     });
 }
예제 #2
0
 private static IEnumerable <TypeUsage> UntypedNullAwareFlattenArgumentType(
     TypeUsage argType)
 {
     if (argType == null)
     {
         return((IEnumerable <TypeUsage>) new TypeUsage[1]);
     }
     return(TypeSemantics.FlattenType(argType));
 }
예제 #3
0
 private static IEnumerable <TypeUsage> UntypedNullAwareFlattenParameterType(
     TypeUsage paramType,
     TypeUsage argType)
 {
     if (argType != null)
     {
         return(TypeSemantics.FlattenType(paramType));
     }
     return((IEnumerable <TypeUsage>) new TypeUsage[1]
     {
         paramType
     });
 }
예제 #4
0
 /// <summary>
 /// Resolves <paramref name="argTypes"/> against the list of function signatures.
 /// </summary>
 /// <returns>Funciton metadata</returns>
 internal static EdmFunction ResolveFunctionOverloads(IList <EdmFunction> functionsMetadata,
                                                      IList <TypeUsage> argTypes,
                                                      bool isGroupAggregateFunction,
                                                      out bool isAmbiguous)
 {
     return(ResolveFunctionOverloads(
                functionsMetadata,
                argTypes,
                (edmFunction) => edmFunction.Parameters,
                (functionParameter) => functionParameter.TypeUsage,
                (functionParameter) => functionParameter.Mode,
                (argType) => TypeSemantics.FlattenType(argType),
                (paramType, argType) => TypeSemantics.FlattenType(paramType),
                (fromType, toType) => TypeSemantics.IsPromotableTo(fromType, toType),
                (fromType, toType) => TypeSemantics.IsStructurallyEqual(fromType, toType),
                isGroupAggregateFunction,
                out isAmbiguous));
 }
예제 #5
0
 internal static EdmFunction ResolveFunctionOverloads(
     IList <EdmFunction> functionsMetadata,
     IList <TypeUsage> argTypes,
     bool isGroupAggregateFunction,
     out bool isAmbiguous)
 {
     return(FunctionOverloadResolver.ResolveFunctionOverloads <EdmFunction, FunctionParameter>(functionsMetadata, argTypes, (Func <EdmFunction, IList <FunctionParameter> >)(edmFunction => (IList <FunctionParameter>)edmFunction.Parameters), (Func <FunctionParameter, TypeUsage>)(functionParameter => functionParameter.TypeUsage), (Func <FunctionParameter, ParameterMode>)(functionParameter => functionParameter.Mode), (Func <TypeUsage, IEnumerable <TypeUsage> >)(argType => TypeSemantics.FlattenType(argType)), (Func <TypeUsage, TypeUsage, IEnumerable <TypeUsage> >)((paramType, argType) => TypeSemantics.FlattenType(paramType)), (Func <TypeUsage, TypeUsage, bool>)((fromType, toType) => TypeSemantics.IsPromotableTo(fromType, toType)), (Func <TypeUsage, TypeUsage, bool>)((fromType, toType) => TypeSemantics.IsStructurallyEqual(fromType, toType)), isGroupAggregateFunction, out isAmbiguous));
 }
 private static IEnumerable <TypeUsage> UntypedNullAwareFlattenParameterType(TypeUsage paramType, TypeUsage argType)
 {
     return(argType != null?TypeSemantics.FlattenType(paramType) : new[] { paramType });
 }