Exemple #1
0
        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);
        }
Exemple #2
0
 internal VoiceCommandPhrase(string text, VoiceCommandRequireAppName requireAppName, VoiceCommand parent)
     : base(text, parent)
 {
     this.RequireAppName = requireAppName;
     this.ValidateInternal();
 }