Rename Synopsis to Summary to improve clarity
This commit is contained in:
@@ -15,10 +15,10 @@ namespace Discord.Commands
|
||||
|
||||
// Brief summary of method/module/parameter
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Parameter)]
|
||||
public class SynopsisAttribute : Attribute
|
||||
public class SummaryAttribute : Attribute
|
||||
{
|
||||
public string Text { get; }
|
||||
public SynopsisAttribute(string text)
|
||||
public SummaryAttribute(string text)
|
||||
{
|
||||
Text = text;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Discord.Commands
|
||||
|
||||
public string Name { get; }
|
||||
public string Description { get; }
|
||||
public string Synopsis { get; }
|
||||
public string Summary { get; }
|
||||
public string Text { get; }
|
||||
public Module Module { get; }
|
||||
public IReadOnlyList<CommandParameter> Parameters { get; }
|
||||
@@ -32,9 +32,9 @@ namespace Discord.Commands
|
||||
if (description != null)
|
||||
Description = description.Text;
|
||||
|
||||
var synopsis = methodInfo.GetCustomAttribute<SynopsisAttribute>();
|
||||
if (synopsis != null)
|
||||
Synopsis = synopsis.Text;
|
||||
var summary = methodInfo.GetCustomAttribute<SummaryAttribute>();
|
||||
if (summary != null)
|
||||
Summary = summary.Text;
|
||||
|
||||
Parameters = BuildParameters(methodInfo);
|
||||
_action = BuildAction(methodInfo);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Discord.Commands
|
||||
{
|
||||
public CommandService Service { get; }
|
||||
public string Name { get; }
|
||||
public string Synopsis { get; }
|
||||
public string Summary { get; }
|
||||
public string Description { get; }
|
||||
public IEnumerable<Command> Commands { get; }
|
||||
internal object Instance { get; }
|
||||
@@ -20,9 +20,9 @@ namespace Discord.Commands
|
||||
Name = typeInfo.Name;
|
||||
Instance = instance;
|
||||
|
||||
var synopsisAttr = typeInfo.GetCustomAttribute<SynopsisAttribute>();
|
||||
if (synopsisAttr != null)
|
||||
Synopsis = synopsisAttr.Text;
|
||||
var summaryAttr = typeInfo.GetCustomAttribute<SummaryAttribute>();
|
||||
if (summaryAttr != null)
|
||||
Summary = summaryAttr.Text;
|
||||
|
||||
var descriptionAttr = typeInfo.GetCustomAttribute<DescriptionAttribute>();
|
||||
if (descriptionAttr != null)
|
||||
|
||||
Reference in New Issue
Block a user