internal MCSession(SavedSession ss) { accessToken = ss.AccessToken; clientToken = ss.ClientToken; profiles = ss.AvailableProfiles; selected = Array.IndexOf(ss.AvailableProfiles, ss.SelectedProfile); userId = ss.User.ID; userProperties = ss.User.Properties == null ? new Dictionary <string, string>() : ss.User.Properties.ToDictionary(x => x.Name, x => x.Value); email = ss.Email; isOffline = ss.IsOffline; }
public static MCSession PackFrom(SavedSession ss) => new MCSession(ss);