winget-cli

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

InvalidSourceException.cs (1170B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="InvalidSourceException.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 source.
     14     /// </summary>
     15     [Serializable]
     16     public class InvalidSourceException : ArgumentException
     17     {
     18         /// <summary>
     19         /// Initializes a new instance of the <see cref="InvalidSourceException"/> class.
     20         /// </summary>
     21         /// <param name="sourceName">Source name.</param>
     22         public InvalidSourceException(string sourceName)
     23             : base(string.Format(Resources.InvalidSourceExceptionMessage, sourceName))
     24         {
     25             this.SourceName = sourceName;
     26         }
     27 
     28         /// <summary>
     29         /// Gets the source name.
     30         /// </summary>
     31         public string SourceName { get; private set; }
     32     }
     33 }