private async Task <IRegistryHost> GetConsulRegistryHost() { var registryHost = new ConsulRegistryHost(); await registryHost.KeyValuePutAsync("key1", "value1"); await registryHost.KeyValuePutAsync("key2", "value2"); await registryHost.KeyValuePutAsync("folder/key3", "value3"); await registryHost.KeyValuePutAsync("folder/key4", "value4"); return(registryHost); }
private async Task <IRegistryHost> GetConsulRegistryHostAsync() { var configuration = new ConsulRegistryHostConfiguration() { HostName = "localhost" }; var registryHost = new ConsulRegistryHost(configuration); await registryHost.KeyValuePutAsync("key1", "value1"); await registryHost.KeyValuePutAsync("key2", "value2"); await registryHost.KeyValuePutAsync("folder/key3", "value3"); await registryHost.KeyValuePutAsync("folder/key4", "value4"); return(registryHost); }