Ejemplo n.º 1
0
 private void AppendExpression(StringBuilder result)
 {
     if (_expression != null)
     {
         result.Append("_" + _expression.GetType().Name);
     }
 }
		private static void CheckPerformance(IExpressionParser expressionParser, string expression)
		{
			var stopwatch = Stopwatch.StartNew();

			Enumerable
				.Range(1, 100)
				.ToList()
				.ForEach(i => expressionParser.Parse<TestEntity>(expression));

			stopwatch.Stop();
			Debug.WriteLine("{0}: {1}", expressionParser.GetType().Name, stopwatch.ElapsedMilliseconds);
		}
Ejemplo n.º 3
0
 public ServiceNotFoundException(IExpressionParser injectTarget, Type service, IEnumerable <string> serachPath)
     : base($"{injectTarget.GetType()} required service [{service.Name}] not found in {(string.Join("=>", serachPath.Select(x => $"[{x}]")))}")
 {
 }