mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Fix some warnings
This commit is contained in:
parent
cc91916574
commit
6a69a6e197
4 changed files with 22 additions and 20 deletions
|
|
@ -8,8 +8,8 @@ using Dalamud.IoC.Internal;
|
|||
using Dalamud.Plugin.Services;
|
||||
|
||||
using CSBuddy = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy;
|
||||
using CSUIState = FFXIVClientStructs.FFXIV.Client.Game.UI.UIState;
|
||||
using CSBuddyMember = FFXIVClientStructs.FFXIV.Client.Game.UI.Buddy.BuddyMember;
|
||||
using CSUIState = FFXIVClientStructs.FFXIV.Client.Game.UI.UIState;
|
||||
|
||||
namespace Dalamud.Game.ClientState.Buddy;
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ using System.Diagnostics.CodeAnalysis;
|
|||
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1116:SplitParametersMustStartOnLineAfterDeclaration", Justification = "Reviewed.")]
|
||||
[assembly: SuppressMessage("StyleCop.CSharp.MaintainabilityRules", "SA1402:FileMayOnlyContainASingleType", Justification = "This would be nice, but a big refactor")]
|
||||
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1649:FileNameMustMatchTypeName", Justification = "I don't like this one so much")]
|
||||
[assembly: SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1108:BlockStatementsMustNotContainEmbeddedComments", Justification = "I like having comments in blocks")]
|
||||
|
||||
// ImRAII stuff
|
||||
[assembly: SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1600:ElementsMustBeDocumented", Justification = "Reviewed.", Scope = "namespaceanddescendants", Target = "Dalamud.Interface.Utility.Raii")]
|
||||
|
|
|
|||
|
|
@ -61,6 +61,23 @@ public record DalamudUri
|
|||
/// <inheritdoc/>
|
||||
public override string ToString() => this.rawUri.ToString();
|
||||
|
||||
/// <summary>
|
||||
/// Build a DalamudURI from a given URI.
|
||||
/// </summary>
|
||||
/// <param name="uri">The URI to convert to a Dalamud URI.</param>
|
||||
/// <returns>Returns a DalamudUri.</returns>
|
||||
public static DalamudUri FromUri(Uri uri)
|
||||
{
|
||||
return new DalamudUri(uri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Build a DalamudURI from a URI in string format.
|
||||
/// </summary>
|
||||
/// <param name="uri">The URI to convert to a Dalamud URI.</param>
|
||||
/// <returns>Returns a DalamudUri.</returns>
|
||||
public static DalamudUri FromUri(string uri) => FromUri(new Uri(uri));
|
||||
|
||||
private string[] GetDataSegments()
|
||||
{
|
||||
// reimplementation of the System.URI#Segments, under MIT license.
|
||||
|
|
@ -82,21 +99,4 @@ public record DalamudUri
|
|||
|
||||
return segments.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Build a DalamudURI from a given URI.
|
||||
/// </summary>
|
||||
/// <param name="uri">The URI to convert to a Dalamud URI.</param>
|
||||
/// <returns>Returns a DalamudUri.</returns>
|
||||
public static DalamudUri FromUri(Uri uri)
|
||||
{
|
||||
return new DalamudUri(uri);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Build a DalamudURI from a URI in string format.
|
||||
/// </summary>
|
||||
/// <param name="uri">The URI to convert to a Dalamud URI.</param>
|
||||
/// <returns>Returns a DalamudUri.</returns>
|
||||
public static DalamudUri FromUri(string uri) => FromUri(new Uri(uri));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace Dalamud.Plugin.Services;
|
|||
|
||||
/// <summary>
|
||||
/// A service to allow plugins to subscribe to dalamud:// URIs targeting them. Plugins will receive any URI sent to the
|
||||
/// <code>dalamud://plugin/{PLUGIN_INTERNAL_NAME}/...</code> namespace.
|
||||
/// <c>dalamud://plugin/{PLUGIN_INTERNAL_NAME}/...</c> namespace.
|
||||
/// </summary>
|
||||
[Experimental("DAL_RPC", Message = "This service will be finalized around 7.41 and may change before then.")]
|
||||
public interface IPluginLinkHandler
|
||||
|
|
@ -14,7 +14,8 @@ public interface IPluginLinkHandler
|
|||
/// <summary>
|
||||
/// A delegate containing the received URI.
|
||||
/// </summary>
|
||||
delegate void PluginUriReceived(DalamudUri uri);
|
||||
/// <param name="uri">The URI opened by the user.</param>
|
||||
public delegate void PluginUriReceived(DalamudUri uri);
|
||||
|
||||
/// <summary>
|
||||
/// The event fired when a URI targeting this plugin is received.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue