Skip to content

Commit e931f34

Browse files
committed
ArgumentException is now used for empty arguments instead of ArgumentNullException; Change the _processManager variable of the WinGet class from 'internal' to 'private protected'; XML Doc improvements
1 parent 6e405a2 commit e931f34

7 files changed

Lines changed: 764 additions & 272 deletions

File tree

‎src/WGet.NET/Components/WinGet.cs‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class WinGet
2020
private const string _versionCmd = "--version";
2121
private const string _exportSettingsCmd = "settings export";
2222

23-
internal readonly ProcessManager _processManager;
23+
private protected readonly ProcessManager _processManager;
2424

2525
/// <summary>
2626
/// Gets if winget is installed on the system.
@@ -158,10 +158,12 @@ public async Task<string> ExportSettingsAsync()
158158
/// Please see inner exception.
159159
/// </exception>
160160
/// <exception cref="System.ArgumentNullException">
161-
/// A provided argument is null or empty.
161+
/// A provided argument is null.
162162
/// </exception>
163163
/// <exception cref="System.ArgumentException">
164-
/// The path contains one or more invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars"/>.
164+
/// <para>A provided argument is empty.</para>
165+
/// <para>-or-</para>
166+
/// <para>The path contains one or more invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars"/>.</para>
165167
/// </exception>
166168
/// <exception cref="System.IO.DirectoryNotFoundException">
167169
/// The directory root does not exist.
@@ -221,27 +223,25 @@ public void ExportSettingsToFile(string file)
221223
/// Please see inner exception.
222224
/// </exception>
223225
/// <exception cref="System.ArgumentNullException">
224-
/// A provided argument is null or empty.
226+
/// A provided argument is null.
225227
/// </exception>
226228
/// <exception cref="System.ArgumentException">
227-
/// Path contains one or more invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars"/>.
229+
/// <para>A provided argument is empty.</para>
230+
/// <para>-or-</para>
231+
/// <para>The path contains one or more invalid characters as defined by <see cref="System.IO.Path.InvalidPathChars"/>.</para>
232+
/// </exception>
233+
/// <exception cref="System.IO.DirectoryNotFoundException">
234+
/// The directory root does not exist.
228235
/// </exception>
229236
/// <exception cref="System.IO.PathTooLongException">
230237
/// The specified path, file name, or both exceed the system-defined maximum length.
231238
/// </exception>
232-
/// <exception cref="System.IO.DirectoryNotFoundException">
233-
/// The specified path is invalid (for example, it is on an unmapped drive).
239+
/// <exception cref="System.UnauthorizedAccessException">
240+
/// The caller does not have the required permission.
234241
/// </exception>
235242
/// <exception cref="System.IO.IOException">
236243
/// An I/O error occurred while opening the file
237244
/// </exception>
238-
/// <exception cref="System.UnauthorizedAccessException">
239-
/// Path specified a file that is read-only.
240-
/// Or Path specified a file that is hidden.
241-
/// Or This operation is not supported on the current platform.
242-
/// Or Path specified a directory.
243-
/// Or The caller does not have the required permission.
244-
/// </exception>
245245
/// <exception cref="System.NotSupportedException">
246246
/// Path is in an invalid format.
247247
/// </exception>

0 commit comments

Comments
 (0)