Replaced DependencyMap with ServiceCollection and IServiceProvider (#625)
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Discord.Commands
|
||||
{
|
||||
@@ -14,13 +16,13 @@ namespace Discord.Commands
|
||||
Alias = alias;
|
||||
}
|
||||
|
||||
public Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, IDependencyMap map = null)
|
||||
=> Command.CheckPreconditionsAsync(context, map);
|
||||
public Task<PreconditionResult> CheckPreconditionsAsync(ICommandContext context, IServiceProvider services = null)
|
||||
=> Command.CheckPreconditionsAsync(context, services);
|
||||
public Task<ParseResult> ParseAsync(ICommandContext context, SearchResult searchResult, PreconditionResult? preconditionResult = null)
|
||||
=> Command.ParseAsync(context, Alias.Length, searchResult, preconditionResult);
|
||||
public Task<ExecuteResult> ExecuteAsync(ICommandContext context, IEnumerable<object> argList, IEnumerable<object> paramList, IDependencyMap map)
|
||||
=> Command.ExecuteAsync(context, argList, paramList, map);
|
||||
public Task<ExecuteResult> ExecuteAsync(ICommandContext context, ParseResult parseResult, IDependencyMap map)
|
||||
=> Command.ExecuteAsync(context, parseResult, map);
|
||||
public Task<ExecuteResult> ExecuteAsync(ICommandContext context, IEnumerable<object> argList, IEnumerable<object> paramList, IServiceProvider services)
|
||||
=> Command.ExecuteAsync(context, argList, paramList, services);
|
||||
public Task<ExecuteResult> ExecuteAsync(ICommandContext context, ParseResult parseResult, IServiceProvider services)
|
||||
=> Command.ExecuteAsync(context, parseResult, services);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user