Search:
Namespaces
Discussions
.NET v1.1
Feedback
How to return and interface from a remote object?
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework.remoting
.
Post a new message to this list...
Julia
Hi,I have the following classes
public interface IComponentProperties
{
object this[string propertyName]
{
get;
set;
}
}
//Hold a list of properties
class Properties:IComponentProperties
{
private
Hashtable
propsHolder = new
Hashtable
();
public object this[string propertyName]
{
get
{
return propsHolder[propertyName];
}
set
{
}
}
}
Class Service
{
private Properties props;
public IComponentProperties Properties
{
get{return props;}
}
}
The service class is a server activated singleton remote object which
accessed by ASP.NET application,
I wonder if I need to do anything special in order to use the
IComponentProperties interface from ASP.NET application
Should the Properties class be a remote as well?
Thanks in advance.
Reply to this message...
Sam Santiago
It depends if you want your properties to be marshaled-by-value or
marshaled-by-reference. Most likely, for properties you probably want to
use marshal-by-value (unless you wanted changes by the client reflected on
the server) so you have to ensure the objects you put in your
Hashtable
are
Serializable. If you want to remote your properties class then it must
inherit from
MarshalByRefObject
.
Thanks,
Sam
--
_______________________________
Sam Santiago
Click here to reveal e-mail address
http://www.SoftiTechture.com
_______________________________
"Julia" <
Click here to reveal e-mail address
> wrote in message
news:%
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
System.Collections.Hashtable
System.MarshalByRefObject
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com