private void DoDisco(string msg) { Become(new Behavior <Dictionary <string, string> >(Found)); BaseActor rem = new RemoteSenderActor(new ActorTag(fUri)); rem += new DiscoCommand(this); // send message }
private void Disco(string hostAddress) { Become(new Behavior <Dictionary <string, string> >(t => true, Found)); var rem = new RemoteSenderActor(new ActorTag(hostAddress)); rem.SendMessage(new DiscoCommand(this)); }
private void Disco(string hostAddress, IActor actor) { Become(new Behavior <Dictionary <string, string> >(t => { return(true); }, Found)); var rem = new RemoteSenderActor(new ActorTag(hostAddress)); rem.SendMessage(new DiscoCommand(actor)); }
public object GetObjectToSerialize(object obj, Type targetType) { // Reset the property value using the GetValue method. // force misc init if (obj is RemoteSenderActor remoteActor) { BaseActor.CompleteInitialize(remoteActor); RemoteSenderActor.CompleteInitialize(remoteActor); // typeof(RemoteSenderActor).GetField("fRemoteTag").SetValue(obj, getTag); } return(obj); }
public object SetObjectData(object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) { // Reset the property value using the GetValue method. // force misc init if (obj is RemoteSenderActor remoteActor) { if (info == null) { throw new ActorException("Receiving null SerializationInfo"); } BaseActor.CompleteInitialize(remoteActor); RemoteSenderActor.CompleteInitialize(remoteActor); ActorTag getTag = (ActorTag)info.GetValue("RemoteTag", typeof(ActorTag)); typeof(RemoteSenderActor).GetField("fRemoteTag").SetValue(obj, getTag); } return(null); // ms bug here }
public static void CompleteInitialize(RemoteSenderActor anActor) { CheckArg.Actor(anActor); anActor.fSerializeService = ActorServer.GetInstance().SerializeService; anActor.Become(new Behavior <object>(anActor.DoRouting)); }
private void DoConnect(ActorTag tag) { IActor remoteSend = new RemoteSenderActor(tag); fSender.SendMessage(fServiceName, tag, remoteSend); }