Click here to Skip to main content
16,003,746 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
GeneralRe: When we will stop programming?! Pin
Eddy Vluggen19-Apr-12 6:50
professionalEddy Vluggen19-Apr-12 6:50 
AnswerRe: When we will stop programming?! Pin
Pete O'Hanlon8-Apr-12 2:25
mvePete O'Hanlon8-Apr-12 2:25 
GeneralRe: When we will stop programming?! Pin
Hasan Al-Halabi8-Apr-12 3:23
Hasan Al-Halabi8-Apr-12 3:23 
GeneralRe: When we will stop programming?! Pin
Pete O'Hanlon8-Apr-12 11:32
mvePete O'Hanlon8-Apr-12 11:32 
AnswerRe: When we will stop programming?! Pin
Rustem Gaifutdinov24-Apr-12 3:52
Rustem Gaifutdinov24-Apr-12 3:52 
AnswerRe: When we will stop programming?! Pin
Midnight Ahri27-Apr-12 15:10
Midnight Ahri27-Apr-12 15:10 
AnswerRe: When we will stop programming?! Pin
Vivi Chellappa28-Apr-12 5:51
professionalVivi Chellappa28-Apr-12 5:51 
AnswerRe: When we will stop programming?! Pin
Eddy Vluggen29-Apr-12 0:49
professionalEddy Vluggen29-Apr-12 0:49 
GeneralRe: When we will stop programming?! Pin
Vivi Chellappa29-Apr-12 6:27
professionalVivi Chellappa29-Apr-12 6:27 
GeneralRe: When we will stop programming?! Pin
jschell29-Apr-12 6:40
jschell29-Apr-12 6:40 
AnswerRe: When we will stop programming?! Pin
Eddy Vluggen30-Apr-12 1:24
professionalEddy Vluggen30-Apr-12 1:24 
GeneralRe: When we will stop programming?! Pin
jschell29-Apr-12 6:30
jschell29-Apr-12 6:30 
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 

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.