Skip to content

Commit

Permalink
Introduce ENABLE_REMOTE_XAML_HOT_RELOAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Kir-Antipov committed Feb 5, 2025
1 parent 226bec4 commit 9264f87
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/HotAvalonia.Extensions/AvaloniaHotReloadExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ private static IHotReloadContext CreateHotReloadContext(AvaloniaProjectLocator p
[DebuggerStepThrough]
private static AvaloniaProjectLocator CreateAvaloniaProjectLocator()
{
#if ENABLE_REMOTE_XAML_HOT_RELOAD
return new AvaloniaProjectLocator(global::HotAvalonia.IO.FileSystem.Connect(global::HotAvalonia.IO.FileSystem.Empty));
#else
return new AvaloniaProjectLocator();
#endif
}
#endif

Expand Down
5 changes: 5 additions & 0 deletions src/HotAvalonia.Extensions/AvaloniaHotReloadExtensions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
//#endregion

#nowarn
#nowarn FS3261

namespace HotAvalonia

Expand Down Expand Up @@ -132,7 +133,11 @@ type internal AvaloniaHotReloadExtensions =
/// <returns>A new instance of the <see cref="AvaloniaProjectLocator"/> class.</returns>
[<DebuggerStepThrough>]
static member private CreateAvaloniaProjectLocator() =
#if ENABLE_REMOTE_XAML_HOT_RELOAD
AvaloniaProjectLocator(HotAvalonia.IO.FileSystem.Connect(HotAvalonia.IO.FileSystem.Empty))
#else
AvaloniaProjectLocator()
#endif
#endif

/// <summary>
Expand Down
4 changes: 4 additions & 0 deletions src/HotAvalonia.Extensions/AvaloniaHotReloadExtensions.vb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,11 @@ Namespace Global.HotAvalonia
''' <returns>A new instance of the <see cref="AvaloniaProjectLocator"/> class.</returns>
<DebuggerStepThrough>
Private Function CreateAvaloniaProjectLocator() As AvaloniaProjectLocator
#If ENABLE_REMOTE_XAML_HOT_RELOAD Then
Return New AvaloniaProjectLocator(HotAvalonia.IO.FileSystem.Connect(HotAvalonia.IO.FileSystem.Empty))
#Else
Return New AvaloniaProjectLocator()
#End If
End Function
#End If

Expand Down

0 comments on commit 9264f87

Please sign in to comment.