public VoiceCommandPhrase CreateCommandPhrase(string phrase, VoiceCommandRequireAppName requireAppName) { if (this.phrases.Any(m => m.Text == phrase)) { throw new ArgumentException(nameof(phrase)); } VoiceCommandPhrase result = new VoiceCommandPhrase(phrase, requireAppName, this); this.phrases.Add(result); return(result); }
internal VoiceCommandPhrase(string text, VoiceCommandRequireAppName requireAppName, VoiceCommand parent) : base(text, parent) { this.RequireAppName = requireAppName; this.ValidateInternal(); }