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) #region cTor(s)
/// <summary> /// <exception cref="InvalidOperationException">
/// Initialize a new instance of <see cref="BizHawkExternalToolUsageAttribute"/> /// <paramref name="usage"/> is <see cref="BizHawkExternalToolUsage.EmulatorSpecific"/> and <paramref name="system"/> is <see cref="CoreSystem.Null"/>, or
/// </summary> /// usage is <see cref="BizHawkExternalToolUsage.GameSpecific"/> and <paramref name="gameHash"/> is blank
/// <param name="usage"><see cref="BizHawkExternalToolUsage"/> i.e. what your external tool is for</param> /// </exception>
/// <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>
public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system, string gameHash) public BizHawkExternalToolUsageAttribute(BizHawkExternalToolUsage usage, CoreSystem system, string gameHash)
{ {
if (usage == BizHawkExternalToolUsage.EmulatorSpecific && system == CoreSystem.Null) if (usage == BizHawkExternalToolUsage.EmulatorSpecific && system == CoreSystem.Null)

View File

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

View File

@ -25,6 +25,7 @@ namespace BizHawk.Client.ApiHawk
/// </summary> /// </summary>
/// <param name="system">What <see cref="SystemInfo"/> this <see cref="Joypad"/> is used for</param> /// <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> /// <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) internal Joypad(SystemInfo system, int player)
{ {
if (player < 1 || player > system.MaxControllers) if (player < 1 || player > system.MaxControllers)