Showing the changes to Source/Libraries/GSF.Core/Data/DataSetExtensions.cs (1 of 72 files). Show all
Unified · Split
| @@ -153,10 +153,10 @@ namespace GSF.Data · 152 unmodified lines | |||
| 153 | public static void SerializeToStream(this DataSet source, Stream destination, bool assumeStringForUnknownTypes = true) | 153 | public static void SerializeToStream(this DataSet source, Stream destination, bool assumeStringForUnknownTypes = true) |
| 154 | { | 154 | { |
| 155 | if ((object)source == null) | 155 | if ((object)source == null) |
| 156 | throw new ArgumentNullException("source"); | 156 | throw new ArgumentNullException(nameof(source)); |
| 157 | 157 | ||
| 158 | if ((object)destination == null) | 158 | if ((object)destination == null) |
| 159 | throw new ArgumentNullException("destination"); | 159 | throw new ArgumentNullException(nameof(destination)); |
| 160 | 160 | ||
| 161 | if (!destination.CanWrite) | 161 | if (!destination.CanWrite) |
| 162 | throw new InvalidOperationException("Cannot write to a read-only stream"); | 162 | throw new InvalidOperationException("Cannot write to a read-only stream"); |
| @@ -299,7 +299,7 @@ namespace GSF.Data · 136 unmodified lines | |||
| 299 | public static DataSet DeserializeToDataSet(this Stream source) | 299 | public static DataSet DeserializeToDataSet(this Stream source) |
| 300 | { | 300 | { |
| 301 | if ((object)source == null) | 301 | if ((object)source == null) |
| 302 | throw new ArgumentNullException("source"); | 302 | throw new ArgumentNullException(nameof(source)); |
| 303 | 303 | ||
| 304 | if (!source.CanRead) | 304 | if (!source.CanRead) |
| 305 | throw new InvalidOperationException("Cannot read from a write-only stream"); | 305 | throw new InvalidOperationException("Cannot read from a write-only stream"); |