Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Conversion from C# to VB.NET
Message
De
17/04/2013 10:55:57
 
 
À
17/04/2013 10:34:28
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01571173
Message ID:
01571223
Vues:
31
>>That doesn't explain *why* you are doing it - just the problems that occur....
>
>oProcess.oApp is the object I need to clone. This is what I am doing since a few weeks and it works very well. oApp is tied to oProcess, which represents the IIS hit. The first thing I do at the hit level is to take a copy of oApp. Thus, so far, I was cloning it. But, cloning it is only a shallow copy. So, objectds under oApp are not necessarily cloned and point to the same address. While this is better, it is not perfect as this is not a deep cloning. This is what I am trying to achieve.
>
>The reason for this is that oApp might be changed by another hit, such as when I adjust something in the Field table, which is a table from the data dictionary. This is all loaded up into the memory into a NameObjectCollectionBase approach. So, if something got changed in there, the hit who does it will be ok. But, while doing it, this reset oApp.Tables, the NameObjectCollectionBase object, and this may cause another hit already in progress to loose the oApp.Tables reference because it disappears from memory for about 1.3 seconds. So, this is why I clone a first, looking now for a deep copy, in order to make sure that I have a copy of oApp for each hit, which would not be affected when a reset occurs under something which is tied to oApp.

TBH, this seems like bad design. Would it not be simpler, more efficient and less error prone for a hit to retrieve a current reference to the required oApp objects rather than hold a potentially out-of-date version ?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform