public ReverseProxyMiddleware(RequestDelegate nextMiddleware) { _nextMiddleware = nextMiddleware; dynamic router = JsonLoader.LoadFromFile <dynamic>("routes.json"); _routes = JsonLoader.Deserialize <List <Route> >(Convert.ToString(router.routes)); }
public Router(string routeConfigFilePath) { var router = JsonLoader.LoadFromFile <dynamic>(routeConfigFilePath); Routes = JsonLoader.Deserialize <List <Route> >(Convert.ToString(router.routes)); AuthenticationService = JsonLoader.Deserialize <Destination>(Convert.ToString(router.authenticationService)); }
public Router(string routeConfigFilePath, ILoggerManager logger) { dynamic router = JsonLoader.LoadFromFile <dynamic>(routeConfigFilePath); Routes = JsonLoader.Deserialize <List <Route> >(Convert.ToString(router.routes)); AuthenticationService = JsonLoader.Deserialize <Destination>(Convert.ToString(router.authenticationService)); this.logger = logger; }
public void Load() { var path = Paths.GetPurchasedBundlesDataPath(); m_data = JsonLoader.LoadFromFile <PurchasedBundlesData>(path); if (m_data == null) { m_data = new PurchasedBundlesData(); } }
public static LevelProgress LoadOrCreate(string bundleId, string imageId) { if (string.IsNullOrEmpty(bundleId) || string.IsNullOrEmpty(imageId)) { return(null); } var path = GetFilePath(bundleId, imageId); var data = JsonLoader.LoadFromFile <LevelProgressData>(path); if (data == null) { data = new LevelProgressData(); } return(Create(bundleId, imageId, data)); }
/// <summary> /// Initializes a new instance of the <see cref="UsersService"/> class. /// </summary> public UsersService() { dynamic users = JsonLoader.LoadFromFile <dynamic>("users.json"); this.Users = JsonLoader.Deserialize <List <User> >(Convert.ToString(users)); }
public void Load() { var filePath = GetFilePath(); m_data = JsonLoader.LoadFromFile <PersistentData>(filePath); }
public void Setup() { _loader = new JsonLoader(); _router = _loader.LoadFromFile <dynamic>(@"Router\routes_test.json"); }
public void Load() { var filePath = GetFilePath(); m_data = JsonLoader.LoadFromFile <OptionsData>(filePath); }