/// <summary> /// Compares the Bindable LINQ query with the equivalent LINQ query. /// </summary> /// <param name="bindableLinqQuery">The Bindable LINQ query.</param> /// <param name="standardLinqQuery">The LINQ query.</param> public static void CompareWithLinq(CompatabilityLevel expectations, IEnumerable bindableLinqQuery, IEnumerable standardLinqQuery) { switch (expectations) { case CompatabilityLevel.FullyCompatible: CompareWithLinqOrdered(bindableLinqQuery, standardLinqQuery); break; case CompatabilityLevel.FullyCompatibleExceptOrdering: CompareWithLinqUnordered(bindableLinqQuery, standardLinqQuery); break; } }
private static TSqlParser GetSqlParser(int compatabilityLevel) { compatabilityLevel = CompatabilityLevel.Validate(compatabilityLevel); var fullyQualifiedName = string.Format("Microsoft.SqlServer.TransactSql.ScriptDom.TSql{0}Parser", compatabilityLevel); TSqlParser parser = null; foreach (var asm in AppDomain.CurrentDomain.GetAssemblies()) { var parserType = asm.GetType(fullyQualifiedName); if (parserType != null) { parser = (TSqlParser)Activator.CreateInstance(parserType, new object[] { true }); break; } } return(parser ?? new TSql120Parser(true)); }
public FragmentBuilder(int compatabilityLevel) { parser = GetSqlParser(CompatabilityLevel.Validate(compatabilityLevel)); }