Skip to content

Commit de80000

Browse files
committed
update some xmldoc 😁
1 parent 11368e4 commit de80000

1 file changed

Lines changed: 18 additions & 5 deletions

File tree

QueryBuilder.Tests/Infrastructure/TestCompilersContainer.cs

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ namespace SqlKata.Tests.Infrastructure
77
{
88
public class TestCompilersContainer
99
{
10+
private static class Messages
11+
{
12+
public const string ERR_INVALID_ENGINECODE = "Engine code '{0}' is not valid";
13+
public const string ERR_INVALID_ENGINECODES = "Invalid engine codes supplied '{0}'";
14+
}
15+
1016
protected readonly IDictionary<string, Compiler> Compilers = new Dictionary<string, Compiler>
1117
{
1218
[EngineCodes.Firebird] = new FirebirdCompiler(),
@@ -23,15 +29,15 @@ public IEnumerable<string> KnownEngineCodes
2329
}
2430

2531
/// <summary>
26-
/// Returns the compiler instance for the given <param name="engineCode"></param>
32+
/// Returns a <see cref="Compiler"/> instance for the given engine code
2733
/// </summary>
2834
/// <param name="engineCode"></param>
2935
/// <returns></returns>
3036
public Compiler Get(string engineCode)
3137
{
3238
if (!Compilers.ContainsKey(engineCode))
3339
{
34-
throw new InvalidOperationException($"Engine code '{engineCode}' is not valid");
40+
throw new InvalidOperationException(string.Format(Messages.ERR_INVALID_ENGINECODE, engineCode));
3541
}
3642

3743
return Compilers[engineCode];
@@ -50,7 +56,7 @@ public TCompiler Get<TCompiler>(string engineCode) where TCompiler : Compiler
5056
}
5157

5258
/// <summary>
53-
/// Compiles the query for the given <param name="engineCode"></param>
59+
/// Compiles the <see cref="Query"/> against the given engine code
5460
/// </summary>
5561
/// <param name="engineCode"></param>
5662
/// <param name="query"></param>
@@ -61,6 +67,12 @@ public SqlResult CompileFor(string engineCode, Query query)
6167
return compiler.Compile(query);
6268
}
6369

70+
/// <summary>
71+
/// Compiles the <see cref="Query"/> against the given engine codes
72+
/// </summary>
73+
/// <param name="engineCodes"></param>
74+
/// <param name="query"></param>
75+
/// <returns></returns>
6476
public TestSqlResultContainer Compile(IEnumerable<string> engineCodes, Query query)
6577
{
6678
var codes = engineCodes.ToList();
@@ -72,14 +84,15 @@ public TestSqlResultContainer Compile(IEnumerable<string> engineCodes, Query que
7284
if (results.Count != codes.Count)
7385
{
7486
var missingCodes = codes.Where(w => Compilers.All(a => a.Key != w));
75-
throw new InvalidOperationException($"Invalid engine codes supplied '{string.Join(", ", missingCodes)}'");
87+
var templateArg = string.Join(", ", missingCodes);
88+
throw new InvalidOperationException(string.Format(Messages.ERR_INVALID_ENGINECODES, templateArg));
7689
}
7790

7891
return new TestSqlResultContainer(results);
7992
}
8093

8194
/// <summary>
82-
/// Compiles the query for all known compilers
95+
/// Compiles the <see cref="Query"/> against all <see cref="Compiler"/>s
8396
/// </summary>
8497
/// <param name="query"></param>
8598
/// <returns></returns>

0 commit comments

Comments
 (0)