Ejemplo n.º 1
0
		public ShimmerInstaller(ShimmerConfiguration configuration)
		{
			var urlOrPath = configuration.UrlOrPath;
			var applicationName = configuration.ApplicationName;
			var frameworkVersion = configuration.FrameworkVersion;

			updateManager = new UpdateManager(urlOrPath, applicationName, frameworkVersion);
			updateInfo = updateManager.CheckForUpdate().Wait();

			UpdatesAvailable = updateInfo.ReleasesToApply.Any();
			InstallationPath = updateManager.LatestInstallationPath(updateInfo);
		}
Ejemplo n.º 2
0
		public static string Install(ShimmerConfiguration shimmerConfiguration, Action<ShimmerInstaller> onUpdatesAvailable)
		{
			using (var shimmerInstaller = new ShimmerInstaller(shimmerConfiguration))
			{
				var debugOrInstalledPath = shimmerInstaller.InstallationPath;

				if (SystemInspector.Debugger.IsAttached)
				{
					debugOrInstalledPath = shimmerConfiguration.DebugOrInstalledPath();
				}

				AssembliesResolver.AppendResolver(new FolderAssemblyResolver(debugOrInstalledPath));

				if (shimmerInstaller.UpdatesAvailable)
				{
					onUpdatesAvailable(shimmerInstaller);
				}

				return debugOrInstalledPath;
			}
		}