Click here to Skip to main content
15,880,392 members
Home / Discussions / C#
   

C#

 
QuestionFTP Decryption Error Pin
Member 865395910-Jan-13 18:22
Member 865395910-Jan-13 18:22 
AnswerRe: FTP Decryption Error Pin
Bernhard Hiller10-Jan-13 21:46
Bernhard Hiller10-Jan-13 21:46 
GeneralRe: FTP Decryption Error Pin
Garth J Lancaster11-Jan-13 11:00
professionalGarth J Lancaster11-Jan-13 11:00 
AnswerRe: FTP Decryption Error Pin
Eddy Vluggen11-Jan-13 2:28
professionalEddy Vluggen11-Jan-13 2:28 
GeneralRe: FTP Decryption Error Pin
Garth J Lancaster11-Jan-13 11:00
professionalGarth J Lancaster11-Jan-13 11:00 
Questionhow to export a div to pdf Pin
shineskollam10-Jan-13 18:17
shineskollam10-Jan-13 18:17 
AnswerRe: how to export a div to pdf Pin
Richard MacCutchan10-Jan-13 21:51
mveRichard MacCutchan10-Jan-13 21:51 
QuestionRegarding implementation of Dependency Injection with C# Pin
Tridip Bhattacharjee10-Jan-13 2:06
professionalTridip Bhattacharjee10-Jan-13 2:06 
i never use Dependency Injection in apps. i go through few article with Dependency Injection and found the concept is interesting but believe hard to implement in real life. now i want to implement Dependency Injection in my win form apps.

our company work with many shipping company like UPS, Fedex, Purolator etc for now but in future they have plan to works with many other shipping company. i have developed separate separate class library projects for all those shipping company like UPS, Fedex, Purolator and include those dll into our main form apps. the problem is many time we hard code few things in our code like country code etc.

for example i have one form where 4 buttons are there. like those buttons are "Ship with UPS WorldShip", another button there called "Ship with UPS WebAPI", another button there called "Ship with FedEX Desktop Apps" and another last button called "Ship with Fedex WebAPI".

when user click on UPS WorldShip button then a flat file generate in a folder. when user click on UPS WebAPI button then a request goes to UPS site.

when user click on FedEX WinApps button then a flat file generate in a folder. when user click on FedEX WebAPI button then a request goes to FedEx site.

so what i do now when user click on any button then i call a specific function exist in dll to complete the task.

everything is working fine at my end but the problem is when our company start working with another new shipping company then i have to create another class library for that company.

i said i never use DI ever in my apps and have no experience. so some one guide me how could i handle my situation with DI as a result when a new shipping company will join then i do not have to write any extra code. so guide me how to implement DI in my apps and also guide me with how to handle my situation with sample DI code for guidance.

thanks
tbhattacharjee

AnswerRe: Regarding implementation of Dependency Injection with C# Pin
Pete O'Hanlon10-Jan-13 2:22
mvePete O'Hanlon10-Jan-13 2:22 
AnswerRe: Regarding implementation of Dependency Injection with C# Pin
jschell10-Jan-13 14:03
jschell10-Jan-13 14:03 
AnswerRe: Regarding implementation of Dependency Injection with C# Pin
SledgeHammer0110-Jan-13 14:57
SledgeHammer0110-Jan-13 14:57 
GeneralRe: Regarding implementation of Dependency Injection with C# Pin
Tridip Bhattacharjee10-Jan-13 20:07
professionalTridip Bhattacharjee10-Jan-13 20:07 
GeneralRe: Regarding implementation of Dependency Injection with C# Pin
Pete O'Hanlon10-Jan-13 21:11
mvePete O'Hanlon10-Jan-13 21:11 
QuestionHow to draw an arc in winRT with animation? Pin
abinashokk9-Jan-13 21:55
abinashokk9-Jan-13 21:55 
AnswerRe: How to draw an arc in winRT with animation? Pin
Pete O'Hanlon9-Jan-13 22:34
mvePete O'Hanlon9-Jan-13 22:34 
QuestionC#.NET 3.5 Code review checklist Pin
Member 31370789-Jan-13 20:28
Member 31370789-Jan-13 20:28 
AnswerRe: C#.NET 3.5 Code review checklist Pin
Eddy Vluggen9-Jan-13 22:54
professionalEddy Vluggen9-Jan-13 22:54 
AnswerRe: C#.NET 3.5 Code review checklist Pin
Deflinek10-Jan-13 0:53
Deflinek10-Jan-13 0:53 
AnswerRe: C#.NET 3.5 Code review checklist Pin
jschell10-Jan-13 14:06
jschell10-Jan-13 14:06 
GeneralRe: C#.NET 3.5 Code review checklist Pin
PIEBALDconsult10-Jan-13 15:16
mvePIEBALDconsult10-Jan-13 15:16 
GeneralRe: C#.NET 3.5 Code review checklist Pin
PIEBALDconsult10-Jan-13 14:46
mvePIEBALDconsult10-Jan-13 14:46 
QuestionSocket programming Pin
mohammadkaab9-Jan-13 3:32
mohammadkaab9-Jan-13 3:32 
AnswerRe: Socket programming Pin
Dave Kreskowiak9-Jan-13 3:38
mveDave Kreskowiak9-Jan-13 3:38 
GeneralRe: Socket programming Pin
mohammadkaab9-Jan-13 7:13
mohammadkaab9-Jan-13 7:13 
GeneralRe: Socket programming Pin
Dave Kreskowiak9-Jan-13 9:02
mveDave Kreskowiak9-Jan-13 9:02 

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.