public bool Retrieve(int userId, out UserAuthor userAuthor) { if (_userAuthorCache.TryGetValue(userId, out userAuthor)) { return(true); } userAuthor = new UserAuthor { UserId = userId }; if (_userAuthorCache.TryAdd(userId, userAuthor)) { return(false); } _userAuthorCache.TryGetValue(userId, out userAuthor); return(true); }
public Load(UserAuthor userAuthor, IBitmap avatar) { UserAuthor = userAuthor; Avatar = avatar; }
public Load(UserAuthor userAuthor, string name) { UserAuthor = userAuthor; Name = name; }