Example #1
0
 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);
 }
Example #2
0
 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;
 }