Skip to content

Commit a7cb3ab

Browse files
committed
chore(code-style): let resharper clean up our whole codebase oop 😆
1 parent 253cc6d commit a7cb3ab

File tree

797 files changed

+23431
-17906
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

797 files changed

+23431
-17906
lines changed

Diff for: DisCatSharp.ApplicationCommands/ApplicationCommandsConfiguration.cs

+69-62
Original file line numberDiff line numberDiff line change
@@ -5,105 +5,112 @@
55
namespace DisCatSharp.ApplicationCommands;
66

77
/// <summary>
8-
/// A configuration for a <see cref="ApplicationCommandsExtension"/>
8+
/// A configuration for a <see cref="ApplicationCommandsExtension" />
99
/// </summary>
1010
public sealed class ApplicationCommandsConfiguration
1111
{
1212
/// <summary>
13-
/// <para>Sets the service provider.</para>
14-
/// <para>Objects in this provider are used when instantiating application command modules.</para>
15-
/// <para>This allows passing data around without resorting to static members.</para>
16-
/// <para>Defaults to <see langword="null"/>.</para>
13+
/// Creates a new configuration with default values.
14+
/// </summary>
15+
public ApplicationCommandsConfiguration()
16+
{ }
17+
18+
/// <summary>
19+
/// Utilized via dependency injection pipeline.
20+
/// </summary>
21+
/// <param name="provider">The service provider.</param>
22+
[ActivatorUtilitiesConstructor]
23+
public ApplicationCommandsConfiguration(IServiceProvider provider)
24+
{
25+
this.ServiceProvider = provider;
26+
}
27+
28+
/// <summary>
29+
/// Creates a new instance of <see cref="ApplicationCommandsConfiguration" />, copying the properties of another
30+
/// configuration.
31+
/// </summary>
32+
/// <param name="acc">Configuration the properties of which are to be copied.</param>
33+
public ApplicationCommandsConfiguration(ApplicationCommandsConfiguration acc)
34+
{
35+
this.EnableDefaultHelp = acc.EnableDefaultHelp;
36+
this.ServiceProvider = acc.ServiceProvider;
37+
this.DebugStartup = acc.DebugStartup;
38+
this.CheckAllGuilds = acc.CheckAllGuilds;
39+
this.AutoDefer = acc.AutoDefer;
40+
this.EnableLocalization = acc.EnableLocalization;
41+
this.GenerateTranslationFilesOnly = acc.GenerateTranslationFilesOnly;
42+
this.EnableDefaultUserAppsHelp = acc.EnableDefaultUserAppsHelp;
43+
this.UnitTestMode = acc.UnitTestMode;
44+
}
45+
46+
/// <summary>
47+
/// <para>Sets the service provider.</para>
48+
/// <para>Objects in this provider are used when instantiating application command modules.</para>
49+
/// <para>This allows passing data around without resorting to static members.</para>
50+
/// <para>Defaults to <see langword="null" />.</para>
1751
/// </summary>
1852
public IServiceProvider ServiceProvider { internal get; set; } = new ServiceCollection().BuildServiceProvider(true);
1953

2054
/// <summary>
21-
/// <para>This option enables the default help command.</para>
22-
/// <para>Disabling this will allow you to make your own help command.</para>
23-
/// <para>Defaults to <see langword="true"/>.</para>
55+
/// <para>This option enables the default help command.</para>
56+
/// <para>Disabling this will allow you to make your own help command.</para>
57+
/// <para>Defaults to <see langword="true" />.</para>
2458
/// </summary>
2559
public bool EnableDefaultHelp { internal get; set; } = true;
2660

2761
/// <summary>
28-
/// <para>This option enables the default help command with user apps capability.</para>
29-
/// <para>Mutually exclusive with <see cref="EnableDefaultHelp"/>.</para>
30-
/// <para>Defaults to <see langword="false"/>.</para>
62+
/// <para>This option enables the default help command with user apps capability.</para>
63+
/// <para>Mutually exclusive with <see cref="EnableDefaultHelp" />.</para>
64+
/// <para>Defaults to <see langword="false" />.</para>
3165
/// </summary>
3266
public bool EnableDefaultUserAppsHelp { get; set; } = false;
3367

3468
/// <summary>
35-
/// This option enables the localization feature.
36-
/// <para>Defaults to <see langword="false"/>.</para>
69+
/// This option enables the localization feature.
70+
/// <para>Defaults to <see langword="false" />.</para>
3771
/// </summary>
3872
public bool EnableLocalization { internal get; set; } = false;
3973

4074
// TODO: Check if it interferes with callback hints
4175
/// <summary>
42-
/// <para>Automatically defer all responses.</para>
43-
/// <note type="note">If you enable this, you can't use CreateResponse. Use EditResponse instead.</note>
44-
/// <para>Defaults to <see langword="false"/>.</para>
76+
/// <para>Automatically defer all responses.</para>
77+
/// <note type="note">If you enable this, you can't use CreateResponse. Use EditResponse instead.</note>
78+
/// <para>Defaults to <see langword="false" />.</para>
4579
/// </summary>
4680
public bool AutoDefer { internal get; set; } = false;
4781

4882
/// <summary>
49-
/// <para>This option informs the module to check through all guilds whether the
50-
/// <see target="_blank" alt="Application Commands Scope" href="https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes">application.commands</see> scope is set.</para>
51-
/// <note type="warning">This will take quite a while, when the bot is on more than 1k guilds.</note>
52-
/// <para>Defaults to <see langword="false"/>.</para>
83+
/// <para>
84+
/// This option informs the module to check through all guilds whether the
85+
/// <see target="_blank" alt="Application Commands Scope"
86+
/// href="https://discord.com/developers/docs/topics/oauth2#shared-resources-oauth2-scopes">
87+
/// application.commands
88+
/// </see>
89+
/// scope is set.
90+
/// </para>
91+
/// <note type="warning">This will take quite a while, when the bot is on more than 1k guilds.</note>
92+
/// <para>Defaults to <see langword="false" />.</para>
5393
/// </summary>
5494
public bool CheckAllGuilds { internal get; set; } = false;
5595

5696
/// <summary>
57-
/// <para>This option increases the debug output of the module.</para>
58-
/// <note type="warning">
59-
/// <para>This is not recommended for production use.</para>
60-
/// <para>Enable this option only if DisCatSharp support advises you to do so.</para>
61-
/// </note>
62-
/// <para>Defaults to <see langword="false"/>.</para>
97+
/// <para>This option increases the debug output of the module.</para>
98+
/// <note type="warning">
99+
/// <para>This is not recommended for production use.</para>
100+
/// <para>Enable this option only if DisCatSharp support advises you to do so.</para>
101+
/// </note>
102+
/// <para>Defaults to <see langword="false" />.</para>
63103
/// </summary>
64104
public bool DebugStartup { internal get; set; } = false;
65105

66106
/// <summary>
67-
/// <para>Whether to only generate translations files and abort after that.</para>
68-
/// <para>Defaults to <see langword="false"/>.</para>
107+
/// <para>Whether to only generate translations files and abort after that.</para>
108+
/// <para>Defaults to <see langword="false" />.</para>
69109
/// </summary>
70110
public bool GenerateTranslationFilesOnly { internal get; set; } = false;
71111

72112
/// <summary>
73-
/// Whether to enable unit test mode.
113+
/// Whether to enable unit test mode.
74114
/// </summary>
75115
internal bool UnitTestMode { get; set; } = false;
76-
77-
/// <summary>
78-
/// Creates a new configuration with default values.
79-
/// </summary>
80-
public ApplicationCommandsConfiguration()
81-
{ }
82-
83-
/// <summary>
84-
/// Utilized via dependency injection pipeline.
85-
/// </summary>
86-
/// <param name="provider">The service provider.</param>
87-
[ActivatorUtilitiesConstructor]
88-
public ApplicationCommandsConfiguration(IServiceProvider provider)
89-
{
90-
this.ServiceProvider = provider;
91-
}
92-
93-
/// <summary>
94-
/// Creates a new instance of <see cref="ApplicationCommandsConfiguration"/>, copying the properties of another configuration.
95-
/// </summary>
96-
/// <param name="acc">Configuration the properties of which are to be copied.</param>
97-
public ApplicationCommandsConfiguration(ApplicationCommandsConfiguration acc)
98-
{
99-
this.EnableDefaultHelp = acc.EnableDefaultHelp;
100-
this.ServiceProvider = acc.ServiceProvider;
101-
this.DebugStartup = acc.DebugStartup;
102-
this.CheckAllGuilds = acc.CheckAllGuilds;
103-
this.AutoDefer = acc.AutoDefer;
104-
this.EnableLocalization = acc.EnableLocalization;
105-
this.GenerateTranslationFilesOnly = acc.GenerateTranslationFilesOnly;
106-
this.EnableDefaultUserAppsHelp = acc.EnableDefaultUserAppsHelp;
107-
this.UnitTestMode = acc.UnitTestMode;
108-
}
109116
}

0 commit comments

Comments
 (0)