Esempio n. 1
0
        protected GameSettingsProfile(Guid id, string name, string color, GameSettingsProfileBase parent)
            : base(id, name, color)
        {
            if (parent == null)
            {
                throw new ArgumentNullException(nameof(parent));
            }
            _parent = parent;

            //SetupRefresh();
        }
Esempio n. 2
0
        static IEnumerable <IGetData> GetAllProfiles(GameSettingsProfileBase activeProfile)
        {
            if (!(activeProfile != null))
            {
                throw new NullReferenceException("activeProfile != null");
            }

            var profile = activeProfile;

            while (profile != null)
            {
                yield return(profile);

                profile = profile.Parent;
            }
        }
Esempio n. 3
0
 public GameSettingsProfile(string name, string color, GameSettingsProfileBase parent)
     : this(Guid.NewGuid(), name, color, parent)
 {
 }
Esempio n. 4
0
 public void OnDeserialized(StreamingContext context)
 {
     ActiveProfile = _profiles.FirstOrDefault(x => x.Id == ActiveProfileGuid);
 }