Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Design Time / October 2004

Tip: Looking for answers? Try searching our database.

Designer services

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joey Callisay - 15 Oct 2004 03:32 GMT
there are a lot of samples for designer classes.  Some are storing internal
references to the services (componentchangeservice, selectionservice, etc.)
on the designer classes, some are getting them when needed.  Are there
disadvantages on storing private references to such services rather than
getting them from designer host when needed? thanks...
Frank Hileman - 15 Oct 2004 14:28 GMT
Since there is no real documentation on this, go with your instinct. There
seems to be no harm we have found in storing references per-designer, but we
only store the most frequently used ones. For others we create private
properties to call GetService dynamically. It is safer to get the services
dynamically, since theoretically they can change. Looking at the service
provider code in reflector, I would say most references are fixed for the
lifetime of the designer.

Regards,
Frank Hileman

check out VG.net: www.vgdotnet.com
Animated vector graphics system
Integrated Visual Studio .NET graphics editor

> there are a lot of samples for designer classes.  Some are storing internal
> references to the services (componentchangeservice, selectionservice, etc.)
> on the designer classes, some are getting them when needed.  Are there
> disadvantages on storing private references to such services rather than
> getting them from designer host when needed? thanks...
Joey Callisay - 19 Oct 2004 02:04 GMT
thanks a lot Sir Frank...

> Since there is no real documentation on this, go with your instinct. There
> seems to be no harm we have found in storing references per-designer, but we
[quoted text clipped - 18 lines]
> > disadvantages on storing private references to such services rather than
> > getting them from designer host when needed? thanks...

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.