Fixed typo in IObjectStorageHelper. Updated var name to be more accurate in Samples.cs

This commit is contained in:
Shane Weaver 2021-07-16 09:11:20 -07:00
Родитель cf294f2f2e
Коммит 5707c6d669
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -21,7 +21,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
private static SemaphoreSlim _semaphore = new SemaphoreSlim(1);
private static LinkedList<Sample> _recentSamples;
private static ApplicationDataStorageHelper _localObjectStorageHelper = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
private static ApplicationDataStorageHelper _appDataStorageHelper = ApplicationDataStorageHelper.GetCurrent(new Toolkit.Helpers.SystemSerializer());
public static async Task<SampleCategory> GetCategoryBySample(Sample sample)
{
@ -98,7 +98,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
if (_recentSamples == null)
{
_recentSamples = new LinkedList<Sample>();
var savedSamples = _localObjectStorageHelper.Read<string>(_recentSamplesStorageKey);
var savedSamples = _appDataStorageHelper.Read<string>(_recentSamplesStorageKey);
if (savedSamples != null)
{
@ -144,7 +144,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
}
var str = string.Join(";", _recentSamples.Take(10).Select(s => s.Name).ToArray());
_localObjectStorageHelper.Save<string>(_recentSamplesStorageKey, str);
_appDataStorageHelper.Save<string>(_recentSamplesStorageKey, str);
}
}
}

Просмотреть файл

@ -12,7 +12,7 @@ namespace Microsoft.Toolkit.Uwp.Helpers
/// <summary>
/// Service used to store data.
/// </summary>
[Obsolete("IObjectStorageHelper is deprecated. Please use IDictionaryStorageHelper and IFileStorageHelper interfaces instead.")]
[Obsolete("IObjectStorageHelper is deprecated. Please use ISettingsStorageHelper and IFileStorageHelper interfaces instead.")]
public interface IObjectStorageHelper
{
/// <summary>