public static async Task Initialize(SQLiteControl command) { Temporaries = new StatefulModel.SortedObservableCollection <TNicoTemporary, DateTime>( await command.SelectNicoTemporary(), x => x.Date, true ); Histories = new StatefulModel.SortedObservableCollection <VNicoHistory, DateTime>( await command.SelectNicoHistory(), x => x.Date, true ); Favorites = new StatefulModel.SortedObservableCollection <TNicoFavorite, DateTime>( await command.SelectNicoFavorite(), x => x.Date, true ); var combo = XDocument.Load(CoreUtil.RelativePathToAbsolutePath(NicoComboPath)).Root; Combos = combo.Descendants("combo") .SelectMany(xml => { return(xml.Descendants("item") .Select(tag => new ComboboxItemModel( (string)xml.Attribute("group"), (string)tag.Attribute("value"), (string)tag.Attribute("display") ))); }) .ToArray(); }