public object Clone() { //Do not work as the messageObject is of unknow object type is been pass and object type can not do deep copy. //Need to be done show that the new process does not have a reference to Memory in the other process. // thisMessageObject = messageObject.Clone(); /// ProcessMessage thisProcessMessage = new ProcessMessage(fromProcessId, toPocessId, fromIP, fromMAC, toIP, toMAC, messageObject, objectType); return thisProcessMessage; throw new NotImplementedException(); }
public void MailBox(ProcessMessage mail) { //A new deep copy of the mail should made in this process heap. This to stop process from shire objects. //Problem of object that mail is pass is could not be deep copy. ProcessMessage thisMail = (ProcessMessage)mail.Clone(); mailBox.Enqueue(thisMail); }