private void Running(actTag msg) { fTestRun++; if (fNextNode != null) { if ((fTestRun % 100) == 0) { //var tr = new actTrace(); //tr.Start(); SendMessageTo( msg, fNextNode); //tr.Stop("End Node Ring"); } else { SendMessageTo( msg, fNextNode); } } else { if (fTestRun >= actTest.fTest) { testResult.end = DateTimeOffset.UtcNow; Console.WriteLine("End Test " + fTestRun.ToString() + " " + testResult.end.ToString()); Console.WriteLine("Elapsed " + fTestRun.ToString() + " " + testResult.Delta.ToString()); // .ToString("N5")); } } }
public void GetObjectData(object obj, SerializationInfo info, StreamingContext context) { IActor act = (IActor)obj; actHostDirectory.Register(act); // continue info.SetType(typeof(actRemoteActor)); actTag remoteTag = act.Tag; info.AddValue("RemoteTag", remoteTag, typeof(actTag)); }
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 actRemoteActor) { actActor.CompleteInitialize((actActor)obj); actRemoteActor.CompleteInitialize((actRemoteActor)obj); actTag getTag = (actTag)info.GetValue("RemoteTag", typeof(actTag)); typeof(actRemoteActor).GetField("fRemoteTag").SetValue(obj, getTag); } return(null); // ms bug here }