<VersionPrefix>1.3.0</VersionPrefix>
<VersionSuffix>dev</VersionSuffix>
</PropertyGroup>
+
+ <ItemGroup>
+ <AdditionalFiles Include="$(SolutionDir)stylecop.json" />
+ </ItemGroup>
</Project>
}
/// <summary>
- /// The priority of the event listener.
+ /// Gets or sets the priority of the event listener.
/// </summary>
public EventPriority Priority { get; set; }
/// <summary>
- /// The events that the listener is listening to.
+ /// Gets or sets the event that the listener is listening to.
/// </summary>
public Type? Event { get; set; }
/// <summary>
- /// If set to true, the listener will be called regardless of the <see cref="IEventCancelable.IsCancelled" />.
+ /// Gets or sets a value indicating whether the listener will be called regardless of the <see cref="IEventCancelable.IsCancelled" />.
/// </summary>
public bool IgnoreCancelled { get; set; }
}
public interface IPlayerStartMeetingEvent : IPlayerEvent
{
/// <summary>
- /// Gets the player who's body got reported. Is null when the meeting started by Emergency call button
+ /// Gets the player who's body got reported. Is null when the meeting started by Emergency call button.
/// </summary>
IInnerPlayerControl? Body { get; }
}
public interface IEventCancelable : IEvent
{
/// <summary>
- /// True if the event was cancelled.
+ /// Gets or sets a value indicating whether the event was cancelled.
/// </summary>
bool IsCancelled { get; set; }
}
where TListener : IEventListener;
/// <summary>
- /// Returns true if an event with the type <see cref="TEvent" /> is registered.
+ /// Returns true if an event with the type <typeparamref name="TEvent" /> is registered.
/// </summary>
- /// <returns>True if the <see cref="TEvent" /> is registered.</returns>
+ /// <returns>True if the <typeparamref name="TEvent" /> is registered.</returns>
/// <typeparam name="TEvent">Type of the event.</typeparam>
bool IsRegistered<TEvent>()
where TEvent : IEvent;
/// <summary>
- /// Call all the event listeners for the type <see cref="TEvent" />.
+ /// Call all the event listeners for the type <typeparamref name="TEvent" />.
/// </summary>
/// <param name="event">The event argument.</param>
/// <typeparam name="TEvent">Type of the event.</typeparam>
namespace Impostor.Api
{
/// <summary>
- /// Priovides a StreamReader-like api throught extensions
+ /// Priovides a StreamReader-like api throught extensions.
/// </summary>
public static class SpanReaderExtensions
{
}
/// <summary>
- /// Advances the position of <see cref="input" /> by the size of <see cref="T" />.
+ /// Advances the position of <paramref name="input" /> by the size of <typeparamref name="T" />.
/// </summary>
/// <typeparam name="T">Type that will be read.</typeparam>
/// <param name="input">input "stream"/span.</param>
- /// <returns>The original input</returns>
+ /// <returns>The original input.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private static unsafe ReadOnlySpan<byte> Advance<T>(ref ReadOnlySpan<byte> input)
where T : unmanaged
<PackageProjectUrl>https://github.com/Impostor/Impostor</PackageProjectUrl>
<RepositoryType>git</RepositoryType>
<RepositoryUrl>https://github.com/Impostor/Impostor</RepositoryUrl>
+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<ItemGroup>
IDictionary<object, object> Items { get; }
/// <summary>
- /// Gets or sets the current game data of the <see cref="IClient" />.
+ /// Gets the current game data of the <see cref="IClient" />.
/// </summary>
IClientPlayer? Player { get; }
/// The message to show to the player.
/// </param>
/// <param name="message">
- /// Only used when <see cref="reason" /> is set to <see cref="DisconnectReason.Custom" />.
+ /// Only used when <paramref name="reason" /> is set to <see cref="DisconnectReason.Custom" />.
/// </param>
/// <returns>
/// A <see cref="ValueTask" /> representing the asynchronous operation.
bool IsConnected { get; }
/// <summary>
- /// Gets the client of the connection.
+ /// Gets or sets the client of the connection.
/// </summary>
IClient? Client { get; set; }
/// Sends a message writer to the connection.
/// </summary>
/// <param name="writer">The message.</param>
- /// <returns></returns>
+ /// <returns>Task that must be awaited.</returns>
ValueTask SendAsync(IMessageWriter writer);
/// <summary>
/// Disconnects the client and invokes the disconnect handler.
/// </summary>
/// <param name="reason">A reason.</param>
- /// <returns></returns>
+ /// <returns>Task that must be awaited.</returns>
ValueTask DisconnectAsync(string? reason);
}
}
{
/// <summary>
/// Retrieves a <see cref="IMessageWriter" /> from the internal pool.
- /// Make sure to call <see cref="IMessageWriter.Dispose" /> when you are done!
+ /// Make sure to call <see cref="System.IDisposable.Dispose" /> when you are done!.
/// </summary>
/// <param name="sendOption">
/// Whether to send the message as <see cref="MessageType.Reliable" /> or <see cref="MessageType.Unreliable" />.
namespace Impostor.Api.Reactor
{
/// <summary>
- /// Plugin side used in modded handshake
+ /// Plugin side used in modded handshake.
/// </summary>
public enum PluginSide : byte
{
/// </summary>
/// <param name="method">The method.</param>
/// <param name="showParameters">True if the parameters should be included in the name.</param>
- /// <returns>Friendly name of the method</returns>
+ /// <returns>Friendly name of the method.</returns>
public static string GetFriendlyName(this MethodBase method, bool showParameters = true)
{
var str = method.Name;
<CodeAnalysisRuleSet>../ProjectRules.ruleset</CodeAnalysisRuleSet>
<Nullable>enable</Nullable>
<SelfContained>false</SelfContained>
+ <GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup>
public enum ServerReplayVersion
{
/// <summary>
- /// Initial version
+ /// Initial version.
/// </summary>
Initial = 1,
/// <summary>
- /// Latest version
+ /// Latest version.
/// </summary>
Latest = Initial,
}
<RuleSet Name="Impostor" ToolsVersion="10.0">
- <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.OrderingRules">
- <Rule Id="SA1200" Action="None" />
+ <Rules AnalyzerId="Microsoft.CodeAnalysis.CSharp" RuleNamespace="Microsoft.CodeAnalysis.CSharp">
+ <Rule Id="CS1591" Action="Hidden" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.DocumentationRules">
<Rule Id="SA1600" Action="None" />
<Rule Id="SA1309" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.SpacingRules">
- <Rule Id="SA1003" Action="None" />
<Rule Id="SA1009" Action="None" />
</Rules>
</RuleSet>
--- /dev/null
+{
+ "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
+ "settings": {
+ "orderingRules": {
+ "usingDirectivesPlacement": "preserve"
+ },
+ "layoutRules": {
+ "newlineAtEndOfFile": "require"
+ }
+ }
+}