#region Helper public virtual void SerializeTo(ref Uri url, object queryJson) { if (queryJson != null) { Type type = queryJson.GetType(); url = new Uri(string.Format("{0}#{1}卐{2}", url.OriginalString, type.AssemblyQualifiedName, JsonConvert.SerializeObject(queryJson))); } } public virtual void DeserializeFrom(ref Uri url, out object queryJson) { queryJson = null; int i = url.OriginalString.LastIndexOf("#"); if (i != -1) { string[] param = url.OriginalString.Substring(i + 1).Split(‘卐‘); string typeName = param[0]; queryJson = JsonConvert.DeserializeObject(param[1], Type.GetType(typeName, true)); } } #endregion
这是什么垃圾代码
时间: 2024-10-10 15:51:10