Exemple #1
0
        public static Dictionary <string, string> ConfigFromFile(string path)
        {
            var zprops = ZnConfigFromFile(path);
            var zstr   = ZnConfigToStr(zprops);

            return(ZTypes.ZStringToProperties(zstr));
        }
Exemple #2
0
        internal static Dictionary <string, string> ZStringToProperties(ZString zs)
        {
            var str = ZTypes.ZStringToString(zs);

            // Parse the properties from the string
            var properties = str.Split(_propSeparator, StringSplitOptions.RemoveEmptyEntries)
                             .Select(x => x.Split(_kvSeparator, 2))
                             .ToDictionary(x => x.First(), x => (x.Length == 2) ? x.Last() : "");

            return(properties);
        }