示例#1
0
        public BoxSetupViewModel(Game game)
        {
            if (game == null) throw new ArgumentNullException("game");

            asyncTaskService = game.Services.GetRequiredService<IAsyncTaskService>();
            boxIntegration = (game as BlockViewerGame).BoxIntegration;

            getTicketAsync = (state) => boxIntegration.GetTicket();
            getAuthTokenAsync = (state) => boxIntegration.GetAuthToken();
            prepareFolderTreeAsync = (state) => boxIntegration.PrepareFolderTree();
            saveSettingsAsync = (state) => boxIntegration.SaveSettings();
        }