예제 #1
0
        // 채널 정보 로드 관련
        private void test_channelInfo()
        {
            LQStructures.LQChannelInfo struaa = new LQStructures.LQChannelInfo();

            LQStructures.LQChannelInfo stru = new LQStructures.LQChannelInfo();
            //stru.strCEOName_ = "Adasdjklhakdljhflaksdasdfasasdasdasddfasdfsadfhrfklajhelrkjsdhlfkjsdhf";


            //byte[] pByte = Packet_Convert.Serialize<LQStructures.LQChannelInfo>(stru);
            //MessageBox.Show(string.Format("{0}", pByte.Length));
            //LQStructures.LQChannelInfo stru1 = new LQStructures.LQChannelInfo();
            //Packet_Convert.Deserialize<LQStructures.LQChannelInfo>(ref stru1, ref pByte);
            //MessageBox.Show(string.Format("{0}", stru1.strCEOName_));


            MemoryStream stream = new MemoryStream();

            Packet_Convert.Serialize_Stream <LQStructures.LQChannelInfo>(ref stru, ref stream);
            MessageBox.Show(string.Format("{0}", stream.Length));


            stream.Position = 0;
            LQStructures.LQChannelInfo stru1 = Packet_Convert.Deserialize_Stream <LQStructures.LQChannelInfo>(ref stream) as LQStructures.LQChannelInfo;
            if (stru1 == null)
            {
                MessageBox.Show("실패함");
            }

            byte[] pByte = new byte[(int)stream.Length];
            stream.Write(pByte, 0, (int)stream.Length);
            MessageBox.Show(string.Format("{0}", pByte.Length));
            GC.Collect();

            //   MessageBox.Show(string.Format("{0} 개가 생성이 되었습니다.", LQStructures.LQChannelInfo.count));
        }
예제 #2
0
 public void SetChannelInfo(LQStructures.LQChannelInfo pInfo)
 {
     ChannelInfo_ = pInfo;
 }