File size: 2,423 Bytes
8c763fb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

using System;

namespace Microsoft.PowerShell.Commands.ShowCommandInternal
{
    /// <summary>
    /// Arguments for the event triggered when it is necessary to display help for a command.
    /// </summary>
    public class ImportModuleEventArgs : EventArgs
    {
        /// <summary>
        /// the name for the command belonging to the module to be imported.
        /// </summary>
        private string commandName;

        /// <summary>
        /// the module path or name for the module we want to import.
        /// </summary>
        private string parentModuleName;

        /// <summary>
        /// the name of the module that is selected, which can be different from parentModuleName
        /// if "All" is selected
        /// </summary>
        private string selectedModuleName;

        /// <summary>
        /// Initializes a new instance of the ImportModuleEventArgs class.
        /// </summary>
        /// <param name="commandName">The name for the command needing help.</param>
        /// <param name="parentModuleName">The name of the module containing the command.</param>
        /// <param name="selectedModuleName">
        /// the name of the module that is selected, which can be different from parentModuleName
        /// if "All" is selected
        /// </param>
        public ImportModuleEventArgs(string commandName, string parentModuleName, string selectedModuleName)
        {
            this.commandName = commandName;
            this.parentModuleName = parentModuleName;
            this.selectedModuleName = selectedModuleName;
        }

        /// <summary>
        /// Gets the name for the command belonging to the module to be imported.
        /// </summary>
        public string CommandName
        {
            get { return this.commandName; }
        }

        /// <summary>
        /// Gets the module path or name for the module we want to import.
        /// </summary>
        public string ParentModuleName
        {
            get { return this.parentModuleName; }
        }

        /// <summary>
        /// Gets the name of the module that is selected, which can be different from parentModuleName
        /// if "All" is selected
        /// </summary>
        public string SelectedModuleName
        {
            get { return this.selectedModuleName; }
        }
    }
}