Esempio n. 1
0
		static void Program_QueryExecution(object sender, QueryExecutionEventArgs args)
		{
			using (StreamWriter writer = File.AppendText(GetPersonalFilePath("CFNativeQueriesEnabler.Example.txt")))
			{
				writer.WriteLine("{0} - {1}: {2}", DateTime.Now, args.ExecutionKind, args.Predicate);
			}
		}
 protected override void OnQueryExecution(object sender, QueryExecutionEventArgs args)
 {
     if (args.Predicate.GetType().Name.EndsWith("Unoptimizable"))
     {
         Assert.AreEqual(QueryExecutionKind.Unoptimized, args.ExecutionKind);
     }
     else
     {
         Assert.AreEqual(QueryExecutionKind.PreOptimized, args.ExecutionKind);
     }
 }
		protected virtual void OnQueryExecution(object sender, QueryExecutionEventArgs args)
		{
			throw new NotImplementedException();
		}
		override protected void OnQueryExecution(object sender, QueryExecutionEventArgs args)
		{
			Assert.AreEqual(QueryExecutionKind.PreOptimized, args.ExecutionKind);
		}
		private void OnQueryExecution(object sender, QueryExecutionEventArgs args)
		{
			Assert.AreEqual(QueryExecutionKind.DynamicallyOptimized, args.ExecutionKind);
		}