コード例 #1
0
        /// <summary>
        /// Computes and returns the absolute path specified by this <see cref="FilesystemDynamicPath"/> for the <see cref="StudyStorageLocation"/>.
        /// Note: The path may or may not be valid.
        /// </summary>
        /// <param name="studyStorage"></param>
        /// <returns></returns>
        public string ConvertToAbsolutePath(StudyStorageLocation studyStorage)
        {
            switch (_type)
            {
            case PathType.Absolute: return(_path);

            case PathType.RelativeToReconcileFolder:
                var basePath = studyStorage.GetReconcileRootPath();
                return(Path.Combine(basePath, _path));

            case PathType.RelativeToStudyFolder:
                basePath = studyStorage.GetStudyPath();
                return(Path.Combine(basePath, _path));

            default:
                return(_path);
            }
        }
コード例 #2
0
        /// <summary>
        /// Computes and returns the absolute path specified by this <see cref="FilesystemDynamicPath"/> for the <see cref="StudyStorageLocation"/>.
        /// Note: The path may or may not be valid.
        /// </summary>
        /// <param name="studyStorage"></param>
        /// <returns></returns>
        public string ConvertToAbsolutePath(StudyStorageLocation studyStorage)
        {
            switch (_type)
            {
                case PathType.Absolute: return _path;

                case PathType.RelativeToReconcileFolder:
                    var basePath = studyStorage.GetReconcileRootPath();
                    return Path.Combine(basePath, _path);

                case PathType.RelativeToStudyFolder:
                    basePath = studyStorage.GetStudyPath();
                    return Path.Combine(basePath, _path);

                default:
                    return _path;
            }
        }