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); }
public void AddOption(CoapOptionNumber type, int value) { CoapOption option = new CoapOption((int)type, value); AddOption(type, option); }