Пример #1
0
        public string GetCoded(int offset, int?length)
        {
            string subStrRaw = length.HasValue
                ? Raw.Substring(offset, length.Value)
                : Raw.Substring(offset);

            return(_namingConventionSwitcher.ConvertRequestedToCoded(subStrRaw));
        }
        /// <summary>
        /// Adds the properties of the given <see cref="jObject" /> to a new instance of the <see cref="TDictionary"/> dictionary type.
        /// </summary>
        internal TDictionary ConvertObject(JObject jObject)
        {
            var obj = new TDictionary();
            IDictionary <string, object> dictionary = obj;

            foreach (JProperty property in jObject.Properties())
            {
                string key = _switcher.ConvertRequestedToCoded(property.Name);
                dictionary.Add(key, Convert(property.Value));
            }

            return(obj);
        }