File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
orleans/JournaledTodoList/JournaledTodoList.WebApp Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11public static class Constants
22{
33 public const string StateStorageProviderName = "StateStorage" ;
4+
5+ public const string TodoListRegistryId = "registry" ;
46}
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ public async Task SetNameAsync(string listName)
8787 // Publish list with new name to todo list registry.
8888 // The registry only cares about the id and name of the list,
8989 // so this is the only place where we need to interact with the registry.
90- var registry = GrainFactory . GetGrain < ITodoListRegistryGrain > ( "registry" ) ;
90+ var registry = GrainFactory . GetGrain < ITodoListRegistryGrain > ( Constants . TodoListRegistryId ) ;
9191 await registry . RegisterTodoListAsync ( new TodoListReference ( this . GetPrimaryKeyString ( ) , listName ) ) ;
9292 }
9393
Original file line number Diff line number Diff line change @@ -9,15 +9,15 @@ public class TodoListService(IGrainFactory grainFactory)
99{
1010 public async Task < IDisposable > SubscribeAsync ( ITodoListRegistryObserver observer )
1111 {
12- var registryGrain = grainFactory . GetGrain < ITodoListRegistryGrain > ( "registry" ) ;
12+ var registryGrain = grainFactory . GetGrain < ITodoListRegistryGrain > ( Constants . TodoListRegistryId ) ;
1313 var observerRef = grainFactory . CreateObjectReference < ITodoListRegistryObserver > ( observer ) ;
1414 await registryGrain . Subscribe ( observerRef ) ;
1515 return new Subscription ( observerRef , registryGrain ) ;
1616 }
1717
1818 public Task < ImmutableArray < TodoListReference > > GetTodoListReferencesAsync ( )
1919 {
20- var registryGrain = grainFactory . GetGrain < ITodoListRegistryGrain > ( "registry" ) ;
20+ var registryGrain = grainFactory . GetGrain < ITodoListRegistryGrain > ( Constants . TodoListRegistryId ) ;
2121 return registryGrain . GetAllTodoListsAsync ( ) ;
2222 }
2323
You can’t perform that action at this time.
0 commit comments