Exemplo n.º 1
0
        internal static RestConnection Create(BaseDiscordClient discord, Model model)
        {
            var entity = new RestConnection(discord);

            entity.Update(model);
            return(entity);
        }
Exemplo n.º 2
0
        public Connection(Model model)
        {
            Id        = model.Id;
            Type      = model.Type;
            Name      = model.Name;
            IsRevoked = model.Revoked;

            IntegrationIds = model.Integrations;
        }
Exemplo n.º 3
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;
 }
Exemplo n.º 4
0
 internal static RestConnection Create(Model model)
 {
     return(new RestConnection(model.Id, model.Type, model.Name, model.Revoked, model.Integrations.ToImmutableArray()));
 }