예제 #1
0
        private static ServerApplicationPaths CreateApplicationPaths(string applicationPath, string programDataPath)
        {
            if (string.IsNullOrEmpty(programDataPath))
            {
                programDataPath = ApplicationPathHelper.GetProgramDataPath(applicationPath);
            }

            return(new ServerApplicationPaths(programDataPath, applicationPath, Path.GetDirectoryName(applicationPath)));
        }
예제 #2
0
파일: Program.cs 프로젝트: tnt-wolve/Emby
        private static ServerApplicationPaths CreateApplicationPaths(string applicationPath, string programDataPath)
        {
            if (string.IsNullOrEmpty(programDataPath))
            {
                programDataPath = ApplicationPathHelper.GetProgramDataPath(applicationPath);
            }

            var appFolderPath = Path.GetDirectoryName(applicationPath);

            Action <string> createDirectoryFn = s => Directory.CreateDirectory(s);

            return(new ServerApplicationPaths(programDataPath, appFolderPath, Path.GetDirectoryName(applicationPath), createDirectoryFn));
        }