Improve exception docs in BizHawk.Client.ApiHawk

This commit is contained in:
YoshiRulz 2020-01-01 08:56:15 +10:00
parent a8408ed3be
commit 89b475661a
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
3 changed files with 8 additions and 10 deletions

View File

@ -11,12 +11,10 @@ namespace BizHawk.Client.ApiHawk
{
#region cTor(s)
/// <summary>
/// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/>
/// </summary>
/// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param>
/// <param name="system"><see cref="CoreSystem"/> that your external tool is used for</param>
/// <param name="gameHash">The game hash, unique game ID (see in the game database)</param>
/// <exception cref="InvalidOperationException">
/// <paramref name="usage"/> is <see cref="BizHawkExternalToolUsage.EmulatorSpecific"/> and <paramref name="system"/> is <see cref="CoreSystem.Null"/>, or
/// usage is <see cref="BizHawkExternalToolUsage.GameSpecific"/> and <paramref name="gameHash"/> is blank
/// </exception>
public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system, string gameHash)
{
if (usage == BizHawkExternalToolUsage.EmulatorSpecific && system == CoreSystem.Null)

View File

@ -30,10 +30,9 @@ namespace BizHawk.Client.ApiHawk
_apis = libs;
}
/// <summary>
/// the client can call this to register an additional Api
/// </summary>
/// <typeparam name="T">The <seealso cref="IExternalApi"/> to register</typeparam>
/// <summary>the client can call this to register an additional API</summary>
/// <typeparam name="T">the type, inheriting <see cref="IExternalApi"/>, to be registered</typeparam>
/// <exception cref="ArgumentNullException"><paramref name="api"/> is null</exception>
public void Register<T>(T api)
where T : IExternalApi
{

View File

@ -25,6 +25,7 @@ namespace BizHawk.Client.ApiHawk
/// </summary>
/// <param name="system">What <see cref="SystemInfo"/> this <see cref="Joypad"/> is used for</param>
/// <param name="player">Which player this controller is assigned to</param>
/// <exception cref="IndexOutOfRangeException"><paramref name="player"/> not in range <c>1..max</c> where <c>max</c> is <paramref name="system"/>.<see cref="SystemInfo.MaxControllers"/></exception>
internal Joypad(SystemInfo system, int player)
{
if (player < 1 || player > system.MaxControllers)