The TS_SURFCMD structure is used to specify the Surface Command type and to encapsulate the data for a Surface Command sent from a server to a client. All Surface Commands in section 2.2.9.2 conform to this structure.
        /// <summary>
        /// Parse TS_SURFCMD array
        /// (parser index is updated according to parsed length)
        /// </summary>
        /// <param name="data">data to be parsed</param>
        /// <param name="currentIndex">current parser index</param>
        /// <returns>TS_SURFCMD array</returns>
        private TS_SURFCMD[] ParseTsSurfCmd(byte[] data, ref int currentIndex)
        {
            List<TS_SURFCMD_SET_SURF_BITS> listSurfCmd = new List<TS_SURFCMD_SET_SURF_BITS>();

            // One by one parse TS_SURFCMD_SET_SURF_BITS
            while (currentIndex < data.Length)
            {
                TS_SURFCMD_SET_SURF_BITS bits = ParseTsSurfCmdSetSurfBits(data, ref currentIndex);
                listSurfCmd.Add(bits);
            }

            // Copy list to array
            TS_SURFCMD[] surfCmds = new TS_SURFCMD[listSurfCmd.Count];
            for (int i = 0; i < surfCmds.Length; i++)
            {
                surfCmds[i] = listSurfCmd[i];
            }
            return surfCmds;
        }