public void TestInstantiationWithConfig() { var config = new ManagedInstanceDirective { DoAutomaticUpdates = false }; new ManagedInstance(config); }
private ManagedInstance GetDefaultInstance(ManagedInstanceDirective directive = null) { return(new ManagedInstance(directive ?? GetDefaultDirective()) { ApiKey = GetDefaultApiKey(), UseHttps = Settings.Default.ServerUseHttps, PossibleEndpoints = GetDefaultRestEndpointCollection() }); }
private ManagedInstanceDirective GetClearDirective() { var directive = new ManagedInstanceDirective(); var time = TimeSpan.FromHours(1); directive.HeartbeatDirective = new WorkerDirective(false, time, time); directive.ReportStatusDirective = new WorkerDirective(false, time, time); directive.SystemStatusDirective = new WorkerDirective(false, time, time); directive.VersionUpgradeDirective = new WorkerDirective(false, time, time); return(directive); }
private ManagedInstanceDirective GetDefaultDirective() { var directive = new ManagedInstanceDirective(); var wait = TimeSpan.FromMilliseconds(600); var timeout = TimeSpan.FromSeconds(1); directive.HeartbeatDirective = new WorkerDirective(true, wait, timeout); directive.ReportStatusDirective = new WorkerDirective(true, wait, timeout); directive.SystemStatusDirective = new WorkerDirective(true, wait, timeout); directive.VersionUpgradeDirective = new WorkerDirective(true, wait, timeout); return(directive); }