internal void Deserialize(GMAudioOptionsModel audioOptionsModel) { Id = audioOptionsModel.id; foreach (var modelAudioGroup in audioOptionsModel.audioGroups) { var audioGroup = new GMAudioGroup(); audioGroup.Deserialize(modelAudioGroup); AudioGroups.Add(audioGroup); } }
public GMAudioGroup CreateAudioGroup(string name) { if (name == null) { throw new ArgumentNullException(nameof(name)); } // TODO Validate name var audioGroup = new GMAudioGroup { Id = Guid.NewGuid(), Name = name }; AudioGroups.Add(audioGroup); return(audioGroup); }