// Token: 0x060015A7 RID: 5543 RVA: 0x00055C2C File Offset: 0x00053E2C public static ExchangeVolume GetInstance(MountedFolderPath volumeName, string exchangeVolumesRootPath, string databasesRootPath, int numDbsPerVolume) { ExchangeVolume exchangeVolume = new ExchangeVolume(volumeName, exchangeVolumesRootPath, databasesRootPath, numDbsPerVolume); exchangeVolume.Refresh(); return(exchangeVolume); }
public IEnumerable <ExchangeVolume> GetExchangeVolumes(string exchangeVolumesRootPath, string databasesRootPath, int numDbsPerVolume) { string volumeName; while (this.GetNextVolume(out volumeName)) { ExchangeVolume exVol = ExchangeVolume.GetInstance(new MountedFolderPath(volumeName), exchangeVolumesRootPath, databasesRootPath, numDbsPerVolume); yield return(exVol); } yield break; }
// Token: 0x06001589 RID: 5513 RVA: 0x00055818 File Offset: 0x00053A18 public static DatabaseVolumeInfo GetInstance(string edbPath, string logPath, string databaseName, string autoDagVolumesRootFolderPath, string autoDagDatabasesRootFolderPath, int autoDagDatabaseCopiesPerVolume) { Exception ex = null; DatabaseVolumeInfo databaseVolumeInfo = new DatabaseVolumeInfo(); MountedFolderPath volumePathName = MountPointUtil.GetVolumePathName(edbPath, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, string, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): GetVolumePathName() for EDB path '{1}' failed with error: {2}", databaseName, edbPath, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.DatabaseVolumeMountPoint = volumePathName; MountedFolderPath volumeNameForVolumeMountPoint = MountPointUtil.GetVolumeNameForVolumeMountPoint(volumePathName, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, MountedFolderPath, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): GetVolumeNameForVolumeMountPoint() for EDB mount point '{1}' failed with error: {2}", databaseName, volumePathName, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.DatabaseVolumeName = volumeNameForVolumeMountPoint; bool isDatabasePathOnMountedFolder = MountPointUtil.IsDirectoryMountPoint(volumePathName.Path, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, MountedFolderPath, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): IsDirectoryMountPoint() for EDB mount point '{1}' failed with error: {2}", databaseName, volumePathName, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.IsDatabasePathOnMountedFolder = isDatabasePathOnMountedFolder; MountedFolderPath volumePathName2 = MountPointUtil.GetVolumePathName(logPath, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, string, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): GetVolumePathName() for LOG path '{1}' failed with error: {2}", databaseName, logPath, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.LogVolumeMountPoint = volumePathName2; MountedFolderPath volumeNameForVolumeMountPoint2 = MountPointUtil.GetVolumeNameForVolumeMountPoint(volumePathName2, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, MountedFolderPath, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): GetVolumeNameForVolumeMountPoint() for LOG mount point '{1}' failed with error: {2}", databaseName, volumePathName2, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.LogVolumeName = volumeNameForVolumeMountPoint2; bool isLogPathOnMountedFolder = MountPointUtil.IsDirectoryMountPoint(volumePathName2.Path, out ex); if (ex != null) { DatabaseVolumeInfo.Tracer.TraceError <string, MountedFolderPath, Exception>(0L, "DatabaseVolumeInfo.GetInstance( {0} ): IsDirectoryMountPoint() for LOG mount point '{1}' failed with error: {2}", databaseName, volumePathName2, ex); databaseVolumeInfo.LastException = new DatabaseVolumeInfoInitException(databaseName, ex.Message, ex); return(databaseVolumeInfo); } databaseVolumeInfo.IsLogPathOnMountedFolder = isLogPathOnMountedFolder; if (!string.IsNullOrEmpty(autoDagVolumesRootFolderPath) && !string.IsNullOrEmpty(autoDagDatabasesRootFolderPath)) { ExchangeVolume instance = ExchangeVolume.GetInstance(volumeNameForVolumeMountPoint, autoDagVolumesRootFolderPath, autoDagDatabasesRootFolderPath, autoDagDatabaseCopiesPerVolume); if (instance.IsValid) { databaseVolumeInfo.ExchangeVolumeMountPoint = (instance.ExchangeVolumeMountPoint ?? MountedFolderPath.Empty); databaseVolumeInfo.IsExchangeVolumeMountPointValid = !MountedFolderPath.IsNullOrEmpty(databaseVolumeInfo.ExchangeVolumeMountPoint); } } databaseVolumeInfo.IsValid = true; return(databaseVolumeInfo); }