File tree Expand file tree Collapse file tree 4 files changed +7
-39
lines changed
Microsoft.Toolkit.Uwp/Helpers/ObjectStorage Expand file tree Collapse file tree 4 files changed +7
-39
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,13 @@ public abstract class BaseObjectStorageHelper : IObjectStorageHelper
21
21
/// <summary>
22
22
/// Initializes a new instance of the <see cref="BaseObjectStorageHelper"/> class,
23
23
/// which can read and write data using the provided <see cref="IObjectSerializer"/>;
24
- /// if none is provided, a default Json serializer will be used (based on <see cref="DataContractSerializer"/>).
25
- /// In 6.1 and older the default Serializer was based on Newtonsoft.Json and the new default Serializer may behave differently.
24
+ /// In 6.1 and older the default Serializer was based on Newtonsoft.Json.
26
25
/// To implement a <see cref="IObjectSerializer"/> based on Newtonsoft.Json or System.Text.Json see https://aka.ms/wct/storagehelper-migration
27
26
/// </summary>
28
27
/// <param name="objectSerializer">The serializer to use.</param>
29
- public BaseObjectStorageHelper ( IObjectSerializer objectSerializer = null )
28
+ public BaseObjectStorageHelper ( IObjectSerializer objectSerializer )
30
29
{
31
- serializer = objectSerializer ?? new JsonObjectSerializer ( ) ;
30
+ serializer = objectSerializer ?? throw new ArgumentNullException ( nameof ( objectSerializer ) ) ;
32
31
}
33
32
34
33
/// <summary>
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,12 +15,11 @@ public class LocalObjectStorageHelper : BaseObjectStorageHelper
15
15
/// <summary>
16
16
/// Initializes a new instance of the <see cref="LocalObjectStorageHelper"/> class,
17
17
/// which can read and write data using the provided <see cref="IObjectSerializer"/>;
18
- /// if none is provided, a default Json serializer will be used (based on <see cref="DataContractSerializer"/>).
19
- /// In 6.1 and older the default Serializer was based on Newtonsoft.Json and the new default Serializer may behave differently.
18
+ /// In 6.1 and older the default Serializer was based on Newtonsoft.Json.
20
19
/// To implement a <see cref="IObjectSerializer"/> based on Newtonsoft.Json or System.Text.Json see https://aka.ms/wct/storagehelper-migration
21
20
/// </summary>
22
21
/// <param name="objectSerializer">The serializer to use.</param>
23
- public LocalObjectStorageHelper ( IObjectSerializer objectSerializer = null )
22
+ public LocalObjectStorageHelper ( IObjectSerializer objectSerializer )
24
23
: base ( objectSerializer )
25
24
{
26
25
Settings = ApplicationData . Current . LocalSettings ;
Original file line number Diff line number Diff line change @@ -15,12 +15,11 @@ public class RoamingObjectStorageHelper : BaseObjectStorageHelper
15
15
/// <summary>
16
16
/// Initializes a new instance of the <see cref="RoamingObjectStorageHelper"/> class,
17
17
/// which can read and write data using the provided <see cref="IObjectSerializer"/>;
18
- /// if none is provided, a default Json serializer will be used (based on <see cref="DataContractSerializer"/>).
19
- /// In 6.1 and older the default Serializer was based on Newtonsoft.Json and the new default Serializer may behave differently.
18
+ /// In 6.1 and older the default Serializer was based on Newtonsoft.Json.
20
19
/// To implement a <see cref="IObjectSerializer"/> based on Newtonsoft.Json or System.Text.Json see https://aka.ms/wct/storagehelper-migration
21
20
/// </summary>
22
21
/// <param name="objectSerializer">The serializer to use.</param>
23
- public RoamingObjectStorageHelper ( IObjectSerializer objectSerializer = null )
22
+ public RoamingObjectStorageHelper ( IObjectSerializer objectSerializer )
24
23
: base ( objectSerializer )
25
24
{
26
25
Settings = ApplicationData . Current . RoamingSettings ;
You can’t perform that action at this time.
0 commit comments