Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More on cloning
Message
From
16/04/2013 16:08:06
 
 
To
16/04/2013 16:04:31
General information
Forum:
ASP.NET
Category:
Other
Title:
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01571111
Message ID:
01571136
Views:
29
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform