Пример #1
0
        public static ARWObject Extract(byte[] bytes)
        {
            string data = System.Text.Encoding.UTF8.GetString(bytes).Replace("\0", null).Replace("\"", null);

            ARWObject newObj = new ARWObject();

            string[] dataParts = data.Split('~');
            if (dataParts.Length == 3)
            {
                newObj.requestName = dataParts [0];

                string[] prms = dataParts [1].Split('_');
                foreach (string p in prms)
                {
                    string[] paramParts = p.Split('#');
                    if (paramParts.Length == 2)
                    {
                        newObj.dataList.Add(paramParts [0], paramParts [1]);
                    }
                }

                newObj.eventParams = SpecialEventParam.Extract(dataParts [2]);
                return(newObj);
            }
            return(newObj);
        }