Example #1
0
        private static void ToString_impl(HelloNessageRequest value, StringBuilder str_builder, bool in_json)
        {
            {
                str_builder.Append('{');
                bool first_field = true;

                {
                    if (value.HelloMessageContent != null)

                    {
                        if (first_field)
                        {
                            first_field = false;
                        }
                        else
                        {
                            str_builder.Append(',');
                        }
                        str_builder.Append("\"HelloMessageContent\":");

                        ToString_impl(value.HelloMessageContent, str_builder, in_json: true);
                    }
                }

                str_builder.Append('}');
            }
        }
Example #2
0
 /// <summary>
 /// Converts the string representation of a HelloNessageRequest to its
 /// struct equivalent. A return value indicates whether the
 /// operation succeeded.
 /// </summary>
 /// <param name="input">A string to convert.</param>
 /// <param name="value">
 /// When this method returns, contains the struct equivalent of the value contained
 /// in input, if the conversion succeeded, or default(HelloNessageRequest) if the conversion
 /// failed. The conversion fails if the input parameter is null or String.Empty, or is
 /// not of the correct format. This parameter is passed uninitialized.
 /// </param>
 /// <returns>True if input was converted successfully; otherwise, false.</returns>
 public unsafe static bool TryParse(string input, out HelloNessageRequest value)
 {
     try
     {
         value = Newtonsoft.Json.JsonConvert.DeserializeObject <HelloNessageRequest>(input);
         return(true);
     }
     catch { value = default(HelloNessageRequest); return(false); }
 }
Example #3
0
 /// <summary>
 /// Serializes a HelloNessageRequest object to Json string.
 /// </summary>
 /// <param name="value">The target object to be serialized.</param>
 /// <returns>The serialized Json string.</returns>
 public static string ToString(HelloNessageRequest value)
 {
     s_ensure_string_builder();
     ToString_impl(value, s_stringBuilder, in_json: false);
     return(s_stringBuilder.ToString());
 }