コード例 #1
0
		public int Test1_AutoCheck(TestSerializerModel model)
		{
			//if( System.Web.HttpContext.Current.Request.ContentType.StartsWith("application/json") )
			//    model.DtValue = model.DtValue.ToLocalTime();

			string xml1 = model.ToString();
			string xml2 = s_lastTestSerializerModel.ToString();
			return (xml1 == xml2 ? 1 : 0);
		}
コード例 #2
0
		private TestSerializerModel GetTestSerializerModel()
		{
			Random rand = new Random();
			s_lastTestSerializerModel = new TestSerializerModel {
				StringVal = "Fish Li",
				DtValue = DateTime.Now,
				IntVal = rand.Next(10, 100),
				Money = Math.Round( 1000M * (decimal)rand.NextDouble(), 4),
				Guid = Guid.NewGuid()
			};
			return s_lastTestSerializerModel;
		}
コード例 #3
0
		public string Test1(TestSerializerModel model)
		{
			return model.ToString();
		}