diff options
| author | Andrew Rabert <6550543+nvllsvm@users.noreply.github.com> | 2019-01-19 15:11:50 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-19 15:11:50 -0500 |
| commit | 55538764fa06a64795c099fc6496df9dbb4156bd (patch) | |
| tree | 8c1f94861ecebdf634b70a7265945b6f8f13aff1 /Emby.Server.Implementations/Serialization/JsonSerializer.cs | |
| parent | 3b52035ee064a5d9aa215d9515211d4508585d39 (diff) | |
| parent | c5430f86b0b5863482e7c4f7e55a79c7d88c133b (diff) | |
Merge pull request #575 from EraYaN/reformat
Reformat all C# server code to conform with code standards
Diffstat (limited to 'Emby.Server.Implementations/Serialization/JsonSerializer.cs')
| -rw-r--r-- | Emby.Server.Implementations/Serialization/JsonSerializer.cs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Emby.Server.Implementations/Serialization/JsonSerializer.cs b/Emby.Server.Implementations/Serialization/JsonSerializer.cs index d4b6b2f43..60bf2d5a9 100644 --- a/Emby.Server.Implementations/Serialization/JsonSerializer.cs +++ b/Emby.Server.Implementations/Serialization/JsonSerializer.cs @@ -1,9 +1,9 @@ using System; using System.IO; +using System.Threading.Tasks; using MediaBrowser.Model.IO; -using Microsoft.Extensions.Logging; using MediaBrowser.Model.Serialization; -using System.Threading.Tasks; +using Microsoft.Extensions.Logging; namespace Emby.Common.Implementations.Serialization { @@ -27,7 +27,7 @@ namespace Emby.Common.Implementations.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> public void SerializeToStream(object obj, Stream stream) { if (obj == null) @@ -48,7 +48,7 @@ namespace Emby.Common.Implementations.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> public void SerializeToFile(object obj, string file) { if (obj == null) @@ -61,7 +61,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = _fileSystem.GetFileStream(file, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) + using (var stream = _fileSystem.GetFileStream(file, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read)) { SerializeToStream(obj, stream); } @@ -79,7 +79,7 @@ namespace Emby.Common.Implementations.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> public object DeserializeFromFile(Type type, string file) { if (type == null) @@ -92,7 +92,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = OpenFile(file)) + using (var stream = OpenFile(file)) { return DeserializeFromStream(stream, type); } @@ -104,7 +104,7 @@ namespace Emby.Common.Implementations.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> public T DeserializeFromFile<T>(string file) where T : class { @@ -113,7 +113,7 @@ namespace Emby.Common.Implementations.Serialization throw new ArgumentNullException(nameof(file)); } - using (Stream stream = OpenFile(file)) + using (var stream = OpenFile(file)) { return DeserializeFromStream<T>(stream); } @@ -125,7 +125,7 @@ namespace Emby.Common.Implementations.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> public T DeserializeFromStream<T>(Stream stream) { if (stream == null) @@ -153,7 +153,7 @@ namespace Emby.Common.Implementations.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> public T DeserializeFromString<T>(string text) { if (string.IsNullOrEmpty(text)) @@ -170,7 +170,7 @@ namespace Emby.Common.Implementations.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> public object DeserializeFromStream(Stream stream, Type type) { if (stream == null) @@ -236,7 +236,7 @@ namespace Emby.Common.Implementations.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> public object DeserializeFromString(string json, Type type) { if (string.IsNullOrEmpty(json)) @@ -257,7 +257,7 @@ namespace Emby.Common.Implementations.Serialization /// </summary> /// <param name="obj">The obj.</param> /// <returns>System.String.</returns> - /// <exception cref="System.ArgumentNullException">obj</exception> + /// <exception cref="ArgumentNullException">obj</exception> public string SerializeToString(object obj) { if (obj == null) |
