コード例 #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);
 }
コード例 #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;
 }
コード例 #4
0
 public MshSetupInformationCorruptException(string keyPath) : base(DiagnosticsResources.ExceptionMshSetupInformationCorrupt(keyPath))
 {
     this.keyPath = keyPath;
 }
コード例 #5
0
 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;
 }
コード例 #6
0
 public ArgumentNotSupportedException(string argumentName, string supportedArguments, Exception innerException) : base(DiagnosticsResources.ArgumentNotSupported(argumentName, supportedArguments), innerException)
 {
     this.argumentName       = argumentName;
     this.supportedArguments = supportedArguments;
 }