Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        private ByteString SerializeSinkRef(SinkRefImpl sinkRef) => new SinkRef
        {
            EventType = SerializationTools.TypeToProto(sinkRef.EventType),
            TargetRef = new ActorRef
            {
                Path = Akka.Serialization.Serialization.SerializedActorPath(sinkRef.InitialPartnerRef)
            }
        }

        .ToByteString();
Пример #4
0
 public static SinkRef ToSinkRef(SinkRefImpl sinkRef)
 {
     return(new SinkRef()
     {
         EventType = TypeToProto(sinkRef.EventType),
         TargetRef = new ActorRef()
         {
             Path = Akka.Serialization.Serialization.SerializedActorPath(sinkRef.InitialPartnerRef)
         }
     });
 }
Пример #5
0
        public static ISurrogate ToSurrogate(SinkRefImpl sinkRef)
        {
            var snkRef = ToSinkRef(sinkRef);

            return(new SinkRefSurrogate(snkRef.EventType.TypeName, snkRef.TargetRef.Path));
        }