private void Versuch8() { foreach (var provider in Provider.EnumerateProviders()) { Ausgabe.AppendText($"{provider}: {provider.IsBadProvider(Scope.User)}{Environment.NewLine}"); } }
private async void Versuch7() { try { foreach (var provider in Provider.EnumerateProviders()) { foreach (Scope scope in Enum.GetValues(typeof(Scope))) { foreach (var container in provider.EnumerateContainers(scope)) { var containerfilePathTask = Task.Run(() => container.FilePath); try { var containerfilePath = await containerfilePathTask; Ausgabe.AppendText($"{containerfilePath}: {File.Exists(containerfilePath)}{Environment.NewLine}"); } catch (Win32Exception ausnahmefehler) { Ausgabe.AppendText($"{container.Name}: {ausnahmefehler.Message}{Environment.NewLine}"); } } } } } catch (ObjectDisposedException) { } }
private void Versuch5() { var defaultProvider = Provider.GetDefaultProvider(ProviderType.Ids.PROV_RSA_AES, Scope.User); var containers = defaultProvider.EnumerateContainers(Scope.User).ToArray(); foreach (var container in containers) { Ausgabe.AppendText($"{container.UniqueName}{Environment.NewLine}"); } }
void Versuch1() { foreach (var providerType in CspTool.ProviderType.GetProviderTypes().Values) { Ausgabe.AppendText($"{providerType}:{Environment.NewLine}"); foreach (var container in providerType.EnumerateContainers(Scope.User)) { Ausgabe.AppendText($"|-- {container} [{container.Provider}]{Environment.NewLine}"); } } //foreach (var container in CspTool.Container.EnuemrateContainers(1, false)) //{ // Ausgabe.AppendText(container.Name + Environment.NewLine); //} }