Exemple #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();
        }
Exemple #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;
            }
        }
Exemple #3
0
 public GameSettingsProfile(string name, string color, GameSettingsProfileBase parent)
     : this(Guid.NewGuid(), name, color, parent)
 {
 }
Exemple #4
0
 public void OnDeserialized(StreamingContext context)
 {
     ActiveProfile = _profiles.FirstOrDefault(x => x.Id == ActiveProfileGuid);
 }