public static SinkRefImpl ToSinkRefImpl(ExtendedActorSystem system, string eventType, string originPath) { var type = TypeFromString(eventType); var originRef = system.Provider.ResolveActorRef(originPath); return(SinkRefImpl.Create(type, originRef)); }
private SinkRefImpl DeserializeSinkRef(byte[] bytes) { var sinkRef = SinkRef.Parser.ParseFrom(bytes); var type = SerializationTools.TypeFromProto(sinkRef.EventType); var targetRef = _system.Provider.ResolveActorRef(sinkRef.TargetRef.Path); return(SinkRefImpl.Create(type, targetRef)); }
private ByteString SerializeSinkRef(SinkRefImpl sinkRef) => new SinkRef { EventType = SerializationTools.TypeToProto(sinkRef.EventType), TargetRef = new ActorRef { Path = Akka.Serialization.Serialization.SerializedActorPath(sinkRef.InitialPartnerRef) } } .ToByteString();
public static SinkRef ToSinkRef(SinkRefImpl sinkRef) { return(new SinkRef() { EventType = TypeToProto(sinkRef.EventType), TargetRef = new ActorRef() { Path = Akka.Serialization.Serialization.SerializedActorPath(sinkRef.InitialPartnerRef) } }); }
public static ISurrogate ToSurrogate(SinkRefImpl sinkRef) { var snkRef = ToSinkRef(sinkRef); return(new SinkRefSurrogate(snkRef.EventType.TypeName, snkRef.TargetRef.Path)); }