Named attribute parameters
4 posts
• Page 1 of 1
Named attribute parameters
C# allows to pass named parameters to attributes, like this:
Does Phalanger allow it? In my testing it was either complaining about non-constant expression or failed to parse at '=' token.
- Code: Select all
[TestCase(1,2, Result=3)]
Does Phalanger allow it? In my testing it was either complaining about non-constant expression or failed to parse at '=' token.
- weirdan
- Posts: 17
- Joined: June 4th, 2013, 1:11 am
Re: Named attribute parameters
It does, there is also a special syntax for named parameters (due to conflict with PHP syntax)
- Code: Select all
$Result=>3
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Named attribute parameters
Ah, with '=>' it parses ok. This doesn't help much though, as TestCaseAttribute does not compile for some other reason: https://github.com/DEVSENSE/Phalanger/issues/62
- weirdan
- Posts: 17
- Joined: June 4th, 2013, 1:11 am
Re: Named attribute parameters
I've replied to your issue on GitHub but I think I'm wrong in my possible workaround.
-
diddledan - Posts: 14
- Joined: March 19th, 2015, 2:59 pm
- Location: Hampshire, UK
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 16 guests