Format the project with 'dotnet format' (#2551)

* Sync and Re-Format

* Fix Title string.

* Fix indentation.
This commit is contained in:
NaN
2023-02-13 14:45:59 -03:00
committed by GitHub
parent 71e9ecb21e
commit 257f246d1d
401 changed files with 3178 additions and 2671 deletions

View File

@@ -53,7 +53,7 @@ namespace Discord.Interactions.Builders
/// <inheritdoc/>
IReadOnlyList<IParameterBuilder> ICommandBuilder.Parameters => Parameters;
internal CommandBuilder (ModuleBuilder module)
internal CommandBuilder(ModuleBuilder module)
{
_attributes = new List<Attribute>();
_preconditions = new List<PreconditionAttribute>();
@@ -62,7 +62,7 @@ namespace Discord.Interactions.Builders
Module = module;
}
protected CommandBuilder (ModuleBuilder module, string name, ExecuteCallback callback) : this(module)
protected CommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback) : this(module)
{
Name = name;
Callback = callback;
@@ -75,7 +75,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder WithName (string name)
public TBuilder WithName(string name)
{
Name = name;
return Instance;
@@ -88,7 +88,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder WithMethodName (string name)
public TBuilder WithMethodName(string name)
{
MethodName = name;
return Instance;
@@ -101,7 +101,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder WithAttributes (params Attribute[] attributes)
public TBuilder WithAttributes(params Attribute[] attributes)
{
_attributes.AddRange(attributes);
return Instance;
@@ -114,7 +114,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder SetRunMode (RunMode runMode)
public TBuilder SetRunMode(RunMode runMode)
{
RunMode = runMode;
return Instance;
@@ -127,7 +127,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder WithNameAsRegex (bool value)
public TBuilder WithNameAsRegex(bool value)
{
TreatNameAsRegex = value;
return Instance;
@@ -140,7 +140,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder AddParameters (params TParamBuilder[] parameters)
public TBuilder AddParameters(params TParamBuilder[] parameters)
{
_parameters.AddRange(parameters);
return Instance;
@@ -153,30 +153,30 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public TBuilder WithPreconditions (params PreconditionAttribute[] preconditions)
public TBuilder WithPreconditions(params PreconditionAttribute[] preconditions)
{
_preconditions.AddRange(preconditions);
return Instance;
}
/// <inheritdoc/>
public abstract TBuilder AddParameter (Action<TParamBuilder> configure);
public abstract TBuilder AddParameter(Action<TParamBuilder> configure);
internal abstract TInfo Build (ModuleInfo module, InteractionService commandService);
internal abstract TInfo Build(ModuleInfo module, InteractionService commandService);
//ICommandBuilder
/// <inheritdoc/>
ICommandBuilder ICommandBuilder.WithName (string name) =>
ICommandBuilder ICommandBuilder.WithName(string name) =>
WithName(name);
/// <inheritdoc/>
ICommandBuilder ICommandBuilder.WithMethodName (string name) =>
ICommandBuilder ICommandBuilder.WithMethodName(string name) =>
WithMethodName(name);
ICommandBuilder ICommandBuilder.WithAttributes (params Attribute[] attributes) =>
ICommandBuilder ICommandBuilder.WithAttributes(params Attribute[] attributes) =>
WithAttributes(attributes);
/// <inheritdoc/>
ICommandBuilder ICommandBuilder.SetRunMode (RunMode runMode) =>
ICommandBuilder ICommandBuilder.SetRunMode(RunMode runMode) =>
SetRunMode(runMode);
/// <inheritdoc/>
@@ -184,11 +184,11 @@ namespace Discord.Interactions.Builders
WithNameAsRegex(value);
/// <inheritdoc/>
ICommandBuilder ICommandBuilder.AddParameters (params IParameterBuilder[] parameters) =>
ICommandBuilder ICommandBuilder.AddParameters(params IParameterBuilder[] parameters) =>
AddParameters(parameters as TParamBuilder);
/// <inheritdoc/>
ICommandBuilder ICommandBuilder.WithPreconditions (params PreconditionAttribute[] preconditions) =>
ICommandBuilder ICommandBuilder.WithPreconditions(params PreconditionAttribute[] preconditions) =>
WithPreconditions(preconditions);
}
}

View File

@@ -9,7 +9,7 @@ namespace Discord.Interactions.Builders
{
protected override ComponentCommandBuilder Instance => this;
internal ComponentCommandBuilder (ModuleBuilder module) : base(module) { }
internal ComponentCommandBuilder(ModuleBuilder module) : base(module) { }
/// <summary>
/// Initializes a new <see cref="ComponentBuilder"/>.
@@ -17,7 +17,7 @@ namespace Discord.Interactions.Builders
/// <param name="module">Parent module of this command.</param>
/// <param name="name">Name of this command.</param>
/// <param name="callback">Execution callback of this command.</param>
public ComponentCommandBuilder (ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
public ComponentCommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
/// <summary>
/// Adds a command parameter to the parameters collection.
@@ -26,7 +26,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public override ComponentCommandBuilder AddParameter (Action<ComponentCommandParameterBuilder> configure)
public override ComponentCommandBuilder AddParameter(Action<ComponentCommandParameterBuilder> configure)
{
var parameter = new ComponentCommandParameterBuilder(this);
configure(parameter);
@@ -34,7 +34,7 @@ namespace Discord.Interactions.Builders
return this;
}
internal override ComponentCommandInfo Build (ModuleInfo module, InteractionService commandService) =>
internal override ComponentCommandInfo Build(ModuleInfo module, InteractionService commandService) =>
new ComponentCommandInfo(this, module, commandService);
}
}

View File

@@ -35,7 +35,7 @@ namespace Discord.Interactions.Builders
/// </summary>
public GuildPermission? DefaultMemberPermissions { get; set; } = null;
internal ContextCommandBuilder (ModuleBuilder module) : base(module) { }
internal ContextCommandBuilder(ModuleBuilder module) : base(module) { }
/// <summary>
/// Initializes a new <see cref="ContextCommandBuilder"/>.
@@ -43,7 +43,7 @@ namespace Discord.Interactions.Builders
/// <param name="module">Parent module of this command.</param>
/// <param name="name">Name of this command.</param>
/// <param name="callback">Execution callback of this command.</param>
public ContextCommandBuilder (ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
public ContextCommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
/// <summary>
/// Sets <see cref="CommandType"/>.
@@ -52,7 +52,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public ContextCommandBuilder SetType (ApplicationCommandType commandType)
public ContextCommandBuilder SetType(ApplicationCommandType commandType)
{
CommandType = commandType;
return this;
@@ -66,7 +66,7 @@ namespace Discord.Interactions.Builders
/// The builder instance.
/// </returns>
[Obsolete($"To be deprecated soon, use {nameof(SetEnabledInDm)} and {nameof(WithDefaultMemberPermissions)} instead.")]
public ContextCommandBuilder SetDefaultPermission (bool defaultPermision)
public ContextCommandBuilder SetDefaultPermission(bool defaultPermision)
{
DefaultPermission = defaultPermision;
return this;
@@ -79,7 +79,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public override ContextCommandBuilder AddParameter (Action<CommandParameterBuilder> configure)
public override ContextCommandBuilder AddParameter(Action<CommandParameterBuilder> configure)
{
var parameter = new CommandParameterBuilder(this);
configure(parameter);
@@ -126,7 +126,7 @@ namespace Discord.Interactions.Builders
return this;
}
internal override ContextCommandInfo Build (ModuleInfo module, InteractionService commandService) =>
internal override ContextCommandInfo Build(ModuleInfo module, InteractionService commandService) =>
ContextCommandInfo.Create(this, module, commandService);
}
}

View File

@@ -66,7 +66,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder WithName (string name);
ICommandBuilder WithName(string name);
/// <summary>
/// Sets <see cref="MethodName"/>.
@@ -75,7 +75,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder WithMethodName (string name);
ICommandBuilder WithMethodName(string name);
/// <summary>
/// Adds attributes to <see cref="Attributes"/>.
@@ -84,7 +84,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder WithAttributes (params Attribute[] attributes);
ICommandBuilder WithAttributes(params Attribute[] attributes);
/// <summary>
/// Sets <see cref="RunMode"/>.
@@ -93,7 +93,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder SetRunMode (RunMode runMode);
ICommandBuilder SetRunMode(RunMode runMode);
/// <summary>
/// Sets <see cref="TreatNameAsRegex"/>.
@@ -111,7 +111,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder AddParameters (params IParameterBuilder[] parameters);
ICommandBuilder AddParameters(params IParameterBuilder[] parameters);
/// <summary>
/// Adds preconditions to <see cref="Preconditions"/>.
@@ -120,6 +120,6 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
ICommandBuilder WithPreconditions (params PreconditionAttribute[] preconditions);
ICommandBuilder WithPreconditions(params PreconditionAttribute[] preconditions);
}
}

View File

@@ -35,7 +35,7 @@ namespace Discord.Interactions.Builders
/// </summary>
public GuildPermission? DefaultMemberPermissions { get; set; } = null;
internal SlashCommandBuilder (ModuleBuilder module) : base(module) { }
internal SlashCommandBuilder(ModuleBuilder module) : base(module) { }
/// <summary>
/// Initializes a new <see cref="SlashCommandBuilder"/>.
@@ -43,7 +43,7 @@ namespace Discord.Interactions.Builders
/// <param name="module">Parent module of this command.</param>
/// <param name="name">Name of this command.</param>
/// <param name="callback">Execution callback of this command.</param>
public SlashCommandBuilder (ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
public SlashCommandBuilder(ModuleBuilder module, string name, ExecuteCallback callback) : base(module, name, callback) { }
/// <summary>
/// Sets <see cref="Description"/>.
@@ -52,7 +52,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public SlashCommandBuilder WithDescription (string description)
public SlashCommandBuilder WithDescription(string description)
{
Description = description;
return this;
@@ -66,7 +66,7 @@ namespace Discord.Interactions.Builders
/// The builder instance.
/// </returns>
[Obsolete($"To be deprecated soon, use {nameof(SetEnabledInDm)} and {nameof(WithDefaultMemberPermissions)} instead.")]
public SlashCommandBuilder WithDefaultPermission (bool permission)
public SlashCommandBuilder WithDefaultPermission(bool permission)
{
DefaultPermission = permission;
return Instance;
@@ -79,7 +79,7 @@ namespace Discord.Interactions.Builders
/// <returns>
/// The builder instance.
/// </returns>
public override SlashCommandBuilder AddParameter (Action<SlashCommandParameterBuilder> configure)
public override SlashCommandBuilder AddParameter(Action<SlashCommandParameterBuilder> configure)
{
var parameter = new SlashCommandParameterBuilder(this);
configure(parameter);
@@ -126,7 +126,7 @@ namespace Discord.Interactions.Builders
return this;
}
internal override SlashCommandInfo Build (ModuleInfo module, InteractionService commandService) =>
internal override SlashCommandInfo Build(ModuleInfo module, InteractionService commandService) =>
new SlashCommandInfo(this, module, commandService);
}
}