forked from OrleansContrib/Orleankka
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServiceLocator.cs
More file actions
31 lines (25 loc) · 762 Bytes
/
ServiceLocator.cs
File metadata and controls
31 lines (25 loc) · 762 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
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Orleankka.Cluster;
namespace Demo
{
public static class ServiceLocator
{
public static ITopicStorage TopicStorage
{
get; private set;
}
public class Bootstrap : Bootstrapper<IDictionary<string, string>>
{
static bool done;
protected override async Task Run(IDictionary<string, string> properties)
{
if (done)
throw new InvalidOperationException("Already done");
TopicStorage = await Demo.TopicStorage.Init(properties["account"]);
done = true;
}
}
}
}