-
Notifications
You must be signed in to change notification settings - Fork 3
/
ISqlCollection.cs
42 lines (39 loc) · 1.64 KB
/
ISqlCollection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
namespace YeSql.Net;
/// <summary>
/// Represents a collection of tags and SQL statements.
/// </summary>
public interface ISqlCollection : IEnumerable<ModelTag>
{
/// <summary>
/// Gets the SQL statement associated with the specified tag.
/// </summary>
/// <param name="tagName">The tag of the SQL statement to get.</param>
/// <value>
/// The SQL statement associated with the specified tag.
/// If the specified tag is not found, throws a <see cref="TagNotFoundException" />.
/// </value>
/// <exception cref="ArgumentNullException">
/// <c>tagName</c> is <c>null</c>.
/// </exception>
/// <exception cref="TagNotFoundException">
/// <c>tagName</c> does not exist in the collection.
/// </exception>
string this[string tagName] { get; }
/// <summary>
/// Gets the SQL statement associated with the specified tag.
/// </summary>
/// <param name="tagName">The tag of the SQL statement to get.</param>
/// <param name="sqlStatement">
/// When this method returns, contains the SQL statement associated with the specified tag, if the tag is found;
/// otherwise, the default value for the type of the <c>sqlStatement</c> parameter. This parameter is passed uninitialized.
/// </param>
/// <returns>
/// <c>true</c> if the <see cref="ISqlCollection" /> contains a SQL statement with the specified tag; otherwise, <c>false</c>.
/// </returns>
/// <exception cref="ArgumentNullException">
/// <c>tagName</c> is <c>null</c>.
/// </exception>
bool TryGetStatement(string tagName, out string sqlStatement);
}