123456789101112131415161718192021222324252627 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Reflection;
- using System.Text;
- using System.Threading.Tasks;
- namespace SinochemPosClient.Models
- {
- public abstract class RequestBase
- {
- public override string ToString()
- {
- PropertyInfo[] _PropertyInfos = this.GetType().GetProperties();
- var sb = new StringBuilder();
- foreach (var info in _PropertyInfos)
- {
- var value = info.GetValue(this, null) ?? "(null)";
- sb.AppendLine(info.Name + ": " + value.ToString());
- }
- return sb.ToString();
- }
- }
- }
|