Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 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;
 }
Esempio n. 4
0
 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;
 }
Esempio n. 6
0
 public ArgumentNotSupportedException(string argumentName, string supportedArguments, Exception innerException) : base(DiagnosticsResources.ArgumentNotSupported(argumentName, supportedArguments), innerException)
 {
     this.argumentName       = argumentName;
     this.supportedArguments = supportedArguments;
 }