Click here to Skip to main content
15,881,588 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
AnswerRe: When we will stop programming?! Pin
kishhr22-Jun-12 9:08
kishhr22-Jun-12 9:08 
QuestionA server control clients printing Pin
Member 87903165-Apr-12 10:51
Member 87903165-Apr-12 10:51 
AnswerRe: A server control clients printing Pin
Eddy Vluggen8-Apr-12 0:35
professionalEddy Vluggen8-Apr-12 0:35 
QuestionWorkflow Designer Location in a MultiLayer Application Pin
Reza Ahmadi3-Apr-12 22:46
Reza Ahmadi3-Apr-12 22:46 
QuestionGPL License Question Pin
Richard Andrew x641-Apr-12 17:06
professionalRichard Andrew x641-Apr-12 17:06 
AnswerRe: GPL License Question Pin
Jochen Arndt1-Apr-12 21:31
professionalJochen Arndt1-Apr-12 21:31 
QuestionHandle / Body idiom implementation in csharp Pin
Hassan Akhtar Ali26-Mar-12 8:43
Hassan Akhtar Ali26-Mar-12 8:43 
QuestionIntegration test for IoC registrations? Pin
AlexZieg7122-Mar-12 10:36
AlexZieg7122-Mar-12 10:36 
Hi,

for our project we use Windsor Castle to do IoC. This means that we also let the IoC container resolve the needed constructor arguments. But for some cases (wrappers, view models, etc.) we also need to pass some ctor arguments which are only known at runtime and from my opinion are needed to create a valid object. For this we use generic factories like:

interface IMyWrapperFactory
{
  IMyWrapper CreateWrapper(string key);
}


For this to work I have IoC registered that factory as well as IMyWrapper, where the implementation of IMyWrapper only has one ctor overload with the string argument.

Problem: we also have created an integration test which instantiates all registered components to ensure that everything can be resolved. But this fails for obvious reasons with IMyWrapper, as the string argument is not registered!

I would be very happy if you could tell me what you think about it.

1. Is there a way to let certain components exclusively be instantiated by generic factories so the test could differ and it would not be possible to acquire an instance directly without using the needed string argument?
2. Am I wrong and it is generally bad practice to provide runtime parameters to constructors?
3. If not, would you limit your freedom of doing so just to make the integration test check 100% well?

Best regards
Alex
AnswerRe: Integration test for IoC registrations? Pin
senguptaamlan26-Mar-12 10:33
senguptaamlan26-Mar-12 10:33 
QuestionA color-coded flowchart is friendly though, what color(s) should it be? Pin
Caleb McElrath22-Mar-12 7:51
professionalCaleb McElrath22-Mar-12 7:51 
AnswerRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
Not Active22-Mar-12 9:09
mentorNot Active22-Mar-12 9:09 
AnswerRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
R. Giskard Reventlov22-Mar-12 9:59
R. Giskard Reventlov22-Mar-12 9:59 
AnswerRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
senguptaamlan26-Mar-12 10:35
senguptaamlan26-Mar-12 10:35 
GeneralRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
Caleb McElrath30-Mar-12 2:50
professionalCaleb McElrath30-Mar-12 2:50 
JokeRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
Hermaine18-Apr-12 21:26
Hermaine18-Apr-12 21:26 
AnswerRe: A color-coded flowchart is friendly though, what color(s) should it be? Pin
Vivi Chellappa28-Apr-12 6:09
professionalVivi Chellappa28-Apr-12 6:09 
QuestionSkin ActiveX Control Pin
jsdhgkjdsahklg21-Mar-12 4:13
jsdhgkjdsahklg21-Mar-12 4:13 
AnswerRe: Skin ActiveX Control Pin
Pete O'Hanlon21-Mar-12 5:53
mvePete O'Hanlon21-Mar-12 5:53 
GeneralRe: Skin ActiveX Control Pin
jsdhgkjdsahklg21-Mar-12 19:26
jsdhgkjdsahklg21-Mar-12 19:26 
GeneralRe: Skin ActiveX Control Pin
Pete O'Hanlon21-Mar-12 21:05
mvePete O'Hanlon21-Mar-12 21:05 
GeneralRe: Skin ActiveX Control Pin
jsdhgkjdsahklg22-Mar-12 3:23
jsdhgkjdsahklg22-Mar-12 3:23 
QuestionStrategy for polling device on separate thread [Updated] Pin
BRShroyer20-Mar-12 3:19
BRShroyer20-Mar-12 3:19 
AnswerRe: Strategy for polling device on separate thread Pin
Jochen Arndt20-Mar-12 3:51
professionalJochen Arndt20-Mar-12 3:51 
GeneralRe: Strategy for polling device on separate thread Pin
BRShroyer20-Mar-12 5:25
BRShroyer20-Mar-12 5:25 
AnswerRe: Strategy for polling device on separate thread [Updated] Pin
Bernhard Hiller20-Mar-12 23:04
Bernhard Hiller20-Mar-12 23:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.