public async Task<IActionResult> Demo(JsEvaluationViewModel editedModel)
		{
			var model = _jsEvaluationService.GetInitializationData();
			await TryUpdateModelAsync(model, string.Empty, m => m.EngineName, m=> m.Expression);

			if (ModelState.IsValid)
			{
				model = _jsEvaluationService.Evaluate(model);

				ModelState.Clear();
			}

			return View(model);
		}
		public JsEvaluationViewModel GetInitializationData()
		{
			var model = new JsEvaluationViewModel
			{
				EngineName = _engineSwitcher.DefaultEngineName,
				AvailableEngineList = _engineSwitcher.EngineFactories
					.Select(e => new SelectListItem
					{
						Value = e.EngineName,
						Text = GetEngineDisplayName(e.EngineName)
					}),
				Expression = string.Empty,
				Result = null
			};

			return model;
		}
		public JsEvaluationViewModel Evaluate(JsEvaluationViewModel model)
		{
			IJsEngine engine = null;
			var result = new JsEvaluationResultViewModel();

			try
			{
				engine = _engineSwitcher.CreateEngine(model.EngineName);
				result.Value = engine.Evaluate<string>(model.Expression);
			}
			catch (JsEngineLoadException e)
			{
				var error = GetJsEvaluationErrorFromException(e);
				result.Errors.Add(error);
			}
			catch (JsRuntimeException e)
			{
				var error = GetJsEvaluationErrorFromException(e);
				error.LineNumber = e.LineNumber;
				error.ColumnNumber = e.ColumnNumber;
				error.SourceFragment = e.SourceFragment;

				result.Errors.Add(error);
			}
			finally
			{
				if (engine != null)
				{
					engine.Dispose();
				}
			}

			model.Result = result;

			return model;
		}