Esempio n. 1
0
        /// <summary>
        /// Gets the fully qualified file name for the specified data category and path.
        /// </summary>
        private string GetFileName(DataCategory category, string path)
        {
            path = ScadaUtils.NormalPathSeparators(path);

            switch (category)
            {
            case DataCategory.Config:
                return(Path.Combine(StorageContext.AppDirs.ConfigDir, path));

            case DataCategory.Storage:
                return(Path.Combine(StorageContext.AppDirs.StorageDir, path));

            case DataCategory.View:
                return(Path.Combine(viewDir, path));

            default:
                throw new ScadaException("Data category not supported.");
            }
        }