/// <summary>
        /// Gets the object from Json properties.
        /// </summary>
        /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param>
        /// <returns>The object Value.</returns>
        internal static TcpConfig GetFromJsonProperties(JsonReader reader)
        {
            var name        = default(string);
            var port        = default(int?);
            var destination = default(GatewayDestination);

            do
            {
                var propName = reader.ReadPropertyName();
                if (string.Compare("name", propName, StringComparison.Ordinal) == 0)
                {
                    name = reader.ReadValueAsString();
                }
                else if (string.Compare("port", propName, StringComparison.Ordinal) == 0)
                {
                    port = reader.ReadValueAsInt();
                }
                else if (string.Compare("destination", propName, StringComparison.Ordinal) == 0)
                {
                    destination = GatewayDestinationConverter.Deserialize(reader);
                }
                else
                {
                    reader.SkipPropertyValue();
                }
            }while (reader.TokenType != JsonToken.EndObject);

            return(new TcpConfig(
                       name: name,
                       port: port,
                       destination: destination));
        }
        /// <summary>
        /// Gets the object from Json properties.
        /// </summary>
        /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param>
        /// <returns>The object Value.</returns>
        internal static HttpRouteConfig GetFromJsonProperties(JsonReader reader)
        {
            var name        = default(string);
            var match       = default(HttpRouteMatchRule);
            var destination = default(GatewayDestination);

            do
            {
                var propName = reader.ReadPropertyName();
                if (string.Compare("name", propName, StringComparison.Ordinal) == 0)
                {
                    name = reader.ReadValueAsString();
                }
                else if (string.Compare("match", propName, StringComparison.Ordinal) == 0)
                {
                    match = HttpRouteMatchRuleConverter.Deserialize(reader);
                }
                else if (string.Compare("destination", propName, StringComparison.Ordinal) == 0)
                {
                    destination = GatewayDestinationConverter.Deserialize(reader);
                }
                else
                {
                    reader.SkipPropertyValue();
                }
            }while (reader.TokenType != JsonToken.EndObject);

            return(new HttpRouteConfig(
                       name: name,
                       match: match,
                       destination: destination));
        }