コード例 #1
0
        public new static string Serialize(object value)
        {
            StringBuilder stringBuilder = new StringBuilder();

            using (EcmaScriptWriter ecmaScriptWriter = new EcmaScriptWriter(stringBuilder))
            {
                ecmaScriptWriter.Write(value);
            }
            return(stringBuilder.ToString());
        }
コード例 #2
0
        /// <summary>
        /// A helper method for serializing an object to EcmaScript
        /// </summary>
        /// <param name="value"></param>
        /// <returns></returns>
        public static new string Serialize(object value)
        {
            StringBuilder output = new StringBuilder();

            using (EcmaScriptWriter writer = new EcmaScriptWriter(output))
            {
                writer.Write(value);
            }

            return(output.ToString());
        }
コード例 #3
0
ファイル: EcmaScriptWriter.cs プロジェクト: CzDreamer/eat
		/// <summary>
		/// A helper method for serializing an object to EcmaScript
		/// </summary>
		/// <param name="value"></param>
		/// <returns></returns>
		public static new string Serialize(object value)
		{
			StringBuilder output = new StringBuilder();

			using (EcmaScriptWriter writer = new EcmaScriptWriter(output))
			{
				writer.Write(value);
			}

			return output.ToString();
		}