예제 #1
0
        private async Task HandleDeleteCertificateCommand()
        {
            var names = Certificates.Where(_ => _.IsSelected).Select(_ => _.Name).ToList();

            if (!names.Any())
            {
                return;
            }

            foreach (var name in names)
            {
                await _certificateStore.Remove(name);

                Certificates.Remove(Certificates.First(_ => _.Name == name));
            }

            foreach (var certificate in Certificates)
            {
                certificate.IsSelected = false;
            }

            ((Command)DeleteCertificateCommand).ChangeCanExecute();
        }