static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var form = new UnleashForm(); JsonSerializerTester.Assert(new NewtonsoftJson7Serializer()); settings = new UnleashSettings { UnleashApi = new Uri("http://unleash.herokuapp.com/"), //UnleashApi = new Uri("http://localhost:4242/"), AppName = "dotnet-forms-test", InstanceTag = "instance 1", SendMetricsInterval = TimeSpan.FromSeconds(5), FetchTogglesInterval = TimeSpan.FromSeconds(10), UnleashContextProvider = new WinFormsContextProvider(form), JsonSerializer = new NewtonsoftJson7Serializer() }; unleash = new DefaultUnleash(settings); form.Unleash = unleash; form.Settings = settings; Application.ApplicationExit += (sender, args) => { unleash?.Dispose(); }; Application.Run(form); }
public UnleashSampleService( UnleashSampleServiceState state, IUnleashContextProvider unleashContextProvider, IUnleash unleash, IOptions <UnleashSampleServiceOptions> options, ILogger <UnleashSampleService> logger) { State = state; UnleashContextProvider = unleashContextProvider; Unleash = unleash; Options = options.Value; Logger = logger; }
public UnleashController(ILogger <UnleashController> logger, IUnleash unleash) { _logger = logger; _unleash = unleash; }
public TestController(IUnleash unleash, IUnleashContextProvider contextProvider) { Unleash = unleash; ContextProvider = contextProvider; }
public VariantsTest() { _unleash = new DefaultUnleash(new MockedUnleashSettings()); }
public async Task Setup() { var factory = new UnleashClientFactory(); unleash = await factory.CreateClientAsync(new MockedUnleashSettings(), true); }
public ExampleTests() { unleash = new DefaultUnleash(new MockedUnleashSettings()); }
public TestController(IUnleash unleash) { Unleash = unleash; }
public HomeController() { unleash = WebApiApplication.Unleash; }