Example #1
0
 public Team copyWith(
     string id                = null,
     string avatar            = null,
     string name              = null,
     string coverImage        = null,
     TeamStats stats          = null,
     List <User> followers    = null,
     bool?followersHasMore    = null,
     List <Member> members    = null,
     bool?membersHasMore      = null,
     List <string> articleIds = null,
     bool?articlesHasMore     = null,
     bool?followTeamLoading   = null,
     List <string> badges     = null,
     bool?isDetail            = null
     )
 {
     return(new Team {
         id = id ?? this.id,
         avatar = avatar ?? this.avatar,
         name = name ?? this.name,
         coverImage = coverImage ?? this.coverImage,
         stats = stats ?? this.stats,
         followers = followers ?? this.followers,
         followersHasMore = followersHasMore ?? this.followersHasMore,
         members = members ?? this.members,
         membersHasMore = membersHasMore ?? this.membersHasMore,
         articleIds = articleIds ?? this.articleIds,
         articlesHasMore = articlesHasMore ?? this.articlesHasMore,
         followTeamLoading = followTeamLoading ?? this.followTeamLoading,
         badges = badges ?? this.badges,
         isDetail = isDetail ?? this.isDetail
     });
 }
Example #2
0
        public TeamStats Merge(TeamStats other)
        {
            if (null == other)
            {
                return(this);
            }

            return(this.copyWith(
                       followCount: other.followCount,
                       membersCount: other.membersCount
                       ));
        }