diff options
| author | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-06 21:50:43 +0100 |
|---|---|---|
| committer | Erwin de Haan <EraYaN@users.noreply.github.com> | 2019-01-10 20:38:53 +0100 |
| commit | ec1f5dc317182582ebff843c9e8a4d5277405469 (patch) | |
| tree | 6514de336cc9aa94becb3fbd767285dfa61d0b1b /MediaBrowser.Model/Serialization | |
| parent | 3d867c2c46cec39b669bb8647efef677f32b8a8d (diff) | |
Mayor code cleanup
Add Argument*Exceptions now use proper nameof operators.
Added exception messages to quite a few Argument*Exceptions.
Fixed rethorwing to be proper syntax.
Added a ton of null checkes. (This is only a start, there are about 500 places that need proper null handling)
Added some TODOs to log certain exceptions.
Fix sln again.
Fixed all AssemblyInfo's and added proper copyright (where I could find them)
We live in *current year*.
Fixed the use of braces.
Fixed a ton of properties, and made a fair amount of functions static that should be and can be static.
Made more Methods that should be static static.
You can now use static to find bad functions!
Removed unused variable. And added one more proper XML comment.
Diffstat (limited to 'MediaBrowser.Model/Serialization')
| -rw-r--r-- | MediaBrowser.Model/Serialization/IJsonSerializer.cs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/MediaBrowser.Model/Serialization/IJsonSerializer.cs b/MediaBrowser.Model/Serialization/IJsonSerializer.cs index a582beb7f..06e48f412 100644 --- a/MediaBrowser.Model/Serialization/IJsonSerializer.cs +++ b/MediaBrowser.Model/Serialization/IJsonSerializer.cs @@ -11,7 +11,7 @@ namespace MediaBrowser.Model.Serialization /// </summary> /// <param name="obj">The obj.</param> /// <param name="stream">The stream.</param> - /// <exception cref="System.ArgumentNullException">obj</exception> + /// <exception cref="ArgumentNullException">obj</exception> void SerializeToStream(object obj, Stream stream); /// <summary> @@ -19,7 +19,7 @@ namespace MediaBrowser.Model.Serialization /// </summary> /// <param name="obj">The obj.</param> /// <param name="file">The file.</param> - /// <exception cref="System.ArgumentNullException">obj</exception> + /// <exception cref="ArgumentNullException">obj</exception> void SerializeToFile(object obj, string file); /// <summary> @@ -28,7 +28,7 @@ namespace MediaBrowser.Model.Serialization /// <param name="type">The type.</param> /// <param name="file">The file.</param> /// <returns>System.Object.</returns> - /// <exception cref="System.ArgumentNullException">type</exception> + /// <exception cref="ArgumentNullException">type</exception> object DeserializeFromFile(Type type, string file); /// <summary> @@ -37,7 +37,7 @@ namespace MediaBrowser.Model.Serialization /// <typeparam name="T"></typeparam> /// <param name="file">The file.</param> /// <returns>``0.</returns> - /// <exception cref="System.ArgumentNullException">file</exception> + /// <exception cref="ArgumentNullException">file</exception> T DeserializeFromFile<T>(string file) where T : class; @@ -47,7 +47,7 @@ namespace MediaBrowser.Model.Serialization /// <typeparam name="T"></typeparam> /// <param name="stream">The stream.</param> /// <returns>``0.</returns> - /// <exception cref="System.ArgumentNullException">stream</exception> + /// <exception cref="ArgumentNullException">stream</exception> T DeserializeFromStream<T>(Stream stream); /// <summary> @@ -56,7 +56,7 @@ namespace MediaBrowser.Model.Serialization /// <typeparam name="T"></typeparam> /// <param name="text">The text.</param> /// <returns>``0.</returns> - /// <exception cref="System.ArgumentNullException">text</exception> + /// <exception cref="ArgumentNullException">text</exception> T DeserializeFromString<T>(string text); /// <summary> @@ -65,7 +65,7 @@ namespace MediaBrowser.Model.Serialization /// <param name="stream">The stream.</param> /// <param name="type">The type.</param> /// <returns>System.Object.</returns> - /// <exception cref="System.ArgumentNullException">stream</exception> + /// <exception cref="ArgumentNullException">stream</exception> object DeserializeFromStream(Stream stream, Type type); /// <summary> @@ -74,7 +74,7 @@ namespace MediaBrowser.Model.Serialization /// <param name="json">The json.</param> /// <param name="type">The type.</param> /// <returns>System.Object.</returns> - /// <exception cref="System.ArgumentNullException">json</exception> + /// <exception cref="ArgumentNullException">json</exception> object DeserializeFromString(string json, Type type); /// <summary> @@ -82,7 +82,7 @@ namespace MediaBrowser.Model.Serialization /// </summary> /// <param name="obj">The obj.</param> /// <returns>System.String.</returns> - /// <exception cref="System.ArgumentNullException">obj</exception> + /// <exception cref="ArgumentNullException">obj</exception> string SerializeToString(object obj); Task<object> DeserializeFromStreamAsync(Stream stream, Type type); |
