Skip to content

Commit

Permalink
[skip appveyor] test fix of docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby committed Sep 15, 2022
1 parent 39dcd3a commit 31eace1
Show file tree
Hide file tree
Showing 54 changed files with 922 additions and 922 deletions.
2 changes: 1 addition & 1 deletion DisCatSharp.CommandsNext/CommandsNextExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ internal CommandsNextExtension(CommandsNextConfiguration cfg)
/// DO NOT USE THIS MANUALLY.
/// </summary>
/// <param name="client">DO NOT USE THIS MANUALLY.</param>
/// <exception cref="System.InvalidOperationException"/>
/// <exception cref="InvalidOperationException"/>
protected internal override void Setup(DiscordClient client)
{
if (this.Client != null)
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Attributes/DateTimeFormatAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Serialization;

/// <summary>
/// Defines the format for string-serialized <see cref="System.DateTime"/> and <see cref="System.DateTimeOffset"/> objects.
/// Defines the format for string-serialized <see cref="DateTime"/> and <see cref="DateTimeOffset"/> objects.
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class DateTimeFormatAttribute : SerializationAttribute
Expand Down Expand Up @@ -90,7 +90,7 @@ public DateTimeFormatAttribute(string format)
}

/// <summary>
/// <para>Defines which built-in format to use for for <see cref="System.DateTime"/> and <see cref="System.DateTimeOffset"/> serialization.</para>
/// <para>Defines which built-in format to use for for <see cref="DateTime"/> and <see cref="System.DateTimeOffset"/> serialization.</para>
/// <para>See https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings and https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-date-and-time-format-strings for more details.</para>
/// </summary>
public enum DateTimeFormatKind : int
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Attributes/TimeSpanAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
namespace DisCatSharp.Common.Serialization;

/// <summary>
/// <para>Specifies that this <see cref="System.TimeSpan"/> will be serialized as a number of whole seconds.</para>
/// <para>Specifies that this <see cref="TimeSpan"/> will be serialized as a number of whole seconds.</para>
/// <para>This value will always be serialized as a number.</para>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class TimeSpanSecondsAttribute : SerializationAttribute
{ }

/// <summary>
/// <para>Specifies that this <see cref="System.TimeSpan"/> will be serialized as a number of whole milliseconds.</para>
/// <para>Specifies that this <see cref="TimeSpan"/> will be serialized as a number of whole milliseconds.</para>
/// <para>This value will always be serialized as a number.</para>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Attributes/TimeSpanFormatAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Serialization;

/// <summary>
/// Defines the format for string-serialized <see cref="System.TimeSpan"/> objects.
/// Defines the format for string-serialized <see cref="TimeSpan"/> objects.
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class TimeSpanFormatAttribute : SerializationAttribute
Expand Down Expand Up @@ -90,7 +90,7 @@ public TimeSpanFormatAttribute(string format)
}

/// <summary>
/// <para>Defines which built-in format to use for <see cref="System.TimeSpan"/> serialization.</para>
/// <para>Defines which built-in format to use for <see cref="TimeSpan"/> serialization.</para>
/// <para>See https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-timespan-format-strings and https://docs.microsoft.com/en-us/dotnet/standard/base-types/custom-timespan-format-strings for more details.</para>
/// </summary>
public enum TimeSpanFormatKind : int
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Attributes/UnixTimestampAttributes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
namespace DisCatSharp.Common.Serialization;

/// <summary>
/// <para>Specifies that this <see cref="System.DateTime"/> or <see cref="System.DateTimeOffset"/> will be serialized as Unix timestamp seconds.</para>
/// <para>Specifies that this <see cref="DateTime"/> or <see cref="DateTimeOffset"/> will be serialized as Unix timestamp seconds.</para>
/// <para>This value will always be serialized as a number.</para>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
public sealed class UnixSecondsAttribute : SerializationAttribute
{ }

/// <summary>
/// <para>Specifies that this <see cref="System.DateTime"/> or <see cref="System.DateTimeOffset"/> will be serialized as Unix timestamp milliseconds.</para>
/// <para>Specifies that this <see cref="DateTime"/> or <see cref="DateTimeOffset"/> will be serialized as Unix timestamp milliseconds.</para>
/// <para>This value will always be serialized as a number.</para>
/// </summary>
[AttributeUsage(AttributeTargets.Property | AttributeTargets.Field)]
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Common/Types/CharSpanLookupDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
namespace DisCatSharp.Common;

/// <summary>
/// Represents collection of string keys and <typeparamref name="TValue"/> values, allowing the use of <see cref="System.ReadOnlySpan{T}"/> for dictionary operations.
/// Represents collection of string keys and <typeparamref name="TValue"/> values, allowing the use of <see cref="ReadOnlySpan{T}"/> for dictionary operations.
/// </summary>
/// <typeparam name="TValue">Type of items in this dictionary.</typeparam>
public sealed class CharSpanLookupDictionary<TValue> :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace DisCatSharp.Common;

/// <summary>
/// Represents collection of string keys and <typeparamref name="TValue"/> values, allowing the use of <see cref="System.ReadOnlySpan{T}"/> for dictionary operations.
/// Represents collection of string keys and <typeparamref name="TValue"/> values, allowing the use of <see cref="ReadOnlySpan{T}"/> for dictionary operations.
/// </summary>
/// <typeparam name="TValue">Type of items in this dictionary.</typeparam>
public sealed class CharSpanLookupReadOnlyDictionary<TValue> : IReadOnlyDictionary<string, TValue>
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Common/Types/ContinuousMemoryBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public sealed class ContinuousMemoryBuffer<T> : IMemoryBuffer<T> where T : unman
/// Creates a new buffer with a specified segment size, specified number of initially-allocated segments, and supplied memory pool.
/// </summary>
/// <param name="initialSize">Initial size of the buffer in bytes. Defaults to 64KiB.</param>
/// <param name="memPool">Memory pool to use for renting buffers. Defaults to <see cref="System.Buffers.MemoryPool{T}.Shared"/>.</param>
/// <param name="memPool">Memory pool to use for renting buffers. Defaults to <see cref="MemoryPool{T}.Shared"/>.</param>
/// <param name="clearOnDispose">Determines whether the underlying buffers should be cleared on exit. If dealing with sensitive data, it might be a good idea to set this option to true.</param>
public ContinuousMemoryBuffer(int initialSize = 65536, MemoryPool<byte> memPool = default, bool clearOnDispose = false)
{
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Common/Types/MemoryBuffer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public sealed class MemoryBuffer<T> : IMemoryBuffer<T> where T : unmanaged
/// </summary>
/// <param name="segmentSize">Byte size of an individual segment. Defaults to 64KiB.</param>
/// <param name="initialSegmentCount">Number of segments to allocate. Defaults to 0.</param>
/// <param name="memPool">Memory pool to use for renting buffers. Defaults to <see cref="System.Buffers.MemoryPool{T}.Shared"/>.</param>
/// <param name="memPool">Memory pool to use for renting buffers. Defaults to <see cref="MemoryPool{T}.Shared"/>.</param>
/// <param name="clearOnDispose">Determines whether the underlying buffers should be cleared on exit. If dealing with sensitive data, it might be a good idea to set this option to true.</param>
public MemoryBuffer(int segmentSize = 65536, int initialSegmentCount = 0, MemoryPool<byte> memPool = default, bool clearOnDispose = false)
{
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Common/Types/SecureRandom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
namespace DisCatSharp.Common;

/// <summary>
/// Provides a cryptographically-secure pseudorandom number generator (CSPRNG) implementation compatible with <see cref="System.Random"/>.
/// Provides a cryptographically-secure pseudorandom number generator (CSPRNG) implementation compatible with <see cref="Random"/>.
/// </summary>
public sealed class SecureRandom : Random, IDisposable
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
namespace DisCatSharp.Common.Serialization;

/// <summary>
/// Decomposes <see cref="System.Numerics.Complex"/> numbers into tuples (arrays of 2).
/// Decomposes <see cref="Complex"/> numbers into tuples (arrays of 2).
/// </summary>
public sealed class ComplexDecomposer : IDecomposer
{
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Utilities/AsyncEvent/AsyncEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public sealed class AsyncEvent<TSender, TArgs> : AsyncEvent
where TArgs : AsyncEventArgs
{
/// <summary>
/// Gets the maximum allotted execution time for all handlers. Any event which causes the handler to time out
/// Gets the maximum allotted execution time for all handlers. Any event which causes the handler to time out
/// will raise a non-fatal <see cref="AsyncEventTimeoutException{TSender, TArgs}"/>.
/// </summary>
public TimeSpan MaximumExecutionTime { get; }
Expand All @@ -69,7 +69,7 @@ public sealed class AsyncEvent<TSender, TArgs> : AsyncEvent
/// Creates a new asynchronous event with specified name and exception handler.
/// </summary>
/// <param name="name">Name of this event.</param>
/// <param name="maxExecutionTime">Maximum handler execution time. A value of <see cref="System.TimeSpan.Zero"/> means infinite.</param>
/// <param name="maxExecutionTime">Maximum handler execution time. A value of <see cref="TimeSpan.Zero"/> means infinite.</param>
/// <param name="exceptionHandler">Delegate which handles exceptions caused by this event.</param>
public AsyncEvent(string name, TimeSpan maxExecutionTime, AsyncEventExceptionHandler<TSender, TArgs> exceptionHandler)
: base(name)
Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Common/Utilities/AsyncManualResetEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace DisCatSharp.Common.Utilities;

/// <summary>
/// Represents a thread synchronization event that, when signaled, must be reset manually. Unlike <see cref="System.Threading.ManualResetEventSlim"/>, this event is asynchronous.
/// Represents a thread synchronization event that, when signaled, must be reset manually. Unlike <see cref="ManualResetEventSlim"/>, this event is asynchronous.
/// </summary>
public sealed class AsyncManualResetEvent
{
Expand Down
4 changes: 2 additions & 2 deletions DisCatSharp.Common/Utilities/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ namespace DisCatSharp.Common;
public static class Extensions
{
/// <summary>
/// <para>Deconstructs a <see cref="System.Collections.Generic.Dictionary{TKey, TValue}"/> key-value pair item (<see cref="System.Collections.Generic.KeyValuePair{TKey, TValue}"/>) into 2 separate variables.</para>
/// <para>This allows for enumerating over dictionaries in foreach blocks by using a (k, v) tuple as the enumerator variable, instead of having to use a <see cref="System.Collections.Generic.KeyValuePair{TKey, TValue}"/> directly.</para>
/// <para>Deconstructs a <see cref="Dictionary{TKey, TValue}"/> key-value pair item (<see cref="KeyValuePair{TKey, TValue}"/>) into 2 separate variables.</para>
/// <para>This allows for enumerating over dictionaries in foreach blocks by using a (k, v) tuple as the enumerator variable, instead of having to use a <see cref="KeyValuePair{TKey, TValue}"/> directly.</para>
/// </summary>
/// <typeparam name="TKey">Type of dictionary item key.</typeparam>
/// <typeparam name="TValue">Type of dictionary item value.</typeparam>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public async Task PreviousPageAsync()
/// <summary>
/// Gets the buttons async.
/// </summary>
/// <returns><see cref="System.NotSupportedException"/></returns>
/// <returns><see cref="NotSupportedException"/></returns>
#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously
public async Task<IEnumerable<DiscordButtonComponent>> GetButtonsAsync()
#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously
Expand Down
14 changes: 7 additions & 7 deletions DisCatSharp.Interactivity/Extensions/ChannelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static class ChannelExtensions
/// <param name="channel">The channel to monitor.</param>
/// <param name="predicate">A predicate that should return <see langword="true"/> if a message matches.</param>
/// <param name="timeoutOverride">Overrides the timeout set in <see cref="InteractivityConfiguration.Timeout"/></param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel channel, Func<DiscordMessage, bool> predicate, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).WaitForMessageAsync(msg => msg.ChannelId == channel.Id && predicate(msg), timeoutOverride);

Expand All @@ -52,7 +52,7 @@ public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this
/// </summary>
/// <param name="channel">The channel to monitor.</param>
/// <param name="timeoutOverride">Overrides the timeout set in <see cref="InteractivityConfiguration.Timeout"/></param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel channel, TimeSpan? timeoutOverride = null)
=> channel.GetNextMessageAsync(msg => true, timeoutOverride);

Expand All @@ -62,7 +62,7 @@ public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this
/// <param name="channel">The channel to monitor.</param>
/// <param name="user">The target user.</param>
/// <param name="timeoutOverride">Overrides the timeout set in <see cref="InteractivityConfiguration.Timeout"/></param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this DiscordChannel channel, DiscordUser user, TimeSpan? timeoutOverride = null)
=> channel.GetNextMessageAsync(msg => msg.Author.Id == user.Id, timeoutOverride);

Expand All @@ -72,7 +72,7 @@ public static Task<InteractivityResult<DiscordMessage>> GetNextMessageAsync(this
/// <param name="channel">The target channel.</param>
/// <param name="user">The target user.</param>
/// <param name="timeoutOverride">Overrides the timeout set in <see cref="InteractivityConfiguration.Timeout"/></param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task<InteractivityResult<TypingStartEventArgs>> WaitForUserTypingAsync(this DiscordChannel channel, DiscordUser user, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).WaitForUserTypingAsync(user, channel, timeoutOverride);

Expand All @@ -87,7 +87,7 @@ public static Task<InteractivityResult<TypingStartEventArgs>> WaitForUserTypingA
/// <param name="behaviour">Pagination behaviour (when hitting max and min indices).</param>
/// <param name="deletion">Deletion behaviour.</param>
/// <param name="timeoutOverride">Override timeout period.</param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationEmojis emojis, PaginationBehaviour? behaviour = default, PaginationDeletion? deletion = default, TimeSpan? timeoutOverride = null)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, emojis, behaviour, deletion, timeoutOverride);

Expand All @@ -101,7 +101,7 @@ public static Task SendPaginatedMessageAsync(this DiscordChannel channel, Discor
/// <param name="behaviour">Pagination behaviour.</param>
/// <param name="deletion">Deletion behaviour</param>
/// <param name="token">A custom cancellation token that can be cancelled at any point.</param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationButtons buttons, PaginationBehaviour? behaviour = default, ButtonPaginationBehavior? deletion = default, CancellationToken token = default)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, buttons, behaviour, deletion, token);

Expand All @@ -119,7 +119,7 @@ public static Task SendPaginatedMessageAsync(this DiscordChannel channel, Discor
/// <param name="behaviour">Pagination behaviour.</param>
/// <param name="deletion">Deletion behaviour.</param>
/// <param name="timeoutOverride">Override timeout period.</param>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity is not enabled for the client associated with the channel.</exception>
public static Task SendPaginatedMessageAsync(this DiscordChannel channel, DiscordUser user, IEnumerable<Page> pages, PaginationButtons buttons, TimeSpan? timeoutOverride, PaginationBehaviour? behaviour = default, ButtonPaginationBehavior? deletion = default)
=> GetInteractivity(channel).SendPaginatedMessageAsync(channel, user, pages, buttons, timeoutOverride, behaviour, deletion);

Expand Down
2 changes: 1 addition & 1 deletion DisCatSharp.Interactivity/Extensions/ClientExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public static class ClientExtensions
/// <param name="client">The client to enable interactivity for.</param>
/// <param name="configuration">A configuration instance. Default configuration values will be used if none is provided.</param>
/// <returns>A brand new <see cref="InteractivityExtension"/> instance.</returns>
/// <exception cref="System.InvalidOperationException">Thrown if interactivity has already been enabled for the client instance.</exception>
/// <exception cref="InvalidOperationException">Thrown if interactivity has already been enabled for the client instance.</exception>
public static InteractivityExtension UseInteractivity(this DiscordClient client, InteractivityConfiguration configuration = null)
{
if (client.GetExtension<InteractivityExtension>() != null) throw new InvalidOperationException($"Interactivity is already enabled for this {(client.IsShard ? "shard" : "client")}.");
Expand Down
Loading

0 comments on commit 31eace1

Please sign in to comment.