Esempio n. 1
0
        static void Main(string[] args)
        {
            int    x = 0, y = 0;
            Hell   pr = Rus;
            Mather mth /*= Input*/;

            pr += Eng;
            pr += Ger;
            pr += Jap;
            pr();
            mth = (int a, int b) => a + b;
            mth = (int a, int b) => a * b;
            Console.WriteLine(mth(1, 3));
        }
Esempio n. 2
0
        /// <summary>
        /// Adds the period.
        /// </summary>
        /// <param name="startDate">The start date.</param>
        /// <param name="tenorString">The tenor string.</param>
        /// <param name="calendar">The calendar.</param>
        /// <param name="rollConvention">The roll convention.</param>
        /// <param name="dayType">Type of the day.</param>
        /// <returns></returns>
        public static DateTime AddPeriod(DateTime startDate, string tenorString, IBusinessCalendar calendar, string rollConvention, string dayType)
        {
            const string defaultRollConvention = "FOLLOWING";

            if (calendar == null)
            {
                calendar = new Hell();
            }
            if (String.IsNullOrEmpty(rollConvention))
            {
                rollConvention = defaultRollConvention;
            }
            Period rollPeriod = PeriodHelper.Parse(tenorString);

            if (String.IsNullOrEmpty(dayType))
            {
                dayType = DayTypeStringFromRollPeriodInterval(rollPeriod);
            }
            var dayTypeEnum = (DayTypeEnum)Enum.Parse(typeof(DayTypeEnum), dayType, true);
            BusinessDayConventionEnum businessDayConvention = BusinessDayConventionHelper.Parse(rollConvention);
            DateTime endDate = calendar.Advance(startDate, OffsetHelper.FromInterval(rollPeriod, dayTypeEnum), businessDayConvention);

            return(endDate);
        }
Esempio n. 3
0
        // Create a list of every Area object
        public void InitializeAreas()
        {
            //Overworld Areas
            Area dismalSwamp = new DismalSwamp(this);

            areaList.Add(dismalSwamp);
            Area edgeOfBigHole = new EdgeOfBigHole(this);

            areaList.Add(edgeOfBigHole);
            Area forest = new Forest(this);

            areaList.Add(forest);
            Area hiddenGrove = new HiddenGrove(this);

            areaList.Add(hiddenGrove);
            Area lakeShore = new LakeShore(this);

            areaList.Add(lakeShore);
            Area ledge = new Ledge(this);

            areaList.Add(ledge);
            Area quicksand = new Quicksand(this);

            areaList.Add(quicksand);
            Area stump = new Stump(this);

            areaList.Add(stump);
            Area sunnyMeadow = new SunnyMeadow(this);

            areaList.Add(sunnyMeadow);
            Area topOfCypress = new TopOfCypress(this);

            areaList.Add(topOfCypress);
            Area topOfOak = new TopOfOak(this);

            areaList.Add(topOfOak);
            //Underworld Areas
            Area bottomOfChasm = new BottomOfChasm(this);

            areaList.Add(bottomOfChasm);
            Area largeCavern = new LargeCavern(this);

            areaList.Add(largeCavern);
            Area largeEightSidedRoom = new LargeEightSidedRoom(this);

            areaList.Add(largeEightSidedRoom);
            Area darkness = new Darkness(this);

            areaList.Add(darkness);
            Area longDownslopingHallway = new LongDownslopingHallway(this);

            areaList.Add(longDownslopingHallway);
            Area longTunnel = new LongTunnel(this);

            areaList.Add(longTunnel);
            Area memoryChip = new MemoryChip(this);

            areaList.Add(memoryChip);
            Area narrowLedgeByChasm = new NarrowLedgeByChasm(this);

            areaList.Add(narrowLedgeByChasm);
            Area narrowLedgeByThroneRoom = new NarrowLedgeByThroneRoom(this);

            areaList.Add(narrowLedgeByThroneRoom);
            Area rootChamber = new RootChamber(this);

            areaList.Add(rootChamber);
            Area royalAnteroom = new RoyalAnteroom(this);

            areaList.Add(royalAnteroom);
            Area royalChamber = new RoyalChamber(this);

            areaList.Add(royalChamber);
            Area semiDarkHole = new SemiDarkHole(this);

            areaList.Add(semiDarkHole);
            Area throneRoom = new ThroneRoom(this);

            areaList.Add(throneRoom);
            //Purgatory areas
            Area endlessCorridor = new EndlessCorridor(this);

            areaList.Add(endlessCorridor);
            Area hell = new Hell(this);

            areaList.Add(hell);
            Area largeMistyRoom = new LargeMistyRoom(this);

            areaList.Add(largeMistyRoom);
            //Maze areas
            Area eastOne = new EastOne(this);

            areaList.Add(eastOne);
            Area eastTwo = new EastTwo(this);

            areaList.Add(eastTwo);
            Area entrance = new Entrance(this);

            areaList.Add(entrance);
            Area northEastOne = new NorthEastOne(this);

            areaList.Add(northEastOne);
            Area northEastTwo = new NorthEastTwo(this);

            areaList.Add(northEastTwo);
            Area northOne = new NorthOne(this);

            areaList.Add(northOne);
            Area northTwo = new NorthTwo(this);

            areaList.Add(northTwo);
            Area northWestOne = new NorthWestOne(this);

            areaList.Add(northWestOne);
            Area northWestTwo = new NorthWestTwo(this);

            areaList.Add(northWestTwo);
            Area southEastOne = new SouthEastOne(this);

            areaList.Add(southEastOne);
            Area southEastTwo = new SouthEastTwo(this);

            areaList.Add(southEastTwo);
            Area southOne = new SouthOne(this);

            areaList.Add(southOne);
            Area southTwo = new SouthTwo(this);

            areaList.Add(southTwo);
            Area southWestOne = new SouthWestOne(this);

            areaList.Add(southWestOne);
            Area southWestTwo = new SouthWestTwo(this);

            areaList.Add(southWestTwo);
            Area westOne = new WestOne(this);

            areaList.Add(westOne);
            Area westTwo = new WestTwo(this);

            areaList.Add(westTwo);
        }