Browse Source

change storage type of alias dictionary to be IReadOnlyDictionary

pull/943/head
Chris Johnston 7 years ago
parent
commit
d42936c568
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      src/Discord.Net.Commands/CommandService.cs
  2. +1
    -1
      src/Discord.Net.Commands/CommandServiceConfig.cs
  3. +1
    -1
      src/Discord.Net.Commands/Info/CommandInfo.cs

+ 1
- 1
src/Discord.Net.Commands/CommandService.cs View File

@@ -32,7 +32,7 @@ namespace Discord.Commands
internal readonly RunMode _defaultRunMode; internal readonly RunMode _defaultRunMode;
internal readonly Logger _cmdLogger; internal readonly Logger _cmdLogger;
internal readonly LogManager _logManager; internal readonly LogManager _logManager;
internal readonly Dictionary<char, char> _quotationMarkAliasMap;
internal readonly IReadOnlyDictionary<char, char> _quotationMarkAliasMap;


public IEnumerable<ModuleInfo> Modules => _moduleDefs.Select(x => x); public IEnumerable<ModuleInfo> Modules => _moduleDefs.Select(x => x);
public IEnumerable<CommandInfo> Commands => _moduleDefs.SelectMany(x => x.Commands); public IEnumerable<CommandInfo> Commands => _moduleDefs.SelectMany(x => x.Commands);


+ 1
- 1
src/Discord.Net.Commands/CommandServiceConfig.cs View File

@@ -19,7 +19,7 @@ namespace Discord.Commands


/// <summary> Collection of aliases that can wrap strings for command parsing. /// <summary> Collection of aliases that can wrap strings for command parsing.
/// represents the opening quotation mark and the value is the corresponding closing mark.</summary> /// represents the opening quotation mark and the value is the corresponding closing mark.</summary>
public Dictionary<char, char> QuotationMarkAliasMap { get; set; }
public IReadOnlyDictionary<char, char> QuotationMarkAliasMap { get; set; }
= new Dictionary<char, char>() = new Dictionary<char, char>()
{ {
{'\"', '\"' }, {'\"', '\"' },


+ 1
- 1
src/Discord.Net.Commands/Info/CommandInfo.cs View File

@@ -20,7 +20,7 @@ namespace Discord.Commands


private readonly CommandService _commandService; private readonly CommandService _commandService;
private readonly Func<ICommandContext, object[], IServiceProvider, CommandInfo, Task> _action; private readonly Func<ICommandContext, object[], IServiceProvider, CommandInfo, Task> _action;
internal readonly Dictionary<char,char> _quotationAliases;
internal readonly IReadOnlyDictionary<char,char> _quotationAliases;


public ModuleInfo Module { get; } public ModuleInfo Module { get; }
public string Name { get; } public string Name { get; }


Loading…
Cancel
Save