//----------------------------------------------------------------------- // // Copyright (C) 2013 Microsoft Corporation // //----------------------------------------------------------------------- using System.Collections.Generic; using System.Collections.ObjectModel; namespace System.Management.Automation { /// /// Contains a PS Class information /// public sealed class PSClassInfo { /// /// Initializes a new instance of the PSClassInfo class /// /// Name of the PS Class. internal PSClassInfo(string name) { this.Name = name; } /// /// Name of the class. /// public string Name { get; private set; } /// /// Collection of members of the class. /// public ReadOnlyCollection Members { get; private set; } /// /// Updates members of the class. /// /// Updated members public void UpdateMembers(IList members) { if (members != null) this.Members = new ReadOnlyCollection(members); } /// /// Module in which the class is implemented in. /// public PSModuleInfo Module { get; internal set; } /// /// Gets the help file path for the cmdlet. /// public string HelpFile { get; internal set; } = String.Empty; } /// /// Contains a class field information /// public sealed class PSClassMemberInfo { /// /// Initializes a new instance of the PSClassMemberInfo class /// internal PSClassMemberInfo(string name, string memberType, string defaultValue) { if (String.IsNullOrEmpty(name)) throw new ArgumentNullException("name"); this.Name = name; this.TypeName = memberType; this.DefaultValue = defaultValue; } /// /// Gets or sets name of the member /// public string Name { get; private set; } /// /// Gets or sets type of the member /// public string TypeName { get; private set; } /// /// Default value of the Field. /// public string DefaultValue { get; private set; } } }