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 / ASP.NET / Web Services / August 2005

Tip: Looking for answers? Try searching our database.

Identical classes: one assembly->many services - how to share?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 05 Aug 2005 23:22 GMT
If I have classes in an assembly that gets referenced by multiple web
services, when the user adds a web ref to the service, then these classes
are included in each namespace seperately. Seeing they are really the same
class, I'd like to pass them from one service to another. I can change some
code and mangle namespaces after the import, but that doesn't seem too
scalable.

I can see a few ways around this:
(1) Some declarative way of telling the system to generate the web services
such that upon use, certain classes are put in a shared namespace
(2) Some way to "convince" C# that two classes are the same because they in
fact are the same in every way. (Like a cast, but stronger -- the compiler
(rightly) does not allow a cast between these N different classes - although
I guess it do a really deep comparison...)
(3) Something simple I'm doing wrong or overlooking...

thanks,
mike
hB - 10 Aug 2005 21:56 GMT
I think you are in separate projects?
if project is same, you have to do addref once.
so for one project, only one WebReference proxy classes folder is
generated.
(with visual studio)

---
hB
hB - 10 Aug 2005 21:56 GMT
I think you are in separate projects?
if project is same, you have to do addref once.
so for one project, only one WebReference proxy classes folder is
generated.
(with visual studio)

---
hB

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.