diff --git a/.github/workflows/editorconfig.yml b/.github/workflows/editorconfig.yml
index 203cb755..c1283a51 100644
--- a/.github/workflows/editorconfig.yml
+++ b/.github/workflows/editorconfig.yml
@@ -9,6 +9,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest
+ timeout-minutes: 30
# from https://github.com/marketplace/actions/dotnet-format
steps:
- name: Get branch info # todo: is this needed?
@@ -33,10 +34,11 @@ jobs:
working-directory: ./src
- name: Inspect code
- uses: muno92/resharper_inspectcode@1.4.0
+ uses: muno92/resharper_inspectcode@1.12.0
with:
solutionPath: ./src/Consolonia.sln
- exclude: "**Consolonia.GuiCS/**.*"
+ exclude: "**Consolonia.GuiCS/**.*;**Consolonia.Gallery/**.*;**Example/**.*"
+ version: '2024.2.6'
- name: install-resharper
run: |
@@ -45,7 +47,7 @@ jobs:
- name: resharper-cleanup
run: |
- jb cleanupcode Consolonia.sln --exclude="**Consolonia.GuiCS\**.*"
+ jb cleanupcode Consolonia.sln --exclude="**Consolonia.GuiCS/**.*;**Consolonia.Gallery/**.*;**Example/**.*"
working-directory: ./src
- name: Commit files
diff --git a/.github/workflows/general_build.yml b/.github/workflows/general_build.yml
index d51c6edc..4bc85551 100644
--- a/.github/workflows/general_build.yml
+++ b/.github/workflows/general_build.yml
@@ -12,6 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
+ timeout-minutes: 30
defaults:
run:
working-directory: ./src
diff --git a/Directory.Build.props b/Directory.Build.props
index f1116aae..31a7bf2b 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -5,12 +5,12 @@
disable
- 0.10.21
+ 11.0.9
https://github.com/jinek/Consolonia/graphs/contributors
Text User Interface implementation of Avalonia UI (GUI Framework)
Copyright © Evgeny Gorbovoy 2021 - 2022
- 0.10.21
+ 11.0.9
\ No newline at end of file
diff --git a/Directory.Core.Build.props b/Directory.Core.Build.props
index e52f705d..90acdb61 100644
--- a/Directory.Core.Build.props
+++ b/Directory.Core.Build.props
@@ -10,4 +10,8 @@
true
true
+
+ true
+ true
+
\ No newline at end of file
diff --git a/src/.editorconfig b/src/.editorconfig
index b052bd0f..45b7f78a 100644
--- a/src/.editorconfig
+++ b/src/.editorconfig
@@ -3224,7 +3224,7 @@ resharper_use_collection_count_property_highlighting = suggestion
resharper_use_configure_await_false_for_async_disposable_highlighting = none
resharper_use_configure_await_false_highlighting = suggestion
resharper_use_deconstruction_highlighting = hint
-resharper_use_deconstruction_on_parameter_highlighting = hint
+resharper_use_deconstruction_on_parameter_highlighting = none
resharper_use_empty_types_field_highlighting = suggestion
resharper_use_event_args_empty_field_highlighting = suggestion
resharper_use_format_specifier_in_format_string_highlighting = suggestion
diff --git a/src/Consolonia.Core/ApplicationStartup.cs b/src/Consolonia.Core/ApplicationStartup.cs
index 41fcb8a4..4570055f 100644
--- a/src/Consolonia.Core/ApplicationStartup.cs
+++ b/src/Consolonia.Core/ApplicationStartup.cs
@@ -25,29 +25,24 @@ public static class ApplicationStartup
lifetime.Start(args);
}
- public static TAppBuilder UseStandardConsole(this TAppBuilder builder)
- where TAppBuilder : AppBuilderBase, new()
+ public static AppBuilder UseStandardConsole(this AppBuilder builder)
{
return builder.UseConsole(new DefaultNetConsole());
}
- public static TAppBuilder UseConsole(this TAppBuilder builder, IConsole console)
- where TAppBuilder : AppBuilderBase, new()
+ public static AppBuilder UseConsole(this AppBuilder builder, IConsole console)
{
return builder.With(console);
}
- public static TAppBuilder UseConsolonia(this TAppBuilder builder)
- where TAppBuilder : AppBuilderBase, new()
+ public static AppBuilder UseConsolonia(this AppBuilder builder)
{
return builder
+ .UseStandardRuntimePlatformSubsystem()
.UseWindowingSubsystem(() => new ConsoloniaPlatform().Initialize(), nameof(ConsoloniaPlatform))
.UseRenderingSubsystem(() =>
{
- var platformRenderInterface =
- AvaloniaLocator.CurrentMutable.GetService();
-
- var consoloniaRenderInterface = new ConsoloniaRenderInterface(platformRenderInterface);
+ var consoloniaRenderInterface = new ConsoloniaRenderInterface();
AvaloniaLocator.CurrentMutable
.Bind().ToConstant(consoloniaRenderInterface);
@@ -65,8 +60,7 @@ public static ClassicDesktopStyleApplicationLifetime BuildLifetime(IConsol
return CreateLifetime(consoloniaAppBuilder, args);
}
- private static ClassicDesktopStyleApplicationLifetime CreateLifetime(T builder, string[] args)
- where T : AppBuilderBase, new()
+ private static ClassicDesktopStyleApplicationLifetime CreateLifetime(AppBuilder builder, string[] args)
{
var lifetime = new ConsoloniaLifetime
{
@@ -77,9 +71,8 @@ private static ClassicDesktopStyleApplicationLifetime CreateLifetime(T builde
return lifetime;
}
- public static int StartWithConsoleLifetime(
- this T builder, string[] args)
- where T : AppBuilderBase, new()
+ public static int StartWithConsoleLifetime(
+ this AppBuilder builder, string[] args)
{
ClassicDesktopStyleApplicationLifetime lifetime = CreateLifetime(builder, args);
return lifetime.Start(args);
diff --git a/src/Consolonia.Core/Consolonia.Core.csproj b/src/Consolonia.Core/Consolonia.Core.csproj
index cc185961..695f2d90 100644
--- a/src/Consolonia.Core/Consolonia.Core.csproj
+++ b/src/Consolonia.Core/Consolonia.Core.csproj
@@ -9,3 +9,4 @@
+
\ No newline at end of file
diff --git a/src/Consolonia.Core/Drawing/ConsoloniaPlatformRenderInterfaceContext.cs b/src/Consolonia.Core/Drawing/ConsoloniaPlatformRenderInterfaceContext.cs
new file mode 100644
index 00000000..3ecd180f
--- /dev/null
+++ b/src/Consolonia.Core/Drawing/ConsoloniaPlatformRenderInterfaceContext.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Collections.Generic;
+using Avalonia.Platform;
+
+namespace Consolonia.Core.Drawing
+{
+ internal sealed class ConsoloniaPlatformRenderInterfaceContext : IPlatformRenderInterfaceContext
+ {
+ public object TryGetFeature(Type featureType)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void Dispose()
+ {
+ }
+
+ public IRenderTarget CreateRenderTarget(IEnumerable