Browse Source

Apply suggestions from code review

Co-authored-by: Armano den Boef <68127614+Rozen4334@users.noreply.github.com>
pull/2136/head
Cenk Ergen GitHub 3 years ago
parent
commit
45ec61e0de
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 6 deletions
  1. +6
    -3
      src/Discord.Net.Core/Interactions/IRouteMatchContainer.cs
  2. +5
    -2
      src/Discord.Net.Core/Interactions/IRouteSegmentMatch.cs
  3. +1
    -1
      src/Discord.Net.Core/Interactions/RouteSegmentMatch.cs

+ 6
- 3
src/Discord.Net.Core/Interactions/IRouteMatchContainer.cs View File

@@ -3,17 +3,20 @@ using System.Collections.Generic;
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Represents a container for temporarily storing CustomId wild card matches of a command name.
/// Represents a container for temporarily storing CustomId wild card matches of a component.
/// </summary> /// </summary>
public interface IRouteMatchContainer public interface IRouteMatchContainer
{ {
/// <summary> /// <summary>
/// Gets the collection of the captured route segments.
/// Gets the collection of captured route segments in this container.
/// </summary> /// </summary>
/// <returns>
/// A collection of captured route segments.
///</returns>
IEnumerable<IRouteSegmentMatch> SegmentMatches { get; } IEnumerable<IRouteSegmentMatch> SegmentMatches { get; }


/// <summary> /// <summary>
/// Sets the <see cref="SegmentMatches"/> propert
/// Sets the <see cref="SegmentMatches"/> property of this container.
/// </summary> /// </summary>
/// <param name="segmentMatches">The collection of captured route segments.</param> /// <param name="segmentMatches">The collection of captured route segments.</param>
void SetSegmentMatches(IEnumerable<IRouteSegmentMatch> segmentMatches); void SetSegmentMatches(IEnumerable<IRouteSegmentMatch> segmentMatches);


+ 5
- 2
src/Discord.Net.Core/Interactions/IRouteSegmentMatch.cs View File

@@ -1,13 +1,16 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Represents an object for storing CustomId a wild card match.
/// Represents an object for storing a CustomId wild card match.
/// </summary> /// </summary>
public interface IRouteSegmentMatch public interface IRouteSegmentMatch
{ {
/// <summary> /// <summary>
/// Gets the captured value.
/// Gets the captured value of this wild card match.
/// </summary> /// </summary>
/// <returns>
/// The value of this wild card.
/// </returns>
string Value { get; } string Value { get; }
} }
} }

+ 1
- 1
src/Discord.Net.Core/Interactions/RouteSegmentMatch.cs View File

@@ -1,7 +1,7 @@
namespace Discord namespace Discord
{ {
/// <summary> /// <summary>
/// Represents an object for storing CustomId wild card matches.
/// Represents an object for storing a CustomId wild card match.
/// </summary> /// </summary>
internal record RouteSegmentMatch : IRouteSegmentMatch internal record RouteSegmentMatch : IRouteSegmentMatch
{ {


Loading…
Cancel
Save