コード例 #1
0
        internal static RestIntegration Create(BaseDiscordClient discord, IGuild guild, Model model)
        {
            var entity = new RestIntegration(discord, guild, model.Id);

            entity.Update(model);
            return(entity);
        }
コード例 #2
0
 internal void Update(Model model)
 {
     Id           = model.Id;
     Name         = model.Name;
     Type         = model.Type;
     IsRevoked    = model.Revoked.IsSpecified ? model.Revoked.Value : null;
     Integrations = model.Integrations.IsSpecified ?model.Integrations.Value
                    .Select(intergration => RestIntegration.Create(Discord, null, intergration)).ToImmutableArray() : null;
     Verified     = model.Verified;
     FriendSync   = model.FriendSync;
     ShowActivity = model.ShowActivity;
     Visibility   = model.Visibility;
 }