Example #1
0
 public void InjectConfigServerInstance(IConfigServer configServer)
 {
     if (configServer != null)
     {
         ConfigServer = configServer;
         //ConfigServer.ConfigUpdatedEvent += OnConfigServerChange;
     }
 }
Example #2
0
 public ConfigServerClientTest()
 {
     collection = new ConfigurationRegistry();
     collection.AddRegistration(ConfigurationRegistration.Build <SimpleConfig>());
     options                         = new ConfigServerClientOptions();
     options.ClientId                = "1234-5678-1234";
     options.ConfigServer            = "https://test.com/Config";
     options.CacheOptions.IsDisabled = true;
     clientWrapper                   = new Mock <IHttpClientWrapper>();
     cache  = new Mock <IMemoryCache>();
     target = new ConfigServerClient(clientWrapper.Object, cache.Object, collection, options);
 }
Example #3
0
 public ConfigServerClientTest()
 {
     collection = new ConfigurationRegistry();
     collection.AddRegistration(ConfigurationRegistration.Build <SimpleConfig>());
     collection.AddRegistration(ConfigurationRegistration.Build <SampleConfig>(configRegisration));
     options = new ConfigServerClientOptions
     {
         ConfigServer = "https://test.com/Config"
     };
     options.CacheOptions.IsDisabled = true;
     clientWrapper = new Mock <IHttpClientWrapper>();
     target        = new ConfigServerClient(clientWrapper.Object, new NoCachingStrategy(), new SingleClientIdProvider(clientId), collection, options);
 }
Example #4
0
 public TemplateService(IConfigServer configServer, MessageServer messageClient)
 {
     _configServer  = configServer;
     _messageServer = messageClient;
     _configServer.ConfigUpdatedEvent += MyHandler;
 }
Example #5
0
 public HomeController(IConfigServer configProvider)
 {
     this.configProvider = configProvider;
 }
Example #6
0
 public ConfigService()
 {
     ConfigServer = ConfigServiceLocator.GetService();
 }
Example #7
0
 public HomeController(IConfigServer configServer)
 {
     config  = configServer.GetConfig <SampleConfig>();
     options = configServer.GetCollectionConfig <OptionFromConfigSet>();
 }
 public MainScreenViewModel(IStartGame startGame, IConfigServer configServer)
 {
     MainMenu         = new MainMenuViewModel(startGame, this, configServer);
     userNameProvider = new CachedUserNameProvider(new FileUserNameProvider("user_name.txt"));
     popUpController  = new ChangeNamePopUpController();
 }
Example #9
0
 public MainMenuViewModel(IStartGame startGame, IChangeName changeName, IConfigServer configureServer)
 {
     this.changeName      = changeName;
     this.startGame       = startGame;
     this.configureServer = configureServer;
 }