//----------------------------------------------------------------------- // Copyright © Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------- namespace Microsoft.PowerShell.Commands.ShowCommandExtension { using System; using System.Management.Automation; /// /// Implements a facade around PSModuleInfo and its deserialized counterpart /// public class ShowCommandModuleInfo { /// /// Creates an instance of the ShowCommandModuleInfo class based on a CommandInfo object /// /// /// /// The object to wrap. /// public ShowCommandModuleInfo(PSModuleInfo other) { if (null == other) { throw new ArgumentNullException("other"); } this.Name = other.Name; } /// /// Creates an instance of the ShowCommandModuleInfo class based on a PSObject object /// /// /// /// The object to wrap. /// public ShowCommandModuleInfo(PSObject other) { if (null == other) { throw new ArgumentNullException("other"); } this.Name = other.Members["Name"].Value as string; } /// /// Gets the name of this module /// public string Name { get; private set; } } }