コード例 #1
0
 public AlwaysNeedInputHintChannelCapability(IChannelCapability inner)
 {
     SetField.NotNull(out this.inner, nameof(inner), inner);
 }
コード例 #2
0
 public static bool ShouldSetInputHint(this IChannelCapability channelCapability, IMessageActivity activity)
 {
     return(channelCapability.NeedsInputHint() &&
            activity.Type == ActivityTypes.Message &&
            string.IsNullOrEmpty(activity.InputHint));
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: zaubererty/HamLibSharp
        static string DumpChannelCaps(IChannelCapability chan)
        {
            StringBuilder sb = new StringBuilder();

            if (chan.BankNumber)
            {
                sb.Append("BANK ");
            }
            if (chan.Antenna)
            {
                sb.Append("ANT ");
            }
            if (chan.RXFrequency)
            {
                sb.Append("FREQ ");
            }
            if (chan.RXMode)
            {
                sb.Append("MODE ");
            }
            if (chan.RXWidth)
            {
                sb.Append("WIDTH ");
            }
            if (chan.TXFrequency)
            {
                sb.Append("TXFREQ ");
            }
            if (chan.TXMode)
            {
                sb.Append("TXMODE ");
            }
            if (chan.TXWidth)
            {
                sb.Append("TXWIDTH ");
            }
            if (chan.Split)
            {
                sb.Append("SPLIT ");
            }
            if (chan.RepeaterShift)
            {
                sb.Append("RPTRSHIFT ");
            }
            if (chan.RepeaterOffset)
            {
                sb.Append("RPTROFS ");
            }
            if (chan.TuningStep)
            {
                sb.Append("TS ");
            }
            if (chan.Rit)
            {
                sb.Append("RIT ");
            }
            if (chan.Xit)
            {
                sb.Append("XIT ");
            }
            if (chan.Functions > 0)
            {
                sb.Append("FUNC ");                                 /* TODO: iterate over the list */
            }
            if (chan.Levels > 0)
            {
                sb.Append("LEVEL ");                              /* TODO: iterate over the list */
            }
            if (chan.CtcssTone)
            {
                sb.Append("TONE ");
            }
            if (chan.CtcssSquelch)
            {
                sb.Append("CTCSS ");
            }
            if (chan.DcsCode)
            {
                sb.Append("DCSCODE ");
            }
            if (chan.DcsSquelch)
            {
                sb.Append("DCSSQL ");
            }
            if (chan.ScanGroup)
            {
                sb.Append("SCANGRP ");
            }
            if (chan.ChannelFlags)
            {
                sb.Append("FLAG ");                                /* TODO: iterate over the RIG_CHFLAG's */
            }
            if (chan.ChannelName)
            {
                sb.Append("NAME ");
            }
            if (chan.ExtensionLevels)
            {
                sb.Append("EXTLVL ");
            }

            return(sb.ToString());
        }
コード例 #4
0
 public InputHintQueue(IChannelCapability channelCapability, Func <IDialogStack> makeStack)
 {
     SetField.NotNull(out this.channelCapability, nameof(channelCapability), channelCapability);
     SetField.NotNull(out this.makeStack, nameof(makeStack), makeStack);
 }
 public TextToSpeakActivityMapper(IChannelCapability capability)
 {
     SetField.NotNull(out this.capability, nameof(capability), capability);
 }