Skip to main content
Nmaster88's user avatar
Nmaster88's user avatar
Nmaster88's user avatar
Nmaster88
  • Member for 6 years
  • Last seen more than 2 years ago
awarded
awarded
comment
Class design using Open and Close Methods
The way I have now its reusable because the user can call Open method multiple times, if he hadnt call Dispose. If the class instantiation is managed by the client and not by IoC we can use constructor with the "filePath" which is a dynamic parameter, in my opinion.
comment
Class design using Open and Close Methods
@Flater I see, Im already making a StreamReaderWrapperFactory call in the Open method, which is responsible to return the actual instance of StreamReader. But if we use IoC and call an endpoint the instance of CsvWriterService I mention will be created by the framework, so how can I pass a runtime parameter like "filePath" without creating a standalone method? The only way is to force the user to do the instantiation of the class itself, which might be the right way.
comment
Class design using Open and Close Methods
I see @JohnWu but what about IoC for the injection of dependencies? The constructor shouldn´t be used to pass a parameter like "filePath" I believe.
revised
Class design using Open and Close Methods
added 348 characters in body
Loading…
asked
Loading…
comment
Mapping list to another list dynamically
Hi thanks, ill be creating a github POC in github and share it. Then ill edit my post. You probably are right and using automapper with reflection is more than enough and frees me of many headaches.
comment
Mapping list to another list dynamically
@DocBrow its not just the mapping its the dynamic mapping of any object/list into another, it riquires user interactivity for it.
revised
Mapping list to another list dynamically
added 109 characters in body
Loading…
comment
Mapping list to another list dynamically
Hi @JimmyJames, Im going to put as soon as I can a screenshot of the console of my POC to get an idea. But yes Im aware that not all inputs types should be possible to convert into output types.
asked
Loading…
awarded
awarded
awarded
comment
Method that returns an object is it adequate for TDD?
thanks for having an useful reply in this question.
comment
Method that returns an object is it adequate for TDD?
@RikD dont know if youre the one that downvoted, but care to elaborate? maybe I can change the title if thats the case?
Loading…
comment
Why running migration turns into timeout in a production environment?
You're right, on this case it blocked when creating a new table that has indexes and foreign key constraint from other tables, some of these table are on heavy usage from production system. I guess that the deadlock with other queries can make sense i think i need to investigate more about that in SQL server
Loading…