コード例 #1
0
 private static IEnumerable <Bundle> GetAllBundles()
 {
     if (RuntimeInfo.RunningOnWindows)
     {
         return(RegistryQuery.GetAllInstalledBundles());
     }
     else if (RuntimeInfo.RunningOnOSX)
     {
         return(FileSystemExplorer.GetAllInstalledBundles());
     }
     else
     {
         throw new OperatingSystemNotSupportedException();
     }
 }
コード例 #2
0
 public static void Execute()
 {
     if (RuntimeInfo.RunningOnWindows)
     {
         Execute(
             RegistryQuery.GetAllInstalledBundles(),
             Windows.SupportedBundleTypeConfigs.SupportedBundleTypes);
     }
     else if (RuntimeInfo.RunningOnOSX)
     {
         Execute(
             FileSystemExplorer.GetAllInstalledBundles(),
             MacOs.SupportedBundleTypeConfigs.SupportedBundleTypes);
     }
     else
     {
         throw new OperatingSystemNotSupportedException();
     }
 }