Skip to content

Commit

Permalink
Fixed IocPage
Browse files Browse the repository at this point in the history
  • Loading branch information
Simnico99 committed Sep 15, 2022
1 parent ce027f1 commit 828edfa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions src/ZirconNet.Core/Runtime/DynamicClass.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,7 @@ public DynamicClass(in DynamicClassField[] fields)
_fields = new Dictionary<string, KeyValuePair<Type, object?>>();
foreach (var field in fields)
{
try
{
var first = _fields.Single(x => x.Key == field.FieldName);
}
catch (Exception ex) when (ex is ArgumentNullException or InvalidOperationException)
{
_fields.Add(field.FieldName, new KeyValuePair<Type, object?>(field.FieldType, field.Value));
}
_fields.Add(field.FieldName, new KeyValuePair<Type, object?>(field.FieldType, field.Value));
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/ZirconNet.WPF/Mvvm/AwaitableViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public Task WaitForReadyAsync(CancellationToken cancellationToken = default)
internal void RegisterViewModelReady()
{
_startupTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
using (ReadyEvent.Subscribe((_) => _startupTcs!.TrySetResult(new object()))) { };
using (ReadyEvent.Subscribe((_) => _startupTcs!.TrySetResult(new object()))) { }
}
}

0 comments on commit 828edfa

Please sign in to comment.