Exemple #1
0
        protected async static Tasks.Task InstantiateAsync(AsyncDynamicCommand instance)
        {
            var commandID = new CommandID(Package.CommandSet, Id);
            var command   = new OleMenuCommand(instance.ExecuteHandler, instance.ChangeHandler, instance.QueryStatusHandler, commandID);

            Instance = instance;

            await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();

            Package?.CommandService?.AddCommand(command);
        }
Exemple #2
0
 protected virtual void OnDisposeUnmanaged(AsyncDynamicCommand command)
 {
 }