Exemplo n.º 1
0
 protected override Task OnInitialize()
 {
     if (self == null)
     {
         self = GrainFactory.CreateObjectReference <IShardSessionObserver>(this).Result;
         return(ShardSession.Connect(self, shardName));
     }
     else
     {
         throw new InvalidOperationException("cannot initialize more than once");
     }
 }