internal override void Update(ChannelModel model) { if (model.Position.HasValue) { Position = model.Position.Value; } if (model.PermissionOverwrites.HasValue) { Overwrites = model.PermissionOverwrites.Value.ToReadOnlyList(this, (x, @this) => { var overwrite = new RestOverwrite(@this.Client, @this.Id, x); overwrite.Channel.Value = @this; return(overwrite); }); } base.Update(model); }
internal override void Update(ChannelModel model) { if (model.Position.HasValue) { Position = model.Position.Value; } if (model.PermissionOverwrites.HasValue) { Overwrites = model.PermissionOverwrites.Value.Select(x => { var overwrite = new RestOverwrite(Client, x, Id); overwrite.Channel.SetValue(this); return(overwrite); }).ToImmutableArray(); } base.Update(model); }