View unanswered posts | View active topics



Reply to topic  [ 5 posts ] 
Refactoring: create delegate methods 
Author Message
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
This patch creates delegate methods for fields

http://dl.dropbox.com/u/9443658/fd/delegate.patch

Image

Image

Image


Last edited by ir73 on Mon Aug 09, 2010 4:21 pm, edited 1 time in total.



Mon Aug 09, 2010 3:30 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11368
Location: Paris, France
not sure to understand what this does...


Mon Aug 09, 2010 4:20 pm
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
The best way to check this out is to see it in action in Eclipse (some java project). But here's a short description for Visual Studio
http://stackoverflow.com/questions/2679 ... gate-metho

Method delegation is mostly used to avoid the problem where the language allows you to extend only one class. If you want to extend more classes, then you just create fields with these classes and create delegates.

If you still don't get the idea here's a short description for my screenshots above: imagine that class PhoneDTO (what was right clicked) has the following methods listed in Delegate Methods box. You just choose methods (with checkboxes) you want to delegate and they are generated automatically.


Mon Aug 09, 2010 4:32 pm
Profile
Admin

Joined: Wed Aug 31, 2005 7:27 am
Posts: 11368
Location: Paris, France
Ah your screenshot was not clear on what you activated the refactoring action.

Sounds good.


Mon Aug 09, 2010 4:36 pm
Profile WWW
Member

Joined: Thu Mar 29, 2007 9:32 am
Posts: 244
updated to be latest trunk compatible


Tue Aug 10, 2010 7:28 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 5 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.