Exemplo n.º 1
0
 internal static GrainReference FromKeyInfo(GrainReferenceKeyInfo keyInfo, IGrainReferenceRuntime runtime)
 {
     if (keyInfo.HasGenericArgument)
     {
         return(FromGrainId(LegacyGrainId.FromKeyInfo(keyInfo.Key), runtime, keyInfo.GenericArgument));
     }
     else if (keyInfo.HasObserverId)
     {
         return(NewObserverGrainReference(LegacyGrainId.FromKeyInfo(keyInfo.Key), GuidId.GetGuidId(keyInfo.ObserverId), runtime));
     }
     else if (keyInfo.HasTargetSilo)
     {
         return(FromGrainId(LegacyGrainId.FromKeyInfo(keyInfo.Key), runtime, null, SiloAddress.New(keyInfo.TargetSilo.endpoint, keyInfo.TargetSilo.generation)));
     }
     else
     {
         return(FromGrainId(LegacyGrainId.FromKeyInfo(keyInfo.Key), runtime));
     }
 }
Exemplo n.º 2
0
        public Uri ToGatewayUri()
        {
            var siloAddress = SiloAddressClass.FromParsableString(SiloAddress);

            return(SiloAddressClass.New(new IPEndPoint(siloAddress.Endpoint.Address, ProxyPort), siloAddress.Generation).ToGatewayUri());
        }