-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSqlStatement.cs
More file actions
35 lines (31 loc) · 999 Bytes
/
SqlStatement.cs
File metadata and controls
35 lines (31 loc) · 999 Bytes
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
using System;
using Microsoft.CodeAnalysis;
namespace NpgsqlAnalyzers
{
internal struct SqlStatement
{
public SqlStatement(string statement, Location location)
{
Statement = statement;
Location = location ?? throw new ArgumentNullException(nameof(location));
IsValid = true;
NotFound = false;
}
private SqlStatement(string statement, Location location, bool isValid, bool notFound)
{
Statement = statement;
Location = location;
IsValid = isValid;
NotFound = notFound;
}
public static SqlStatement StatementNotFound { get; } = new SqlStatement(
statement: string.Empty,
location: null,
isValid: false,
notFound: true);
public bool IsValid { get; }
public bool NotFound { get; }
public string Statement { get; }
public Location Location { get; }
}
}