/// <summary>
 /// Performs the  command.
 /// </summary>
 /// <param name="parameter">The RefreshExtensions command parameter.</param>
 private void DoRefreshExtensionsCommand(object parameter)
 {
     //  Get all servers.
     var servers = ServerRegistrationManager.EnumerateExtensions(RegistrationType.OS64Bit, ShellExtensionType.IconHandler);
     foreach (var server in servers)
     {
         var extensionViewModel = new ExtensionViewModel();
         extensionViewModel.DisplayName = server.DisplayName;
         extensionViewModel.ShellExtensionType = server.ShellExtensionType;
         foreach (var classReg in server.ClassRegistrations)
             extensionViewModel.ClassRegistrations.Add(classReg);
         RefreshExtensionsCommand.ReportProgress(() => Extensions.Add(extensionViewModel));
     }
 }
Exemplo n.º 2
0
        /// <summary>
        /// Performs the  command.
        /// </summary>
        /// <param name="parameter">The RefreshExtensions command parameter.</param>
        private void DoRefreshExtensionsCommand(object parameter)
        {
            //  Get all servers.
            var servers = ServerRegistrationManager.EnumerateExtensions(RegistrationType.OS64Bit, RegistrationLocation.LocalMachine, ShellExtensionType.IconHandler);

            foreach (var server in servers)
            {
                var extensionViewModel = new ExtensionViewModel();
                extensionViewModel.DisplayName        = server.DisplayName;
                extensionViewModel.ShellExtensionType = server.ShellExtensionType;
                foreach (var classReg in server.ClassRegistrations)
                {
                    extensionViewModel.ClassRegistrations.Add(classReg);
                }
                RefreshExtensionsCommand.ReportProgress(() => Extensions.Add(extensionViewModel));
            }
        }