public static Version GetExecutingVersion() { if (ExchangeSetupContext.executingVersion == null) { string text = Path.Combine(ExchangeSetupContext.AssemblyPath, "ExSetup.exe"); try { FileVersionInfo versionInfo = FileVersionInfo.GetVersionInfo(text); if (string.IsNullOrEmpty(versionInfo.FileVersion)) { throw new FileVersionNotFoundException(DiagnosticsResources.ExceptionFileVersionNotFound(text)); } ExchangeSetupContext.executingVersion = new Version(versionInfo.FileVersion); } catch (FileNotFoundException) { throw new FileVersionNotFoundException(DiagnosticsResources.ExceptionWantedVersionButFileNotFound(text)); } } return(ExchangeSetupContext.executingVersion); }
public ArgumentDuplicatedException(string msg, Exception innerException) : base(DiagnosticsResources.ArgumentDuplicated(msg), innerException) { this.msg = msg; }
public SetupVersionInformationCorruptException(string keyPath, Exception innerException) : base(DiagnosticsResources.ExceptionSetupVersionInformationCorrupt(keyPath), innerException) { this.keyPath = keyPath; }
public MshSetupInformationCorruptException(string keyPath) : base(DiagnosticsResources.ExceptionMshSetupInformationCorrupt(keyPath)) { this.keyPath = keyPath; }
public ArgumentValueCannotBeParsedException(string key, string value, string typeName, Exception innerException) : base(DiagnosticsResources.ArgumentValueCannotBeParsed(key, value, typeName), innerException) { this.key = key; this.value = value; this.typeName = typeName; }
public ArgumentNotSupportedException(string argumentName, string supportedArguments, Exception innerException) : base(DiagnosticsResources.ArgumentNotSupported(argumentName, supportedArguments), innerException) { this.argumentName = argumentName; this.supportedArguments = supportedArguments; }