/// <summary>
        /// Execute and Compare results sync
        /// </summary>
        /// <typeparam name="TResult">Item Type of the result collection</typeparam>
        /// <param name="linqToAstoriaResultComparer">Result Comparer</param>
        /// <param name="query">Query to execute</param>
        /// <param name="expectedValue">Expected value</param>
        /// <param name="dataContext">Data Context to execute expression from</param>
        /// <param name="clientExpectedError">Expected Client Error</param>
        public static void ExecuteAndCompareSync <TResult>(this IClientQueryResultComparer linqToAstoriaResultComparer, IQueryable <TResult> query, QueryValue expectedValue, DataServiceContext dataContext, ExpectedClientErrorBaseline clientExpectedError)
        {
#if !SILVERLIGHT
            SyncHelpers.ExecuteActionAndWait(c => linqToAstoriaResultComparer.ExecuteAndCompare <TResult>(c, false, query, expectedValue, dataContext, clientExpectedError));
#else
            throw new TaupoInvalidOperationException("Cannot execute in Silverlight");
#endif
        }
Example #2
0
 /// <summary>
 /// Execute and Compare results sync
 /// </summary>
 /// <typeparam name="TResult">Item Type of the result collection</typeparam>
 /// <param name="linqToAstoriaResultComparer">Result Comparer</param>
 /// <param name="query">Query to execute</param>
 /// <param name="expectedValue">Expected value</param>
 /// <param name="dataContext">Data Context to execute expression from</param>
 /// <param name="clientExpectedError">Expected Client Error</param>
 public static void ExecuteAndCompareSync <TResult>(this IClientQueryResultComparer linqToAstoriaResultComparer, IQueryable <TResult> query, QueryValue expectedValue, DataServiceContext dataContext, ExpectedClientErrorBaseline clientExpectedError)
 {
     SyncHelpers.ExecuteActionAndWait(c => linqToAstoriaResultComparer.ExecuteAndCompare <TResult>(c, false, query, expectedValue, dataContext, clientExpectedError));
 }