Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.TS_FP_UPDATE_PDU.EncodeCachedPtr C# (CSharp) Method

EncodeCachedPtr() private method

private EncodeCachedPtr ( TS_FP_CACHEDPOINTERATTRIBUTE ptrData ) : byte[]
ptrData TS_FP_CACHEDPOINTERATTRIBUTE
return byte[]
        private byte[] EncodeCachedPtr(TS_FP_CACHEDPOINTERATTRIBUTE ptrData)
        {
            List<byte> totalBuffer = new List<byte>();
            List<byte> buffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(buffer, ptrData.cachedPointerUpdateData.cacheIndex);

            if (ptrData.compressionFlags != compressedType_Values.None)
            {
                RdpbcgrEncoder.EncodeBytes(
                    totalBuffer, serverSessionContext.Compress(ptrData.compressionFlags, buffer.ToArray()));
            }
            else
            {
                RdpbcgrEncoder.EncodeBytes(totalBuffer, buffer.ToArray());
            }
            return totalBuffer.ToArray();
        }