diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index b9b27c0..76bd61e 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -8,13 +8,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - dotnet: [ '6.0.x' ] - os: [ubuntu-latest, windows-latest, macOS-latest] + dotnet: [ '8.0.x' ] + os: [ubuntu-latest, macOS-latest] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v4 - name: Setup .NET Core - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ matrix.dotnet }} - name: Build with dotnet core diff --git a/.github/workflows/dotnet48.yml b/.github/workflows/dotnet48.yml index 8c7980e..9e60d96 100644 --- a/.github/workflows/dotnet48.yml +++ b/.github/workflows/dotnet48.yml @@ -4,27 +4,26 @@ on: [push] jobs: build: - name: Test Windows .net Framework Only - runs-on: windows-2019 + name: Test Windows .net Framework and Core + runs-on: windows-2022 steps: - - - uses: actions/checkout@v2 - - - name: Setup NuGet - uses: NuGet/setup-nuget@v1.2.0 - - - name: setup-msbuild - uses: microsoft/setup-msbuild@v1.1 - + - uses: actions/checkout@v4 + - uses: NuGet/setup-nuget@v2 + - uses: microsoft/setup-msbuild@v2 + with: + dotnet-version: 4.8 - name: Restore Packages run: nuget restore Dynamitey.sln - name: Build solution run: msbuild Dynamitey.sln -t:rebuild -property:Configuration=Release - - name: Run vstests - uses: microsoft/vstest-action@v1.0.0 + - name: Test + uses: josepho0918/vstest-action@0e887de8dcfab5ce3eecaf4ad6320bb9b3ecf633 with: testAssembly: Tests.dll searchFolder: .\Tests\bin\Release\*\ runInParallel: true otherConsoleOptions: /TestCaseFilter:"(TestCategory!=Performance)" platform: x64 + - name: Publish + run: + dotnet nuget push '${{ github.workspace }}\publish\*.nupkg' --source https://nuget.pkg.github.com/ekonbenefits/index.json --api-key ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/Dynamitey/DynamicObjects/BaseObject.cs b/Dynamitey/DynamicObjects/BaseObject.cs index 9c6681d..9cb5a03 100644 --- a/Dynamitey/DynamicObjects/BaseObject.cs +++ b/Dynamitey/DynamicObjects/BaseObject.cs @@ -83,7 +83,7 @@ public bool TryTypeForName(string binderName, out Type type) return m.ReturnType; case EventInfo e: return e.EventHandlerType; -#if NET40 || PROFILE158 +#if NETFRAMEWORK || PROFILE158 case Type t: return t; #else diff --git a/Dynamitey/DynamicObjects/Builder.cs b/Dynamitey/DynamicObjects/Builder.cs index 1931fd7..b85c60f 100644 --- a/Dynamitey/DynamicObjects/Builder.cs +++ b/Dynamitey/DynamicObjects/Builder.cs @@ -291,15 +291,15 @@ public dynamic ObjectSetup(Func constructorArgsFactory) /// /// Trampoline for builder /// - public class BuilderTrampoline : DynamicObject + public class BuilderTrampoline : DynamicObject { - Builder _buider; + Builder _buider; /// /// Initializes a new instance of the class. /// /// The builder. - public BuilderTrampoline(Builder builder) + public BuilderTrampoline(Builder builder) { _buider = builder; } @@ -324,15 +324,15 @@ public override bool TryInvoke(InvokeBinder binder, object[] args, out object re /// /// Trampoline for setup builder /// - public class SetupTrampoline : DynamicObject + public class SetupTrampoline : DynamicObject { - Builder _buider; + Builder _buider; /// /// Initializes a new instance of the class. /// /// The builder. - public SetupTrampoline(Builder builder){ + public SetupTrampoline(Builder builder){ _buider = builder; } diff --git a/Dynamitey/Dynamitey.csproj b/Dynamitey/Dynamitey.csproj index b56d710..7ea382c 100644 --- a/Dynamitey/Dynamitey.csproj +++ b/Dynamitey/Dynamitey.csproj @@ -7,7 +7,7 @@ Copyright 2017 Ekon Benefits https://github.com/ekonbenefits/dynamitey - http://www.apache.org/licenses/LICENSE-2.0 + Apache-2.0 dynamic metaprogramming dlr reflection currying tuples expando latetypes True True @@ -66,5 +66,11 @@ - + + + + \ No newline at end of file diff --git a/Dynamitey/Internal/Compat/Net40.cs b/Dynamitey/Internal/Compat/Net40.cs index 5f6f1f3..6d02b87 100644 --- a/Dynamitey/Internal/Compat/Net40.cs +++ b/Dynamitey/Internal/Compat/Net40.cs @@ -14,7 +14,7 @@ namespace Dynamitey.Internal.Compat public static class Net40 { -#if NET40 || PROFILE158 +#if NETFRAMEWORK || PROFILE158 public static Type GetTypeInfo(this Type type) { diff --git a/NuGet.config b/NuGet.config index d1e2b59..fe3ad03 100644 --- a/NuGet.config +++ b/NuGet.config @@ -5,6 +5,5 @@ - \ No newline at end of file diff --git a/Tests/Curry.cs b/Tests/Curry.cs index 50cad72..2260b46 100644 --- a/Tests/Curry.cs +++ b/Tests/Curry.cs @@ -9,7 +9,7 @@ namespace Dynamitey.Tests { [TestFixture] - public class Curry : AssertionHelper + public class Curry : Helper { [Test] public void TestBasicDelegateCurry() diff --git a/Tests/DynamicObjects.cs b/Tests/DynamicObjects.cs index a7d1c98..ebc1706 100644 --- a/Tests/DynamicObjects.cs +++ b/Tests/DynamicObjects.cs @@ -15,7 +15,7 @@ namespace Dynamitey.Tests { [TestFixture] - public class DynamicObjs : AssertionHelper + public class DynamicObjs : Helper { @@ -573,7 +573,7 @@ public void TestRecorder() } -#if !NET6_0_OR_GREATER +#if NETFRAMEWORK [Test] public void TestCodeDomLateTypeBind() diff --git a/Tests/ExpandoObjs.cs b/Tests/ExpandoObjs.cs index cca00f9..a67d9a6 100644 --- a/Tests/ExpandoObjs.cs +++ b/Tests/ExpandoObjs.cs @@ -4,7 +4,7 @@ namespace Dynamitey.Tests { [TestFixture] - public class ExpandoObjs : AssertionHelper + public class ExpandoObjs : Helper { [Test] public void TestExpando() diff --git a/Tests/Helper.cs b/Tests/Helper.cs new file mode 100644 index 0000000..aaa7bb4 --- /dev/null +++ b/Tests/Helper.cs @@ -0,0 +1,11 @@ +using NUnit.Framework; + +namespace Dynamitey.Tests +{ +#pragma warning disable CS0618 // Type or member is obsolete + public class Helper:AssertionHelper +#pragma warning restore CS0618 // Type or member is obsolete + { + + } +} \ No newline at end of file diff --git a/Tests/Impromptu.cs b/Tests/Impromptu.cs index 1202111..f15241d 100644 --- a/Tests/Impromptu.cs +++ b/Tests/Impromptu.cs @@ -13,7 +13,7 @@ namespace Dynamitey.Tests { [TestFixture(Category = "Impromptu")] - public class Impromptu:AssertionHelper + public class Impromptu:Helper { public static readonly dynamic Interfacing diff --git a/Tests/Invoke.cs b/Tests/Invoke.cs index 7ef3549..7b12425 100644 --- a/Tests/Invoke.cs +++ b/Tests/Invoke.cs @@ -14,7 +14,7 @@ namespace Dynamitey.Tests { - public class Invoke:AssertionHelper + public class Invoke:Helper { [OneTimeTearDown] public void DestroyCaches() @@ -1416,7 +1416,9 @@ private void RunBinaryMockTests(ExpressionType type){ private void RunUnaryMockTests(ExpressionType type){ var mock = new OperatorTestDynObject(type); +#pragma warning disable CS0618 // Type or member is obsolete Dynamic.InvokeUnaryOpartor(type,mock); +#pragma warning restore CS0618 // Type or member is obsolete } [Test] diff --git a/Tests/Linq.cs b/Tests/Linq.cs index c13713a..bf0e8ad 100644 --- a/Tests/Linq.cs +++ b/Tests/Linq.cs @@ -12,7 +12,7 @@ namespace Dynamitey.Tests { [TestFixture] - public class Linq : AssertionHelper + public class Linq : Helper { diff --git a/Tests/PrivateTest.cs b/Tests/PrivateTest.cs index e0c2b6a..dfef4ab 100644 --- a/Tests/PrivateTest.cs +++ b/Tests/PrivateTest.cs @@ -10,7 +10,7 @@ namespace Dynamitey.Tests { [TestFixture] - public class PrivateTest : AssertionHelper + public class PrivateTest : Helper { [Test] diff --git a/Tests/SpeedTest.cs b/Tests/SpeedTest.cs index 8158faa..59af1b9 100644 --- a/Tests/SpeedTest.cs +++ b/Tests/SpeedTest.cs @@ -11,7 +11,7 @@ namespace Dynamitey.Tests { [TestFixture] [Category("Performance")] - public class SpeedTest:AssertionHelper + public class SpeedTest:Helper { [OneTimeSetUp] public void WarmUpDlr() diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 437777e..fb7cb49 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,18 +1,18 @@  - net6;net48 + net8.0;net48 false - + - + diff --git a/Version.props b/Version.props index daff1c8..851ba2a 100644 --- a/Version.props +++ b/Version.props @@ -1,5 +1,6 @@ - 3.0.3 + 3.0.4 + preview$(GITHUB_RUN_NUMBER) \ No newline at end of file