// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. using System; using System.Management.Automation; namespace Microsoft.PowerShell.Commands.ShowCommandExtension { /// /// Implements a facade around PSModuleInfo and its deserialized counterpart. /// public class ShowCommandModuleInfo { /// /// Initializes a new instance of the class /// with the specified . /// /// /// The object to wrap. /// public ShowCommandModuleInfo(PSModuleInfo other) { ArgumentNullException.ThrowIfNull(other); this.Name = other.Name; } /// /// Initializes a new instance of the class /// with the specified . /// /// /// The object to wrap. /// public ShowCommandModuleInfo(PSObject other) { ArgumentNullException.ThrowIfNull(other); this.Name = other.Members["Name"].Value as string; } /// /// Gets the name of this module. /// public string Name { get; } } }