From 99260d274668e29990e8c6404ca4cd4656574dc3 Mon Sep 17 00:00:00 2001 From: YoshiRulz Date: Tue, 27 Jul 2021 14:53:04 +1000 Subject: [PATCH] Add DocumentationAnalyzers from NuGet and fix syntax in docs --- Common.ruleset | 53 +++++++++++++++++++ .../movie/MovieService.cs | 2 +- .../tools/Watch/WatchDisplayType.cs | 2 +- .../CustomControls/InputRoll/Cell.cs | 2 +- src/BizHawk.Client.EmuHawk/MainForm.cs | 6 +-- src/BizHawk.Common/BizHawk.Common.csproj | 1 + .../CallbackBasedTraceBuffer.cs | 8 +-- .../MemoryBasedInputCallbackSystem.cs | 6 +-- src/BizHawk.Emulation.Common/CoreComms.cs | 2 +- src/BizHawk.Emulation.Common/Enums.cs | 4 +- .../Interfaces/IEmulator.cs | 7 +-- .../Interfaces/IEmulatorService.cs | 2 +- .../Interfaces/IEmulatorServiceProvider.cs | 7 ++- .../Interfaces/IInputCallbackSystem.cs | 3 +- .../Interfaces/IMemoryCallbackSystem.cs | 5 +- .../Interfaces/Services/IBoardInfo.cs | 3 +- .../Interfaces/Services/IDisassemblable.cs | 4 +- .../Interfaces/Services/IVideoProvider.cs | 8 +-- .../Sound/SpeexResampler.cs | 2 +- 19 files changed, 86 insertions(+), 41 deletions(-) diff --git a/Common.ruleset b/Common.ruleset index 774788799b..4b405cb12b 100644 --- a/Common.ruleset +++ b/Common.ruleset @@ -1,5 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/BizHawk.Client.Common/movie/MovieService.cs b/src/BizHawk.Client.Common/movie/MovieService.cs index 909cd7d97e..3cd93c1aeb 100644 --- a/src/BizHawk.Client.Common/movie/MovieService.cs +++ b/src/BizHawk.Client.Common/movie/MovieService.cs @@ -12,7 +12,7 @@ namespace BizHawk.Client.Common public static string TasMovieExtension => TasMovie.Extension; /// - /// Gets a list of extensions for all implementations + /// Gets a list of extensions for all implementations /// public static IEnumerable MovieExtensions => new[] { Bk2Movie.Extension, TasMovie.Extension }; diff --git a/src/BizHawk.Client.Common/tools/Watch/WatchDisplayType.cs b/src/BizHawk.Client.Common/tools/Watch/WatchDisplayType.cs index 9937d5a28e..efc156ca6c 100644 --- a/src/BizHawk.Client.Common/tools/Watch/WatchDisplayType.cs +++ b/src/BizHawk.Client.Common/tools/Watch/WatchDisplayType.cs @@ -54,7 +54,7 @@ FixedPoint_16_16, /// - /// The traditional float type as in C++ + /// The traditional float type as in C++ /// Used only by as it is 32 bits length /// Float diff --git a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/Cell.cs b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/Cell.cs index e12f8167a8..d5984006c8 100644 --- a/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/Cell.cs +++ b/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/Cell.cs @@ -3,7 +3,7 @@ namespace BizHawk.Client.EmuHawk { /// - /// Represents a single cell of the + /// Represents a single cell of the /// public class Cell { diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index 417445d5aa..c41057f60f 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -821,10 +821,10 @@ namespace BizHawk.Client.EmuHawk /// /// Saving a no-framebuffer state that is stored in RAM /// Emulating forth for some frames with updates disabled - /// + /// /// Optionally hacking in-game memory /// (like camera position, to show off-screen areas) - /// + /// /// Updating the screen /// Loading the no-framebuffer state from RAM /// @@ -3232,7 +3232,7 @@ namespace BizHawk.Client.EmuHawk /// /// start AVI recording, unattended /// - /// match the short name of an + /// match the short name of an /// filename to save to private void RecordAv(string videoWriterName, string filename) { diff --git a/src/BizHawk.Common/BizHawk.Common.csproj b/src/BizHawk.Common/BizHawk.Common.csproj index 2ceb4e6999..551993da1d 100644 --- a/src/BizHawk.Common/BizHawk.Common.csproj +++ b/src/BizHawk.Common/BizHawk.Common.csproj @@ -10,6 +10,7 @@ + diff --git a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs index 8a40f208ed..4b515e2e54 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/CallbackBasedTraceBuffer.cs @@ -7,16 +7,12 @@ using System.Linq; namespace BizHawk.Emulation.Common { /// - /// An implementation of that is implementation using only methods - /// from , , and + /// An implementation of that is implementation using only methods + /// from , , and /// Useful for ported cores that have these hooks but no trace logging hook, /// This allows for a traceable implementation without the need for additional API /// Note that this technique will always be significantly slower than a direct implementation /// - /// - /// - /// - /// public abstract class CallbackBasedTraceBuffer : ITraceable { /// does not provide memory callback support or does not implement diff --git a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs index 7b384e5458..068cc60b1f 100644 --- a/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Base Implementations/MemoryBasedInputCallbackSystem.cs @@ -7,13 +7,11 @@ using System.Collections.Generic; namespace BizHawk.Emulation.Common { /// - /// An implementation of that is implementation using only methods - /// from , + /// An implementation of that is implementation using only methods + /// from , /// Useful for ported cores that have these hooks but no input callback hook, /// This allows for an input callback implementation without the need for additional APIs /// - /// - /// public class MemoryBasedInputCallbackSystem : IInputCallbackSystem { private readonly List _inputCallbacks = new List(); diff --git a/src/BizHawk.Emulation.Common/CoreComms.cs b/src/BizHawk.Emulation.Common/CoreComms.cs index 872d91cfde..fb11ca3d08 100644 --- a/src/BizHawk.Emulation.Common/CoreComms.cs +++ b/src/BizHawk.Emulation.Common/CoreComms.cs @@ -7,7 +7,7 @@ namespace BizHawk.Emulation.Common /// /// This object facilitates communications between client and core /// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use - /// Any communications that can be described as purely a Core -> Client system, should be provided as an instead + /// Any communications that can be described as purely a Core -> Client system, should be provided as an instead /// It is important that by design this class stay immutable /// public class CoreComm diff --git a/src/BizHawk.Emulation.Common/Enums.cs b/src/BizHawk.Emulation.Common/Enums.cs index fe53ceeed3..d5355850bd 100644 --- a/src/BizHawk.Emulation.Common/Enums.cs +++ b/src/BizHawk.Emulation.Common/Enums.cs @@ -1,7 +1,7 @@ namespace BizHawk.Emulation.Common { /// - /// DisplayType, used in + /// DisplayType, used in /// public enum DisplayType { @@ -11,7 +11,7 @@ } /// - /// The type/increment of stepping in the Step method of + /// The type/increment of stepping in the Step method of /// public enum StepType { diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs index aab2fbc74c..1dc0f78735 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulator.cs @@ -30,12 +30,13 @@ namespace BizHawk.Emulation.Common /// Runs the emulator core for 1 frame /// note that (some?) cores expect you to call SoundProvider.GetSamples() after each FrameAdvance() /// please do this, even when = false - /// The instance that the core will use for input. - /// The provided by the client must provide the buttons specified by the core through the property + /// + /// + /// The instance that the core will use for input. + /// The provided by the client must provide the buttons specified by the core through the property /// /// Whether or not to render video, cores will pass false here in cases such as frame skipping /// Whether or not to render audio, cores will pass here false here in cases such as fast forwarding where bypassing sound may improve speed - /// bool FrameAdvance(IController controller, bool render, bool renderSound = true); /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs index cd2b2e2394..d528d828b1 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorService.cs @@ -1,7 +1,7 @@ namespace BizHawk.Emulation.Common { /// - /// This interface specifies that an interface or implementation is a emulator core service, such as , + /// This interface specifies that an interface or implementation is a emulator core service, such as , /// but is an optional part of the core functionality /// Clients should gracefully handle an IEmulator that has a missing or partial implementation of one of these services /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs index 4d6214b623..18b2a12a5e 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs @@ -6,7 +6,7 @@ using System.Collections.Generic; namespace BizHawk.Emulation.Common { /// - /// This interface defines the mechanism by which clients can retrieve + /// This interface defines the mechanism by which clients can retrieve /// from an IEmulator implementation /// An implementation should collect all available IEmulatorService instances. /// This interface defines only the client interaction. This interface does not specify the means @@ -14,13 +14,12 @@ namespace BizHawk.Emulation.Common /// by design must provide this mechanism /// /// - /// public interface IEmulatorServiceProvider { /// /// Returns whether or not T is available /// - /// The to check + /// The to check bool HasService() where T : IEmulatorService; /// @@ -32,7 +31,7 @@ namespace BizHawk.Emulation.Common /// Returns an instance of T if T is available /// Else returns null /// - /// The requested + /// The requested T GetService() where T : IEmulatorService; /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs b/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs index b14cc14e70..2ebc287991 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IInputCallbackSystem.cs @@ -6,11 +6,10 @@ using System.Collections.Generic; namespace BizHawk.Emulation.Common { /// - /// This is a property of , and defines the means by which a client + /// This is a property of , and defines the means by which a client /// gets and sets input callbacks in the core. An input callback should fire any time input is /// polled by the core /// - /// public interface IInputCallbackSystem : ICollection { /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs index 79e57a40f0..36a7169016 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs @@ -9,11 +9,10 @@ namespace BizHawk.Emulation.Common public delegate void MemoryCallbackDelegate(uint address, uint value, uint flags); /// - /// This is a property of , and defines the means by which a client + /// This is a property of , and defines the means by which a client /// gets and sets memory callbacks in the core. A memory callback should fire any time memory is /// read/written/executed by the core, and depends on the type specified by the callback /// - /// public interface IMemoryCallbackSystem : IEnumerable { /* @@ -91,7 +90,7 @@ namespace BizHawk.Emulation.Common /// /// A list of available "scopes" (memory domains, cpus, etc) that a the property of the can have - /// Passing a into the method that is not in this list will result in an + /// Passing a into the method that is not in this list will result in an /// string[] AvailableScopes { get; } } diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IBoardInfo.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IBoardInfo.cs index 9e58fd1f11..7eb530db8c 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IBoardInfo.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IBoardInfo.cs @@ -1,11 +1,10 @@ namespace BizHawk.Emulation.Common { /// - /// An that returns cart/mapper/board information about the Game hardware itself, if available + /// An that returns cart/mapper/board information about the Game hardware itself, if available /// Currently the board name is the only property but this could be expanded to support more detailed information /// /// - /// public interface IBoardInfo : IEmulatorService { /// diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs index 777860cef8..8fea39a8d4 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs @@ -9,13 +9,13 @@ namespace BizHawk.Emulation.Common /// /// This service provides the means to generate disassembly by the core for a given CPU and memory domain /// Tools such the debugger use this, but also LUA scripting, and tools like trace logging and code data logging can make use of this tool - /// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the service is available + /// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the service is available /// public interface IDisassemblable : IEmulatorService { /// /// Gets or sets the CPUS that will be used to disassemble - /// Only values returned from will be supported when Set + /// Only values returned from will be supported when Set /// string Cpu { get; set; } diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs index d6ecba85e6..20abcc9ebb 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/IVideoProvider.cs @@ -21,7 +21,7 @@ namespace BizHawk.Emulation.Common // 2. aspect ratio is accurate /// - /// Gets a value that together with , describes a metric on the screen + /// Gets a value that together with , describes a metric on the screen /// they should define the smallest size that the buffer can be placed inside such that: /// 1. no actual pixel data is lost /// 2. aspect ratio is accurate @@ -29,7 +29,7 @@ namespace BizHawk.Emulation.Common int VirtualWidth { get; } /// - /// Gets a value that together with , describes a metric on the screen + /// Gets a value that together with , describes a metric on the screen /// they should define the smallest size that the buffer can be placed inside such that: /// 1. no actual pixel data is lost /// 2. aspect ratio is accurate @@ -47,12 +47,12 @@ namespace BizHawk.Emulation.Common int BufferHeight { get; } /// - /// Gets the vsync Numerator. Combined with the can be used to calculate a precise vsync rate. + /// Gets the vsync Numerator. Combined with the can be used to calculate a precise vsync rate. /// int VsyncNumerator { get; } /// - /// Gets the vsync Denominator. Combined with the can be used to calculate a precise vsync rate. + /// Gets the vsync Denominator. Combined with the can be used to calculate a precise vsync rate. /// int VsyncDenominator { get; } diff --git a/src/BizHawk.Emulation.Common/Sound/SpeexResampler.cs b/src/BizHawk.Emulation.Common/Sound/SpeexResampler.cs index 5220752396..01b10fd5e7 100644 --- a/src/BizHawk.Emulation.Common/Sound/SpeexResampler.cs +++ b/src/BizHawk.Emulation.Common/Sound/SpeexResampler.cs @@ -82,7 +82,7 @@ namespace BizHawk.Emulation.Common /// denominator of sample rate change ratio (inrate / outrate) /// sampling rate in, rounded to nearest hz /// sampling rate out, rounded to nearest hz - /// function which accepts output as produced. if null, act as an + /// function which accepts output as produced. if null, act as an /// source to take input from when output is requested. if null, no auto-fetching /// and are both non-null /// unmanaged call failed