private static IPath ApplyOptions(IPath path, PathFactoryOptions options) { if (options.AutoNormalizeCase) { path = options.Culture != null ? path.NormCase(options.Culture) : path.NormCase(); } if (options.AutoExpandEnvironmentVariables) { path = path.ExpandEnvironmentVars(); } if (options.AutoExpandUserDirectory) { path = options.UserDirectory != null ? path.ExpandUser(options.UserDirectory) : path.ExpandUser(); } return(path); }
private static IPath ApplyOptions(IPath path, PathFactoryOptions options) { if (options.AutoNormalizeCase) { path = options.Culture != null ? path.NormCase(options.Culture) : path.NormCase(); } if (options.AutoExpandEnvironmentVariables) { path = path.ExpandEnvironmentVars(); } if (options.AutoExpandUserDirectory) { path = options.UserDirectory != null ? path.ExpandUser(options.UserDirectory) : path.ExpandUser(); } return path; }