Microsoft.Protocols.TestTools.StackSdk.RemoteDesktop.Rdpbcgr.Server_Save_Session_Info_Pdu.EncodeSaveSessionInfoData C# (CSharp) Method

EncodeSaveSessionInfoData() private method

private EncodeSaveSessionInfoData ( TS_SAVE_SESSION_INFO_PDU_DATA saveSessionInfoPduData ) : byte[]
saveSessionInfoPduData TS_SAVE_SESSION_INFO_PDU_DATA
return byte[]
        private byte[] EncodeSaveSessionInfoData(TS_SAVE_SESSION_INFO_PDU_DATA saveSessionInfoPduData)
        {
            List<byte> dataBuffer = new List<byte>();

            RdpbcgrEncoder.EncodeStructure(dataBuffer, saveSessionInfoPduData.shareDataHeader);
            RdpbcgrEncoder.EncodeStructure(dataBuffer, (uint)saveSessionInfoPduData.infoType);
            switch (saveSessionInfoPduData.infoType)
            {
                case infoType_Values.INFOTYPE_LOGON:
                    RdpbcgrEncoder.EncodeBytes(dataBuffer, EncodeLogonInfo((TS_LOGON_INFO)saveSessionInfoPduData.infoData));
                    break;
                case infoType_Values.INFOTYPE_LOGON_LONG:
                    RdpbcgrEncoder.EncodeBytes(dataBuffer, EncodeLogonLongInfo((TS_LOGON_INFO_VERSION_2)saveSessionInfoPduData.infoData));
                    break;
                case infoType_Values.INFOTYPE_LOGON_EXTENDED_INF:
                    RdpbcgrEncoder.EncodeBytes(dataBuffer, EncodeLogonExtended((TS_LOGON_INFO_EXTENDED)saveSessionInfoPduData.infoData));
                    break;
                case infoType_Values.INFOTYPE_LOGON_PLAINNOTIFY:
                    RdpbcgrEncoder.EncodeBytes(dataBuffer, EncodeLogonPlainNotify((TS_PLAIN_NOTIFY)saveSessionInfoPduData.infoData));
                    break;
            }

            return dataBuffer.ToArray();
        }