Ejemplo n.º 1
0
 protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge(
     EnumMethodEnum enumMethod,
     EPType type,
     StatementCompileTimeServices services)
 {
     if (type.GetNormalizedClass().IsBigInteger())
     {
         return(streamCountIncoming => new EnumAverageBigIntegerScalarNoParam(streamCountIncoming));
         // services.ImportServiceCompileTime.DefaultMathContext
     }
     else if (type.GetNormalizedClass().IsDecimal())
     {
         return(streamCountIncoming => new EnumAverageDecimalScalarNoParam(
                    streamCountIncoming));
     }
     else if (type.GetNormalizedClass().IsDouble())
     {
         return(streamCountIncoming => new EnumAverageDoubleScalarNoParam(
                    streamCountIncoming));
     }
     else
     {
         throw new ArgumentException("Failed to find a suitable scalar no-param");
     }
 }
 protected override ThreeFormNoParamFactory.ForgeFunction NoParamsForge(
     EnumMethodEnum enumMethod,
     EPType type,
     StatementCompileTimeServices services)
 {
     return(streamCountIncoming => new EnumMostLeastFrequentScalarNoParam(
                streamCountIncoming,
                enumMethod == EnumMethodEnum.MOSTFREQUENT,
                type.GetNormalizedClass()));
 }