Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<PackageVersion Include="Azure.Monitor.Query.Metrics" Version="1.0.0" />
<PackageVersion Include="Azure.ResourceManager.ServiceBus" Version="1.1.0" />
<PackageVersion Include="ByteSize" Version="2.1.2" />
<PackageVersion Include="Caliburn.Micro" Version="4.0.230" />
<PackageVersion Include="Caliburn.Micro" Version="5.0.258" />
<PackageVersion Include="DnsClient" Version="1.8.0" />
<PackageVersion Include="FluentValidation" Version="11.12.0" />
<PackageVersion Include="Fody" Version="6.9.3" />
Expand Down
4 changes: 2 additions & 2 deletions src/ServiceControl.Config/Framework/Rx/RxScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class RxScreen : RxViewAware, IScreen, IChild, IModalResult
/// <summary>
/// Raised after activation occurs.
/// </summary>
public event EventHandler<ActivationEventArgs> Activated = (sender, e) => { };
public event AsyncEventHandler<ActivationEventArgs> Activated = (sender, e) => Task.CompletedTask;

public IEventAggregator EventAggregator { get; set; }

Expand Down Expand Up @@ -70,7 +70,7 @@ async Task IActivate.ActivateAsync(CancellationToken cancellationToken)
Log.Info("Activating {0}.", this);
await OnActivate();

Activated(this, new ActivationEventArgs
await Activated(this, new ActivationEventArgs
{
WasInitialized = initialized
});
Expand Down
5 changes: 4 additions & 1 deletion src/ServiceControl.Config/Framework/Rx/RxViewAware.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
{
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Caliburn.Micro;

public class RxViewAware : RxPropertyChanged, IViewAware
Expand Down Expand Up @@ -61,7 +62,7 @@ public virtual object GetView(object context = null)
static void AttachViewReadyOnActivated(IActivate activatable, object nonGeneratedView)
{
var viewReference = new WeakReference(nonGeneratedView);
EventHandler<ActivationEventArgs> handler = null;
AsyncEventHandler<ActivationEventArgs> handler = null;
handler = (s, e) =>
{
((IActivate)s).Activated -= handler;
Expand All @@ -70,6 +71,8 @@ static void AttachViewReadyOnActivated(IActivate activatable, object nonGenerate
{
PlatformProvider.Current.ExecuteOnLayoutUpdated(view, ((RxViewAware)s).OnViewReady);
}

return Task.CompletedTask;
};
activatable.Activated += handler;
}
Expand Down
Loading