public override object Deserialize(IDictionary<string, object> dictionary, Type type, JavaScriptSerializer serializer) { if (dictionary != null) { var watcher = new Watcher(); watcher.Id = dictionary.GetValue<int>(RedmineKeys.ID); watcher.Name = dictionary.GetValue<string>(RedmineKeys.NAME); return watcher; } return null; }
/// <summary> /// /// </summary> /// <returns></returns> public object Clone() { var watcher = new Watcher { Id = Id, Name = Name }; return watcher; }