Hello,
I am currently doing default serialization of various objects and I am aware
that the simplest way to do serialization between assemblies is to put the
objects to be serialized in a common assembly. However, I would like to be
able to put these objects in separate assemblies, but beyond that, continue
doing default serialization. My rough understanding of what I must do is to
implement the ISerializable interface for such objects and (apparently) use
it to change the assembly information. I have read Jeffrey Richter's series
of articles ( http://msdn.microsoft.com/msdnmag/issues/02/07/net) concerning
custom serialization but they appear to go way beyond what I want to do (and
can comprehend) at this point. Can someone possibly provide an example of
what I need to do, or point me in the right direction?
Thanks,
Ray Mitchell 2 1637
You can exchange instances of types to|from|between |through|among different
assemblies without serialization as long as the assemblies are in the same
application domain. Whether or not they's in the same assembly is mainly
orthogonal to serialization, although it might simplify your versioning
story. Also - you don't need to implement ISerializable - in most cases you
can just attribute your type with [Serializable]. What is it you're trying
to accomplish?
--
Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press www.servergeek.com
"Ray Mitchell" <Ra*********@Me anOldTeacher.co m> wrote in message
news:H7******** ***********@new sread1.news.pas .earthlink.net. .. Hello,
I am currently doing default serialization of various objects and I am
aware that the simplest way to do serialization between assemblies is to put the objects to be serialized in a common assembly. However, I would like to
be able to put these objects in separate assemblies, but beyond that,
continue doing default serialization. My rough understanding of what I must do is
to implement the ISerializable interface for such objects and (apparently)
use it to change the assembly information. I have read Jeffrey Richter's
series of articles (http://msdn.microsoft.com/msdnmag/issues/02/07/net)
concerning custom serialization but they appear to go way beyond what I want to do
(and can comprehend) at this point. Can someone possibly provide an example of what I need to do, or point me in the right direction?
Thanks, Ray Mitchell
My current application transfers arbitrary object graphs of all different
types over an IP network. Some of the IP nodes are threads within the same
assembly while others are on remote machines. As it is now all of my remote
and local nodes have to at least have the assembly containing the serialized
object in common because of the assembly naming problem. I'd like to be
able to treat the remote assembly as an entirely separate entity.
"Mickey Williams" <my first name at servergeek.com> wrote in message
news:O0******** ********@tk2msf tngp13.phx.gbl. .. You can exchange instances of types to|from|between |through|among
different assemblies without serialization as long as the assemblies are in the same application domain. Whether or not they's in the same assembly is mainly orthogonal to serialization, although it might simplify your versioning story. Also - you don't need to implement ISerializable - in most cases
you can just attribute your type with [Serializable]. What is it you're trying to accomplish?
-- Mickey Williams Author, "Microsoft Visual C# .NET Core Reference", MS Press www.servergeek.com "Ray Mitchell" <Ra*********@Me anOldTeacher.co m> wrote in message news:H7******** ***********@new sread1.news.pas .earthlink.net. .. Hello,
I am currently doing default serialization of various objects and I am aware that the simplest way to do serialization between assemblies is to put
the objects to be serialized in a common assembly. However, I would like to be able to put these objects in separate assemblies, but beyond that, continue doing default serialization. My rough understanding of what I must do
is to implement the ISerializable interface for such objects and (apparently) use it to change the assembly information. I have read Jeffrey Richter's series of articles (http://msdn.microsoft.com/msdnmag/issues/02/07/net) concerning custom serialization but they appear to go way beyond what I want to do (and can comprehend) at this point. Can someone possibly provide an example
of what I need to do, or point me in the right direction?
Thanks, Ray Mitchell
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Mike |
last post by:
I'm having a problem with serializing between different versions of classes.
I've read the many posts on handling versioning by implementing
ISerializable but unforunately we shipped the first few versions of our app
thinking we had done that, but unforunately we hadn't. Thus all the
original serialized object were done using pretty much standard .NET binary
serialization.
We're using the binary formatter and now have a number of typed...
|
by: Steve |
last post by:
I've been following a couple remoting tutorials on the web, they are all
pretty much the same.
I've got my different applications built(client, server and remote object
(dll))
The client is able to get a reference to the remote object and that works
fine. When I try to make a call to a remote object's method I get an
exception:
System.Runtime.Serialization.SerializationException: Cannot find the
assembly ProcessTest,...
|
by: Tim Cartwright |
last post by:
I recently added a new property to a base object that had a property with a
protected set. After adding the new propery to the class that inherited from
that class, I get the below error. This web service was working until this
change.
System.InvalidOperationException: Unable to generate a temporary class
(result=1).
error CS0272: The property or indexer 'USI.Data.Common.BizBase.IsValid'
cannot be used in this context because the set...
|
by: Thomas Qvist |
last post by:
We are building a suite of programs consisting of both winforms applications
and
office addins.
We would like to pre-generate the xml-serialization classes and add it to
our project to
avoid the overhead at startup and thus enhance the performance of our
applications.
The programs are coded in c# under .net 1.1.
|
by: Harold Howe |
last post by:
I am having a problem deserializing objects from a library when the
following conditions exist:
1- The library is strongly named
2- The serialized file was created with version 1.0 of the assembly
3- I am trying to deserialize from an EXE that references version 2.0 of
the assembly
4- Both version 1.0 and 2.0 of the assembly reside in the GAC (no policy
redirects exist).
| |
by: Peter Duniho |
last post by:
I've been learning about mechanisms .NET offers to export data. The
initial goal is to see what sorts of ways are available to save an
application's state (document, internal database, whatever). Not counting
storing data in a database (which is obviously suitable for some things,
but not necessary or even necessarily desirable for other things), here's
what I've explored:
Serializable attribute, with BinaryFormatter and SoapFormatter...
|
by: camarkco |
last post by:
Why does C# go out of it's way to prevent this?
Mark
|
by: compurhythms |
last post by:
I have a .NET Windows Service that needs to run without interruption
for long periods of time (weeks or months). Everything works great
except that every once in a great while I get the following type of
exception when reading data from a file via XML Serialization:
System.IO.FileNotFoundException: Could not find file 'C:\WINDOWS\TEMP
\muodpwwm.dll'. (see rest of call stack below).
The problem is that the serialization works for...
|
by: Gabriel Ferrarini |
last post by:
The following code show me all assemblies attached to the project.
=================================
For Each asm In AppDomain.CurrentDomain.GetAssemblies()
MessageBox.Show(asm.Location)
Next
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |