public static Dictionary <string, string> ConfigFromFile(string path) { var zprops = ZnConfigFromFile(path); var zstr = ZnConfigToStr(zprops); return(ZTypes.ZStringToProperties(zstr)); }
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); }