Skip to content

Commit

Permalink
docs: fix XML documentation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vbreuss committed Jan 28, 2025
1 parent 15d0547 commit b4e2786
Show file tree
Hide file tree
Showing 21 changed files with 94 additions and 54 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using System.Collections.Generic;
using System.Runtime.Versioning;
using System.Security.AccessControl;

namespace System.IO.Abstractions
{
Expand All @@ -10,7 +8,9 @@ namespace System.IO.Abstractions
#endif
public abstract class DirectoryBase : IDirectory
{
/// <inheritdoc />
/// <summary>
/// Base class for calling static methods of <see cref="Directory"/>
/// </summary>
protected DirectoryBase(IFileSystem fileSystem)
{
FileSystem = fileSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Security.AccessControl;

namespace System.IO.Abstractions
{
Expand All @@ -9,7 +8,9 @@ namespace System.IO.Abstractions
#endif
public abstract class DirectoryInfoBase : FileSystemInfoBase, IDirectoryInfo
{
/// <inheritdoc />
/// <summary>
/// Base class for calling methods of <see cref="DirectoryInfo"/>
/// </summary>
protected DirectoryInfoBase(IFileSystem fileSystem) : base(fileSystem)
{
}
Expand Down Expand Up @@ -120,7 +121,9 @@ internal DirectoryInfoBase() { }
/// <inheritdoc cref="IDirectoryInfo.Root"/>
public abstract IDirectoryInfo Root { get; }

/// <inheritdoc />
/// <summary>
/// Implicitly converts a <see cref="DirectoryInfo"/> to a <see cref="DirectoryInfoBase"/>.
/// </summary>
public static implicit operator DirectoryInfoBase(DirectoryInfo directoryInfo)
{
if (directoryInfo == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ internal class DirectoryInfoFactory : IDirectoryInfoFactory
{
private readonly IFileSystem fileSystem;

/// <inheritdoc />
/// <summary>
/// Base factory class for creating a <see cref="IDirectoryInfo"/>
/// </summary>
public DirectoryInfoFactory(IFileSystem fileSystem)
{
this.fileSystem = fileSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
using System.Collections.Generic;
using System.IO.Pipes;
using System.Linq;
using System.Runtime.Versioning;
using System.Security.AccessControl;

namespace System.IO.Abstractions
{
/// <inheritdoc />
/// <inheritdoc cref="DirectoryInfoBase" />
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public class DirectoryInfoWrapper : DirectoryInfoBase, IFileSystemAclSupport
{
private readonly DirectoryInfo instance;

/// <inheritdoc />
/// <summary>
/// Wrapper class for calling methods of <see cref="DirectoryInfo"/>
/// </summary>
public DirectoryInfoWrapper(IFileSystem fileSystem, DirectoryInfo instance) : base(fileSystem)
{
this.instance = instance ?? throw new ArgumentNullException(nameof(instance));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace System.IO.Abstractions
{
/// <inheritdoc />
/// <inheritdoc cref="DirectoryBase" />
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#endif
public abstract class DriveInfoBase : IDriveInfo
{
/// <inheritdoc />
/// <summary>
/// Base class for calling methods of <see cref="DriveInfo"/>
/// </summary>
protected DriveInfoBase(IFileSystem fileSystem)
{
FileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
Expand Down Expand Up @@ -48,9 +50,8 @@ internal DriveInfoBase() { }
public abstract string VolumeLabel { get; set; }

/// <summary>
/// Converts a <see cref="DriveInfo"/> into a <see cref="DriveInfoBase"/>.
/// Implicitly converts a <see cref="DriveInfo"/> to a <see cref="DriveInfoBase"/>.
/// </summary>
/// <param name="driveInfo">The drive info to be converted.</param>
public static implicit operator DriveInfoBase(DriveInfo driveInfo)
{
if (driveInfo == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ internal class DriveInfoFactory : IDriveInfoFactory
{
private readonly IFileSystem fileSystem;

/// <summary>
/// Base factory class for creating a <see cref="IDriveInfo"/>
/// </summary>
public DriveInfoFactory(IFileSystem fileSystem)
{
this.fileSystem = fileSystem;
Expand Down
4 changes: 3 additions & 1 deletion src/TestableIO.System.IO.Abstractions.Wrappers/FileBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ namespace System.IO.Abstractions
#endif
public abstract partial class FileBase : IFile
{
///
/// <summary>
/// Base class for calling static methods of <see cref="File"/>
/// </summary>
protected FileBase(IFileSystem fileSystem)
{
FileSystem = fileSystem;
Expand Down
12 changes: 7 additions & 5 deletions src/TestableIO.System.IO.Abstractions.Wrappers/FileInfoBase.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
using System.Security.AccessControl;

namespace System.IO.Abstractions
namespace System.IO.Abstractions
{
/// <inheritdoc cref="FileInfo"/>
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public abstract class FileInfoBase : FileSystemInfoBase, IFileInfo
{
/// <inheritdoc />
/// <summary>
/// Base class for calling methods of <see cref="FileInfo"/>
/// </summary>
protected FileInfoBase(IFileSystem fileSystem) : base(fileSystem)
{
}
Expand Down Expand Up @@ -86,7 +86,9 @@ internal FileInfoBase() { }
/// <inheritdoc cref="IFileInfo.Length"/>
public abstract long Length { get; }

/// <inheritdoc />
/// <summary>
/// Implicitly converts a <see cref="FileInfo"/> to a <see cref="FileInfoBase"/>.
/// </summary>
public static implicit operator FileInfoBase(FileInfo fileInfo)
{
if (fileInfo == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ internal class FileInfoFactory : IFileInfoFactory
{
private readonly IFileSystem fileSystem;

/// <inheritdoc />
/// <summary>
/// Base factory class for creating a <see cref="IFileInfo"/>
/// </summary>
public FileInfoFactory(IFileSystem fileSystem)
{
this.fileSystem = fileSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,17 @@

namespace System.IO.Abstractions
{
/// <inheritdoc />
/// <inheritdoc cref="FileInfoBase" />
#if FEATURE_SERIALIZABLE
[Serializable]
#endif
public class FileInfoWrapper : FileInfoBase, IFileSystemAclSupport
{
private readonly FileInfo instance;

/// <inheritdoc />
/// <summary>
/// Wrapper class for calling methods of <see cref="FileInfo"/>
/// </summary>
public FileInfoWrapper(IFileSystem fileSystem, FileInfo instance) : base(fileSystem)
{
this.instance = instance ?? throw new ArgumentNullException(nameof(instance));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Reflection;
using System.Runtime.Versioning;
using System.Runtime.Versioning;
using System.Security.AccessControl;

namespace System.IO.Abstractions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ namespace System.IO.Abstractions
#endif
internal sealed class FileStreamFactory : IFileStreamFactory
{
/// <summary>
/// Base factory class for creating a <see cref="FileSystemStream"/>
/// </summary>
public FileStreamFactory(IFileSystem fileSystem)
{
FileSystem = fileSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ namespace System.IO.Abstractions
#endif
public abstract class FileSystemInfoBase : IFileSystemInfo
{
///
/// <summary>
/// Base class for calling methods of <see cref="FileSystemInfo"/>
/// </summary>
protected FileSystemInfoBase(IFileSystem fileSystem)
{
FileSystem = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public abstract class FileSystemWatcherBase : IFileSystemWatcher

#if FEATURE_FILE_SYSTEM_WATCHER_FILTERS
/// <inheritdoc cref="FileSystemWatcher.Filters"/>
public abstract System.Collections.ObjectModel.Collection<string> Filters { get; }
public abstract Collections.ObjectModel.Collection<string> Filters { get; }
#endif

/// <inheritdoc cref="FileSystemWatcher.InternalBufferSize"/>
Expand Down Expand Up @@ -82,7 +82,9 @@ public void Dispose()
public abstract IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeType, TimeSpan timeout);
#endif

/// <inheritdoc />
/// <summary>
/// Implicitly converts a <see cref="FileSystemWatcher"/> to a <see cref="FileSystemWatcherBase"/>.
/// </summary>
public static implicit operator FileSystemWatcherBase(FileSystemWatcher watcher)
{
if (watcher == null)
Expand All @@ -93,37 +95,49 @@ public static implicit operator FileSystemWatcherBase(FileSystemWatcher watcher)
return new FileSystemWatcherWrapper(new FileSystem(), watcher);
}

/// <inheritdoc />
/// <summary>
/// Callback executed during <see cref="IDisposable.Dispose()"/>
/// </summary>
public virtual void Dispose(bool disposing)
{
// do nothing
}

/// <inheritdoc />
/// <summary>
/// Invokes the <see cref="Created"/> event.
/// </summary>
protected void OnCreated(object sender, FileSystemEventArgs args)
{
Created?.Invoke(sender, args);
}

/// <inheritdoc />
/// <summary>
/// Invokes the <see cref="Changed"/> event.
/// </summary>
protected void OnChanged(object sender, FileSystemEventArgs args)
{
Changed?.Invoke(sender, args);
}

/// <inheritdoc />
/// <summary>
/// Invokes the <see cref="Deleted"/> event.
/// </summary>
protected void OnDeleted(object sender, FileSystemEventArgs args)
{
Deleted?.Invoke(sender, args);
}

/// <inheritdoc />
/// <summary>
/// Invokes the <see cref="Renamed"/> event.
/// </summary>
protected void OnRenamed(object sender, RenamedEventArgs args)
{
Renamed?.Invoke(sender, args);
}

/// <inheritdoc />
/// <summary>
/// Invokes the <see cref="Error"/> event.
/// </summary>
protected void OnError(object sender, ErrorEventArgs args)
{
Error?.Invoke(sender, args);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
#endif
public class FileSystemWatcherFactory : IFileSystemWatcherFactory
{
///
/// <summary>
/// Base factory class for creating a <see cref="IFileSystemWatcher"/>
/// </summary>
public FileSystemWatcherFactory(IFileSystem fileSystem)
{
FileSystem = fileSystem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public override string Filter

#if FEATURE_FILE_SYSTEM_WATCHER_FILTERS
/// <inheritdoc />
public override System.Collections.ObjectModel.Collection<string> Filters
public override Collections.ObjectModel.Collection<string> Filters
{
get { return watcher.Filters; }
}
Expand Down Expand Up @@ -168,33 +168,33 @@ public override IWaitForChangedResult WaitForChanged(WatcherChangeTypes changeTy
private readonly struct WaitForChangedResultWrapper
: IWaitForChangedResult, IEquatable<WaitForChangedResultWrapper>
{
private readonly WaitForChangedResult _instance;
private readonly WaitForChangedResult instance;

public WaitForChangedResultWrapper(WaitForChangedResult instance)
{
_instance = instance;
this.instance = instance;
}

/// <inheritdoc cref="IWaitForChangedResult.ChangeType" />
public WatcherChangeTypes ChangeType
=> _instance.ChangeType;
=> instance.ChangeType;

/// <inheritdoc cref="IWaitForChangedResult.Name" />
public string Name
=> _instance.Name;
=> instance.Name;

/// <inheritdoc cref="IWaitForChangedResult.OldName" />
public string OldName
=> _instance.OldName;
=> instance.OldName;

/// <inheritdoc cref="IWaitForChangedResult.TimedOut" />
public bool TimedOut
=> _instance.TimedOut;
=> instance.TimedOut;

/// <inheritdoc cref="IEquatable{WaitForChangedResultWrapper}.Equals(WaitForChangedResultWrapper)" />
public bool Equals(WaitForChangedResultWrapper other)
{
return _instance.Equals(other._instance);
return instance.Equals(other.instance);
}

/// <inheritdoc cref="object.Equals(object)" />
Expand All @@ -207,7 +207,7 @@ public override bool Equals(object obj)
/// <inheritdoc cref="object.GetHashCode()" />
public override int GetHashCode()
{
return _instance.GetHashCode();
return instance.GetHashCode();
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public abstract class FileVersionInfoBase : IFileVersionInfo
/// <inheritdoc cref="IFileVersionInfo.SpecialBuild" />
public abstract string SpecialBuild { get; }

/// <inheritdoc />
/// <summary>
/// Implicitly converts a <see cref="FileVersionInfo"/> to a <see cref="FileVersionInfoBase"/>.
/// </summary>
public static implicit operator FileVersionInfoBase(FileVersionInfo fileVersionInfo)
{
if (fileVersionInfo == null)
Expand All @@ -100,7 +102,7 @@ public static implicit operator FileVersionInfoBase(FileVersionInfo fileVersionI
return new FileVersionInfoWrapper(fileVersionInfo);
}

/// <inheritdoc />
/// <inheritdoc cref="FileVersionInfo.ToString()" />
public new abstract string ToString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ internal class FileVersionInfoFactory : IFileVersionInfoFactory
{
private readonly IFileSystem fileSystem;

/// <inheritdoc />
/// <summary>
/// Base factory class for creating a <see cref="IFileVersionInfo"/>
/// </summary>
public FileVersionInfoFactory(IFileSystem fileSystem)
{
this.fileSystem = fileSystem;
Expand Down
Loading

0 comments on commit b4e2786

Please sign in to comment.