public StreamRef StreamOf(StreamPath path) { if (path == StreamPath.Empty) throw new ArgumentException("Stream path is empty", nameof(path)); return StreamRef.Deserialize(path); }
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); }
public StreamRef StreamOf(StreamPath path) { if (path == StreamPath.Empty) { throw new ArgumentException("Stream path is empty", "path"); } return(StreamRef.Deserialize(path)); }