Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More on cloning
Message
De
16/04/2013 16:08:06
 
 
À
16/04/2013 16:04:31
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01571111
Message ID:
01571136
Vues:
28
>Your oApp objects are different, but they may have properties that refer to the same object. For example, if your oApp has an oConnection property, (oProcess.oApp Is App.oApp) might return false whereas (oProcess.oApp.oConnection Is App.oApp.oConnection) could still return true. To make sure all of your reference properties are cloned and not referring to the same instance, you will need to do a deep copy.

Yep, and to do a deep copy, I have to serialize a bunch of things in the App class. This is getting complicated.

Especially when I get a message like this:

"Type 'System.Web.HttpRequest' in Assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable."

on that line:
        Public oRequest As System.Web.HttpRequest
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform