winget-cli

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

OutOfProcDiscoverer.cs (1509B)


      1 // -----------------------------------------------------------------------------
      2 // <copyright file="OutOfProcDiscoverer.cs" company="Microsoft Corporation">
      3 //     Copyright (c) Microsoft Corporation. Licensed under the MIT License.
      4 // </copyright>
      5 // -----------------------------------------------------------------------------
      6 
      7 namespace Microsoft.Management.Configuration.UnitTests.Helpers
      8 {
      9     using System.Collections.Generic;
     10     using Xunit.Abstractions;
     11     using Xunit.Sdk;
     12 
     13     /// <summary>
     14     /// Enables integration with xUnit trait system.
     15     /// </summary>
     16     public class OutOfProcDiscoverer : ITraitDiscoverer
     17     {
     18         /// <summary>
     19         /// The type name for this discoverer.
     20         /// </summary>
     21         public const string TypeName = Constants.NamespaceNameForTraits + ".OutOfProcDiscoverer";
     22 
     23         /// <summary>
     24         /// Initializes a new instance of the <see cref="OutOfProcDiscoverer"/> class.
     25         /// </summary>
     26         public OutOfProcDiscoverer()
     27         {
     28         }
     29 
     30         /// <summary>
     31         /// Gets the trait information for the OutOfProcAttribute.
     32         /// </summary>
     33         /// <param name="traitAttribute">The trait information.</param>
     34         /// <returns>Trait name/value pairs.</returns>
     35         public IEnumerable<KeyValuePair<string, string>> GetTraits(IAttributeInfo traitAttribute)
     36         {
     37             yield return new KeyValuePair<string, string>("Category", "OutOfProc");
     38         }
     39     }
     40 }