Timeline for Is it possible to method-inject an object call?
Current License: CC BY-SA 3.0
14 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 16, 2017 at 16:49 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Oct 17, 2017 at 16:07 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Sep 17, 2017 at 20:30 | comment | added | John Wu | I am asking if something is possible, not fit for a particular purpose. The code snip is an example chosen for its ease of explanation. Certainly injected methods are useful in other contexts, e.g. for deferred execution. | |
| Sep 17, 2017 at 16:53 | comment | added | radarbob | So you want to take well named and defined method, obfuscate it, move it out of the class it belongs in, double the amount of written code and spend more time testing, all for the falacious illusion that the dependency was removed? No, it was only moved. | |
| Sep 17, 2017 at 15:41 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Aug 18, 2017 at 15:33 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jul 19, 2017 at 15:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Jun 19, 2017 at 14:03 | answer | added | iMortalitySX | timeline score: 1 | |
| Jun 15, 2017 at 21:17 | review | Close votes | |||
| Jun 20, 2017 at 3:02 | |||||
| Apr 8, 2017 at 8:24 | history | tweeted | twitter.com/StackSoftEng/status/850625479543533569 | ||
| Mar 14, 2017 at 21:38 | comment | added | Doctor Vermilion Wizard |
If you want it to point to a property, you'll need a lambda: SaveEmail(() => frmUser.EmailProperty);
|
|
| Mar 14, 2017 at 21:37 | comment | added | John Wu | Same sort of syntax if I want my Func<T> to point at a property? Or does it have to be a method? | |
| Mar 14, 2017 at 21:33 | comment | added | Doctor Vermilion Wizard | Yes, that's totally possible. And it looks like the example in your second code block is the right syntax. Have you experienced a problem with it? | |
| Mar 14, 2017 at 21:27 | history | asked | John Wu | CC BY-SA 3.0 |