@@ -35,7 +35,7 @@ public class Parameter : IEquatable<Parameter>
3535
3636        public  bool  IsDynamic  {  get ;  set  ;  } 
3737
38-         public  string  Aliases  {  get ;  set ; } 
38+         public  List < string >  Aliases  {  get ;  set ; } 
3939
4040        public  bool  DontShow  {  get ;  set ; } 
4141
@@ -52,7 +52,7 @@ public Parameter()
5252            Description  =  string . Empty ; 
5353            ParameterSets  =  new ( ) ; 
5454            ParameterValue  =  new ( ) ; 
55-             Aliases  =  string . Empty ; 
55+             Aliases  =  new ( ) ; 
5656            AcceptedValues  =  new ( ) ; 
5757            DefaultValue  =  string . Empty ; 
5858            HelpMessage  =  string . Empty ; 
@@ -64,7 +64,7 @@ public Parameter(string name, string type)
6464            Type  =  type ; 
6565            ParameterSets  =  new ( ) ; 
6666            ParameterValue  =  new ( ) ; 
67-             Aliases  =  string . Empty ; 
67+             Aliases  =  new ( ) ; 
6868            AcceptedValues  =  new ( ) ; 
6969            DefaultValue  =  string . Empty ; 
7070            Description  =  string . Empty ; 
@@ -147,7 +147,7 @@ public Parameter(string name, string description, ParameterMetadataV2 metadata)
147147            VariableLength  =  metadata . VariableLength ; 
148148            DefaultValue  =  metadata . DefaultValue ; 
149149            SupportsWildcards  =  metadata . SupportsWildcards ; 
150-             Aliases  =  string . Join ( "," ,   metadata . Aliases ) ; 
150+             Aliases  =  metadata . Aliases ; 
151151            DontShow  =  metadata . DontShow ; 
152152            AcceptedValues  =  metadata . AcceptedValues ; 
153153            HelpMessage  =  metadata . HelpMessage ; 
@@ -201,16 +201,9 @@ public ParameterMetadataV2 GetMetadata()
201201                metadata . DefaultValue  =  DefaultValue ; 
202202            } 
203203
204-             if  ( !   string . IsNullOrEmpty ( Aliases ) ) 
204+             if  ( Aliases   is  not  null ) 
205205            { 
206-                 var  aliases  =  Aliases ? . Split ( Constants . Comma ,  StringSplitOptions . RemoveEmptyEntries ) ; 
207-                 if  ( aliases  is  not null ) 
208-                     { 
209-                     foreach ( var  alias   in  aliases ) 
210-                     { 
211-                         metadata . Aliases . Add ( alias . Trim ( ) ) ; 
212-                     } 
213-                 } 
206+                 metadata . Aliases  =  Aliases ; 
214207            } 
215208
216209            if  ( ParameterValue  is  not null  &&  ParameterValue . Count  >  0 ) 
@@ -248,7 +241,7 @@ public bool EqualsNoDescription(Parameter other)
248241            return  ( 
249242                string . Compare ( Name ,  other . Name ,  StringComparison . CurrentCulture )  ==  0  && 
250243                string . Compare ( Type ,  other . Type ,  StringComparison . CurrentCulture )  ==  0  && 
251-                 string . Compare ( Aliases ,   other . Aliases ,  StringComparison . CurrentCulture )   ==   0  && 
244+                 Aliases . SequenceEqual ( other . Aliases ,  StringComparer . CurrentCulture )  && 
252245                string . Compare ( DefaultValue ,  other . DefaultValue ,  StringComparison . CurrentCulture )  ==  0  && 
253246                string . Compare ( HelpMessage ,  other . HelpMessage ,  StringComparison . CurrentCulture )  ==  0  && 
254247                SupportsWildcards  ==  other . SupportsWildcards  && 
@@ -270,7 +263,7 @@ public bool Equals(Parameter other)
270263                string . Compare ( Name ,  other . Name ,  StringComparison . CurrentCulture )  ==  0  && 
271264                string . Compare ( Type ,  other . Type ,  StringComparison . CurrentCulture )  ==  0  && 
272265                string . Compare ( Description ,  other . Description ,  StringComparison . CurrentCulture )  ==  0  && 
273-                 string . Compare ( Aliases ,   other . Aliases ,  StringComparison . CurrentCulture )   ==   0  && 
266+                 Aliases . SequenceEqual ( other . Aliases ,  StringComparer . CurrentCulture )  && 
274267                string . Compare ( DefaultValue ,  other . DefaultValue ,  StringComparison . CurrentCulture )  ==  0  && 
275268                string . Compare ( HelpMessage ,  other . HelpMessage ,  StringComparison . CurrentCulture )  ==  0  && 
276269                SupportsWildcards  ==  other . SupportsWildcards  && 
0 commit comments