Esempio n. 1
0
 public void SetUp()
 {
     _manager    = Substitute.For <InvestmentManager>(null as InvestmentDal);
     _controller = new InvestmentController(_manager)
     {
         Request       = new HttpRequestMessage(),
         Configuration = new HttpConfiguration()
     };
 }
Esempio n. 2
0
    private void Initialize()
    {
        if (singleton != null)
        {
            Destroy(this.gameObject);
            return;
        }
        singleton = this;

        DontDestroyOnLoad(this.gameObject);
    }
Esempio n. 3
0
    private void GameOver()
    {
        GameManager.Singleton.GameOverClear();
        UIManager.Singleton.GameOverClear();
        InvestmentManager.Singleton.GameOverClear();

        GameManager.Release();
        UIManager.Release();
        InvestmentManager.Release();
        ResourceManager.Release();

        System.GC.Collect();
    }
        public void AddInvestmentManager(InvestmentManager investmentManager)
        {
            if (investmentManager == null)
            {
                throw new ArgumentNullException(nameof(investmentManager));
            }
            // the repository fills the id (instead of using identity columns)
            investmentManager.Id = Guid.NewGuid();

            foreach (var stock in investmentManager.investmentManagerStocks)
            {
                stock.Id = Guid.NewGuid();
            }

            _context.InvestmentManagers.Add(investmentManager);
        }
 public InvestmentController(ILogger <InvestmentController> logger, InvestmentManager investmentManager, InvestmentDal dal)
 {
     _logger            = logger;
     _investmentManager = investmentManager;
     _dal = dal;
 }
Esempio n. 6
0
 public InvestmentController(W4rtaDBContext context)
 {
     this.context      = context;
     investmentManager = new InvestmentManager(this.context);
 }