public override bool OnRun(FormTesting form, int count)
        {
            SuperPoolCall call = new SuperPoolCall(1712);

            // Generate a typical call.
            call.MethodInfoLocal = (MethodInfo)MethodInfo.GetCurrentMethod();
            call.Parameters      = new object[] { "asdwdas", 85923, EventArgs.Empty };
            call.RequestResponse = false;
            call.State           = SuperPoolCall.StateEnum.Finished;

            object result;

            for (_executed = 0; _executed < count; _executed++)
            {
                result = SerializationHelper.BinaryClone(call);
            }

            return(true);
        }
Exemple #2
0
        public virtual Envelope Clone()
        {
            Envelope newObject = (Envelope)this.MemberwiseClone();

            if (_transportByReference == false && _message != null)
            {
                if (_message is ICloneable)
                {
                    newObject._message = ((ICloneable)_message).Clone();
                }
                else if (_message.GetType().IsClass)
                {// We need to use the slow cloning mechanism.
                    newObject._message = SerializationHelper.BinaryClone(_message);
                    SystemMonitor.CheckOperationError(newObject._message != null, "Failed to serialize message [" + _message.GetType().Name + "].");
                }

                // Non class items are supposed to be copied by referencing.
            }

            return(newObject);
        }