Skip to content

Switch argument order in SkipOnPlatformAttribute#7192

Merged
akoeplinger merged 1 commit intodotnet:mainfrom
akoeplinger:followup-platform
Apr 6, 2021
Merged

Switch argument order in SkipOnPlatformAttribute#7192
akoeplinger merged 1 commit intodotnet:mainfrom
akoeplinger:followup-platform

Conversation

@akoeplinger
Copy link
Member

@akoeplinger akoeplinger commented Apr 6, 2021

While looking at doing the conversion in dotnet/runtime after #7184 I noticed that having the reason argument as the last argument reads weird, it's better to have the platform as the first argument so it reads more like a sentence.

E.g. instead of

[SkipOnPlatform("System.Net.Security is not supported on this platform.", TestPlatforms.Browser)]

we have

[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on this platform.")]

Also allow multiple attributes since the skip reason can be quite different between platforms.

While looking at doing the conversion in dotnet/runtime after dotnet#7184 I noticed that having the reason argument reads weird, it's better to have the platform as the first argument so it reads more like a sentence.

E.g. instead of

```csharp
[SkipOnPlatform("System.Net.Security is not supported on this platform.", TestPlatforms.Browser)]
```

we have

```csharp
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on this platform.")]
```

Also allow multiple attributes since the skip reason can be quite different between platforms.
@akoeplinger akoeplinger requested a review from safern April 6, 2021 11:06
@akoeplinger akoeplinger merged commit b0eeb27 into dotnet:main Apr 6, 2021
@akoeplinger akoeplinger deleted the followup-platform branch April 6, 2021 15:11
akoeplinger added a commit to akoeplinger/arcade that referenced this pull request Apr 12, 2021
While looking at doing the conversion in dotnet/runtime after dotnet#7184 I noticed that having the reason argument reads weird, it's better to have the platform as the first argument so it reads more like a sentence.

E.g. instead of

```csharp
[SkipOnPlatform("System.Net.Security is not supported on this platform.", TestPlatforms.Browser)]
```

we have

```csharp
[SkipOnPlatform(TestPlatforms.Browser, "System.Net.Security is not supported on this platform.")]
```

Also allow multiple attributes since the skip reason can be quite different between platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants