Esempio n. 1
0
 public void WriteFile(DonationManager donationManager)
 {
     using (StreamWriter writer = new StreamWriter(this.outputFile))
     {
         writer.Write(donationManager);
     }
 }
Esempio n. 2
0
        static void Main(string[] args)
        {
            DonationReader        dr     = new DonationReader(@"..\..\..\d1.txt");
            List <DonationRecord> drList = dr.ReadFile();

            Console.Error.WriteLine(dr.ToString());

            DonationManager dm = new DonationManager(drList);

            Console.Out.WriteLine(dm.ToString());

            DonationWriter dw = new DonationWriter(dr.ToString());

            dw.WriteFile(dm);

            Console.In.ReadLine();
        }
Esempio n. 3
0
        public void SetUp()
        {
            token            = new TestToken();
            orderTransaction = new OrderTransaction();
            var addCreditsResult = new AddCreditsResult(It.IsAny <int>());

            database          = new Mock <IDatabase>();
            userManager       = new Mock <IUserManager>();
            httpContextReader = new Mock <IHttpContextReader>();

            database.Setup(d =>
                           d.TokenRepository.GetTokenByCodeAndType(It.IsNotNull <string>(), TokenType.Payment, UserId))
            .ReturnsAsync(token);
            database.Setup(d => d.OrderTransactionRepository.Find(It.IsNotNull <string>()))
            .ReturnsAsync(orderTransaction);
            database.Setup(d => d.TokenRepository.Delete(It.IsNotNull <Token>())).ReturnsAsync(true);
            database.Setup(d => d.BeginTransaction()).Returns(new DatabaseTransaction());
            database.Setup(d => d.ReportRepository.Insert(It.IsNotNull <Report>(), false)).ReturnsAsync(true);
            userManager.Setup(u => u.AddCredits(It.IsNotNull <int>(), UserId)).ReturnsAsync(addCreditsResult);
            httpContextReader.Setup(h => h.CurrentUserId).Returns(UserId);

            donationManager = new DonationManager(database.Object, userManager.Object, httpContextReader.Object);
        }
Esempio n. 4
0
    // Use this for initialization
    void Start()
    {
        Mz_ResizeScale.ResizingScale(background_obj.transform);

        SheepBank.HaveUpgradeOutSide = false;

        StartCoroutine_Auto(ReInitializeAudioClipData());
        StartCoroutine(this.InitializeAudio());
        StartCoroutine(this.InitializeBankOfficer());
        this.InitializeGameEffectGenerator();
        base.InitializeIdentityGUI();

        upgradeInsideManager = upgradeInside_window_Obj.GetComponent<UpgradeInsideManager>();
        donationManager = donationForm_group.GetComponent<DonationManager>();

        this.InitializeFields();

        if(MainMenu._HasNewGameEvent) {
            shadowPlane_Obj.gameObject.active = true;
            sheepBankTutor.Deposit_button_obj.transform.position += Vector3.back * 12;
            sheepBankTutor.Back_Button_obj.transform.position += Vector3.forward * 20;
            this.CreateTutorObjectAtRuntime();
        }
        else {
            shadowPlane_Obj.gameObject.active = false;
        }
    }