public static TagViewModel Create(TagItem tag, IBookService bookService) { return new TagViewModel(tag, bookService); }
/// <summary> /// Initializes a new instance of the TagViewModel class. /// </summary> private TagViewModel(TagItem tag, IBookService bookService) { _tag = tag; _bookService = bookService; }
public void UpdBookTag(TagItem before, TagItem after, Action<Exception> callback) { try { ServiceLocator.Current.GetInstance<IUserService>().GetLoginUser((lu, ex) => { if (ex != null) { callback(ex); return; } WebUtil.Put(string.Format("api/updbooktag/{0}?before={1}&after={2}", lu.Domain, before.name, after != null ? after.name : null)); callback(null); }); } catch (Exception ex) { logger.Warn(ex); callback(ex); } }