コード例 #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            var wordStorage   = new WordStorageList();
            var playerStorage = new PlayerStorageList();

            var _library = new WordGuessSystem(wordStorage, playerStorage);

            services.AddSingleton <WordGuessSystem>(_library);
        }
コード例 #2
0
 public WordController(WordGuessSystem library)
 {
     //var wordStorage = new wordStorageList();
     //var playerStorage = new playerStorageList();
     _library = library;//new WordGuessSystem(wordStorage, playerStorage);
 }