/// <summary> /// Initializes a new instance of the InlineDialogPage_ChooseIncludedSetsVM class. /// </summary> /// <param name="converterGame">The ConverterGame to choose included sets from.</param> public InlineDialogPage_ChooseIncludedSetsVM(ConverterGame converterGame) { if (converterGame == null) { throw new ArgumentNullException("converterGame"); } this._ConverterGame = converterGame; }
/// <summary> /// Initializes a new instance of the InlineDialogPage_ChooseAnotherCardVM class. /// </summary> /// <param name="converterMapping">The Converter Mapping which contains the parsed card name to match to</param> /// <param name="converterGame">The Converter Game to be used when searching for another card</param> public InlineDialogPage_ChooseAnotherCardVM(ConverterMapping converterMapping, ConverterGame converterGame) { if (converterGame == null) { throw new ArgumentNullException("converterGame"); } this._ConverterGame = converterGame; this.ConverterMapping = converterMapping; }
/// <summary> /// The database of all OCTGN card Name, Guid, and Set info needs to be read in. /// When Initialize is called, the database is read from the Controller on a worker thread so /// the user can immediately begin entering their deck info. /// </summary> private void Initialize() { Logger.Info("Initializing the OCTGN Game " + this.Game.Name); this._BuildCardDatabaseTask = new Task(() => { this.Sets = ConverterGame.BuildCardDatabase(this.Game); this.IsInitialized = true; }); // Continue with this if building the database threw an unexpected exception this._BuildCardDatabaseTask.ContinueWith ( (t) => { Logger.Error("An exception occurred while building the card database. ", t.Exception); this.BuildCardDatabaseExceptions = t.Exception; }, System.Threading.Tasks.TaskContinuationOptions.OnlyOnFaulted ); this._BuildCardDatabaseTask.Start(); }