public ActivationAddress AddSingleActivation(GrainId grain, ActivationId act, SiloAddress silo) { SingleInstance = true; if (Instances.Count > 0) { var item = Instances.First(); return(ActivationAddress.GetAddress(item.Value.SiloAddress, grain, item.Key)); } else { Instances.Add(act, new ActivationInfo(silo)); VersionTag = rand.Next(); return(ActivationAddress.GetAddress(silo, grain, act)); } }
public ActivationAddress AddSingleActivation(GrainId grain, ActivationId act, SiloAddress silo, MultiClusterStatus registrationStatus = MultiClusterStatus.Owned) { SingleInstance = true; if (Instances.Count > 0) { var item = Instances.First(); return(ActivationAddress.GetAddress(item.Value.SiloAddress, grain, item.Key)); } else { Instances.Add(act, new ActivationInfo(silo, registrationStatus)); VersionTag = rand.Next(); return(ActivationAddress.GetAddress(silo, grain, act, registrationStatus)); } }