Browse Source

Enable nullability in all samples (#20379)

pull/20404/head
Julien Lebosquain 1 month ago
committed by GitHub
parent
commit
3e41310917
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      samples/AppWithoutLifetime/AppWithoutLifetime.csproj
  2. 2
      samples/BindingDemo/GenericMarkupExtension.cs
  3. 2
      samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs
  4. 8
      samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs
  5. 20
      samples/BindingDemo/ViewModels/MainWindowViewModel.cs
  6. 1
      samples/ControlCatalog.Android/ControlCatalog.Android.csproj
  7. 2
      samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs
  8. 4
      samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs
  9. 2
      samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs
  10. 6
      samples/ControlCatalog.Desktop/Program.cs
  11. 1
      samples/ControlCatalog/ControlCatalog.csproj
  12. 1
      samples/Directory.Build.props
  13. 1
      samples/GpuInterop/GpuInterop.csproj
  14. 1
      samples/IntegrationTestApp/IntegrationTestApp.csproj
  15. 1
      samples/MiniMvvm/MiniMvvm.csproj
  16. 8
      samples/PlatformSanityChecks/Program.cs
  17. 14
      samples/Previewer/MainWindow.xaml.cs
  18. 4
      samples/RenderDemo/Pages/CustomSkiaPage.cs
  19. 4
      samples/RenderDemo/Pages/FormattedTextPage.axaml.cs
  20. 8
      samples/RenderDemo/Pages/GlyphRunPage.xaml.cs
  21. 7
      samples/RenderDemo/Pages/PathMeasurementPage.cs
  22. 7
      samples/RenderDemo/Pages/RenderTargetBitmapPage.cs
  23. 6
      samples/RenderDemo/Pages/TextFormatterPage.axaml.cs
  24. 7
      samples/RenderDemo/Pages/WriteableBitmapPage.cs
  25. 1
      samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj
  26. 1
      samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj
  27. 1
      samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj
  28. 1
      samples/SafeAreaDemo/SafeAreaDemo.csproj
  29. 1
      samples/SampleControls/ControlSamples.csproj
  30. 1
      samples/SingleProjectSandbox/SingleProjectSandbox.csproj
  31. 1
      samples/TextTestApp/TextTestApp.csproj
  32. 1
      samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj
  33. 1
      samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj
  34. 8
      samples/XEmbedSample/XEmbedSample.csproj
  35. 4
      src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs

1
samples/AppWithoutLifetime/AppWithoutLifetime.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>

2
samples/BindingDemo/GenericMarkupExtension.cs

@ -5,7 +5,7 @@ namespace BindingDemo;
internal class GenericMarkupExtension<T> : MarkupExtension
{
public T Value { get; set; }
public T? Value { get; set; }
public override object ProvideValue(IServiceProvider serviceProvider)
{

2
samples/BindingDemo/ViewModels/DataAnnotationsErrorViewModel.cs

@ -6,7 +6,7 @@ namespace BindingDemo.ViewModels
{
[Phone]
[MaxLength(10)]
public string PhoneNumber { get; set; }
public string? PhoneNumber { get; set; }
[Range(0, 9)]
public int LessThan10 { get; set; }

8
samples/BindingDemo/ViewModels/IndeiErrorViewModel.cs

@ -9,7 +9,7 @@ namespace BindingDemo.ViewModels
{
private int _maximum = 10;
private int _value;
private string _valueError;
private string? _valueError;
public IndeiErrorViewModel()
{
@ -34,16 +34,16 @@ namespace BindingDemo.ViewModels
set { this.RaiseAndSetIfChanged(ref _value, value); }
}
public event EventHandler<DataErrorsChangedEventArgs> ErrorsChanged;
public event EventHandler<DataErrorsChangedEventArgs>? ErrorsChanged;
public IEnumerable GetErrors(string propertyName)
public IEnumerable GetErrors(string? propertyName)
{
switch (propertyName)
{
case nameof(Value):
return new[] { _valueError };
default:
return null;
return Array.Empty<string>();
}
}

20
samples/BindingDemo/ViewModels/MainWindowViewModel.cs

@ -16,10 +16,10 @@ namespace BindingDemo.ViewModels
{
private string _booleanString = "True";
private double _doubleValue = 5.0;
private string _stringValue = "Simple Binding";
private string? _stringValue = "Simple Binding";
private bool _booleanFlag = false;
private string _currentTime;
private NestedCommandViewModel _nested;
private string? _currentTime;
private NestedCommandViewModel? _nested;
public MainWindowViewModel()
{
@ -74,7 +74,7 @@ namespace BindingDemo.ViewModels
set { this.RaiseAndSetIfChanged(ref _doubleValue, value); }
}
public string StringValue
public string? StringValue
{
get { return _stringValue; }
set { this.RaiseAndSetIfChanged(ref _stringValue, value); }
@ -86,7 +86,7 @@ namespace BindingDemo.ViewModels
set { this.RaiseAndSetIfChanged(ref _booleanFlag, value); }
}
public string CurrentTime
public string? CurrentTime
{
get { return _currentTime; }
private set { this.RaiseAndSetIfChanged(ref _currentTime, value); }
@ -99,7 +99,7 @@ namespace BindingDemo.ViewModels
public ExceptionErrorViewModel ExceptionDataValidation { get; } = new ExceptionErrorViewModel();
public IndeiErrorViewModel IndeiDataValidation { get; } = new IndeiErrorViewModel();
public NestedCommandViewModel NestedModel
public NestedCommandViewModel? NestedModel
{
get { return _nested; }
private set { this.RaiseAndSetIfChanged(ref _nested, value); }
@ -119,16 +119,16 @@ namespace BindingDemo.ViewModels
// Nested class, jsut so we can test it in XAML
public class TestItem<T> : ViewModelBase
{
private T _value;
private string _detail;
private T? _value;
private string? _detail;
public T Value
public T? Value
{
get { return _value; }
set { this.RaiseAndSetIfChanged(ref this._value, value); }
}
public string Detail
public string? Detail
{
get { return _detail; }
set { this.RaiseAndSetIfChanged(ref this._detail, value); }

1
samples/ControlCatalog.Android/ControlCatalog.Android.csproj

@ -3,7 +3,6 @@
<TargetFramework>$(AvsCurrentAndroidTargetFramework)</TargetFramework>
<SupportedOSPlatformVersion>$(AvsMinSupportedAndroidVersion)</SupportedOSPlatformVersion>
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<ApplicationId>com.Avalonia.ControlCatalog</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>

2
samples/ControlCatalog.Desktop/NativeControls/Gtk/EmbedSample.Gtk.cs

@ -9,7 +9,7 @@ namespace ControlCatalog.Desktop;
public class EmbedSampleGtk : INativeDemoControl
{
private Process _mplayer;
private Process? _mplayer;
public IPlatformHandle CreateControl(bool isSecond, IPlatformHandle parent, Func<IPlatformHandle> createDefault)
{

4
samples/ControlCatalog.Desktop/NativeControls/Mac/MacHelper.cs

@ -20,7 +20,7 @@ internal class MacHelper
internal class MacOSViewHandle : INativeControlHostDestroyableControlHandle
{
private NSView _view;
private NSView? _view;
public MacOSViewHandle(NSView view)
{
@ -32,7 +32,7 @@ internal class MacOSViewHandle : INativeControlHostDestroyableControlHandle
public void Destroy()
{
_view.Dispose();
_view?.Dispose();
_view = null;
}
}

2
samples/ControlCatalog.Desktop/NativeControls/Win/WinApi.cs

@ -44,7 +44,7 @@ internal unsafe class WinApi
[DllImport("kernel32.dll")]
public static extern IntPtr GetModuleHandle(string lpModuleName);
public static extern IntPtr GetModuleHandle(string? lpModuleName);
[DllImport("user32.dll", SetLastError = true)]
public static extern IntPtr CreateWindowEx(

6
samples/ControlCatalog.Desktop/Program.cs

@ -74,12 +74,12 @@ namespace ControlCatalog.Desktop
{
DispatcherTimer.RunOnce(async () =>
{
var window = ((IClassicDesktopStyleApplicationLifetime)Application.Current.ApplicationLifetime)
.MainWindow;
var window = ((IClassicDesktopStyleApplicationLifetime)Application.Current!.ApplicationLifetime!)
.MainWindow!;
var tc = window.GetLogicalDescendants().OfType<TabControl>().First();
foreach (var page in tc.Items.Cast<TabItem>().ToList())
{
if (page.Header.ToString() == "DatePicker" || page.Header.ToString() == "TreeView")
if (page.Header?.ToString() is "DatePicker" or "TreeView")
continue;
Console.WriteLine("Selecting " + page.Header);
tc.SelectedItem = page;

1
samples/ControlCatalog/ControlCatalog.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFrameworks>$(AvsCurrentTargetFramework)</TargetFrameworks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>
</PropertyGroup>
<ItemGroup>

1
samples/Directory.Build.props

@ -6,6 +6,7 @@
<EnableNETAnalyzers>false</EnableNETAnalyzers>
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<LangVersion>14.0</LangVersion>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS8002</NoWarn> <!-- ignore signing warnings for samples -->
</PropertyGroup>

1
samples/GpuInterop/GpuInterop.csproj

@ -4,7 +4,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<Nullable>enable</Nullable>
<UseD3DCompiler>true</UseD3DCompiler>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

1
samples/IntegrationTestApp/IntegrationTestApp.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);AVP1012;AVLN3001</NoWarn>
<ApplicationManifest>app.manifest</ApplicationManifest>
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>

1
samples/MiniMvvm/MiniMvvm.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

8
samples/PlatformSanityChecks/Program.cs

@ -12,12 +12,12 @@ namespace PlatformSanityChecks
{
public class Program
{
static Thread UiThread;
static Thread UiThread = null!;
static void Main(string[] args)
{
UiThread = Thread.CurrentThread;
AppBuilder.Configure<App>().RuntimePlatformServicesInitializer();
AppBuilder.Configure<App>().RuntimePlatformServicesInitializer!();
var app = new App();
AvaloniaX11PlatformExtensions.InitializeX11Platform();
@ -41,13 +41,13 @@ namespace PlatformSanityChecks
throw new Exception(error);
}
static IDisposable Enter([CallerMemberName] string caller = null)
static IDisposable Enter([CallerMemberName] string? caller = null)
{
Console.WriteLine("Entering " + caller);
return Disposable.Create(() => { Console.WriteLine("Leaving " + caller); });
}
static void EnterLoop(Action<CancellationTokenSource> cb, [CallerMemberName] string caller = null)
static void EnterLoop(Action<CancellationTokenSource> cb, [CallerMemberName] string? caller = null)
{
using (Enter(caller))
{

14
samples/Previewer/MainWindow.xaml.cs

@ -17,22 +17,22 @@ namespace Previewer
<TextBlock>Hello world!</TextBlock>
</Window>";
private IAvaloniaRemoteTransportConnection _connection;
private IAvaloniaRemoteTransportConnection? _connection;
private Control _errorsContainer;
private TextBlock _errors;
private RemoteWidget _remote;
private RemoteWidget? _remote;
public MainWindow()
{
this.InitializeComponent();
var tb = this.FindControl<TextBox>("Xaml");
var tb = this.GetControl<TextBox>("Xaml");
tb.Text = InitialXaml;
var scroll = this.FindControl<ScrollViewer>("Remote");
var scroll = this.GetControl<ScrollViewer>("Remote");
var rem = new Center();
scroll.Content = rem;
_errorsContainer = this.FindControl<Control>("ErrorsContainer");
_errors = this.FindControl<TextBlock>("Errors");
_errorsContainer = this.GetControl<Control>("ErrorsContainer");
_errors = this.GetControl<TextBlock>("Errors");
tb.GetObservable(TextBox.TextProperty).Subscribe(text => _connection?.Send(new UpdateXamlMessage
{
Xaml = text
@ -70,7 +70,7 @@ namespace Previewer
_errorsContainer.IsVisible = result.Error != null;
_errors.Text = result.Error ?? "";
}
if (obj is RequestViewportResizeMessage resize)
if (obj is RequestViewportResizeMessage resize && _remote is not null)
{
_remote.Width = Math.Min(4096, Math.Max(resize.Width, 1));
_remote.Height = Math.Min(4096, Math.Max(resize.Height, 1));

4
samples/RenderDemo/Pages/CustomSkiaPage.cs

@ -31,7 +31,7 @@ namespace RenderDemo.Pages
public CustomDrawOp(Rect bounds, GlyphRun noSkia)
{
_noSkia = noSkia.TryCreateImmutableGlyphRunReference();
_noSkia = noSkia.TryCreateImmutableGlyphRunReference()!;
Bounds = bounds;
}
@ -42,7 +42,7 @@ namespace RenderDemo.Pages
public Rect Bounds { get; }
public bool HitTest(Point p) => false;
public bool Equals(ICustomDrawOperation other) => false;
public bool Equals(ICustomDrawOperation? other) => false;
static Stopwatch St = Stopwatch.StartNew();
public void Render(ImmediateDrawingContext context)
{

4
samples/RenderDemo/Pages/FormattedTextPage.axaml.cs

@ -57,11 +57,11 @@ namespace RenderDemo.Pages
context.DrawText(formattedText, new Point(10, 0));
var geometry = formattedText.BuildGeometry(new Point(10 + formattedText.Width + 10, 0));
var geometry = formattedText.BuildGeometry(new Point(10 + formattedText.Width + 10, 0))!;
context.DrawGeometry(gradient, null, geometry);
var highlightGeometry = formattedText.BuildHighlightGeometry(new Point(10 + formattedText.Width + 10, 0));
var highlightGeometry = formattedText.BuildHighlightGeometry(new Point(10 + formattedText.Width + 10, 0))!;
context.DrawGeometry(null, new ImmutablePen(gradient.ToImmutable(), 2), highlightGeometry);
}

8
samples/RenderDemo/Pages/GlyphRunPage.xaml.cs

@ -29,7 +29,7 @@ namespace RenderDemo.Pages
private float _fontSize = 20;
private int _direction = 10;
private DispatcherTimer _timer;
private DispatcherTimer? _timer;
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
@ -48,7 +48,7 @@ namespace RenderDemo.Pages
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
{
_timer.Stop();
_timer?.Stop();
_timer = null;
}
@ -88,7 +88,7 @@ namespace RenderDemo.Pages
private float _fontSize = 20;
private int _direction = 10;
private DispatcherTimer _timer;
private DispatcherTimer? _timer;
protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e)
{
@ -107,7 +107,7 @@ namespace RenderDemo.Pages
protected override void OnDetachedFromVisualTree(VisualTreeAttachmentEventArgs e)
{
_timer.Stop();
_timer?.Stop();
_timer = null;
}

7
samples/RenderDemo/Pages/PathMeasurementPage.cs

@ -14,7 +14,7 @@ namespace RenderDemo.Pages
AffectsRender<PathMeasurementPage>(BoundsProperty);
}
private RenderTargetBitmap _bitmap;
private RenderTargetBitmap? _bitmap;
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
@ -24,7 +24,7 @@ namespace RenderDemo.Pages
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
_bitmap.Dispose();
_bitmap?.Dispose();
_bitmap = null;
base.OnDetachedFromLogicalTree(e);
}
@ -37,6 +37,9 @@ namespace RenderDemo.Pages
public override void Render(DrawingContext context)
{
if (_bitmap is null)
return;
using (var bitmapCtx = _bitmap.CreateDrawingContext())
{
var basePath = new PathGeometry();

7
samples/RenderDemo/Pages/RenderTargetBitmapPage.cs

@ -10,7 +10,7 @@ namespace RenderDemo.Pages
{
public class RenderTargetBitmapPage : Control
{
private RenderTargetBitmap _bitmap;
private RenderTargetBitmap? _bitmap;
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
{
@ -20,7 +20,7 @@ namespace RenderDemo.Pages
protected override void OnDetachedFromLogicalTree(LogicalTreeAttachmentEventArgs e)
{
_bitmap.Dispose();
_bitmap?.Dispose();
_bitmap = null;
base.OnDetachedFromLogicalTree(e);
}
@ -28,6 +28,9 @@ namespace RenderDemo.Pages
readonly Stopwatch _st = Stopwatch.StartNew();
public override void Render(DrawingContext context)
{
if (_bitmap is null)
return;
using (var ctx = _bitmap.CreateDrawingContext())
using (ctx.PushTransform(Matrix.CreateTranslation(-100, -100)
* Matrix.CreateRotation(_st.Elapsed.TotalSeconds)

6
samples/RenderDemo/Pages/TextFormatterPage.axaml.cs

@ -9,7 +9,7 @@ namespace RenderDemo.Pages
{
public class TextFormatterPage : UserControl
{
private TextLine _textLine;
private TextLine? _textLine;
public TextFormatterPage()
{
@ -50,7 +50,7 @@ namespace RenderDemo.Pages
{
var currentX = 0d;
foreach (var textRun in _textLine.TextRuns)
foreach (var textRun in _textLine?.TextRuns ?? [])
{
if (textRun is ControlRun controlRun)
{
@ -78,7 +78,7 @@ namespace RenderDemo.Pages
_defaultProperties = defaultProperties;
}
public TextRun GetTextRun(int textSourceIndex)
public TextRun? GetTextRun(int textSourceIndex)
{
if (textSourceIndex >= _text.Length * 2 + TextRun.DefaultTextSourceLength)
{

7
samples/RenderDemo/Pages/WriteableBitmapPage.cs

@ -13,8 +13,8 @@ namespace RenderDemo.Pages
{
public class WriteableBitmapPage : Control
{
private WriteableBitmap _unpremulBitmap;
private WriteableBitmap _premulBitmap;
private WriteableBitmap? _unpremulBitmap;
private WriteableBitmap? _premulBitmap;
private readonly Stopwatch _st = Stopwatch.StartNew();
protected override void OnAttachedToLogicalTree(LogicalTreeAttachmentEventArgs e)
@ -38,6 +38,9 @@ namespace RenderDemo.Pages
public override void Render(DrawingContext context)
{
if (_unpremulBitmap is null || _premulBitmap is null)
return;
void FillPixels(WriteableBitmap bitmap, byte fillAlpha, bool premul)
{
using (var fb = bitmap.Lock())

1
samples/SafeAreaDemo.Android/SafeAreaDemo.Android.csproj

@ -3,7 +3,6 @@
<OutputType>Exe</OutputType>
<TargetFramework>$(AvsCurrentAndroidTargetFramework)</TargetFramework>
<SupportedOSPlatformVersion>$(AvsMinSupportedAndroidVersion)</SupportedOSPlatformVersion>
<Nullable>enable</Nullable>
<ApplicationId>com.avalonia.safeareademo</ApplicationId>
<ApplicationVersion>1</ApplicationVersion>
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>

1
samples/SafeAreaDemo.Desktop/SafeAreaDemo.Desktop.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>

1
samples/SafeAreaDemo.iOS/SafeAreaDemo.iOS.csproj

@ -4,7 +4,6 @@
<TargetFramework>$(AvsCurrentIOSTargetFramework)</TargetFramework>
<SupportedOSPlatformVersion>$(AvsMinSupportedIOSVersion)</SupportedOSPlatformVersion>
<ProvisioningType>manual</ProvisioningType>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

1
samples/SafeAreaDemo/SafeAreaDemo.csproj

@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
</PropertyGroup>

1
samples/SampleControls/ControlSamples.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

1
samples/SingleProjectSandbox/SingleProjectSandbox.csproj

@ -5,7 +5,6 @@
<TargetFrameworks Condition="'$(IncludeMacTargetSamples)' == 'true'">$(TargetFrameworks);$(AvsCurrentMacOSTargetFramework)</TargetFrameworks>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>
</PropertyGroup>

1
samples/TextTestApp/TextTestApp.csproj

@ -6,7 +6,6 @@
<TargetLatestRuntimePatch>true</TargetLatestRuntimePatch>
<ApplicationManifest>app.manifest</ApplicationManifest>
<IncludeAvaloniaGenerators>true</IncludeAvaloniaGenerators>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>

1
samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContext.csproj

@ -3,7 +3,6 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

1
samples/UnloadableAssemblyLoadContext/UnloadableAssemblyLoadContextPlug/UnloadableAssemblyLoadContextPlug.csproj

@ -2,7 +2,6 @@
<PropertyGroup>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>

8
samples/XEmbedSample/XEmbedSample.csproj

@ -4,16 +4,8 @@
<OutputType>Exe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>$(AvsCurrentTargetFramework)</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.24.24.95"/>

4
src/Headless/Avalonia.Headless.Vnc/HeadlessVncPlatformExtensions.cs

@ -26,7 +26,7 @@ namespace Avalonia
/// <returns></returns>
public static int StartWithHeadlessVncPlatform(
this AppBuilder builder,
string host, int port,
string? host, int port,
string[] args,
ShutdownMode shutdownMode = ShutdownMode.OnLastWindowClose)
{
@ -46,7 +46,7 @@ namespace Avalonia
/// <exception cref="InvalidOperationException"></exception>
public static int StartWithHeadlessVncPlatform(
this AppBuilder builder,
string host, int port,
string? host, int port,
string? password,
string[] args,
ShutdownMode shutdownMode = ShutdownMode.OnLastWindowClose)

Loading…
Cancel
Save