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)); }
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); }