-
Notifications
You must be signed in to change notification settings - Fork 2k
/
RelationalStorageProviderQueries.cs
56 lines (47 loc) · 1.74 KB
/
RelationalStorageProviderQueries.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
using System;
namespace Orleans.Storage
{
/// <summary>
/// A container class for the queries currently used by the <see cref="AdoNetGrainStorage"/>.
/// </summary>
/// <remarks>This is provided as a separate entity in order to make these dynamically updatable.</remarks>
public class RelationalStorageProviderQueries
{
/// <summary>
/// The clause to write to the storage.
/// </summary>
public string WriteToStorage { get; }
/// <summary>
/// The clause to read from the storage.
/// </summary>
public string ReadFromStorage { get; set; }
/// <summary>
/// The clause to clear the storage.
/// </summary>
public string ClearState { get; set; }
/// <summary>
/// Constructor.
/// </summary>
/// <param name="writeToStorage">The clause to write to a storage.</param>
/// <param name="readFromStorage">The clause to read from a storage.</param>
/// <param name="clearState">The clause to clear the storage.</param>
public RelationalStorageProviderQueries(string writeToStorage, string readFromStorage, string clearState)
{
if(writeToStorage == null)
{
throw new ArgumentNullException(nameof(writeToStorage));
}
if(readFromStorage == null)
{
throw new ArgumentNullException(nameof(readFromStorage));
}
if(clearState == null)
{
throw new ArgumentNullException(nameof(clearState));
}
WriteToStorage = writeToStorage;
ReadFromStorage = readFromStorage;
ClearState = clearState;
}
}
}