WorkbookPublishSettings.PathForSettingsFile C# (CSharp) Method

PathForSettingsFile() static private method

Generates the path/filename of the Settings file that corresponds to the workbook path
static private PathForSettingsFile ( string workbookPath ) : string
workbookPath string
return string
    internal static string PathForSettingsFile(string workbookPath)
    {
        //Sanity test
        if(string.IsNullOrWhiteSpace(workbookPath))
        {
            AppDiagnostics.Assert(false, "missing path");
            throw new ArgumentNullException("missing path");
        }

        //Tag an extra extension to the file
        return workbookPath + WorkbookSettingsSuffix;
    }

Usage Example

 /// <summary>
 /// Generates the path/filename of the Settings file that corresponds to the datasource path
 /// </summary>
 /// <param name="datasourcePath"></param>
 /// <returns></returns>
 private static string PathForSettingsFile(string datasourcePath)
 {
     return(WorkbookPublishSettings.PathForSettingsFile(datasourcePath));
 }