Skip to content

Commit

Permalink
Merge pull request #10 from ebifrier/net8
Browse files Browse the repository at this point in the history
.NET8に対応した
  • Loading branch information
ebifrier authored Jan 8, 2025
2 parents 7da0fa7 + 0f71b8a commit 6a979d5
Show file tree
Hide file tree
Showing 23 changed files with 119 additions and 136 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'
- uses: szenius/set-timezone@v1.0
dotnet-version: '8.0.x'
- uses: szenius/set-timezone@v2.0
with:
timezoneWindows: "Tokyo Standard Time"
- name: build and test
Expand Down
8 changes: 4 additions & 4 deletions Ragnarok.Calculator.Tests/Ragnarok.Calculator.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
15 changes: 4 additions & 11 deletions Ragnarok.Calculator/Externals/NParsec/ParserException.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Runtime.Serialization;

namespace Codehaus.Parsec
{
Expand All @@ -10,8 +9,7 @@ namespace Codehaus.Parsec
///
/// 2004-11-12
/// </author>
[Serializable]
public class ParserException : System.SystemException
public class ParserException : SystemException
{
/// <summary> Get the parsing trace.</summary>
/// <returns> the parsing trace
Expand Down Expand Up @@ -108,7 +106,7 @@ public void WriteParsingTrace(System.IO.TextWriter writer)
public void WriteParsingTrace()
{
using (System.IO.StreamWriter temp_writer =
new System.IO.StreamWriter(System.Console.OpenStandardError(), System.Console.Error.Encoding))
new System.IO.StreamWriter(Console.OpenStandardError(), Console.Error.Encoding))
{
temp_writer.AutoFlush = true;
WriteParsingTrace(temp_writer);
Expand Down Expand Up @@ -174,7 +172,7 @@ public ParserException(string message, ParseError err, string mname, Pos pos)
/// <param name="pos">the position.
/// </param>
//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
public ParserException(System.Exception cause, ParseError err, string mname, Pos pos)
public ParserException(Exception cause, ParseError err, string mname, Pos pos)
: base(mname, cause)
{
this.err = err;
Expand All @@ -193,17 +191,12 @@ public ParserException(System.Exception cause, ParseError err, string mname, Pos
/// <param name="pos">the position.
/// </param>
//UPGRADE_NOTE: Exception 'java.lang.Throwable' was converted to 'System.Exception' which has different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1100'"
public ParserException(string message, System.Exception cause, ParseError err, string mname, Pos pos)
public ParserException(string message, Exception cause, ParseError err, string mname, Pos pos)
: base(message, cause)
{
this.err = err;
this.pos = pos;
this.module = mname;
}

protected ParserException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
24 changes: 3 additions & 21 deletions Ragnarok.Calculator/Externals/NParsec/UserException.cs
Original file line number Diff line number Diff line change
@@ -1,24 +1,18 @@

using System;
using System.Runtime.Serialization;

namespace Codehaus.Parsec
{
/// <summary>
/// This exception represents an illegal parser state that should not happen.
/// This exception being thrown means a bug in the parser application.
/// </summary>
[Serializable]
public class IllegalParserStateException : SystemException
{
public IllegalParserStateException() { }
public IllegalParserStateException(string msg) : base(msg) { }
public IllegalParserStateException(string msg, Exception innerException)
: base(msg, innerException) { }

protected IllegalParserStateException(SerializationInfo info, StreamingContext context)
: base(info, context)
{}
}


Expand All @@ -31,8 +25,7 @@ protected IllegalParserStateException(SerializationInfo info, StreamingContext c
/// <author> Ben Yu
///
/// </author>
[Serializable]
public class UserException : System.Exception
public class UserException : Exception
{
/// <summary> Get the index in the original source.</summary>
public int Index
Expand All @@ -44,12 +37,6 @@ public int Index
}
private readonly int ind;

public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("Index", Index);
}

public UserException() { }
public UserException(string msg) : base(msg) { }
public UserException(string msg, Exception innerException)
Expand Down Expand Up @@ -84,7 +71,7 @@ public UserException(int ind, string msg)
/// </param>
/// <param name="arg1">the chained exception.
/// </param>
public UserException(int ind, string msg, System.Exception arg1)
public UserException(int ind, string msg, Exception arg1)
: base(msg, arg1)
{
this.ind = ind;
Expand All @@ -95,15 +82,10 @@ public UserException(int ind, string msg, System.Exception arg1)
/// </param>
/// <param name="cause">the chained exception.
/// </param>
public UserException(int ind, System.Exception cause)
public UserException(int ind, Exception cause)
: base("user exception", cause)
{
this.ind = ind;
}
protected UserException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
this.ind = info.GetInt32("Index");
}
}
}
2 changes: 1 addition & 1 deletion Ragnarok.Calculator/Ragnarok.Calculator.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>

Expand Down
10 changes: 0 additions & 10 deletions Ragnarok.Extra/Effect/EffectException.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Ragnarok.Extra.Effect
{
/// <summary>
/// エフェクト関係の例外を扱います。
/// </summary>
[Serializable()]
public class EffectException : RagnarokException
{
/// <summary>
Expand All @@ -33,13 +31,5 @@ public EffectException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// コンストラクタ
/// </summary>
protected EffectException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
2 changes: 1 addition & 1 deletion Ragnarok.Extra/Ragnarok.Extra.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x86</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion Ragnarok.Forms/Ragnarok.Forms.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
Expand Down
10 changes: 0 additions & 10 deletions Ragnarok.OpenGL/GLException.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Ragnarok.OpenGL
{
/// <summary>
/// OpenGL用の例外クラスです。
/// </summary>
[Serializable()]
public class GLException : Exception
{
/// <summary>
Expand All @@ -33,13 +31,5 @@ public GLException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// コンストラクタ
/// </summary>
protected GLException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
2 changes: 1 addition & 1 deletion Ragnarok.OpenGL/Ragnarok.OpenGL.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x86</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion Ragnarok.Presentation/Ragnarok.Presentation.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x86</Platforms>
Expand Down
2 changes: 1 addition & 1 deletion Ragnarok.Sound/Ragnarok.Sound.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>

Expand Down
2 changes: 0 additions & 2 deletions Ragnarok.Tests/EnumExTest.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.IO;
using System.Text;
using NUnit.Framework;

namespace Ragnarok.Tests
Expand Down
8 changes: 4 additions & 4 deletions Ragnarok.Tests/Ragnarok.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Ragnarok.Xaml/Ragnarok.Xaml.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<UseWPF>true</UseWPF>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>
Expand Down
12 changes: 0 additions & 12 deletions Ragnarok/MathEx/Matrix44d.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Linq.Expressions;
using System.Runtime.Serialization;

namespace Ragnarok.MathEx
{
/// <summary>
/// 行列用の例外クラスです。
/// </summary>
[Serializable()]
public class MatrixException : Exception
{
/// <summary>
Expand All @@ -36,14 +32,6 @@ public MatrixException(string message, Exception innerException)
: base(message, innerException)
{
}

/// <summary>
/// コンストラクタ
/// </summary>
protected MatrixException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}

/// <summary>
Expand Down
10 changes: 0 additions & 10 deletions Ragnarok/Net/RagnarokNetException.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;

namespace Ragnarok.Net
{
/// <summary>
/// コネクションの例外です。
/// </summary>
[Serializable()]
public class RagnarokNetException : RagnarokException
{
/// <summary>
Expand All @@ -34,13 +32,5 @@ public RagnarokNetException(string message,
: base(message, innerException)
{
}

/// <summary>
/// コンストラクタ
/// </summary>
protected RagnarokNetException(SerializationInfo info, StreamingContext context)
: base(info, context)
{
}
}
}
2 changes: 1 addition & 1 deletion Ragnarok/Ragnarok.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Platforms>AnyCPU;x86</Platforms>
</PropertyGroup>

Expand Down
Loading

0 comments on commit 6a979d5

Please sign in to comment.