Team Ai
Datasetpublic

MegaBites-AI/Windows-powershell

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes372downloads
ISubsystem.cs68 linesDownload Raw Back to Subsystem
1// Copyright (c) Microsoft Corporation.2// Licensed under the MIT License.3 4#nullable enable5 6using System;7using System.Collections.Generic;8 9namespace System.Management.Automation.Subsystem10{11    /// <summary>12    /// Define the kinds of subsystems.13    /// </summary>14    /// <remarks>15    /// This enum uses power of 2 as the values for the enum elements, so as to make sure16    /// the bitwise 'or' operation of the elements always results in an invalid value.17    /// </remarks>18    public enum SubsystemKind : uint19    {20        /// <summary>21        /// Component that provides predictive suggestions to commandline input.22        /// </summary>23        CommandPredictor = 1,24 25        /// <summary>26        /// Cross platform desired state configuration component.27        /// </summary>28        CrossPlatformDsc = 2,29 30        /// <summary>31        /// Component that provides feedback when a command fails interactively.32        /// </summary>33        FeedbackProvider = 4,34    }35 36    /// <summary>37    /// Define the base interface to implement a subsystem.38    /// The API contracts for specific subsystems are defined within the specific interfaces/abstract classes that implements this interface.39    /// </summary>40    /// <remarks>41    /// A user should not directly implement <see cref="ISubsystem"/>, but instead should derive from one of the concrete subsystem interfaces or abstract classes.42    /// The instance of a type that only implements 'ISubsystem' cannot be registered to the <see cref="SubsystemManager"/>.43    /// </remarks>44    public interface ISubsystem45    {46        /// <summary>47        /// Gets the unique identifier for a subsystem implementation.48        /// </summary>49        Guid Id { get; }50 51        /// <summary>52        /// Gets the name of a subsystem implementation.53        /// </summary>54        string Name { get; }55 56        /// <summary>57        /// Gets the description of a subsystem implementation.58        /// </summary>59        string Description { get; }60 61        /// <summary>62        /// Gets a dictionary that contains the functions to be defined at the global scope of a PowerShell session.63        /// Key: function name; Value: function script.64        /// </summary>65        Dictionary<string, string>? FunctionsToDefine { get; }66    }67}68