Пример #1
0
        private static JObject WriteKeepAlive(KeepAlive value)
        {
            JObject jKA = new JObject();

            jKA.Add(new JProperty("Type", value.Type.ToString()));

            return(jKA);
        }
Пример #2
0
        private static KeepAlive ParseKeepAlive(dynamic ka)
        {
            KeepAlive keepAlive = new KeepAlive();

            if (ka == null)
            {
                return(keepAlive);
            }

            keepAlive.Type = ParseEnum <KeepAliveType>(ka.Type);
            return(keepAlive);
        }