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