internal static SocketPresence Create(Model model)
        {
            var entity = new SocketPresence();

            entity.Update(model);
            return(entity);
        }
Esempio n. 2
0
 internal void Update(ClientState state, PresenceModel model, bool updatePresence)
 {
     if (updatePresence)
     {
         Presence = SocketPresence.Create(model);
         GlobalUser.Update(state, model);
     }
     if (model.Nick.IsSpecified)
     {
         Nickname = model.Nick.Value;
     }
     if (model.Roles.IsSpecified)
     {
         UpdateRoles(model.Roles.Value);
     }
 }
Esempio n. 3
0
 internal void Update(ClientState state, PresenceModel model)
 {
     Presence  = SocketPresence.Create(model);
     DMChannel = state.DMChannels.FirstOrDefault(x => x.Recipient.Id == Id);
 }
Esempio n. 4
0
 internal virtual void Update(ClientState state, PresenceModel model)
 {
     Presence = SocketPresence.Create(model);
     Update(state, model.User);
 }
Esempio n. 5
0
 internal void Update(ClientState state, PresenceModel model)
 {
     Presence = SocketPresence.Create(model);
 }