-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Community.VisualStudio.Toolkit.DependencyInjection/src/Core/Shared/CommandWrapper.cs
Line 62 in 639e834
| protected async Task ExecuteAsync(OleMenuCmdEventArgs e) |
protected async Task ExecuteAsync(OleMenuCmdEventArgs e)
{
using var scope = this._serviceProvider.CreateScope();
BaseDICommand instance = (BaseDICommand)scope.ServiceProvider.GetRequiredService(typeof(T));
Task executeAsyncTask = (Task)_executeAsyncMethod.Invoke(instance, new object[] { e });
await executeAsyncTask;
}
The OleMenuCommand will Invoke the CommandWapper Execute method. This will invoke the BaseCommand Execute which will invoke the BaseCommand ExecuteAsync if not overridden.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels