resharper suggestions in common implementations

This commit is contained in:
Luke Pulverenti
2013-04-10 11:45:15 -04:00
parent 7806ccd42f
commit d8263c7057
11 changed files with 52 additions and 63 deletions

View File

@@ -45,7 +45,7 @@ namespace MediaBrowser.Common.Implementations
/// <summary>
/// Gets the path to the system folder
/// </summary>
public string ProgramSystemPath { get { return Path.Combine(ProgramDataPath, "System"); }}
public string ProgramSystemPath { get { return Path.Combine(ProgramDataPath, "System"); } }
/// <summary>
/// The _data directory
@@ -291,7 +291,7 @@ namespace MediaBrowser.Common.Implementations
/// Gets the path to the application's ProgramDataFolder
/// </summary>
/// <returns>System.String.</returns>
private string GetProgramDataPath()
private string GetProgramDataPath()
{
var programDataPath = _useDebugPath ? ConfigurationManager.AppSettings["DebugProgramDataPath"] : Path.Combine(ConfigurationManager.AppSettings["ReleaseProgramDataPath"], ConfigurationManager.AppSettings["ProgramDataFolderName"]);
@@ -303,11 +303,16 @@ namespace MediaBrowser.Common.Implementations
var path = Assembly.GetExecutingAssembly().Location;
path = Path.GetDirectoryName(path);
if (string.IsNullOrEmpty(path))
{
throw new ApplicationException("Unable to determine running assembly location");
}
programDataPath = Path.Combine(path, programDataPath);
programDataPath = Path.GetFullPath(programDataPath);
}
if (!Directory.Exists(programDataPath))
{
Directory.CreateDirectory(programDataPath);