Ejemplo n.º 1
0
        public static IServiceCollection UseHttpUpdater(this IServiceCollection services, Action <HttpAppUpdaterOptions> setupAction)
        {
            var opts = new HttpAppUpdaterOptions();

            setupAction.Invoke(opts);

            return(services.AddSingleton <IAppUpdaterService, HttpAppUpdaterService>()
                   .AddSingleton <HttpAppUpdaterOptions>(opts));
        }
Ejemplo n.º 2
0
        public HttpAppUpdaterTests()
        {
            var workingDirectory = Path.GetDirectoryName(typeof(FtpAppUpdaterTests).Assembly.Location);

            opts = new HttpAppUpdaterOptions()
            {
                AppName         = "",
                AppEntryDll     = "",
                ContentRootPath = workingDirectory,
                HttpDownloadUrl = "",
            };
            httpAppUpdaterService = new HttpAppUpdaterService(NullLogger <HttpAppUpdaterService> .Instance, opts);
        }