Ejemplo n.º 1
0
        public override JsonResult JavaScript(JavascriptService service)
        {
            var locator = Context.Current.GetOptionalService <ServiceConfigurationLocator>();

            if (locator == null || !locator.HasConfiguration)
            {
                return(base.JavaScript(service));
            }

            return(base.JavaScript(new MicroserviceJavascriptService(locator.GetUrl(HttpContext), service)));
        }
Ejemplo n.º 2
0
        public GameViewModel(GameService gameService, JavascriptService javascriptService)
        {
            _gameService       = gameService;
            _javascriptService = javascriptService;

            _timer          = new Timer();
            _timer.Interval = SleepTimeBetweenGenerations;
            _timer.Elapsed += TimerElapsed;

            _watch = new Stopwatch();

            SelectedTool = Tool.Cell;

            Console.WriteLine("GameViewModel created");
        }
 public MicroserviceJavascriptService(string configuration, JavascriptService service)
     : base(service.ServiceKey, service.Function, service.Arguments)
 {
     ServiceConfigurationUrl = configuration;
 }