Click here to Skip to main content
15,879,095 members
Home / Discussions / C#
   

C#

 
AnswerRe: C# Pin
Paul Conrad10-Oct-12 7:31
professionalPaul Conrad10-Oct-12 7:31 
AnswerRe: C# Pin
Abhinav S10-Oct-12 16:08
Abhinav S10-Oct-12 16:08 
AnswerRe: C# Pin
KiranKumar Roy14-Oct-12 1:36
KiranKumar Roy14-Oct-12 1:36 
QuestionProgressive tax calculator in C# Pin
cyberhopper10-Oct-12 2:26
professionalcyberhopper10-Oct-12 2:26 
AnswerRe: Progressive tax calculator in C# Pin
Pete O'Hanlon10-Oct-12 3:05
mvePete O'Hanlon10-Oct-12 3:05 
GeneralRe: Progressive tax calculator in C# Pin
Paul Conrad10-Oct-12 7:33
professionalPaul Conrad10-Oct-12 7:33 
QuestionC# obtain return code from a proxy Pin
dcof10-Oct-12 2:23
dcof10-Oct-12 2:23 
AnswerRe: C# obtain return code from a proxy Pin
dojohansen10-Oct-12 3:06
dojohansen10-Oct-12 3:06 
It depends. It *always* depends. Smile | :)

I would try to look for a solution that could keep the tracking stuff separate from the proxy. Proxies usually aren't hand-coded and it's quite convenient to just "update" a "service reference" in order to generate new proxy code should the service interface change.

Assuming you only use a few operations on the service, the easiest seems to me to be adding a thin abstraction layer on top of the proxy and put the tracking logic there.

A few tips for how to do such refactoring speedily:

- Rename the proxy class to whatever you want your new class (implementing the abstraction layer) to have, using Refactor => Rename. This will update all the call sites.

- Rename the class back to what it was originally called, WITHOUT using Refactor => Rename.

Every place in the code where you had new Proxy() you now have new AbstractionLayer(). (Please don't use that name. Name it according to what function it has.)

Introduce the new class and put your tracking logic there. In short, you've built a proxy for the proxy.
GeneralRe: C# obtain return code from a proxy Pin
Pete O'Hanlon10-Oct-12 3:08
mvePete O'Hanlon10-Oct-12 3:08 
GeneralRe: C# obtain return code from a proxy Pin
dojohansen10-Oct-12 5:52
dojohansen10-Oct-12 5:52 
GeneralRe: C# obtain return code from a proxy Pin
dcof10-Oct-12 16:00
dcof10-Oct-12 16:00 
GeneralRe: C# obtain return code from a proxy Pin
dojohansen10-Oct-12 23:33
dojohansen10-Oct-12 23:33 
QuestionRender Excel document to word document using C#.net Pin
Ullas_Joseph9-Oct-12 22:35
Ullas_Joseph9-Oct-12 22:35 
AnswerRe: Render Excel document to word document using C#.net Pin
Marco Bertschi12-Oct-12 5:03
protectorMarco Bertschi12-Oct-12 5:03 
QuestionSheet name is missing when doing a "SAve As" for Excel document to PDF Pin
Ullas_Joseph9-Oct-12 21:24
Ullas_Joseph9-Oct-12 21:24 
AnswerRe: Sheet name is missing when doing a "SAve As" for Excel document to PDF Pin
Pete O'Hanlon9-Oct-12 22:55
mvePete O'Hanlon9-Oct-12 22:55 
QuestionC# exclude file from directory search Pin
classy_dog9-Oct-12 17:51
classy_dog9-Oct-12 17:51 
AnswerRe: C# exclude file from directory search Pin
n.podbielski9-Oct-12 21:00
n.podbielski9-Oct-12 21:00 
AnswerRe: C# exclude file from directory search Pin
OriginalGriff9-Oct-12 21:07
mveOriginalGriff9-Oct-12 21:07 
QuestionHow to draw on web page? Pin
dfernando229-Oct-12 9:31
dfernando229-Oct-12 9:31 
AnswerRe: How to draw on web page? Pin
Pete O'Hanlon9-Oct-12 9:54
mvePete O'Hanlon9-Oct-12 9:54 
GeneralRe: How to draw on web page? Pin
dfernando229-Oct-12 10:29
dfernando229-Oct-12 10:29 
GeneralRe: How to draw on web page? Pin
Pete O'Hanlon9-Oct-12 10:35
mvePete O'Hanlon9-Oct-12 10:35 
GeneralRe: How to draw on web page? Pin
y.dsandeepnaidu9-Oct-12 20:11
y.dsandeepnaidu9-Oct-12 20:11 
GeneralRe: How to draw on web page? Pin
Pete O'Hanlon10-Oct-12 0:43
mvePete O'Hanlon10-Oct-12 0:43 

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.