Closed powercode closed 6 years ago
Attributes that users params in constructors no longer work.
params
[ValidateSet("pending", "submitted", "shelved")] must be written as [ValidateSet(new[]{"pending", "submitted", "shelved"})]
[ValidateSet("pending", "submitted", "shelved")]
[ValidateSet(new[]{"pending", "submitted", "shelved"})]
Same with OutputType, Alias etc.
OutputType
Alias
PSMemberInfoCollection<PSPropertyInfo> no longer has an indexer with a string parameter.
PSMemberInfoCollection<PSPropertyInfo>
string
so
PSMemberInfoCollection<PSPropertyInfo>properties; properties["name"];
will now result in Argument1: cannot convert from 'string' to 'int'
Argument1: cannot convert from 'string' to 'int'
the ValidateSet issue was somewhat general, my tools eliminated the params modifier. I'll have that fixed shortly
fixed in https://github.com/PowerShell/PowerShellStandard/pull/9
Can you publish a preview-02?
yep, that's the plan - should be tomorrow
Attributes that users
params
in constructors no longer work.[ValidateSet("pending", "submitted", "shelved")]
must be written as[ValidateSet(new[]{"pending", "submitted", "shelved"})]
Same with
OutputType
,Alias
etc.PSMemberInfoCollection<PSPropertyInfo>
no longer has an indexer with astring
parameter.so
will now result in
Argument1: cannot convert from 'string' to 'int'