TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

.NET CF Compatibility #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As a feature request, msnp-sharp could be compatible with .net compact
framework.

Original issue reported on code.google.com by junalmeida on 18 Feb 2010 at 12:47

GoogleCodeExporter commented 9 years ago

Original comment by freezing...@gmail.com on 18 Feb 2010 at 1:31

GoogleCodeExporter commented 9 years ago
Would you please provide more infomation? For example, which part of the 
library is 
not compatible with .net compact framework?

Original comment by freezing...@gmail.com on 21 Feb 2010 at 12:33

GoogleCodeExporter commented 9 years ago
If we simple add the reference, .net deploys all the desktop version of its
libraries. So, I have tried to compile copying all msnp-sharp files to a new
SmartDevice Class Library. But, after resolving some minimal necessary changes, 
it
throws fews compilation errors against unsupported webservice features like the
'xxxCompleted' events of async calls, and anonymous delegates.And such erros 
are more
complex and i'm unable to resolve.

Original comment by junalmeida on 21 Feb 2010 at 12:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,
Give me the discription of those errors to me, please.

Original comment by freezing...@gmail.com on 21 Feb 2010 at 1:50

GoogleCodeExporter commented 9 years ago
The .net compact framework is able to connect to a webservice, both in a 
synchronous
and asynchronous way. The problem is that some events and anonymous delegates 
are not
supported. I mean, after i have removed all other incompatibilities, the compile
results on the following:

------ Rebuild All started: Project: MSNPSharpCE, Configuration: Debug Any CPU 
------
ContactService.cs(571,66): error CS0246: The type or namespace name
'FindMembershipCompletedEventHandler' could not be found (are you missing a 
using
directive or an assembly reference?)

ContactService.cs(691,66): error CS0246: The type or namespace name
'ABFindContactsPagedCompletedEventHandler' could not be found (are you missing a
using directive or an assembly reference?)

ContactService.cs(702,89): error CS0246: The type or namespace name
'ABFindContactsPagedCompletedEventHandler' could not be found (are you missing a
using directive or an assembly reference?)

ContactService.cs(1031,133): error CS0246: The type or namespace name
'ABContactAddCompletedEventHandler' could not be found (are you missing a using
directive or an assembly reference?)

Compile complete -- 4 errors, 0 warnings
-------------

So, I guess that rewriting these parts, and rewriting anonymous delegates with 
real
delegates will turn msnp-sharp compatible with compact framework.

Original comment by junalmeida on 21 Feb 2010 at 1:55

GoogleCodeExporter commented 9 years ago
ContactService.cs(571,66)
What is it?

Original comment by freezing...@gmail.com on 21 Feb 2010 at 2:52

GoogleCodeExporter commented 9 years ago
ContactService.cs is a class of your library, see below:

namespace MSNPSharp
{
    using MSNPSharp.IO;
    using MSNPSharp.Core;
    using MSNPSharp.MSNWS.MSNABSharingService;

    /// <summary>
    /// Provide webservice operations for contacts. This class cannot be inherited.
    /// </summary>
    public sealed class ContactService : MSNService
....

Original comment by junalmeida on 21 Feb 2010 at 2:56

GoogleCodeExporter commented 9 years ago
I think the problem is some of these event handler were rename when 
re-generating 
the webservices' source.

Original comment by freezing...@gmail.com on 21 Feb 2010 at 2:56

GoogleCodeExporter commented 9 years ago
The problem is that these event handlers are not supported on the compact 
framework,
they simply does not exist. There are other ways to achieve the "Completed" 
callback
of the async webservice on CF.NET, but we need a small effort on refactoring 
these
webservice calls.

Original comment by junalmeida on 21 Feb 2010 at 3:01

GoogleCodeExporter commented 9 years ago
ok, could you please send the source of the library to ported to smart device 
to 
freezingsoft@gmail.com?

Original comment by freezing...@gmail.com on 22 Feb 2010 at 9:20

GoogleCodeExporter commented 9 years ago
i have sent the source of the library partially ported to your email.

Original comment by junalmeida on 22 Feb 2010 at 9:45

GoogleCodeExporter commented 9 years ago
I see, Compact framework use Begin/End prototype to achieve async calls. This 
will 
lead to a lot of work, you need to rewrite all of the calling to async 
webservice 
methods. So I still suggest you not to port this library to Compact Framework.

Original comment by freezing...@gmail.com on 23 Feb 2010 at 4:06

GoogleCodeExporter commented 9 years ago

Original comment by freezing...@gmail.com on 26 Feb 2010 at 1:57