Conditional methods with parameters as actions?
- Dominant language
- C#
- Stars
- 1.1k
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
Hi @canton7,
Thanks for this awesome library, I have been using it and I just love how simple and powerful it is.
On caliburn you can use methods with parameters for conditions(for reference: ), say
```cs
public bool CanDoSomething(string name)
{
return !string.IsNullOrWhiteSpace(name);
}
public void DoSomething(string name)
{
// do something
}
```
From what I read on the documentation with Stylet that is not possible with a method or taking a parameter.
I could probably do a hacky approach which would involve binding 2 properties to achieve something close to the above but its no ideal.
Do you have any plans on adding that into Stylet or have I missed something and that is indeed possible?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by comparing Stylet's documented action and condition handling with the linked Caliburn.Micro action-parameters documentation. Done would mean determining whether methods such as CanDoSomething(string name) and DoSomething(string name) can be supported, and documenting the resulting behavior or limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100