Skip to content

Commit 1790f3a

Browse files
authored
Remove redundant Attribute suffix (#24940)
1 parent 8f1d111 commit 1790f3a

File tree

58 files changed

+300
-300
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+300
-300
lines changed

src/Microsoft.Management.Infrastructure.CimCmdlets/CimIndicationWatcher.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ private void NewSubscriptionResultHandler(object src, CimSubscriptionEventArgs a
239239
/// If set EnableRaisingEvents to false, which will be ignored
240240
/// </para>
241241
/// </summary>
242-
[BrowsableAttribute(false)]
242+
[Browsable(false)]
243243
public bool EnableRaisingEvents
244244
{
245245
get

src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public abstract class CoreCommandBase : PSCmdlet, IDynamicParameters
2525
/// An instance of the PSTraceSource class used for trace output
2626
/// using "NavigationCommands" as the category.
2727
/// </summary>
28-
[Dbg.TraceSourceAttribute("NavigationCommands", "The namespace navigation tracer")]
28+
[Dbg.TraceSource("NavigationCommands", "The namespace navigation tracer")]
2929
internal static readonly Dbg.PSTraceSource tracer = Dbg.PSTraceSource.GetTracer("NavigationCommands", "The namespace navigation tracer");
3030

3131
#endregion Tracer

src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ public SwitchParameter PassThru
147147
/// The name of the new NoteProperty member.
148148
/// </summary>
149149
[Parameter(Mandatory = true, Position = 0, ParameterSetName = NotePropertySingleMemberSet)]
150-
[ValidateNotePropertyNameAttribute]
151-
[NotePropertyTransformationAttribute]
150+
[ValidateNotePropertyName]
151+
[NotePropertyTransformation]
152152
[ValidateNotNullOrEmpty]
153153
public string NotePropertyName
154154
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/CsvCommands.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ public string LiteralPath
218218
/// Gets or sets encoding optional flag.
219219
/// </summary>
220220
[Parameter]
221-
[ArgumentToEncodingTransformationAttribute]
222-
[ArgumentEncodingCompletionsAttribute]
221+
[ArgumentToEncodingTransformation]
222+
[ArgumentEncodingCompletions]
223223
[ValidateNotNullOrEmpty]
224224
public Encoding Encoding
225225
{
@@ -602,8 +602,8 @@ public string[] LiteralPath
602602
/// Gets or sets encoding optional flag.
603603
/// </summary>
604604
[Parameter]
605-
[ArgumentToEncodingTransformationAttribute]
606-
[ArgumentEncodingCompletionsAttribute]
605+
[ArgumentToEncodingTransformation]
606+
[ArgumentEncodingCompletions]
607607
[ValidateNotNullOrEmpty]
608608
public Encoding Encoding
609609
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-hex/Format-Hex.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ public sealed class FormatHex : PSCmdlet
6868
/// Gets or sets the type of character encoding for InputObject.
6969
/// </summary>
7070
[Parameter(ParameterSetName = "ByInputObject")]
71-
[ArgumentToEncodingTransformationAttribute]
72-
[ArgumentEncodingCompletionsAttribute]
71+
[ArgumentToEncodingTransformation]
72+
[ArgumentEncodingCompletions]
7373
[ValidateNotNullOrEmpty]
7474
public Encoding Encoding
7575
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-object/Format-Object.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public object[] Property
4444
/// <summary>
4545
/// </summary>
4646
/// <value></value>
47-
[ValidateRangeAttribute(1, int.MaxValue)]
47+
[ValidateRange(1, int.MaxValue)]
4848
[Parameter]
4949
public int Depth
5050
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/format-wide/Format-Wide.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public SwitchParameter AutoSize
5959
/// </summary>
6060
/// <value></value>
6161
[Parameter]
62-
[ValidateRangeAttribute(1, int.MaxValue)]
62+
[ValidateRange(1, int.MaxValue)]
6363
public int Column
6464
{
6565
get => _column.GetValueOrDefault(-1);

src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-file/Out-File.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ public string LiteralPath
7474
/// Encoding optional flag.
7575
/// </summary>
7676
[Parameter(Position = 1)]
77-
[ArgumentToEncodingTransformationAttribute]
78-
[ArgumentEncodingCompletionsAttribute]
77+
[ArgumentToEncodingTransformation]
78+
[ArgumentEncodingCompletions]
7979
[ValidateNotNullOrEmpty]
8080
public Encoding Encoding
8181
{
@@ -136,7 +136,7 @@ public SwitchParameter NoClobber
136136
/// <summary>
137137
/// Optional, number of columns to use when writing to device.
138138
/// </summary>
139-
[ValidateRangeAttribute(2, int.MaxValue)]
139+
[ValidateRange(2, int.MaxValue)]
140140
[Parameter]
141141
public int Width
142142
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/FormatAndOutput/out-string/Out-String.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public SwitchParameter Stream
3434
/// <summary>
3535
/// Optional, number of columns to use when writing to device.
3636
/// </summary>
37-
[ValidateRangeAttribute(2, int.MaxValue)]
37+
[ValidateRange(2, int.MaxValue)]
3838
[Parameter]
3939
public int Width
4040
{

src/Microsoft.PowerShell.Commands.Utility/commands/utility/GetDateCommand.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public long UnixTimeSeconds
7878
/// Allows the user to override the year.
7979
/// </summary>
8080
[Parameter]
81-
[ValidateRangeAttribute(1, 9999)]
81+
[ValidateRange(1, 9999)]
8282
public int Year
8383
{
8484
get
@@ -100,7 +100,7 @@ public int Year
100100
/// Allows the user to override the month.
101101
/// </summary>
102102
[Parameter]
103-
[ValidateRangeAttribute(1, 12)]
103+
[ValidateRange(1, 12)]
104104
public int Month
105105
{
106106
get
@@ -122,7 +122,7 @@ public int Month
122122
/// Allows the user to override the day.
123123
/// </summary>
124124
[Parameter]
125-
[ValidateRangeAttribute(1, 31)]
125+
[ValidateRange(1, 31)]
126126
public int Day
127127
{
128128
get
@@ -144,7 +144,7 @@ public int Day
144144
/// Allows the user to override the hour.
145145
/// </summary>
146146
[Parameter]
147-
[ValidateRangeAttribute(0, 23)]
147+
[ValidateRange(0, 23)]
148148
public int Hour
149149
{
150150
get
@@ -166,7 +166,7 @@ public int Hour
166166
/// Allows the user to override the minute.
167167
/// </summary>
168168
[Parameter]
169-
[ValidateRangeAttribute(0, 59)]
169+
[ValidateRange(0, 59)]
170170
public int Minute
171171
{
172172
get
@@ -188,7 +188,7 @@ public int Minute
188188
/// Allows the user to override the second.
189189
/// </summary>
190190
[Parameter]
191-
[ValidateRangeAttribute(0, 59)]
191+
[ValidateRange(0, 59)]
192192
public int Second
193193
{
194194
get
@@ -210,7 +210,7 @@ public int Second
210210
/// Allows the user to override the millisecond.
211211
/// </summary>
212212
[Parameter]
213-
[ValidateRangeAttribute(0, 999)]
213+
[ValidateRange(0, 999)]
214214
public int Millisecond
215215
{
216216
get

0 commit comments

Comments
 (0)