public Repository(string name, string description, long forkCount, RepositoryOwner owner, IssuesConnection issues, Uri url, StarGazers stargazers) => (Name, Description, ForkCount, OwnerLogin, OwnerAvatarUrl, IssuesCount, Uri, StarCount) = (name, description, forkCount, owner.Login, owner.AvatarUrl, issues?.IssuesCount ?? 0, url, stargazers.TotalCount);
public Repository(string name, string description, long forkCount, RepositoryOwner owner, IssuesConnection?issues, string url, StarGazers stargazers, bool isFork, IList <DailyViewsModel>?views = null, IList <DailyClonesModel>?clones = null) { Name = name; Description = description; ForkCount = forkCount; OwnerLogin = owner.Login; OwnerAvatarUrl = owner.AvatarUrl; IssuesCount = issues?.IssuesCount ?? 0; Url = url; StarCount = stargazers.TotalCount; IsFork = isFork; if (views != null && clones != null) { AddMissingDates(views, clones); } DailyViewsList = (views ?? Enumerable.Empty <DailyViewsModel>()).ToList(); DailyClonesList = (clones ?? Enumerable.Empty <DailyClonesModel>()).ToList(); var(isViewsTrending, isClonesTrending) = TrendingService.IsTrending(this); IsTrending = (isViewsTrending ?? false) || (isClonesTrending ?? false); }
public Repository(string name, string description, long forkCount, RepositoryOwner owner, IssuesConnection?issues, string url, StarGazers stargazers, bool isFork, DateTimeOffset dataDownloadedAt, bool isFavorite, IList <DailyViewsModel>?views = null, IList <DailyClonesModel>?clones = null) : this(name, description, forkCount, owner, issues, url, stargazers, isFork, views, clones) { DataDownloadedAt = dataDownloadedAt; IsFavorite = IsFavorite; }