Search the web
Sign In
New User? Sign Up
XMLRPCNET · XML-RPC.NET
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Cannot extend XmlRpcType   Message List  
Reply | Forward Message #1078 of 1226 |
Re: Cannot extend XmlRpcType

Hi again,

I checked the problem more thoroughly and I found that
IsAssignableFrom also matches 'interfaces'. This can miss identify
other data types. Therefore my solution wasn't correct.

This one I guess is the correct one:

if (t == typeof(XmlRpcStruct) || t.IsSubclassOf(typeof(XmlRpcStruct)))

I tested it with some XmlRpcStruct child classes and it seems to work.

Best regards,
Javier Gonel.

--- In XMLRPCNET@yahoogroups.com, "Javier Gonel" <bolibic@...> wrote:
>
> Hi all,
>
> I discovered that I cannot extend XmlRpcType. It's not a problem with
> the XmlRpcType class itself, but with the XmlRpcService class that
> identifies the Xml-RPC type.
>
> In the CookComputing.XmlRpc.XmlRpcServiceInfo class, method
> GetXmlRpcType, I've found this comparison (line 275):
>
> else if (t == typeof(XmlRpcStruct)))
> {
> ret = XmlRpcType.tHashtable;
> }
>
> This doesn't allow to extend XmlRpcType because when you send your
> extended object the type won't match.
>
> I patched the line with this check:
>
> else if (t.IsAssignableFrom(typeof(XmlRpcStruct)))
>
> This allows XmlRpcStruct and derived types to be identified as they
> should.
>
> Perhaps there is a reason for that check to be in that way, but
> without more info I guess this behavior should be patched.
>
> Regards,
> Javier Gonel
>





Sun Oct 19, 2008 4:09 pm

elgraffic
Offline Offline
Send Email Send Email

Forward
Message #1078 of 1226 |
Expand Messages Author Sort by Date

Hi all, I discovered that I cannot extend XmlRpcType. It's not a problem with the XmlRpcType class itself, but with the XmlRpcService class that identifies the...
Javier Gonel
elgraffic
Offline Send Email
Oct 18, 2008
2:35 pm

Hi again, I checked the problem more thoroughly and I found that IsAssignableFrom also matches 'interfaces'. This can miss identify other data types. Therefore...
Javier Gonel
elgraffic
Offline Send Email
Oct 20, 2008
5:52 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help