Resolving warnings and treating warnings as errors in WinUI project. (#824)

This commit is contained in:
Burak Kaan Köse
2026-02-27 20:12:43 +01:00
committed by GitHub
parent d2fce5eee1
commit 0e742c7a8f
55 changed files with 336 additions and 269 deletions
@@ -18,13 +18,16 @@ public abstract class ActivationHandler<T> : ActivationHandler
public override async Task HandleAsync(object args)
{
await HandleInternalAsync(args as T);
if (args is T typedArgs)
{
await HandleInternalAsync(typedArgs);
}
}
public override bool CanHandle(object args)
{
// CanHandle checks the args is of type you have configured
return args is T && CanHandleInternal(args as T);
return args is T typedArgs && CanHandleInternal(typedArgs);
}
// You can override this method to add extra validation on activation args