diff --git a/GFramework.Core.Abstractions/GlobalUsings.cs b/GFramework.Core.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Core.Abstractions/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Core.Tests/GFramework.Core.Tests.csproj b/GFramework.Core.Tests/GFramework.Core.Tests.csproj index e505aab..cf4b142 100644 --- a/GFramework.Core.Tests/GFramework.Core.Tests.csproj +++ b/GFramework.Core.Tests/GFramework.Core.Tests.csproj @@ -1,18 +1,18 @@  - enable + disable enable net10.0;net8.0 - - - + + + - + diff --git a/GFramework.Core.Tests/GlobalUsings.cs b/GFramework.Core.Tests/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Core.Tests/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Core.Tests/architecture/TestArchitectureBase.cs b/GFramework.Core.Tests/architecture/TestArchitectureBase.cs index 1844cb0..5ffffbe 100644 --- a/GFramework.Core.Tests/architecture/TestArchitectureBase.cs +++ b/GFramework.Core.Tests/architecture/TestArchitectureBase.cs @@ -1,6 +1,5 @@ using GFramework.Core.Abstractions.enums; using GFramework.Core.architecture; -using GFramework.Core.events; namespace GFramework.Core.Tests.architecture; diff --git a/GFramework.Core.Tests/coroutine/YieldInstructionTests.cs b/GFramework.Core.Tests/coroutine/YieldInstructionTests.cs index 3509345..3f4b576 100644 --- a/GFramework.Core.Tests/coroutine/YieldInstructionTests.cs +++ b/GFramework.Core.Tests/coroutine/YieldInstructionTests.cs @@ -188,6 +188,7 @@ public class YieldInstructionTests /// /// 验证WaitUntil指令应该在条件满足时完成 /// + [Test] public void WaitUntil_Should_Be_Done_When_Condition_Is_True() { var counter = 0; diff --git a/GFramework.Core.Tests/logging/ConsoleLoggerTests.cs b/GFramework.Core.Tests/logging/ConsoleLoggerTests.cs index 7fc7054..e754a9e 100644 --- a/GFramework.Core.Tests/logging/ConsoleLoggerTests.cs +++ b/GFramework.Core.Tests/logging/ConsoleLoggerTests.cs @@ -1,3 +1,4 @@ +using System.IO; using GFramework.Core.Abstractions.logging; using GFramework.Core.logging; using NUnit.Framework; diff --git a/GFramework.Core.Tests/logging/LoggerFactoryTests.cs b/GFramework.Core.Tests/logging/LoggerFactoryTests.cs index 43b2b23..d3529dd 100644 --- a/GFramework.Core.Tests/logging/LoggerFactoryTests.cs +++ b/GFramework.Core.Tests/logging/LoggerFactoryTests.cs @@ -1,3 +1,4 @@ +using System.IO; using GFramework.Core.Abstractions.logging; using GFramework.Core.logging; using NUnit.Framework; @@ -45,7 +46,7 @@ public class LoggerFactoryTests public void ConsoleLoggerFactory_GetLogger_WithDefaultMinLevel_ShouldUseInfo() { var factory = new ConsoleLoggerFactory(); - var logger = (ConsoleLogger)factory.GetLogger("TestLogger"); + _ = (ConsoleLogger)factory.GetLogger("TestLogger"); var stringWriter = new StringWriter(); var testLogger = new ConsoleLogger("TestLogger", LogLevel.Info, stringWriter, false); @@ -66,7 +67,7 @@ public class LoggerFactoryTests public void ConsoleLoggerFactoryProvider_CreateLogger_ShouldReturnLoggerWithProviderMinLevel() { var provider = new ConsoleLoggerFactoryProvider { MinLevel = LogLevel.Debug }; - var logger = (ConsoleLogger)provider.CreateLogger("TestLogger"); + _ = (ConsoleLogger)provider.CreateLogger("TestLogger"); var stringWriter = new StringWriter(); var testLogger = new ConsoleLogger("TestLogger", LogLevel.Debug, stringWriter, false); @@ -177,7 +178,7 @@ public class LoggerFactoryTests LoggerFactoryResolver.Provider = provider; - var logger = (ConsoleLogger)provider.CreateLogger("TestLogger"); + _ = (ConsoleLogger)provider.CreateLogger("TestLogger"); var stringWriter = new StringWriter(); var testLogger = new ConsoleLogger("TestLogger", LogLevel.Warning, stringWriter, false); @@ -204,7 +205,7 @@ public class LoggerFactoryTests LoggerFactoryResolver.MinLevel = LogLevel.Error; var provider = LoggerFactoryResolver.Provider; - var logger = (ConsoleLogger)provider.CreateLogger("TestLogger"); + _ = (ConsoleLogger)provider.CreateLogger("TestLogger"); var stringWriter = new StringWriter(); var testLogger = new ConsoleLogger("TestLogger", LogLevel.Error, stringWriter, false); @@ -241,7 +242,7 @@ public class LoggerFactoryTests public void ConsoleLoggerFactoryProvider_MinLevel_DoesNotAffectCreatedLogger() { var provider = new ConsoleLoggerFactoryProvider { MinLevel = LogLevel.Error }; - var logger = provider.CreateLogger("TestLogger"); + provider.CreateLogger("TestLogger"); var stringWriter = new StringWriter(); var testLogger = new ConsoleLogger("TestLogger", LogLevel.Error, stringWriter, false); diff --git a/GFramework.Core/GlobalUsings.cs b/GFramework.Core/GlobalUsings.cs index e44a261..4d27181 100644 --- a/GFramework.Core/GlobalUsings.cs +++ b/GFramework.Core/GlobalUsings.cs @@ -14,4 +14,5 @@ global using System; global using System.Collections.Generic; global using System.Linq; +global using System.Threading; global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Game.Abstractions/GlobalUsings.cs b/GFramework.Game.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Game.Abstractions/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Game/GFramework.Game.csproj b/GFramework.Game/GFramework.Game.csproj index b81965b..5890d47 100644 --- a/GFramework.Game/GFramework.Game.csproj +++ b/GFramework.Game/GFramework.Game.csproj @@ -3,14 +3,14 @@ GeWuYou.$(AssemblyName) net8.0;net9.0;net10.0 - enable + disable enable - - + + - + diff --git a/GFramework.Game/GlobalUsings.cs b/GFramework.Game/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Game/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Game/storage/FileStorage.cs b/GFramework.Game/storage/FileStorage.cs index b75ed8a..1f34f6c 100644 --- a/GFramework.Game/storage/FileStorage.cs +++ b/GFramework.Game/storage/FileStorage.cs @@ -1,4 +1,5 @@ using System.Collections.Concurrent; +using System.IO; using System.Text; using GFramework.Game.Abstractions.serializer; using GFramework.Game.Abstractions.storage; diff --git a/GFramework.Godot.SourceGenerators.Abstractions/GlobalUsings.cs b/GFramework.Godot.SourceGenerators.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Godot.SourceGenerators.Abstractions/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Godot.SourceGenerators/GlobalUsings.cs b/GFramework.Godot.SourceGenerators/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Godot.SourceGenerators/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Godot/GFramework.Godot.csproj b/GFramework.Godot/GFramework.Godot.csproj index a77478d..1f12634 100644 --- a/GFramework.Godot/GFramework.Godot.csproj +++ b/GFramework.Godot/GFramework.Godot.csproj @@ -2,20 +2,20 @@ GeWuYou.$(AssemblyName) - enable + disable enable net8.0;net9.0;net10.0 - - - + + + - - - + + + diff --git a/GFramework.Godot/GlobalUsings.cs b/GFramework.Godot/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.Godot/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.Godot/storage/GodotFileStorage.cs b/GFramework.Godot/storage/GodotFileStorage.cs index 324f590..fe79a7e 100644 --- a/GFramework.Godot/storage/GodotFileStorage.cs +++ b/GFramework.Godot/storage/GodotFileStorage.cs @@ -1,4 +1,5 @@ using System.Collections.Concurrent; +using System.IO; using System.Text; using GFramework.Core.Abstractions.storage; using GFramework.Game.Abstractions.serializer; diff --git a/GFramework.SourceGenerators.Abstractions/GlobalUsings.cs b/GFramework.SourceGenerators.Abstractions/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.SourceGenerators.Abstractions/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.SourceGenerators.Common/GlobalUsings.cs b/GFramework.SourceGenerators.Common/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.SourceGenerators.Common/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj b/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj index e60f46a..1ed47ce 100644 --- a/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj +++ b/GFramework.SourceGenerators.Tests/GFramework.SourceGenerators.Tests.csproj @@ -1,29 +1,29 @@  - enable + disable enable net10.0;net8.0 - - - - - - - - + + + + + + + + - + - + diff --git a/GFramework.SourceGenerators.Tests/GlobalUsings.cs b/GFramework.SourceGenerators.Tests/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.SourceGenerators.Tests/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file diff --git a/GFramework.SourceGenerators.Tests/core/GeneratorSnapshotTest.cs b/GFramework.SourceGenerators.Tests/core/GeneratorSnapshotTest.cs index 47a6230..e826559 100644 --- a/GFramework.SourceGenerators.Tests/core/GeneratorSnapshotTest.cs +++ b/GFramework.SourceGenerators.Tests/core/GeneratorSnapshotTest.cs @@ -1,4 +1,5 @@ -using Microsoft.CodeAnalysis.CSharp.Testing; +using System.IO; +using Microsoft.CodeAnalysis.CSharp.Testing; using Microsoft.CodeAnalysis.Testing; using NUnit.Framework; diff --git a/GFramework.SourceGenerators.Tests/enums/EnumExtensionsGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/enums/EnumExtensionsGeneratorSnapshotTests.cs index 2a84399..e21149b 100644 --- a/GFramework.SourceGenerators.Tests/enums/EnumExtensionsGeneratorSnapshotTests.cs +++ b/GFramework.SourceGenerators.Tests/enums/EnumExtensionsGeneratorSnapshotTests.cs @@ -1,3 +1,4 @@ +using System.IO; using GFramework.SourceGenerators.enums; using GFramework.SourceGenerators.Tests.core; using NUnit.Framework; diff --git a/GFramework.SourceGenerators.Tests/logging/LoggerGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/logging/LoggerGeneratorSnapshotTests.cs index 2cb4278..670321f 100644 --- a/GFramework.SourceGenerators.Tests/logging/LoggerGeneratorSnapshotTests.cs +++ b/GFramework.SourceGenerators.Tests/logging/LoggerGeneratorSnapshotTests.cs @@ -1,3 +1,4 @@ +using System.IO; using GFramework.SourceGenerators.logging; using GFramework.SourceGenerators.Tests.core; using NUnit.Framework; diff --git a/GFramework.SourceGenerators.Tests/rule/ContextAwareGeneratorSnapshotTests.cs b/GFramework.SourceGenerators.Tests/rule/ContextAwareGeneratorSnapshotTests.cs index 73a40fd..38a15a6 100644 --- a/GFramework.SourceGenerators.Tests/rule/ContextAwareGeneratorSnapshotTests.cs +++ b/GFramework.SourceGenerators.Tests/rule/ContextAwareGeneratorSnapshotTests.cs @@ -1,4 +1,5 @@ -using GFramework.SourceGenerators.rule; +using System.IO; +using GFramework.SourceGenerators.rule; using GFramework.SourceGenerators.Tests.core; using NUnit.Framework; diff --git a/GFramework.SourceGenerators/GlobalUsings.cs b/GFramework.SourceGenerators/GlobalUsings.cs new file mode 100644 index 0000000..4d27181 --- /dev/null +++ b/GFramework.SourceGenerators/GlobalUsings.cs @@ -0,0 +1,18 @@ +// Copyright (c) 2025 GeWuYou +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +global using System; +global using System.Collections.Generic; +global using System.Linq; +global using System.Threading; +global using System.Threading.Tasks; \ No newline at end of file