CommunityToolkit / CommunityToolkit/dotnet
Unseal RelayCommand and AsyncRelayCommand
- Lenguaje dominante
- C#
- Estrellas
- 3.8k
- Forks
- 400
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
### Overview
I'm working on custom command that will let the developer pass a permission string into the constructor and if the user has that permission then command will be enabled if CanExecute returns true and will be disabled when CanExecute returns false or the user doesn't have that permission. I wanted to inherit from RelayCommand and AsyncRelayCommand but am not able to due to them being marked as sealed.
### API breakdown
Remove sealed keyword from RelayCommand and AsyncRelayCommand.
### Usage example
```
public class CustomCommand : RelayCommand {
...
}
```
```
public class AsyncCustomCommand : AsyncRelayCommand {
...
}
```
### Breaking change?
No
### Alternatives
Re-implement RelayCommand and AsyncRelayCommand functionality for custom commands.
### Additional context
_No response_
### Help us help you
No, just wanted to propose this
Guía de contribución
Línea de trabajo
Localiza las definiciones de RelayCommand y AsyncRelayCommand e inspecciona las pruebas cercanas o las comprobaciones de API-surface antes de cambiar sus declaraciones. Confirma que se puede heredar de ambos tipos como se muestra en el issue y ejecuta las pruebas relevantes del proyecto o la compilación para verificar que la API pública siga siendo válida.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- csharp
- Área
- developer-experience
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Estado de actividad
- Estancado
- Claridad
- Bien especificado
- Aptitud para principiantes
- 35/100