winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

InvalidVersionException.cs (1150B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="InvalidVersionException.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.WinGet.Client.Engine.Exceptions
      8 {
      9     using System;
     10     using Microsoft.WinGet.Resources;
     11 
     12     /// <summary>
     13     /// Invalid version.
     14     /// </summary>
     15     [Serializable]
     16     public class InvalidVersionException : ArgumentException
     17     {
     18         /// <summary>
     19         /// Initializes a new instance of the <see cref="InvalidVersionException"/> class.
     20         /// </summary>
     21         /// <param name="version">Version.</param>
     22         public InvalidVersionException(string version)
     23             : base(string.Format(Resources.InvalidVersionExceptionMessage, version))
     24         {
     25             this.Version = version;
     26         }
     27 
     28         /// <summary>
     29         /// Gets the version.
     30         /// </summary>
     31         public string Version { get; private set; }
     32     }
     33 }