Пример #1
0
        private void AddOption(CoapOptionNumber number, CoapOption option)
        {
            if (Options == null)
            {
                Options = new SortedDictionary <CoapOptionNumber, List <CoapOption> >();
            }

            if (Options.ContainsKey(number) == false)
            {
                Options[number] = new List <CoapOption>();
            }

            Options[number].Add(option);
        }
Пример #2
0
        public void AddOption(CoapOptionNumber type, int value)
        {
            CoapOption option = new CoapOption((int)type, value);

            AddOption(type, option);
        }