Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.TS_INPUT_PDU.Clone C# (CSharp) Method

Clone() public method

Create an instance of the class that is identical to the current PDU.
public Clone ( ) : StackPacket
return StackPacket
        public override StackPacket Clone()
        {
            TS_INPUT_PDU cloneInputPdu = new TS_INPUT_PDU(context);
            cloneInputPdu.commonHeader = commonHeader.Clone();
            cloneInputPdu.numberEvents = numberEvents;
            cloneInputPdu.pad2Octets = pad2Octets;
            cloneInputPdu.shareDataHeader = shareDataHeader;
            if (slowPathInputEvents != null)
            {
                cloneInputPdu.slowPathInputEvents = new Collection<TS_INPUT_EVENT>();
                for (int count = 0; count < this.slowPathInputEvents.Count; count++)
                {
                    cloneInputPdu.slowPathInputEvents.Add(slowPathInputEvents[count]);
                }
            }
            return cloneInputPdu;
        }