コード例 #1
0
        public static KeyValueStrings toKeyValueStrings(this Dictionary <string, string> dictionary)
        {
            if (dictionary.isNull())
            {
                return(null);
            }
            var keyValueStrings = new KeyValueStrings();

            foreach (var item in dictionary)
            {
                keyValueStrings.add(item.Key, item.Value);
            }
            return(keyValueStrings);
        }
コード例 #2
0
        public static Dictionary <string, string> toDictionary(this KeyValueStrings keyValueStrings)
        {
            if (keyValueStrings.isNull())
            {
                return(null);
            }
            var dictionary = new Dictionary <string, string>();

            foreach (var item in keyValueStrings.Items)
            {
                dictionary.add(item.Key, item.Value);
            }
            return(dictionary);
        }