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