added stylecop (#1933)

* added stylecop

* removed xml documentation

* used common stylecop file
This commit is contained in:
Lavius Motileng
2020-04-07 10:19:14 -07:00
parent 89b44f5126
commit cea6b7067a
53 changed files with 626 additions and 536 deletions

View File

@@ -16,20 +16,20 @@ namespace Microsoft.PowerToys.Settings.UI.Activation
internal abstract class ActivationHandler<T> : ActivationHandler
where T : class
{
// Override this method to add the activation logic in your activation handler
protected abstract Task HandleInternalAsync(T args);
public override async Task HandleAsync(object args)
{
await HandleInternalAsync(args as T);
await this.HandleInternalAsync(args as T);
}
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 && this.CanHandleInternal(args as T);
}
// Override this method to add the activation logic in your activation handler
protected abstract Task HandleInternalAsync(T args);
// You can override this method to add extra validation on activation args
// to determine if your ActivationHandler should handle this activation args
protected virtual bool CanHandleInternal(T args)