From b4e2786adfec1de9c0f739c129118bc13e253625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Breu=C3=9F?= Date: Tue, 28 Jan 2025 17:27:58 +0100 Subject: [PATCH] docs: fix XML documentation warnings --- .../DirectoryBase.cs | 6 ++-- .../DirectoryInfoBase.cs | 9 ++++-- .../DirectoryInfoFactory.cs | 4 ++- .../DirectoryInfoWrapper.cs | 7 +++-- .../DirectoryWrapper.cs | 2 +- .../DriveInfoBase.cs | 7 +++-- .../DriveInfoFactory.cs | 3 ++ .../FileBase.cs | 4 ++- .../FileInfoBase.cs | 12 ++++---- .../FileInfoFactory.cs | 4 ++- .../FileInfoWrapper.cs | 6 ++-- .../FileStreamAclExtensions.cs | 3 +- .../FileStreamFactory.cs | 3 ++ .../FileSystemInfoBase.cs | 4 ++- .../FileSystemWatcherBase.cs | 30 ++++++++++++++----- .../FileSystemWatcherFactory.cs | 4 ++- .../FileSystemWatcherWrapper.cs | 18 +++++------ .../FileVersionInfoBase.cs | 6 ++-- .../FileVersionInfoFactory.cs | 4 ++- .../PathBase.cs | 8 ++--- .../PathWrapper.cs | 4 +-- 21 files changed, 94 insertions(+), 54 deletions(-) diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryBase.cs index d88a3e432..5db0fef8b 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryBase.cs @@ -1,6 +1,4 @@ using System.Collections.Generic; -using System.Runtime.Versioning; -using System.Security.AccessControl; namespace System.IO.Abstractions { @@ -10,7 +8,9 @@ namespace System.IO.Abstractions #endif public abstract class DirectoryBase : IDirectory { - /// + /// + /// Base class for calling static methods of + /// protected DirectoryBase(IFileSystem fileSystem) { FileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoBase.cs index b9d31459d..48cc7b025 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoBase.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using System.Security.AccessControl; namespace System.IO.Abstractions { @@ -9,7 +8,9 @@ namespace System.IO.Abstractions #endif public abstract class DirectoryInfoBase : FileSystemInfoBase, IDirectoryInfo { - /// + /// + /// Base class for calling methods of + /// protected DirectoryInfoBase(IFileSystem fileSystem) : base(fileSystem) { } @@ -120,7 +121,9 @@ internal DirectoryInfoBase() { } /// public abstract IDirectoryInfo Root { get; } - /// + /// + /// Implicitly converts a to a . + /// public static implicit operator DirectoryInfoBase(DirectoryInfo directoryInfo) { if (directoryInfo == null) diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoFactory.cs index 326d8faf2..dc872bf16 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoFactory.cs @@ -7,7 +7,9 @@ internal class DirectoryInfoFactory : IDirectoryInfoFactory { private readonly IFileSystem fileSystem; - /// + /// + /// Base factory class for creating a + /// public DirectoryInfoFactory(IFileSystem fileSystem) { this.fileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoWrapper.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoWrapper.cs index 5b933bba6..f905a651e 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoWrapper.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryInfoWrapper.cs @@ -1,12 +1,11 @@ using System.Collections.Generic; -using System.IO.Pipes; using System.Linq; using System.Runtime.Versioning; using System.Security.AccessControl; namespace System.IO.Abstractions { - /// + /// #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -14,7 +13,9 @@ public class DirectoryInfoWrapper : DirectoryInfoBase, IFileSystemAclSupport { private readonly DirectoryInfo instance; - /// + /// + /// Wrapper class for calling methods of + /// public DirectoryInfoWrapper(IFileSystem fileSystem, DirectoryInfo instance) : base(fileSystem) { this.instance = instance ?? throw new ArgumentNullException(nameof(instance)); diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryWrapper.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryWrapper.cs index 05ae91821..72544a50b 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryWrapper.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DirectoryWrapper.cs @@ -3,7 +3,7 @@ namespace System.IO.Abstractions { - /// + /// #if FEATURE_SERIALIZABLE [Serializable] #endif diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoBase.cs index 14ac46b76..a01699525 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoBase.cs @@ -6,7 +6,9 @@ #endif public abstract class DriveInfoBase : IDriveInfo { - /// + /// + /// Base class for calling methods of + /// protected DriveInfoBase(IFileSystem fileSystem) { FileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); @@ -48,9 +50,8 @@ internal DriveInfoBase() { } public abstract string VolumeLabel { get; set; } /// - /// Converts a into a . + /// Implicitly converts a to a . /// - /// The drive info to be converted. public static implicit operator DriveInfoBase(DriveInfo driveInfo) { if (driveInfo == null) diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoFactory.cs index edbc9cf72..fc1b2bc04 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/DriveInfoFactory.cs @@ -7,6 +7,9 @@ internal class DriveInfoFactory : IDriveInfoFactory { private readonly IFileSystem fileSystem; + /// + /// Base factory class for creating a + /// public DriveInfoFactory(IFileSystem fileSystem) { this.fileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileBase.cs index d5c7234a6..43aa10e43 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileBase.cs @@ -10,7 +10,9 @@ namespace System.IO.Abstractions #endif public abstract partial class FileBase : IFile { - /// + /// + /// Base class for calling static methods of + /// protected FileBase(IFileSystem fileSystem) { FileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoBase.cs index ca4df775b..dcde4879c 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoBase.cs @@ -1,6 +1,4 @@ -using System.Security.AccessControl; - -namespace System.IO.Abstractions +namespace System.IO.Abstractions { /// #if FEATURE_SERIALIZABLE @@ -8,7 +6,9 @@ namespace System.IO.Abstractions #endif public abstract class FileInfoBase : FileSystemInfoBase, IFileInfo { - /// + /// + /// Base class for calling methods of + /// protected FileInfoBase(IFileSystem fileSystem) : base(fileSystem) { } @@ -86,7 +86,9 @@ internal FileInfoBase() { } /// public abstract long Length { get; } - /// + /// + /// Implicitly converts a to a . + /// public static implicit operator FileInfoBase(FileInfo fileInfo) { if (fileInfo == null) diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoFactory.cs index afa3b5c62..f4e2b3a58 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoFactory.cs @@ -7,7 +7,9 @@ internal class FileInfoFactory : IFileInfoFactory { private readonly IFileSystem fileSystem; - /// + /// + /// Base factory class for creating a + /// public FileInfoFactory(IFileSystem fileSystem) { this.fileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoWrapper.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoWrapper.cs index 2cc1231a7..34b953a15 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoWrapper.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoWrapper.cs @@ -3,7 +3,7 @@ namespace System.IO.Abstractions { - /// + /// #if FEATURE_SERIALIZABLE [Serializable] #endif @@ -11,7 +11,9 @@ public class FileInfoWrapper : FileInfoBase, IFileSystemAclSupport { private readonly FileInfo instance; - /// + /// + /// Wrapper class for calling methods of + /// public FileInfoWrapper(IFileSystem fileSystem, FileInfo instance) : base(fileSystem) { this.instance = instance ?? throw new ArgumentNullException(nameof(instance)); diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamAclExtensions.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamAclExtensions.cs index 958e54ccc..9d9da9fb5 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamAclExtensions.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamAclExtensions.cs @@ -1,5 +1,4 @@ -using System.Reflection; -using System.Runtime.Versioning; +using System.Runtime.Versioning; using System.Security.AccessControl; namespace System.IO.Abstractions diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamFactory.cs index 309ca8e2e..f114d84bf 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileStreamFactory.cs @@ -7,6 +7,9 @@ namespace System.IO.Abstractions #endif internal sealed class FileStreamFactory : IFileStreamFactory { + /// + /// Base factory class for creating a + /// public FileStreamFactory(IFileSystem fileSystem) { FileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemInfoBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemInfoBase.cs index 9ada81b2d..b98a89ffe 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemInfoBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemInfoBase.cs @@ -8,7 +8,9 @@ namespace System.IO.Abstractions #endif public abstract class FileSystemInfoBase : IFileSystemInfo { - /// + /// + /// Base class for calling methods of + /// protected FileSystemInfoBase(IFileSystem fileSystem) { FileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem)); diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherBase.cs index c59147dc1..f44ed657e 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherBase.cs @@ -25,7 +25,7 @@ public abstract class FileSystemWatcherBase : IFileSystemWatcher #if FEATURE_FILE_SYSTEM_WATCHER_FILTERS /// - public abstract System.Collections.ObjectModel.Collection Filters { get; } + public abstract Collections.ObjectModel.Collection Filters { get; } #endif /// @@ -82,7 +82,9 @@ public void Dispose() public abstract IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeSpan timeout); #endif - /// + /// + /// Implicitly converts a to a . + /// public static implicit operator FileSystemWatcherBase(FileSystemWatcher watcher) { if (watcher == null) @@ -93,37 +95,49 @@ public static implicit operator FileSystemWatcherBase(FileSystemWatcher watcher) return new FileSystemWatcherWrapper(new FileSystem(), watcher); } - /// + /// + /// Callback executed during + /// public virtual void Dispose(bool disposing) { // do nothing } - /// + /// + /// Invokes the event. + /// protected void OnCreated(object sender, FileSystemEventArgs args) { Created?.Invoke(sender, args); } - /// + /// + /// Invokes the event. + /// protected void OnChanged(object sender, FileSystemEventArgs args) { Changed?.Invoke(sender, args); } - /// + /// + /// Invokes the event. + /// protected void OnDeleted(object sender, FileSystemEventArgs args) { Deleted?.Invoke(sender, args); } - /// + /// + /// Invokes the event. + /// protected void OnRenamed(object sender, RenamedEventArgs args) { Renamed?.Invoke(sender, args); } - /// + /// + /// Invokes the event. + /// protected void OnError(object sender, ErrorEventArgs args) { Error?.Invoke(sender, args); diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherFactory.cs index e12c9e1ac..dbd47ad5b 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherFactory.cs @@ -6,7 +6,9 @@ #endif public class FileSystemWatcherFactory : IFileSystemWatcherFactory { - /// + /// + /// Base factory class for creating a + /// public FileSystemWatcherFactory(IFileSystem fileSystem) { FileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherWrapper.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherWrapper.cs index b7fac4af1..5900b75c5 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherWrapper.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileSystemWatcherWrapper.cs @@ -76,7 +76,7 @@ public override string Filter #if FEATURE_FILE_SYSTEM_WATCHER_FILTERS /// - public override System.Collections.ObjectModel.Collection Filters + public override Collections.ObjectModel.Collection Filters { get { return watcher.Filters; } } @@ -168,33 +168,33 @@ public override IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeTy private readonly struct WaitForChangedResultWrapper : IWaitForChangedResult, IEquatable { - private readonly WaitForChangedResult _instance; + private readonly WaitForChangedResult instance; public WaitForChangedResultWrapper(WaitForChangedResult instance) { - _instance = instance; + this.instance = instance; } /// public WatcherChangeTypes ChangeType - => _instance.ChangeType; + => instance.ChangeType; /// public string Name - => _instance.Name; + => instance.Name; /// public string OldName - => _instance.OldName; + => instance.OldName; /// public bool TimedOut - => _instance.TimedOut; + => instance.TimedOut; /// public bool Equals(WaitForChangedResultWrapper other) { - return _instance.Equals(other._instance); + return instance.Equals(other.instance); } /// @@ -207,7 +207,7 @@ public override bool Equals(object obj) /// public override int GetHashCode() { - return _instance.GetHashCode(); + return instance.GetHashCode(); } } } diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoBase.cs index d8dd87683..ff817905a 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoBase.cs @@ -89,7 +89,9 @@ public abstract class FileVersionInfoBase : IFileVersionInfo /// public abstract string SpecialBuild { get; } - /// + /// + /// Implicitly converts a to a . + /// public static implicit operator FileVersionInfoBase(FileVersionInfo fileVersionInfo) { if (fileVersionInfo == null) @@ -100,7 +102,7 @@ public static implicit operator FileVersionInfoBase(FileVersionInfo fileVersionI return new FileVersionInfoWrapper(fileVersionInfo); } - /// + /// public new abstract string ToString(); } } diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoFactory.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoFactory.cs index f3594a28f..457cf3978 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoFactory.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/FileVersionInfoFactory.cs @@ -7,7 +7,9 @@ internal class FileVersionInfoFactory : IFileVersionInfoFactory { private readonly IFileSystem fileSystem; - /// + /// + /// Base factory class for creating a + /// public FileVersionInfoFactory(IFileSystem fileSystem) { this.fileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/PathBase.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/PathBase.cs index e460df76a..31981d7a9 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/PathBase.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/PathBase.cs @@ -1,6 +1,4 @@ -using System.Diagnostics.CodeAnalysis; - -namespace System.IO.Abstractions +namespace System.IO.Abstractions { /// #if FEATURE_SERIALIZABLE @@ -8,7 +6,9 @@ namespace System.IO.Abstractions #endif public abstract class PathBase : IPath { - /// + /// + /// Base class for calling static methods of + /// protected PathBase(IFileSystem fileSystem) { this.FileSystem = fileSystem; diff --git a/src/TestableIO.System.IO.Abstractions.Wrappers/PathWrapper.cs b/src/TestableIO.System.IO.Abstractions.Wrappers/PathWrapper.cs index 230fe6624..6470c5509 100644 --- a/src/TestableIO.System.IO.Abstractions.Wrappers/PathWrapper.cs +++ b/src/TestableIO.System.IO.Abstractions.Wrappers/PathWrapper.cs @@ -1,6 +1,4 @@ -using System.Diagnostics.CodeAnalysis; - -namespace System.IO.Abstractions +namespace System.IO.Abstractions { /// #if FEATURE_SERIALIZABLE