Reputation
2,162
Top tag
Next privilege 2,500 Rep.
Create tag synonyms
Badges
1 9 19
Newest
 Yearling
Impact
~77k people reached

  • 0 posts edited
  • 1 helpful flag
  • 136 votes cast
Jan
11
comment What's the best way to build a factory using NInject?
@Tebo: I just had it implementing a couple of other DI-related interfaces, like a factory that you could pass a Type to, but which would guarantee that the objects it hydrated for that Type implement or extend a given generic type. Nothing too special.
Dec
31
comment What's the best way to build a factory using NInject?
@ColourBlend: No, but if you get rid of the other interfaces that I had InjectionFactory<T> implementing, then the code provided should work just fine. Is there something in particular that you're having issues with?
Nov
17
awarded  Yearling
Nov
17
awarded  Yearling
May
23
awarded  Nice Answer
Apr
7
awarded  Enlightened
Apr
7
awarded  Nice Answer
Mar
19
awarded  Popular Question
Dec
9
comment Logging errors caused by exceptions deep in the application
@BillMichell: When things are done the way I describe, you still end up having all the same information: it's just associated with a wrapping exception, which groups all the related information together in a nice stack trace. Debug/trace logs are a good idea in general, but those are usually inappropriate logging levels when logging exceptions. If an error happens, you want as much information as possible about what was happening, even (and especially) in a production environment.
Dec
6
comment Logging errors caused by exceptions deep in the application
@BillMichell: While the log messages will be less obtrusive at lower levels, I'd still argue that they only add needless complexity in most cases. I would only log information about exceptions that get handled and aren't re-thrown.
Nov
17
awarded  Yearling
Jul
18
awarded  Nice Answer
Jul
15
awarded  Informed
Jan
25
awarded  Enlightened
Jan
25
awarded  Nice Answer
Jan
11
awarded  Populist
Nov
17
awarded  Yearling
Oct
22
comment Ways to ensure unique instances of a class?
@MarcB: Except that the patterns for programming a Singleton don't really work for what the OP asked for.
Sep
13
comment Declaring interface in the same file as the base class, is it a good practice?
@DanielB: The default for Shift-F12 is "find usages." jetbrains.com/resharper/webhelp/…
Sep
12
awarded  Autobiographer