-
Notifications
You must be signed in to change notification settings - Fork 2k
/
AdoNetGrainStorageSiloBuilderExtensions.cs
54 lines (50 loc) · 2.91 KB
/
AdoNetGrainStorageSiloBuilderExtensions.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
using System;
using Microsoft.Extensions.Options;
using Orleans.Configuration;
using Orleans.Providers;
namespace Orleans.Hosting
{
public static class AdoNetGrainStorageSiloBuilderExtensions
{
/// <summary>
/// Configure silo to use AdoNet grain storage as the default grain storage. Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </summary>
/// <remarks>
/// Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </remarks>
public static ISiloBuilder AddAdoNetGrainStorageAsDefault(this ISiloBuilder builder, Action<AdoNetGrainStorageOptions> configureOptions)
{
return builder.AddAdoNetGrainStorage(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME, configureOptions);
}
/// <summary>
/// Configure silo to use AdoNet grain storage for grain storage. Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </summary>
/// <remarks>
/// Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </remarks>
public static ISiloBuilder AddAdoNetGrainStorage(this ISiloBuilder builder, string name, Action<AdoNetGrainStorageOptions> configureOptions)
{
return builder.ConfigureServices(services => services.AddAdoNetGrainStorage(name, configureOptions));
}
/// <summary>
/// Configure silo to use AdoNet grain storage as the default grain storage. Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </summary>
/// <remarks>
/// Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </remarks>
public static ISiloBuilder AddAdoNetGrainStorageAsDefault(this ISiloBuilder builder, Action<OptionsBuilder<AdoNetGrainStorageOptions>> configureOptions = null)
{
return builder.AddAdoNetGrainStorage(ProviderConstants.DEFAULT_STORAGE_PROVIDER_NAME, configureOptions);
}
/// <summary>
/// Configure silo to use AdoNet grain storage for grain storage. Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </summary>
/// <remarks>
/// Instructions on configuring your database are available at <see href="http://aka.ms/orleans-sql-scripts"/>.
/// </remarks>
public static ISiloBuilder AddAdoNetGrainStorage(this ISiloBuilder builder, string name, Action<OptionsBuilder<AdoNetGrainStorageOptions>> configureOptions = null)
{
return builder.ConfigureServices(services => services.AddAdoNetGrainStorage(name, configureOptions));
}
}
}