@@ -20,9 +20,9 @@ public class ApplicationDataStorageHelper : IFileStorageHelper, ISettingsStorage
20
20
/// <summary>
21
21
/// Get a new instance using ApplicationData.Current and the provided serializer.
22
22
/// </summary>
23
- /// <param name="objectSerializer">Serializer for converting stored values.</param>
23
+ /// <param name="objectSerializer">Serializer for converting stored values. Defaults to <see cref="Toolkit.Helpers.SystemSerializer"/>. </param>
24
24
/// <returns>A new instance of ApplicationDataStorageHelper.</returns>
25
- public static ApplicationDataStorageHelper GetCurrent ( Toolkit . Helpers . IObjectSerializer objectSerializer )
25
+ public static ApplicationDataStorageHelper GetCurrent ( Toolkit . Helpers . IObjectSerializer objectSerializer = null )
26
26
{
27
27
var appData = ApplicationData . Current ;
28
28
return new ApplicationDataStorageHelper ( appData , objectSerializer ) ;
@@ -32,9 +32,9 @@ public static ApplicationDataStorageHelper GetCurrent(Toolkit.Helpers.IObjectSer
32
32
/// Get a new instance using the ApplicationData for the provided user and serializer.
33
33
/// </summary>
34
34
/// <param name="user">App data user owner.</param>
35
- /// <param name="objectSerializer">Serializer for converting stored values.</param>
35
+ /// <param name="objectSerializer">Serializer for converting stored values. Defaults to <see cref="Toolkit.Helpers.SystemSerializer"/>. </param>
36
36
/// <returns>A new instance of ApplicationDataStorageHelper.</returns>
37
- public static async Task < ApplicationDataStorageHelper > GetForUserAsync ( User user , Toolkit . Helpers . IObjectSerializer objectSerializer )
37
+ public static async Task < ApplicationDataStorageHelper > GetForUserAsync ( User user , Toolkit . Helpers . IObjectSerializer objectSerializer = null )
38
38
{
39
39
var appData = await ApplicationData . GetForUserAsync ( user ) ;
40
40
return new ApplicationDataStorageHelper ( appData , objectSerializer ) ;
@@ -55,11 +55,11 @@ public static async Task<ApplicationDataStorageHelper> GetForUserAsync(User user
55
55
/// Initializes a new instance of the <see cref="ApplicationDataStorageHelper"/> class.
56
56
/// </summary>
57
57
/// <param name="appData">The data store to interact with.</param>
58
- /// <param name="objectSerializer">Serializer for converting stored values.</param>
59
- public ApplicationDataStorageHelper ( ApplicationData appData , Toolkit . Helpers . IObjectSerializer objectSerializer )
58
+ /// <param name="objectSerializer">Serializer for converting stored values. Defaults to <see cref="Toolkit.Helpers.SystemSerializer"/>. </param>
59
+ public ApplicationDataStorageHelper ( ApplicationData appData , Toolkit . Helpers . IObjectSerializer objectSerializer = null )
60
60
{
61
61
AppData = appData ?? throw new ArgumentNullException ( nameof ( appData ) ) ;
62
- _serializer = objectSerializer ?? throw new ArgumentNullException ( nameof ( objectSerializer ) ) ;
62
+ _serializer = objectSerializer ?? new Toolkit . Helpers . SystemSerializer ( ) ;
63
63
}
64
64
65
65
/// <inheritdoc />
0 commit comments