예제 #1
0
 protected Account(Octokit.Account account, bool valid)
 {
     Id          = account.Id;
     NodeId      = account.NodeId;
     TypeId      = account.Type.HasValue ? (AccountType)account.Type.Value : AccountType.User;
     Login       = account.Login ?? throw new ArgumentNullException(nameof(account.Login));
     Following   = account.Following;
     Followers   = account.Followers;
     PublicRepos = account.PublicRepos;
     AvatarUrl   = account.AvatarUrl ?? string.Empty;
     HtmlUrl     = account.HtmlUrl ?? string.Empty;
     ApiUrl      = account.Url ?? string.Empty;
     BlogUrl     = account.Blog ?? string.Empty;
     Email       = account.Email ?? string.Empty;
     Bio         = account.Bio ?? string.Empty;
     Company     = account.Company ?? string.Empty;
     Location    = account.Location ?? string.Empty;
     CreatedAt   = account.CreatedAt.DateTime;
     FetchedAt   = DateTime.Now;
     Valid       = valid;
 }
예제 #2
0
 public Organization(Octokit.Account account, bool valid) : base(account, valid)
 {
 }
예제 #3
0
 protected static void BasicMemberMapping(Octokit.Account source, GhAccount target)
 {
     target.Login     = source.Login;
     target.Url       = source.Url;
     target.AvatarUrl = source.AvatarUrl;
 }