void IServerMessage.Parse(object data)
        {
            IDictionary <string, object> dic = data as IDictionary <string, object>;
            object value;

            this.MessageId = dic["C"].ToString();

            if (dic.TryGetValue("S", out value))
            {
                IsInitialization = int.Parse(value.ToString()) == 1 ? true : false;
            }
            else
            {
                IsInitialization = false;
            }

            if (dic.TryGetValue("G", out value))
            {
                GroupsToken = value.ToString();
            }

            if (dic.TryGetValue("T", out value))
            {
                ShouldReconnect = int.Parse(value.ToString()) == 1 ? true : false;
            }
            else
            {
                ShouldReconnect = false;
            }

            if (dic.TryGetValue("L", out value))
            {
                PollDelay = TimeSpan.FromMilliseconds(double.Parse(value.ToString()));
            }

            IEnumerable enumerable = dic["M"] as IEnumerable;

            if (enumerable != null)
            {
                Data = new List <IServerMessage>();

                foreach (object subData in enumerable)
                {
                    IDictionary <string, object> subObj = subData as IDictionary <string, object>;

                    IServerMessage subMsg = null;

                    if (subObj != null)
                    {
                        if (subObj.ContainsKey("H"))
                        {
                            subMsg = new MethodCallMessage();
                        }
                        else if (subObj.ContainsKey("I"))
                        {
                            subMsg = new ProgressMessage();
                        }
                        else
                        {
                            subMsg = new DataMessage();
                        }
                    }
                    else
                    {
                        subMsg = new DataMessage();
                    }

                    subMsg.Parse(subData);

                    Data.Add(subMsg);
                }
            }
        }
        void IServerMessage.Parse(object data)
        {
            IDictionary<string, object> dic = data as IDictionary<string, object>;
            object value;

            this.MessageId = dic["C"].ToString();

            if (dic.TryGetValue("S", out value))
                IsInitialization = int.Parse(value.ToString()) == 1 ? true : false;
            else
                IsInitialization = false;

            if (dic.TryGetValue("G", out value))
                GroupsToken = value.ToString();

            if (dic.TryGetValue("T", out value))
                ShouldReconnect = int.Parse(value.ToString()) == 1 ? true : false;
            else
                ShouldReconnect = false;

            if (dic.TryGetValue("L", out value))
                PollDelay = TimeSpan.FromMilliseconds(double.Parse(value.ToString()));

            IEnumerable enumerable = dic["M"] as IEnumerable;

            if (enumerable != null)
            {
                Data = new List<IServerMessage>();

                foreach (object subData in enumerable)
                {
                    IDictionary<string, object> subObj = subData as IDictionary<string, object>;

                    IServerMessage subMsg = null;

                    if (subObj != null)
                    {
                        if (subObj.ContainsKey("H"))
                            subMsg = new MethodCallMessage();
                        else if (subObj.ContainsKey("I"))
                            subMsg = new ProgressMessage();
                        else
                            subMsg = new DataMessage();
                    }
                    else
                        subMsg = new DataMessage();

                    subMsg.Parse(subData);

                    Data.Add(subMsg);
                }
            }
        }