public async System.Threading.Tasks.Task ProfilesTestOpenAsync() { StorageFolder localFolder = ApplicationData.Current.LocalFolder; ProfileArray profileArray = await ProfileArray.OpenAsync(localFolder); Assert.IsNotNull(profileArray); }
public override async Task OnStartAsync(StartKind startKind, IActivatedEventArgs args) { SharedData sharedData = SharedData.SharedDataInstance; if (args.Kind == ActivationKind.Launch) { BackgroundTransfer backgroundTransfer = BackgroundTransfer.CreateBackgroundTransfer(); await backgroundTransfer.DiscoverActiveDownloadsAsync(); } //long-running startup tasks go here StorageFolder localFolder = ApplicationData.Current.LocalFolder; Views.MainPage._unsentMessagesFolder = await localFolder.CreateFolderAsync("UnsentMessages", CreationCollisionOption.OpenIfExists); Views.MainPage._sentMessagesFolder = await localFolder.CreateFolderAsync("SentMessages", CreationCollisionOption.OpenIfExists); Views.MainPage._receivedMessagesFolder = await localFolder.CreateFolderAsync("ReceivedMessages", CreationCollisionOption.OpenIfExists); Views.MainPage._draftMessagesFolder = await localFolder.CreateFolderAsync("DraftMessages", CreationCollisionOption.OpenIfExists); Views.MainPage._archivedMessagesFolder = await localFolder.CreateFolderAsync("ArchivedMessages", CreationCollisionOption.OpenIfExists); Views.MainPage._deletedMessagesFolder = await localFolder.CreateFolderAsync("DeletedMessages", CreationCollisionOption.OpenIfExists); Views.MainPage.LogsFolder = await localFolder.CreateFolderAsync("Logs", CreationCollisionOption.OpenIfExists); Views.MainPage._MetroLogsFolder = await localFolder.CreateFolderAsync("MetroLogs", CreationCollisionOption.OpenIfExists); SharedData.filesInInstalledLocation = await Package.Current.InstalledLocation.GetFilesAsync(); sharedData.BbsArray = await BBSDefinitions.OpenAsync(localFolder); //"ms-appx:///Assets/pdffile.pdf" sharedData.TncDeviceArray = await TNCDeviceArray.OpenAsync(localFolder); sharedData.ProfileArray = await ProfileArray.OpenAsync(localFolder); foreach (var tacticalCallsignType in _tacticalCallsignDataDictionary.Values) { tacticalCallsignType.TacticalCallsigns = await TacticalCallsigns.OpenAsync(tacticalCallsignType.FileName); } await AddressBook.Instance.OpenAsync(); await DistributionListArray.Instance.OpenAsync(); await ListViewParametersArray.Instance.OpenAsync(); NavigationService.Navigate(typeof(Views.MainPage)); await Task.CompletedTask; }