コード例 #1
0
        static void Main(string[] args)
        {
            d          del     = x => x * x;
            Odd        odd     = i => i % 2 == 0;
            NamePrint  name    = (s, t) => s + " " + t;
            GetNumbers nrs     = (s) => s.Where(i => odd(i));
            List <int> numbers = new List <int>();
            Func <string, string, string> print = delegate(string s, string t)
            {
                return(s + " " + t);
            };
            //PlayingWithGenerics<string> pwg = new PlayingWithGenerics<string>();
            //Console.WriteLine(pwg.AddNumbers("ana", "blandiana"));
            //IntegerAdd intadd = new IntegerAdd();
            //Console.WriteLine(intadd.adder(1, 3));

            YieldReturnCheck yrc = new YieldReturnCheck();

            foreach (int value in yrc.GetNumbers())
            {
                numbers.Add(value);
            }

            //Console.WriteLine(print("erik", "cristian"));
            //Console.WriteLine(name("erik","seulean"));
            //foreach(int value in nrs(numbers))
            //    Console.WriteLine(value);
            DelegateLearn dl = new DelegateLearn();

            dl.CallFoo();
            dl.CallBar();
            dl.CallAction();
            Console.ReadLine();
        }
コード例 #2
0
        public void InsertAndUpdateOdds(IEnumerable <Odd> odds)
        {
            List <Odd> oddsInDb = _dataBase.Odds.ToList();

            foreach (var odd in odds)
            {
                Odd existOdd       = oddsInDb.FirstOrDefault(o => o.Id == odd.Id);
                Bet existBetForOdd = _dataBase.Bets.FirstOrDefault(b => b.Id == odd.BetId);
                if (existOdd == null && existBetForOdd != null)
                {
                    Odd newOdd = new Odd
                    {
                        Id              = odd.Id,
                        Name            = odd.Name,
                        Value           = odd.Value,
                        SpecialBetValue = odd.SpecialBetValue,
                        BetId           = odd.BetId
                    };

                    _dataBase.Odds.Add(odd);
                }
                else if ((existOdd != null && existBetForOdd != null) && (existOdd.Name != odd.Name || existOdd.Value != odd.Value || existOdd.SpecialBetValue != odd.SpecialBetValue || existOdd.BetId != odd.BetId))
                {
                    existOdd.Name            = odd.Name;
                    existOdd.Value           = odd.Value;
                    existOdd.SpecialBetValue = odd.SpecialBetValue;
                    existOdd.BetId           = odd.BetId;
                }

                _dataBase.SaveChanges();
            }
        }
コード例 #3
0
        private void SaveOdd(XElement element, Bet bet, Match match)
        {
            var number          = (string)element.Attribute("ID");
            var name            = (string)element.Attribute("Name");
            var value           = float.Parse((string)element.Attribute("Value"), CultureInfo.InvariantCulture);
            var specialBetValue = (string)element.Attribute("SpecialBetValue") != null
                                        ? float.Parse((string)element.Attribute("SpecialBetValue"), CultureInfo.InvariantCulture)
                                        : (float?)null;

            var odd = bet.Odds.FirstOrDefault(b => b.Number == number);

            if (odd != null)
            {
                if (odd.Name != name || odd.Value != value || odd.SpecialBetValue != specialBetValue)
                {
                    odd.Name            = name;
                    odd.Value           = value;
                    odd.SpecialBetValue = specialBetValue;
                    match.ModifiedOn    = DateTime.Now;
                }
            }
            else
            {
                odd = new Odd();

                odd.Number          = number;
                odd.Name            = name;
                odd.Value           = value;
                odd.SpecialBetValue = specialBetValue;

                bet.Odds.Add(odd);
                match.ModifiedOn = DateTime.Now;
            }
        }
コード例 #4
0
        /// <summary>
        /// Save & Update Odds Data
        /// </summary>
        /// <param name="odd"></param>
        /// <returns>Integer for Successfull Operation</returns>
        public int SaveUpdateOdd(Odd odd)
        {
            if (odd.Id > 0)
            {
                var qry = _odds.Table.Where(m => m.Id == odd.Id).FirstOrDefault();

                if (qry != null)
                {
                    qry.Description = odd.Description;
                    qry.Odd_1       = odd.Odd_1;
                    qry.Odd_X       = odd.Odd_X;
                    qry.Odd_2       = odd.Odd_2;
                    _odds.Update(qry);
                    return(odd.Id);
                }
            }
            else
            {
                Odd odds = new Odd();
                odds.Description = odd.Description;
                odd.Odd_1        = odd.Odd_1;
                odd.Odd_X        = odd.Odd_X;
                odd.Odd_2        = odd.Odd_2;
                _odds.Insert(odd);
                return(odd.Id);
            }
            return(0);
        }
コード例 #5
0
ファイル: OddsManager.cs プロジェクト: itplamen/SportsBetting
        public void Manage(IEnumerable <OddFeedModel> feedModels, string marketId, string matchId)
        {
            foreach (var feedModel in feedModels)
            {
                IEnumerable <int> keys = new List <int>()
                {
                    feedModel.Key
                };
                EntitiesByKeyQuery <Odd> query = new EntitiesByKeyQuery <Odd>(keys);
                Odd odd = queryDispatcher.Dispatch <EntitiesByKeyQuery <Odd>, IEnumerable <Odd> >(query).FirstOrDefault();

                if (odd != null)
                {
                    UpdateOddCommand updateCommand = Mapper.Map <UpdateOddCommand>(feedModel);
                    updateCommand.Id = odd.Id;

                    commandDispatcher.Dispatch <UpdateOddCommand, string>(updateCommand);
                }
                else
                {
                    CreateOddCommand createCommand = Mapper.Map <CreateOddCommand>(feedModel);
                    createCommand.IsActive = true;
                    createCommand.MatchId  = matchId;
                    createCommand.MarketId = marketId;

                    commandDispatcher.Dispatch <CreateOddCommand, string>(createCommand);
                }
            }
        }
コード例 #6
0
        public async Task <IActionResult> Create(OddInputModel oddInputModel)
        {
            var matchId = oddInputModel.MatchId;

            var isMatchValid = this.matchService.IsMatchIdValid(matchId);

            if (!isMatchValid)
            {
                return(this.BadRequest());
            }

            var matchViewModel = this.matchService
                                 .GetAll()
                                 .FirstOrDefault(x => x.Id == matchId);

            var match = this.matchService.GetMatch(matchId);

            var odd = new Odd
            {
                Match    = match,
                OddValue = oddInputModel.OddValue,
                Type     = oddInputModel.Type
            };

            await this.oddRepository.AddAsync(odd);

            await this.oddRepository.SaveChangesAsync();


            return(this.RedirectToAction("All", "Odds"));
        }
        public void OddCreateNumbersAddsExpectedAmountOfNumbersToNumbersList()
        {
            Odd test = new Odd();

            test.CreateNumbers(7);

            Assert.AreEqual(7, test.Numbers.Count);
        }
        public void OddCreateDoesNotCreateEvenNumbers()
        {
            Odd test = new Odd();

            test.CreateNumbers(1000);

            Assert.IsFalse(test.Numbers.Any(n => n % 2 == 0));
        }
コード例 #9
0
 public void TestInitialize()
 {
     this.oddsRepository = TestObjectFactoryRepositories.GetOddsRepository();
     this.oddsService    = new OddsService(this.oddsRepository);
     this.odd            = new Odd()
     {
         Name = "Odd to add"
     };
 }
コード例 #10
0
        public Odd Add(Odd odd)
        {
            Guard.WhenArgument(odd, nameof(odd)).IsNull().Throw();

            this.oddsRepository.Add(odd);
            this.oddsRepository.SaveChanges();

            return(odd);
        }
コード例 #11
0
        public string Handle(UpdateOddCommand command)
        {
            DateTime modifiedOn = DateTime.UtcNow;

            UpdateDocument(command, modifiedOn);

            Odd odd = UpdateCache(command, modifiedOn);

            return(odd.Id);
        }
コード例 #12
0
        private Odd GetOdd(string id)
        {
            IEnumerable <string> ids = new List <string>()
            {
                id
            };
            EntitiesByIdQuery <Odd> oddByIdQuery = new EntitiesByIdQuery <Odd>(ids);
            Odd odd = oddByIdHandler.Handle(oddByIdQuery).FirstOrDefault();

            return(odd);
        }
コード例 #13
0
    public string Convert(string str)
    {
        // ensure only letters are passed into the method
        var cleansed = str.Where(char.IsLetter);

        var transposed = cleansed.Select(x => Odd.ContainsKey(x) ? Odd[x] : Even[x]);

        var result = new string( transposed.ToArray());

        return(result);
    }
コード例 #14
0
 public override int GetHashCode()
 {
     unchecked
     {
         var result = 0;
         result = (result * 397) ^ Odd.GetHashCode();
         result = (result * 397) ^ Name.GetHashCode();
         result = (result * 397) ^ Percentage.GetHashCode();
         return(result);
     }
 }
コード例 #15
0
        public string Handle(CreateOddCommand command)
        {
            Odd odd = Mapper.Map <Odd>(command);

            odd.CreatedOn = DateTime.UtcNow;

            dbContext.GetCollection <Odd>().InsertOne(odd);
            oddsCache.Add(odd.Key, odd);

            return(odd.Id);
        }
コード例 #16
0
        public Color GetValue(double p_u, double p_v, Vec3 p_point)
        {
            var sines = Math.Sin(10 * p_point.X) * Math.Sin(10 * p_point.Y) * Math.Sin(10 * p_point.Z);

            if (sines < 0)
            {
                return(Odd.GetValue(p_u, p_v, p_point));
            }

            return(Even.GetValue(p_u, p_v, p_point));
        }
コード例 #17
0
 public HttpResponseMessage GetOddById(OddsModel model)
 {
     try
     {
         Odd odd = _repo.GetbyId(model.Id);
         return(Request.CreateResponse(HttpStatusCode.OK, odd));
     }
     catch (Exception ex)
     {
         _loggerrepo.Log(ex.Message, ex.StackTrace);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
        public void OddCreateNumbersCreatesOddNumbers()
        {
            Odd test = new Odd();

            test.CreateNumbers(7);
            //  Known consecutive odd numbers: 1, 3, 5, 7, 9, 11, 13
            List <int> testList = new List <int>()
            {
                1, 3, 5, 7, 9, 11, 13
            };

            CollectionAssert.AreEqual(test.Numbers, testList);
        }
コード例 #19
0
        private Odd UpdateCache(UpdateOddCommand command, DateTime modifiedOn)
        {
            Odd odd = GetOdd(command.Id);

            odd.Value        = command.Value;
            odd.IsActive     = command.IsActive;
            odd.IsSuspended  = command.IsSuspended;
            odd.ResultStatus = command.ResultStatus;
            odd.ModifiedOn   = modifiedOn;

            oddsCache.Update(odd.Key, odd);

            return(odd);
        }
コード例 #20
0
        private void AddOddElement(XElement element, string betId)
        {
            var odd = new Odd
            {
                Id              = Convert.ToInt32(element.Attribute(ODD_ID).Value),
                Name            = element.Attribute(ODD_NAME).Value,
                Value           = Convert.ToDouble(element.Attribute(ODD_VALUE).Value),
                SpecialBetValue = element.Attribute(ODD_SPECIAL_BET_VALUE)?.Value,
                BetId           = Convert.ToInt32(betId)
            };

            this.db.Odds.Add(odd);

            this.db.SaveChanges();
        }
コード例 #21
0
ファイル: OddsService.cs プロジェクト: curmichris/OddestOdds
 private OddDto Map(Odd entity)
 {
     return(new OddDto()
     {
         Id = entity.Id,
         OddName = $"{entity.HomeTeamName} vs {entity.AwayTeamName}",
         HomeTeamName = entity.HomeTeamName,
         AwayTeamName = entity.AwayTeamName,
         OddValues = new OddValueDto()
         {
             Id = entity.OddValues.Id,
             HomeOddValue = entity.OddValues.HomeOddValue,
             DrawOddValue = entity.OddValues.DrawOddValue,
             AwayOddValue = entity.OddValues.AwayOddValue,
         }
     });
 }
コード例 #22
0
 public static EventOdd GetEventOdd(Odd odd) => new EventOdd
 {
     Id                  = odd.Id,
     EventId             = odd.EventId,
     MoneyLineAway       = odd.MoneyLineAway ?? string.Empty,
     MoneyLineHome       = odd.MoneyLineHome ?? string.Empty,
     OverLine            = odd.OverLine ?? string.Empty,
     TotalNumber         = odd.TotalNumber ?? string.Empty,
     UnderLine           = odd.UnderLine ?? string.Empty,
     PointSpreadAway     = odd.PointSpreadAway ?? string.Empty,
     PointSpreadHome     = odd.PointSpreadHome ?? string.Empty,
     PointSpreadAwayLine = odd.PointSpreadAwayLine ?? string.Empty,
     PointSpreadHomeLine = odd.PointSpreadHomeLine ?? string.Empty,
     DrawLine            = odd.DrawLine ?? string.Empty,
     SiteId              = odd.SiteId,
     LastUpdated         = odd.LastUpdated.ToString(),
     Participant         = odd.Participant?.Name ?? string.Empty
 };
コード例 #23
0
        private static List <Odd> AddOddsToList(int[] array)
        {
            var result = new List <Odd>();

            for (int idx = 0; idx < array.Length; idx++)
            {
                int number = array[idx];
                if (IsOdds(number))
                {
                    var item = new Odd()
                    {
                        Index  = idx,
                        Number = number
                    };
                    result.Add(item);
                }
            }
            return(result);
        }
コード例 #24
0
 public HttpResponseMessage SaveUpdateOdd(OddsModel model)
 {
     try
     {
         Odd odd = new Odd();
         odd.Description = model.Description;
         odd.Odd_1       = Convert.ToDecimal(model.Odd_1);
         odd.Odd_X       = Convert.ToDecimal(model.Odd_X);
         odd.Odd_2       = Convert.ToDecimal(model.Odd_2);
         odd.Id          = model.Id;
         var result = _repo.SaveUpdateOdd(odd);
         model.Id = result;
         PostOddDetails(model);
         return(Request.CreateResponse(HttpStatusCode.OK, result));
     }
     catch (Exception ex)
     {
         _loggerrepo.Log(ex.Message, ex.StackTrace);
         return(Request.CreateResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
コード例 #25
0
        public Odd Update(int id, Odd odd)
        {
            Guard.WhenArgument(id, nameof(id)).IsLessThanOrEqual(ValidationConstants.InvalidId).Throw();
            Guard.WhenArgument(odd, nameof(odd)).IsNull().Throw();

            var oddToUpdate = this.oddsRepository.GetById(id);

            if (oddToUpdate != null)
            {
                oddToUpdate.CreatedOn       = odd.CreatedOn;
                oddToUpdate.IsDeleted       = odd.IsDeleted;
                oddToUpdate.DeletedOn       = odd.DeletedOn;
                oddToUpdate.Name            = odd.Name;
                oddToUpdate.Value           = odd.Value;
                oddToUpdate.SpecialBetValue = odd.SpecialBetValue;
                oddToUpdate.BetId           = odd.BetId;

                this.oddsRepository.SaveChanges();
            }

            return(oddToUpdate);
        }
コード例 #26
0
        static void Main(string[] args)
        {
            int[] Input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();

            int[] Even = Input.Where(a => a % 2 == 0).ToArray();

            int[] Odd = Input.Where(a => a % 2 != 0).ToArray();

            if (Even.Length == 0)
            {
                Even = new int[1] {
                    0
                };
            }
            else if (Odd.Length == 0)
            {
                Odd = new int[1] {
                    0
                };
            }

            Console.WriteLine(Even.Sum() - Odd.Sum());
        }
コード例 #27
0
 public int CreateOdds(OddsData data)
 {
     if (data == null)
     {
         throw new ArgumentNullException();
     }
     try
     {
         var odd = new Odd
         {
             Name = data.Name,
             Home = data.Home,
             Away = data.Away,
             Draw = data.Draw
         };
         _context.Odds.Add(odd);
         _context.SaveChanges();
         return(odd.Id);
     }
     catch (Exception e)
     {
         return(0);
     }
 }
コード例 #28
0
 private static Function[] ProduceFunctions()
 {
     Function[] retval = new Function[368];
     retval[0]                        = new Count();                  // COUNT
     retval[FunctionID.IF]            = new If();                     // IF
     retval[2]                        = LogicalFunction.ISNA;         // IsNA
     retval[3]                        = LogicalFunction.ISERROR;      // IsERROR
     retval[FunctionID.SUM]           = AggregateFunction.SUM;        // SUM
     retval[5]                        = AggregateFunction.AVERAGE;    // AVERAGE
     retval[6]                        = AggregateFunction.MIN;        // MIN
     retval[7]                        = AggregateFunction.MAX;        // MAX
     retval[8]                        = new Row();                    // ROW
     retval[9]                        = new Column();                 // COLUMN
     retval[10]                       = new Na();                     // NA
     retval[11]                       = new Npv();                    // NPV
     retval[12]                       = AggregateFunction.STDEV;      // STDEV
     retval[13]                       = NumericFunction.DOLLAR;       // DOLLAR
     retval[14]                       = new NotImplementedFunction(); // FIXED
     retval[15]                       = NumericFunction.SIN;          // SIN
     retval[16]                       = NumericFunction.COS;          // COS
     retval[17]                       = NumericFunction.TAN;          // TAN
     retval[18]                       = NumericFunction.ATAN;         // ATAN
     retval[19]                       = new Pi();                     // PI
     retval[20]                       = NumericFunction.SQRT;         // SQRT
     retval[21]                       = NumericFunction.EXP;          // EXP
     retval[22]                       = NumericFunction.LN;           // LN
     retval[23]                       = NumericFunction.LOG10;        // LOG10
     retval[24]                       = NumericFunction.ABS;          // ABS
     retval[25]                       = NumericFunction.INT;          // INT
     retval[26]                       = NumericFunction.SIGN;         // SIGN
     retval[27]                       = NumericFunction.ROUND;        // ROUND
     retval[28]                       = new Lookup();                 // LOOKUP
     retval[29]                       = new Index();                  // INDEX
     retval[30]                       = new NotImplementedFunction(); // REPT
     retval[31]                       = TextFunction.MID;             // MID
     retval[32]                       = TextFunction.LEN;             // LEN
     retval[33]                       = new Value();                  // VALUE
     retval[34]                       = new True();                   // TRUE
     retval[35]                       = new False();                  // FALSE
     retval[36]                       = new And();                    // AND
     retval[37]                       = new Or();                     // OR
     retval[38]                       = new Not();                    // NOT
     retval[39]                       = NumericFunction.MOD;          // MOD
     retval[40]                       = new NotImplementedFunction(); // DCOUNT
     retval[41]                       = new NotImplementedFunction(); // DSUM
     retval[42]                       = new NotImplementedFunction(); // DAVERAGE
     retval[43]                       = new NotImplementedFunction(); // DMIN
     retval[44]                       = new NotImplementedFunction(); // DMAX
     retval[45]                       = new NotImplementedFunction(); // DSTDEV
     retval[46]                       = new NotImplementedFunction(); // VAR
     retval[47]                       = new NotImplementedFunction(); // DVAR
     retval[48]                       = new NotImplementedFunction(); // TEXT
     retval[49]                       = new NotImplementedFunction(); // LINEST
     retval[50]                       = new NotImplementedFunction(); // TREND
     retval[51]                       = new NotImplementedFunction(); // LOGEST
     retval[52]                       = new NotImplementedFunction(); // GROWTH
     retval[53]                       = new NotImplementedFunction(); // GOTO
     retval[54]                       = new NotImplementedFunction(); // HALT
     retval[56]                       = new NotImplementedFunction(); // PV
     retval[57]                       = FinanceFunction.FV;           // FV
     retval[58]                       = FinanceFunction.NPER;         // NPER
     retval[59]                       = FinanceFunction.PMT;          // PMT
     retval[60]                       = new NotImplementedFunction(); // RATE
     retval[61]                       = new NotImplementedFunction(); // MIRR
     retval[62]                       = new NotImplementedFunction(); // IRR
     retval[63]                       = new Rand();                   // RAND
     retval[64]                       = new Match();                  // MATCH
     retval[65]                       = DateFunc.instance;            // DATE
     retval[66]                       = new NotImplementedFunction(); // TIME
     retval[67]                       = CalendarFieldFunction.DAY;    // DAY
     retval[68]                       = CalendarFieldFunction.MONTH;  // MONTH
     retval[69]                       = CalendarFieldFunction.YEAR;   // YEAR
     retval[70]                       = new NotImplementedFunction(); // WEEKDAY
     retval[71]                       = new NotImplementedFunction(); // HOUR
     retval[72]                       = new NotImplementedFunction(); // MINUTE
     retval[73]                       = new NotImplementedFunction(); // SECOND
     retval[74]                       = new NotImplementedFunction(); // NOW
     retval[75]                       = new NotImplementedFunction(); // AREAS
     retval[76]                       = new Rows();                   // ROWS
     retval[77]                       = new Columns();                // COLUMNS
     retval[FunctionID.OFFSET]        = new Offset();                 // Offset.Evaluate has a different signature
     retval[79]                       = new NotImplementedFunction(); // ABSREF
     retval[80]                       = new NotImplementedFunction(); // RELREF
     retval[81]                       = new NotImplementedFunction(); // ARGUMENT
     retval[82]                       = TextFunction.SEARCH;
     retval[83]                       = new NotImplementedFunction(); // TRANSPOSE
     retval[84]                       = new NotImplementedFunction(); // ERROR
     retval[85]                       = new NotImplementedFunction(); // STEP
     retval[86]                       = new NotImplementedFunction(); // TYPE
     retval[87]                       = new NotImplementedFunction(); // ECHO
     retval[88]                       = new NotImplementedFunction(); // SetNAME
     retval[89]                       = new NotImplementedFunction(); // CALLER
     retval[90]                       = new NotImplementedFunction(); // DEREF
     retval[91]                       = new NotImplementedFunction(); // WINDOWS
     retval[92]                       = new NotImplementedFunction(); // SERIES
     retval[93]                       = new NotImplementedFunction(); // DOCUMENTS
     retval[94]                       = new NotImplementedFunction(); // ACTIVECELL
     retval[95]                       = new NotImplementedFunction(); // SELECTION
     retval[96]                       = new NotImplementedFunction(); // RESULT
     retval[97]                       = NumericFunction.ATAN2;        // ATAN2
     retval[98]                       = NumericFunction.ASIN;         // ASIN
     retval[99]                       = NumericFunction.ACOS;         // ACOS
     retval[FunctionID.CHOOSE]        = new Choose();
     retval[101]                      = new Hlookup();                // HLOOKUP
     retval[102]                      = new Vlookup();                // VLOOKUP
     retval[103]                      = new NotImplementedFunction(); // LINKS
     retval[104]                      = new NotImplementedFunction(); // INPUT
     retval[105]                      = LogicalFunction.ISREF;        // IsREF
     retval[106]                      = new NotImplementedFunction(); // GetFORMULA
     retval[107]                      = new NotImplementedFunction(); // GetNAME
     retval[108]                      = new NotImplementedFunction(); // SetVALUE
     retval[109]                      = NumericFunction.LOG;          // LOG
     retval[110]                      = new NotImplementedFunction(); // EXEC
     retval[111]                      = new NotImplementedFunction(); // CHAR
     retval[112]                      = TextFunction.LOWER;           // LOWER
     retval[113]                      = TextFunction.UPPER;           // UPPER
     retval[114]                      = new NotImplementedFunction(); // PROPER
     retval[115]                      = TextFunction.LEFT;            // LEFT
     retval[116]                      = TextFunction.RIGHT;           // RIGHT
     retval[117]                      = TextFunction.EXACT;           // EXACT
     retval[118]                      = TextFunction.TRIM;            // TRIM
     retval[119]                      = new Replace();                // Replace
     retval[120]                      = new Substitute();             // SUBSTITUTE
     retval[121]                      = new NotImplementedFunction(); // CODE
     retval[122]                      = new NotImplementedFunction(); // NAMES
     retval[123]                      = new NotImplementedFunction(); // DIRECTORY
     retval[124]                      = TextFunction.FIND;            // Find
     retval[125]                      = new NotImplementedFunction(); // CELL
     retval[126]                      = new NotImplementedFunction(); // IsERR
     retval[127]                      = LogicalFunction.ISTEXT;       // IsTEXT
     retval[128]                      = LogicalFunction.ISNUMBER;     // IsNUMBER
     retval[129]                      = LogicalFunction.ISBLANK;      // IsBLANK
     retval[130]                      = new T();                      // T
     retval[131]                      = new NotImplementedFunction(); // N
     retval[132]                      = new NotImplementedFunction(); // FOPEN
     retval[133]                      = new NotImplementedFunction(); // FCLOSE
     retval[134]                      = new NotImplementedFunction(); // FSIZE
     retval[135]                      = new NotImplementedFunction(); // FReadLN
     retval[136]                      = new NotImplementedFunction(); // FRead
     retval[137]                      = new NotImplementedFunction(); // FWriteLN
     retval[138]                      = new NotImplementedFunction(); // FWrite
     retval[139]                      = new NotImplementedFunction(); // FPOS
     retval[140]                      = new NotImplementedFunction(); // DATEVALUE
     retval[141]                      = new NotImplementedFunction(); // TIMEVALUE
     retval[142]                      = new NotImplementedFunction(); // SLN
     retval[143]                      = new NotImplementedFunction(); // SYD
     retval[144]                      = new NotImplementedFunction(); // DDB
     retval[145]                      = new NotImplementedFunction(); // GetDEF
     retval[146]                      = new NotImplementedFunction(); // REFTEXT
     retval[147]                      = new NotImplementedFunction(); // TEXTREF
     retval[FunctionID.INDIRECT]      = null;                         // Indirect.Evaluate has different signature
     retval[149]                      = new NotImplementedFunction(); // REGISTER
     retval[150]                      = new NotImplementedFunction(); // CALL
     retval[151]                      = new NotImplementedFunction(); // AddBAR
     retval[152]                      = new NotImplementedFunction(); // AddMENU
     retval[153]                      = new NotImplementedFunction(); // AddCOMMAND
     retval[154]                      = new NotImplementedFunction(); // ENABLECOMMAND
     retval[155]                      = new NotImplementedFunction(); // CHECKCOMMAND
     retval[156]                      = new NotImplementedFunction(); // RenameCOMMAND
     retval[157]                      = new NotImplementedFunction(); // SHOWBAR
     retval[158]                      = new NotImplementedFunction(); // DELETEMENU
     retval[159]                      = new NotImplementedFunction(); // DELETECOMMAND
     retval[160]                      = new NotImplementedFunction(); // GetCHARTITEM
     retval[161]                      = new NotImplementedFunction(); // DIALOGBOX
     retval[162]                      = new NotImplementedFunction(); // CLEAN
     retval[163]                      = new NotImplementedFunction(); // MDETERM
     retval[164]                      = new NotImplementedFunction(); // MINVERSE
     retval[165]                      = new NotImplementedFunction(); // MMULT
     retval[166]                      = new NotImplementedFunction(); // FILES
     retval[167]                      = new NotImplementedFunction(); // IPMT
     retval[168]                      = new NotImplementedFunction(); // PPMT
     retval[169]                      = new Counta();                 // COUNTA
     retval[170]                      = new NotImplementedFunction(); // CANCELKEY
     retval[175]                      = new NotImplementedFunction(); // INITIATE
     retval[176]                      = new NotImplementedFunction(); // REQUEST
     retval[177]                      = new NotImplementedFunction(); // POKE
     retval[178]                      = new NotImplementedFunction(); // EXECUTE
     retval[179]                      = new NotImplementedFunction(); // TERMINATE
     retval[180]                      = new NotImplementedFunction(); // RESTART
     retval[181]                      = new NotImplementedFunction(); // HELP
     retval[182]                      = new NotImplementedFunction(); // GetBAR
     retval[183]                      = AggregateFunction.PRODUCT;    // PRODUCT
     retval[184]                      = NumericFunction.FACT;         // FACT
     retval[185]                      = new NotImplementedFunction(); // GetCELL
     retval[186]                      = new NotImplementedFunction(); // GetWORKSPACE
     retval[187]                      = new NotImplementedFunction(); // GetWINDOW
     retval[188]                      = new NotImplementedFunction(); // GetDOCUMENT
     retval[189]                      = new NotImplementedFunction(); // DPRODUCT
     retval[190]                      = LogicalFunction.ISNONTEXT;    // IsNONTEXT
     retval[191]                      = new NotImplementedFunction(); // GetNOTE
     retval[192]                      = new NotImplementedFunction(); // NOTE
     retval[193]                      = new NotImplementedFunction(); // STDEVP
     retval[194]                      = new NotImplementedFunction(); // VARP
     retval[195]                      = new NotImplementedFunction(); // DSTDEVP
     retval[196]                      = new NotImplementedFunction(); // DVARP
     retval[197]                      = new NotImplementedFunction(); // TRUNC
     retval[198]                      = LogicalFunction.ISLOGICAL;    // IsLOGICAL
     retval[199]                      = new NotImplementedFunction(); // DCOUNTA
     retval[200]                      = new NotImplementedFunction(); // DELETEBAR
     retval[201]                      = new NotImplementedFunction(); // UNREGISTER
     retval[204]                      = new NotImplementedFunction(); // USDOLLAR
     retval[205]                      = new NotImplementedFunction(); // FindB
     retval[206]                      = new NotImplementedFunction(); // SEARCHB
     retval[207]                      = new NotImplementedFunction(); // ReplaceB
     retval[208]                      = new NotImplementedFunction(); // LEFTB
     retval[209]                      = new NotImplementedFunction(); // RIGHTB
     retval[210]                      = new NotImplementedFunction(); // MIDB
     retval[211]                      = new NotImplementedFunction(); // LENB
     retval[212]                      = NumericFunction.ROUNDUP;      // ROUNDUP
     retval[213]                      = NumericFunction.ROUNDDOWN;    // ROUNDDOWN
     retval[214]                      = new NotImplementedFunction(); // ASC
     retval[215]                      = new NotImplementedFunction(); // DBCS
     retval[216]                      = new NotImplementedFunction(); // RANK
     retval[219]                      = new NotImplementedFunction(); // AddRESS
     retval[220]                      = new NotImplementedFunction(); // DAYS360
     retval[221]                      = new NotImplementedFunction(); // TODAY
     retval[222]                      = new NotImplementedFunction(); // VDB
     retval[227]                      = AggregateFunction.MEDIAN;     // MEDIAN
     retval[228]                      = new Sumproduct();             // SUMPRODUCT
     retval[229]                      = NumericFunction.SINH;         // SINH
     retval[230]                      = NumericFunction.COSH;         // COSH
     retval[231]                      = NumericFunction.TANH;         // TANH
     retval[232]                      = NumericFunction.ASINH;        // ASINH
     retval[233]                      = NumericFunction.ACOSH;        // ACOSH
     retval[234]                      = NumericFunction.ATANH;        // ATANH
     retval[235]                      = new NotImplementedFunction(); // DGet
     retval[236]                      = new NotImplementedFunction(); // CreateOBJECT
     retval[237]                      = new NotImplementedFunction(); // VOLATILE
     retval[238]                      = new NotImplementedFunction(); // LASTERROR
     retval[239]                      = new NotImplementedFunction(); // CUSTOMUNDO
     retval[240]                      = new NotImplementedFunction(); // CUSTOMREPEAT
     retval[241]                      = new NotImplementedFunction(); // FORMULAConvert
     retval[242]                      = new NotImplementedFunction(); // GetLINKINFO
     retval[243]                      = new NotImplementedFunction(); // TEXTBOX
     retval[244]                      = new NotImplementedFunction(); // INFO
     retval[245]                      = new NotImplementedFunction(); // GROUP
     retval[246]                      = new NotImplementedFunction(); // GetOBJECT
     retval[247]                      = new NotImplementedFunction(); // DB
     retval[248]                      = new NotImplementedFunction(); // PAUSE
     retval[250]                      = new NotImplementedFunction(); // RESUME
     retval[252]                      = new NotImplementedFunction(); // FREQUENCY
     retval[253]                      = new NotImplementedFunction(); // AddTOOLBAR
     retval[254]                      = new NotImplementedFunction(); // DELETETOOLBAR
     retval[FunctionID.EXTERNAL_FUNC] = null;                         // ExternalFunction is a FreeREfFunction
     retval[256]                      = new NotImplementedFunction(); // RESetTOOLBAR
     retval[257]                      = new NotImplementedFunction(); // EVALUATE
     retval[258]                      = new NotImplementedFunction(); // GetTOOLBAR
     retval[259]                      = new NotImplementedFunction(); // GetTOOL
     retval[260]                      = new NotImplementedFunction(); // SPELLINGCHECK
     retval[261]                      = new NotImplementedFunction(); // ERRORTYPE
     retval[262]                      = new NotImplementedFunction(); // APPTITLE
     retval[263]                      = new NotImplementedFunction(); // WINDOWTITLE
     retval[264]                      = new NotImplementedFunction(); // SAVETOOLBAR
     retval[265]                      = new NotImplementedFunction(); // ENABLETOOL
     retval[266]                      = new NotImplementedFunction(); // PRESSTOOL
     retval[267]                      = new NotImplementedFunction(); // REGISTERID
     retval[268]                      = new NotImplementedFunction(); // GetWORKBOOK
     retval[269]                      = AggregateFunction.AVEDEV;     // AVEDEV
     retval[270]                      = new NotImplementedFunction(); // BETADIST
     retval[271]                      = new NotImplementedFunction(); // GAMMALN
     retval[272]                      = new NotImplementedFunction(); // BETAINV
     retval[273]                      = new NotImplementedFunction(); // BINOMDIST
     retval[274]                      = new NotImplementedFunction(); // CHIDIST
     retval[275]                      = new NotImplementedFunction(); // CHIINV
     retval[276]                      = NumericFunction.COMBIN;       // COMBIN
     retval[277]                      = new NotImplementedFunction(); // CONFIDENCE
     retval[278]                      = new NotImplementedFunction(); // CRITBINOM
     retval[279]                      = new Even();                   // EVEN
     retval[280]                      = new NotImplementedFunction(); // EXPONDIST
     retval[281]                      = new NotImplementedFunction(); // FDIST
     retval[282]                      = new NotImplementedFunction(); // FINV
     retval[283]                      = new NotImplementedFunction(); // FISHER
     retval[284]                      = new NotImplementedFunction(); // FISHERINV
     retval[285]                      = NumericFunction.FLOOR;        // FLOOR
     retval[286]                      = new NotImplementedFunction(); // GAMMADIST
     retval[287]                      = new NotImplementedFunction(); // GAMMAINV
     retval[288]                      = NumericFunction.CEILING;      // CEILING
     retval[289]                      = new NotImplementedFunction(); // HYPGEOMDIST
     retval[290]                      = new NotImplementedFunction(); // LOGNORMDIST
     retval[291]                      = new NotImplementedFunction(); // LOGINV
     retval[292]                      = new NotImplementedFunction(); // NEGBINOMDIST
     retval[293]                      = new NotImplementedFunction(); // NORMDIST
     retval[294]                      = new NotImplementedFunction(); // NORMSDIST
     retval[295]                      = new NotImplementedFunction(); // NORMINV
     retval[296]                      = new NotImplementedFunction(); // NORMSINV
     retval[297]                      = new NotImplementedFunction(); // STANDARDIZE
     retval[298]                      = new Odd();                    // ODD
     retval[299]                      = new NotImplementedFunction(); // PERMUT
     retval[300]                      = new NotImplementedFunction(); // POISSON
     retval[301]                      = new NotImplementedFunction(); // TDIST
     retval[302]                      = new NotImplementedFunction(); // WEIBULL
     retval[303]                      = new Sumxmy2();                // SUMXMY2
     retval[304]                      = new Sumx2my2();               // SUMX2MY2
     retval[305]                      = new Sumx2py2();               // SUMX2PY2
     retval[306]                      = new NotImplementedFunction(); // CHITEST
     retval[307]                      = new NotImplementedFunction(); // CORREL
     retval[308]                      = new NotImplementedFunction(); // COVAR
     retval[309]                      = new NotImplementedFunction(); // FORECAST
     retval[310]                      = new NotImplementedFunction(); // FTEST
     retval[311]                      = new NotImplementedFunction(); // INTERCEPT
     retval[312]                      = new NotImplementedFunction(); // PEARSON
     retval[313]                      = new NotImplementedFunction(); // RSQ
     retval[314]                      = new NotImplementedFunction(); // STEYX
     retval[315]                      = new NotImplementedFunction(); // SLOPE
     retval[316]                      = new NotImplementedFunction(); // TTEST
     retval[317]                      = new NotImplementedFunction(); // PROB
     retval[318]                      = AggregateFunction.DEVSQ;      // DEVSQ
     retval[319]                      = new NotImplementedFunction(); // GEOMEAN
     retval[320]                      = new NotImplementedFunction(); // HARMEAN
     retval[321]                      = AggregateFunction.SUMSQ;      // SUMSQ
     retval[322]                      = new NotImplementedFunction(); // KURT
     retval[323]                      = new NotImplementedFunction(); // SKEW
     retval[324]                      = new NotImplementedFunction(); // ZTEST
     retval[325]                      = AggregateFunction.LARGE;      // LARGE
     retval[326]                      = AggregateFunction.SMALL;      // SMALL
     retval[327]                      = new NotImplementedFunction(); // QUARTILE
     retval[328]                      = new NotImplementedFunction(); // PERCENTILE
     retval[329]                      = new NotImplementedFunction(); // PERCENTRANK
     retval[330]                      = new Mode();                   // MODE
     retval[331]                      = new NotImplementedFunction(); // TRIMMEAN
     retval[332]                      = new NotImplementedFunction(); // TINV
     retval[334]                      = new NotImplementedFunction(); // MOVIECOMMAND
     retval[335]                      = new NotImplementedFunction(); // GetMOVIE
     retval[336]                      = TextFunction.CONCATENATE;     // CONCATENATE
     retval[337]                      = NumericFunction.POWER;        // POWER
     retval[338]                      = new NotImplementedFunction(); // PIVOTAddDATA
     retval[339]                      = new NotImplementedFunction(); // GetPIVOTTABLE
     retval[340]                      = new NotImplementedFunction(); // GetPIVOTFIELD
     retval[341]                      = new NotImplementedFunction(); // GetPIVOTITEM
     retval[342]                      = NumericFunction.RADIANS;;     // RADIANS
     retval[343]                      = NumericFunction.DEGREES;      // DEGREES
     retval[344]                      = new NotImplementedFunction(); // SUBTOTAL
     retval[345]                      = new NotImplementedFunction(); // SUMIF
     retval[346]                      = new Countif();                // COUNTIF
     retval[347]                      = new NotImplementedFunction(); // COUNTBLANK
     retval[348]                      = new NotImplementedFunction(); // SCENARIOGet
     retval[349]                      = new NotImplementedFunction(); // OPTIONSLISTSGet
     retval[350]                      = new NotImplementedFunction(); // IsPMT
     retval[351]                      = new NotImplementedFunction(); // DATEDIF
     retval[352]                      = new NotImplementedFunction(); // DATESTRING
     retval[353]                      = new NotImplementedFunction(); // NUMBERSTRING
     retval[354]                      = new NotImplementedFunction(); // ROMAN
     retval[355]                      = new NotImplementedFunction(); // OPENDIALOG
     retval[356]                      = new NotImplementedFunction(); // SAVEDIALOG
     retval[357]                      = new NotImplementedFunction(); // VIEWGet
     retval[358]                      = new NotImplementedFunction(); // GetPIVOTDATA
     retval[359]                      = new NotImplementedFunction(); // HYPERLINK
     retval[360]                      = new NotImplementedFunction(); // PHONETIC
     retval[361]                      = new NotImplementedFunction(); // AVERAGEA
     retval[362]                      = new Maxa();                   // MAXA
     retval[363]                      = new Mina();                   // MINA
     retval[364]                      = new NotImplementedFunction(); // STDEVPA
     retval[365]                      = new NotImplementedFunction(); // VARPA
     retval[366]                      = new NotImplementedFunction(); // STDEVA
     retval[367]                      = new NotImplementedFunction(); // VARA
     return(retval);
 }
コード例 #29
0
ファイル: OddDAL.cs プロジェクト: bllr777/CheckWork
        private static Odd FillDataRecord(IDataRecord myDataRecord)
        {
            Odd myObject = new Odd();

            myObject.OddId = myDataRecord.GetInt32(myDataRecord.GetOrdinal("OddId"));

            if (!myDataRecord.IsDBNull(myDataRecord.GetOrdinal("Odd")))
                myObject.OddValue = myDataRecord.GetString(myDataRecord.GetOrdinal("Odd"));

            return myObject;
        }
コード例 #30
0
ファイル: OddDAL.cs プロジェクト: bllr777/CheckWork
        public static int Save(Odd  oddToSave)
        {
            int result = 0;
            ExecuteTypeEnum queryId = ExecuteTypeEnum.InsertItem;

            // notes:       check for valid OddId - if exists then UPDATE , else INSERT
            if (oddToSave.OddId > 0)
                queryId = ExecuteTypeEnum.UpdateItem;

            using (SqlConnection myConnection = new SqlConnection(AppConfiguration.ConnectionString))
            {
                using (SqlCommand myCommand = new SqlCommand("usp_ExecuteOdd", myConnection))
                {
                    myCommand.CommandType = CommandType.StoredProcedure;

                    myCommand.Parameters.AddWithValue("@QueryId", queryId);
                    myCommand.Parameters.AddWithValue("@OddId", oddToSave.OddId);

                    if (oddToSave.OddValue != null)
                        myCommand.Parameters.AddWithValue("@Match", oddToSave.OddValue);
                    ;

                    //notes:    add return output parameter to command object
                    myCommand.Parameters.Add(HelperDAL.GetReturnParameterInt("ReturnValue"));

                    myConnection.Open();
                    myCommand.ExecuteNonQuery();

                    //notes:    get return value from stored procedure and return Id
                    result = (int)myCommand.Parameters["@ReturnValue"].Value;
                }
                myConnection.Close();
            }
            return result;
        }
        public void OddCanOddBeInstantiated()
        {
            Odd test = new Odd();

            Assert.IsNotNull(test);
        }
コード例 #32
0
 public BuiltInFunctions()
 {
     // Text
     Functions["len"]         = new Len();
     Functions["lower"]       = new Lower();
     Functions["upper"]       = new Upper();
     Functions["left"]        = new Left();
     Functions["right"]       = new Right();
     Functions["mid"]         = new Mid();
     Functions["replace"]     = new Replace();
     Functions["rept"]        = new Rept();
     Functions["substitute"]  = new Substitute();
     Functions["concatenate"] = new Concatenate();
     Functions["concat"]      = new Concat();
     Functions["textjoin"]    = new Textjoin();
     Functions["char"]        = new CharFunction();
     Functions["exact"]       = new Exact();
     Functions["find"]        = new Find();
     Functions["fixed"]       = new Fixed();
     Functions["proper"]      = new Proper();
     Functions["search"]      = new Search();
     Functions["text"]        = new Text.Text();
     Functions["t"]           = new T();
     Functions["hyperlink"]   = new Hyperlink();
     Functions["value"]       = new Value(CultureInfo.CurrentCulture);
     Functions["trim"]        = new Trim();
     Functions["clean"]       = new Clean();
     Functions["unicode"]     = new Unicode();
     Functions["unichar"]     = new Unichar();
     Functions["numbervalue"] = new NumberValue();
     Functions["dollar"]      = new Dollar();
     // Numbers
     Functions["int"] = new CInt();
     // Math
     Functions["aggregate"]       = new Aggregate();
     Functions["abs"]             = new Abs();
     Functions["asin"]            = new Asin();
     Functions["asinh"]           = new Asinh();
     Functions["acot"]            = new Acot();
     Functions["acoth"]           = new Acoth();
     Functions["cos"]             = new Cos();
     Functions["cot"]             = new Cot();
     Functions["coth"]            = new Coth();
     Functions["cosh"]            = new Cosh();
     Functions["csc"]             = new Csc();
     Functions["csch"]            = new Csch();
     Functions["power"]           = new Power();
     Functions["gcd"]             = new Gcd();
     Functions["lcm"]             = new Lcm();
     Functions["sec"]             = new Sec();
     Functions["sech"]            = new SecH();
     Functions["sign"]            = new Sign();
     Functions["sqrt"]            = new Sqrt();
     Functions["sqrtpi"]          = new SqrtPi();
     Functions["pi"]              = new Pi();
     Functions["product"]         = new Product();
     Functions["ceiling"]         = new Ceiling();
     Functions["ceiling.precise"] = new CeilingPrecise();
     Functions["ceiling.math"]    = new CeilingMath();
     Functions["iso.ceiling"]     = new IsoCeiling();
     Functions["combin"]          = new Combin();
     Functions["combina"]         = new Combina();
     Functions["permut"]          = new Permut();
     Functions["permutationa"]    = new Permutationa();
     Functions["count"]           = new Count();
     Functions["counta"]          = new CountA();
     Functions["countblank"]      = new CountBlank();
     Functions["countif"]         = new CountIf();
     Functions["countifs"]        = new CountIfs();
     Functions["fact"]            = new Fact();
     Functions["factdouble"]      = new FactDouble();
     Functions["floor"]           = new Floor();
     Functions["floor.precise"]   = new FloorPrecise();
     Functions["floor.math"]      = new FloorMath();
     Functions["radians"]         = new Radians();
     Functions["roman"]           = new Roman();
     Functions["sin"]             = new Sin();
     Functions["sinh"]            = new Sinh();
     Functions["sum"]             = new Sum();
     Functions["sumif"]           = new SumIf();
     Functions["sumifs"]          = new SumIfs();
     Functions["sumproduct"]      = new SumProduct();
     Functions["sumsq"]           = new Sumsq();
     Functions["sumxmy2"]         = new Sumxmy2();
     Functions["sumx2my2"]        = new SumX2mY2();
     Functions["sumx2py2"]        = new SumX2pY2();
     Functions["seriessum"]       = new Seriessum();
     Functions["stdev"]           = new Stdev();
     Functions["stdeva"]          = new Stdeva();
     Functions["stdevp"]          = new StdevP();
     Functions["stdevpa"]         = new Stdevpa();
     Functions["stdev.s"]         = new StdevDotS();
     Functions["stdev.p"]         = new StdevDotP();
     Functions["subtotal"]        = new Subtotal();
     Functions["exp"]             = new Exp();
     Functions["log"]             = new Log();
     Functions["log10"]           = new Log10();
     Functions["ln"]              = new Ln();
     Functions["max"]             = new Max();
     Functions["maxa"]            = new Maxa();
     Functions["median"]          = new Median();
     Functions["min"]             = new Min();
     Functions["mina"]            = new Mina();
     Functions["mod"]             = new Mod();
     Functions["mode"]            = new Mode();
     Functions["mode.sngl"]       = new ModeSngl();
     Functions["mround"]          = new Mround();
     Functions["multinomial"]     = new Multinomial();
     Functions["average"]         = new Average();
     Functions["averagea"]        = new AverageA();
     Functions["averageif"]       = new AverageIf();
     Functions["averageifs"]      = new AverageIfs();
     Functions["round"]           = new Round();
     Functions["rounddown"]       = new Rounddown();
     Functions["roundup"]         = new Roundup();
     Functions["rand"]            = new Rand();
     Functions["randbetween"]     = new RandBetween();
     Functions["rank"]            = new Rank();
     Functions["rank.eq"]         = new RankEq();
     Functions["rank.avg"]        = new RankAvg();
     Functions["percentile"]      = new Percentile();
     Functions["percentile.inc"]  = new PercentileInc();
     Functions["percentile.exc"]  = new PercentileExc();
     Functions["quartile"]        = new Quartile();
     Functions["quartile.inc"]    = new QuartileInc();
     Functions["quartile.exc"]    = new QuartileExc();
     Functions["percentrank"]     = new Percentrank();
     Functions["percentrank.inc"] = new PercentrankInc();
     Functions["percentrank.exc"] = new PercentrankExc();
     Functions["quotient"]        = new Quotient();
     Functions["trunc"]           = new Trunc();
     Functions["tan"]             = new Tan();
     Functions["tanh"]            = new Tanh();
     Functions["atan"]            = new Atan();
     Functions["atan2"]           = new Atan2();
     Functions["atanh"]           = new Atanh();
     Functions["acos"]            = new Acos();
     Functions["acosh"]           = new Acosh();
     Functions["covar"]           = new Covar();
     Functions["covariance.p"]    = new CovarianceP();
     Functions["covariance.s"]    = new CovarianceS();
     Functions["var"]             = new Var();
     Functions["vara"]            = new Vara();
     Functions["var.s"]           = new VarDotS();
     Functions["varp"]            = new VarP();
     Functions["varpa"]           = new Varpa();
     Functions["var.p"]           = new VarDotP();
     Functions["large"]           = new Large();
     Functions["small"]           = new Small();
     Functions["degrees"]         = new Degrees();
     Functions["odd"]             = new Odd();
     Functions["even"]            = new Even();
     // Information
     Functions["isblank"]    = new IsBlank();
     Functions["isnumber"]   = new IsNumber();
     Functions["istext"]     = new IsText();
     Functions["isnontext"]  = new IsNonText();
     Functions["iserror"]    = new IsError();
     Functions["iserr"]      = new IsErr();
     Functions["error.type"] = new ErrorType();
     Functions["iseven"]     = new IsEven();
     Functions["isodd"]      = new IsOdd();
     Functions["islogical"]  = new IsLogical();
     Functions["isna"]       = new IsNa();
     Functions["na"]         = new Na();
     Functions["n"]          = new N();
     Functions["type"]       = new TypeFunction();
     // Logical
     Functions["if"]      = new If();
     Functions["ifs"]     = new Ifs();
     Functions["maxifs"]  = new MaxIfs();
     Functions["minifs"]  = new MinIfs();
     Functions["iferror"] = new IfError();
     Functions["ifna"]    = new IfNa();
     Functions["not"]     = new Not();
     Functions["and"]     = new And();
     Functions["or"]      = new Or();
     Functions["true"]    = new True();
     Functions["false"]   = new False();
     Functions["switch"]  = new Switch();
     Functions["xor"]     = new Xor();
     // Reference and lookup
     Functions["address"]  = new Address();
     Functions["hlookup"]  = new HLookup();
     Functions["vlookup"]  = new VLookup();
     Functions["lookup"]   = new Lookup();
     Functions["match"]    = new Match();
     Functions["row"]      = new Row();
     Functions["rows"]     = new Rows();
     Functions["column"]   = new Column();
     Functions["columns"]  = new Columns();
     Functions["choose"]   = new Choose();
     Functions["index"]    = new RefAndLookup.Index();
     Functions["indirect"] = new Indirect();
     Functions["offset"]   = new Offset();
     // Date
     Functions["date"]             = new Date();
     Functions["datedif"]          = new DateDif();
     Functions["today"]            = new Today();
     Functions["now"]              = new Now();
     Functions["day"]              = new Day();
     Functions["month"]            = new Month();
     Functions["year"]             = new Year();
     Functions["time"]             = new Time();
     Functions["hour"]             = new Hour();
     Functions["minute"]           = new Minute();
     Functions["second"]           = new Second();
     Functions["weeknum"]          = new Weeknum();
     Functions["weekday"]          = new Weekday();
     Functions["days"]             = new Days();
     Functions["days360"]          = new Days360();
     Functions["yearfrac"]         = new Yearfrac();
     Functions["edate"]            = new Edate();
     Functions["eomonth"]          = new Eomonth();
     Functions["isoweeknum"]       = new IsoWeekNum();
     Functions["workday"]          = new Workday();
     Functions["workday.intl"]     = new WorkdayIntl();
     Functions["networkdays"]      = new Networkdays();
     Functions["networkdays.intl"] = new NetworkdaysIntl();
     Functions["datevalue"]        = new DateValue();
     Functions["timevalue"]        = new TimeValue();
     // Database
     Functions["dget"]     = new Dget();
     Functions["dcount"]   = new Dcount();
     Functions["dcounta"]  = new DcountA();
     Functions["dmax"]     = new Dmax();
     Functions["dmin"]     = new Dmin();
     Functions["dsum"]     = new Dsum();
     Functions["daverage"] = new Daverage();
     Functions["dvar"]     = new Dvar();
     Functions["dvarp"]    = new Dvarp();
     //Finance
     Functions["cumipmt"]    = new Cumipmt();
     Functions["cumprinc"]   = new Cumprinc();
     Functions["dollarde"]   = new DollarDe();
     Functions["dollarfr"]   = new DollarFr();
     Functions["ddb"]        = new Ddb();
     Functions["effect"]     = new Effect();
     Functions["fvschedule"] = new FvSchedule();
     Functions["pduration"]  = new Pduration();
     Functions["rri"]        = new Rri();
     Functions["pmt"]        = new Pmt();
     Functions["ppmt"]       = new Ppmt();
     Functions["ipmt"]       = new Ipmt();
     Functions["ispmt"]      = new IsPmt();
     Functions["pv"]         = new Pv();
     Functions["fv"]         = new Fv();
     Functions["npv"]        = new Npv();
     Functions["rate"]       = new Rate();
     Functions["nper"]       = new Nper();
     Functions["nominal"]    = new Nominal();
     Functions["irr"]        = new Irr();
     Functions["mirr"]       = new Mirr();
     Functions["xirr"]       = new Xirr();
     Functions["sln"]        = new Sln();
     Functions["syd"]        = new Syd();
     Functions["xnpv"]       = new Xnpv();
     Functions["coupdays"]   = new Coupdays();
     Functions["coupdaysnc"] = new Coupdaysnc();
     Functions["coupdaybs"]  = new Coupdaybs();
     Functions["coupnum"]    = new Coupnum();
     Functions["coupncd"]    = new Coupncd();
     Functions["couppcd"]    = new Couppcd();
     Functions["price"]      = new Price();
     Functions["yield"]      = new Yield();
     Functions["yieldmat"]   = new Yieldmat();
     Functions["duration"]   = new Duration();
     Functions["disc"]       = new Disc();
     //Engineering
     Functions["bitand"]       = new BitAnd();
     Functions["bitor"]        = new BitOr();
     Functions["bitxor"]       = new BitXor();
     Functions["bitlshift"]    = new BitLshift();
     Functions["bitrshift"]    = new BitRshift();
     Functions["convert"]      = new ConvertFunction();
     Functions["bin2dec"]      = new Bin2Dec();
     Functions["bin2hex"]      = new Bin2Hex();
     Functions["bin2oct"]      = new Bin2Oct();
     Functions["dec2bin"]      = new Dec2Bin();
     Functions["dec2hex"]      = new Dec2Hex();
     Functions["dec2oct"]      = new Dec2Oct();
     Functions["hex2bin"]      = new Hex2Bin();
     Functions["hex2dec"]      = new Hex2Dec();
     Functions["hex2oct"]      = new Hex2Oct();
     Functions["oct2bin"]      = new Oct2Bin();
     Functions["oct2dec"]      = new Oct2Dec();
     Functions["oct2hex"]      = new Oct2Hex();
     Functions["delta"]        = new Delta();
     Functions["erf"]          = new Erf();
     Functions["erf.precise"]  = new ErfPrecise();
     Functions["erfc"]         = new Erfc();
     Functions["erfc.precise"] = new ErfcPrecise();
     Functions["besseli"]      = new BesselI();
     Functions["besselj"]      = new BesselJ();
     Functions["besselk"]      = new BesselK();
     Functions["bessely"]      = new BesselY();
 }