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;
        }
Esempio n. 2
0
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 public object Clone()
 {
     var watcher = new Watcher { Id = Id, Name = Name };
     return watcher;
 }