Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Property visibility across namespaces
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00775502
Message ID:
00776872
Vues:
15
I don't think you can do that the way you're tyring to do. The language just layer just doesn't support that...

You will have to derive a pattern for this and figure out a way to add worker objects perhaps dynamically and have those objects of specific scope. The problem in .Net is that you will have to use Reflection for all of this which is a fair amount of work...

+++ Rick ---

>>As far as I know you can't do that. You can only set visibility of members at the class level not at the namespace level.
>>
>>You may want to derive all of your classes in each namespace from a common base class and then mark the properties as Protected - that would accomplish what you need but would only work if all the classes can be of the same base type.
>
>Rick,
>I do derive all my classes in the namespace from a common base class.
>The problem I’m still having is that if I set the property to protected, only the class that instantiated the object will see it. I’m trying to have it so that any class from within the same base class that instantiates it can see it.
>
>The scenario here is that I perform my transaction code on the data layer but make the calls (begin, commit, rollback) from the business layer. When I have one business object call another business object, I don’t have a reference back to its data layer unless I give all business classes a property that references the data layer. I did this but want to keep the property scope to just other business classes without exposing it the to the UI which cal also instantiate the business objects.
>
>Thanks,
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform