Ejemplo n.º 1
0
        public static Ref Deserialize(string path, Type type)
        {
            if (type == typeof(ClientRef))
            {
                return(ClientRef.Deserialize(path));
            }

            if (type == typeof(ActorRef))
            {
                return(ActorRef.Deserialize(path));
            }

            if (type == typeof(StreamRef))
            {
                return(StreamRef.Deserialize(path));
            }

            var deserializer = deserializers.Find(type);

            if (deserializer != null)
            {
                return(deserializer(path));
            }

            throw new InvalidOperationException("Unknown ref type: " + type);
        }
Ejemplo n.º 2
0
        public static Ref Deserialize(string path)
        {
            if (ClientRef.Satisfies(path))
            {
                return(ClientRef.Deserialize(path));
            }

            return(ActorRef.Deserialize(ActorPath.Deserialize(path)));
        }