Skip to content

Commit f847574

Browse files
committed
rm obsolete codes
1 parent 419053c commit f847574

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

src/SocketIOClient.Newtonsoft.Json/NewtonsoftJsonSerializer.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,18 @@ public T Deserialize<T>(string json, IList<byte[]> bytes)
3939

4040
private JsonSerializerSettings GetOptions()
4141
{
42-
JsonSerializerSettings options;
42+
JsonSerializerSettings options = null;
4343
if (OptionsProvider != null)
4444
{
4545
options = OptionsProvider();
4646
}
47-
else
48-
{
49-
options = CreateOptions();
50-
}
5147
if (options == null)
5248
{
5349
options = new JsonSerializerSettings();
5450
}
5551
return options;
5652
}
5753

58-
[Obsolete("Use Options instead.")]
59-
public virtual JsonSerializerSettings CreateOptions()
60-
{
61-
return new JsonSerializerSettings();
62-
}
63-
6454
public Func<JsonSerializerSettings> OptionsProvider { get; set; }
6555
}
6656
}

src/SocketIOClient/JsonSerializer/SystemTextJsonSerializer.cs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,18 @@ public T Deserialize<T>(string json, IList<byte[]> bytes)
3636

3737
private JsonSerializerOptions GetOptions()
3838
{
39-
JsonSerializerOptions options;
39+
JsonSerializerOptions options = null;
4040
if (OptionsProvider != null)
4141
{
4242
options = OptionsProvider();
4343
}
44-
else
45-
{
46-
options = CreateOptions();
47-
}
4844
if (options == null)
4945
{
5046
options = new JsonSerializerOptions();
5147
}
5248
return options;
5349
}
5450

55-
[Obsolete("Use OptionsProvider instead.")]
56-
public virtual JsonSerializerOptions CreateOptions()
57-
{
58-
return new JsonSerializerOptions();
59-
}
60-
6151
public Func<JsonSerializerOptions> OptionsProvider { get; set; }
6252
}
6353
}

0 commit comments

Comments
 (0)