Beispiel #1
0
        public void SetData(string str, string scv, byte[] dealsInfo, byte[] dealsData)
        {
            this.CurrentTestRet    = WekaUtils.StringToDoubleArray(str);
            this.CurrentClassValue = WekaUtils.StringToDoubleArray(scv);

            var deals = Feng.Windows.Utils.SerializeHelper.Deserialize <DealsInfo>(dealsInfo);

            if (dealsData != null)
            {
                System.IO.MemoryStream outStream = new System.IO.MemoryStream();
                var inStream = new System.IO.MemoryStream(dealsData);
                System.IO.Compression.GZipStream zipStream = new System.IO.Compression.GZipStream(inStream, System.IO.Compression.CompressionMode.Decompress);
                zipStream.CopyTo(outStream);

                deals.Deals = Feng.Windows.Utils.SerializeHelper.Deserialize <List <DealInfo> >(outStream.ToArray());
            }
            else
            {
                deals.Deals = new List <DealInfo>();
            }
            if (deals != null)
            {
                this.Deals  = deals;
                Initialized = true;
            }
        }