-
Notifications
You must be signed in to change notification settings - Fork 24
Netstandard20 #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Netstandard20 #28
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
199f559
feat: netstandard20 support with smaller surface area of change
ghost1face e15f818
chore: Remove unnecessary dependency since the frameworks include it
ghost1face fcc7a9c
feat: Allow tests to run on net481 on windows machines for local test…
ghost1face 75e7057
chore: Update documentation
ghost1face 64f839c
chore: dotnet format
ghost1face 7debc1a
chore: Remove unused constant added in testing
ghost1face 5d6983d
Update src/ToonFormat/Internal/Decode/Scanner.cs
ghost1face b84ad2b
Update tests/ToonFormat.Tests/ToonFormat.Tests.csproj
ghost1face 683625c
Update src/ToonFormat/System.Runtime.CompilerServices/CompilerFeature…
ghost1face 8fae125
Update src/ToonFormat/System.Runtime.CompilerServices/RequiredMemberA…
ghost1face 93a3be2
Update src/ToonFormat/System.Runtime.CompilerServices/CompilerFeature…
ghost1face 04c437f
fix: Update CompilerFeatureRequiredAttribute to have xml documentation
ghost1face File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| <Project> | ||
| <PropertyGroup> | ||
| <TargetFrameworks>netstandard2.0;net8.0;net9.0;net10.0</TargetFrameworks> | ||
| </PropertyGroup> | ||
|
|
||
| <!-- | ||
| 1. CI Builds only run tests on modern supported frameworks | ||
| 2. Local builds run tests on .NET Framework 4.8.1 (Windows only) and modern supported frameworks | ||
| --> | ||
| <Choose> | ||
| <When Condition=" '$(CI)' == 'true'"> | ||
| <PropertyGroup> | ||
| <TestTargetFrameworks>net8.0;net9.0;net10.0</TestTargetFrameworks> | ||
| </PropertyGroup> | ||
| </When> | ||
|
|
||
| <Otherwise> | ||
|
|
||
| <Choose> | ||
| <When Condition=" $([MSBuild]::IsOsPlatform('Windows')) "> | ||
| <PropertyGroup> | ||
| <TestTargetFrameworks>net481;net8.0;net9.0;net10.0</TestTargetFrameworks> | ||
| </PropertyGroup> | ||
| </When> | ||
|
|
||
| <Otherwise> | ||
| <PropertyGroup> | ||
| <TestTargetFrameworks>net8.0;net9.0;net10.0</TestTargetFrameworks> | ||
| </PropertyGroup> | ||
| </Otherwise> | ||
| </Choose> | ||
|
|
||
| </Otherwise> | ||
| </Choose> | ||
| </Project> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/ToonFormat/System.Diagnostics.CodeAnalysis/SetsRequiredMembersAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| #if NETSTANDARD2_0 | ||
|
|
||
| namespace System.Diagnostics.CodeAnalysis | ||
| { | ||
| /// <summary> | ||
| /// Compiler attribute for setting required members | ||
| /// </summary> | ||
| [AttributeUsage(AttributeTargets.Constructor, AllowMultiple = false, Inherited = true)] | ||
| public sealed class SetsRequiredMembersAttribute : Attribute { } | ||
| } | ||
|
|
||
| #endif |
28 changes: 28 additions & 0 deletions
28
src/ToonFormat/System.Runtime.CompilerServices/CompilerFeatureRequiredAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| #if NETSTANDARD2_0 | ||
| using System; | ||
|
|
||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| /// <summary> | ||
| /// Indicates that a compiler feature is required. | ||
| /// </summary> | ||
| [AttributeUsage(AttributeTargets.All, AllowMultiple = true, Inherited = false)] | ||
| public sealed class CompilerFeatureRequiredAttribute : Attribute | ||
| { | ||
| /// <summary> | ||
| /// Initializes a new instance of the <see cref="CompilerFeatureRequiredAttribute"/> class. | ||
| /// </summary> | ||
| /// <param name="featureName">The name of the feature.</param> | ||
| public CompilerFeatureRequiredAttribute(string featureName) | ||
| { | ||
| FeatureName = featureName; | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// Gets the name of the feature. | ||
| /// </summary> | ||
| public string FeatureName { get; } | ||
| } | ||
| } | ||
|
|
||
| #endif | ||
14 changes: 14 additions & 0 deletions
14
src/ToonFormat/System.Runtime.CompilerServices/RequiredMemberAttribute.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #if NETSTANDARD2_0 | ||
|
|
||
| using System; | ||
|
|
||
| namespace System.Runtime.CompilerServices | ||
| { | ||
| /// <summary> | ||
| /// Attribute for decorating members as required. | ||
| /// </summary> | ||
| [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field, AllowMultiple = false, Inherited = true)] | ||
| public sealed class RequiredMemberAttribute : Attribute { } | ||
| } | ||
|
|
||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.