Dynamically creating SyncService
-
17 czerwca 2010 19:11
I have a system of dynamically created tables and columns and was wondering if it is possible to manually configure the syncservice instead of supplying it a concrete class?
Would it be better for me to dynamically create the code and service and dynamically compile them into an assembly that can be exposed via a WCF svc file.
We have been using the original sync services for devices and that was configured manually so I could add and remove tables from the sync without the need to pre generate classes and compile them into an assembly.
I shall have a dig around to try and understand if it would be possible.
Regards
Russell
Wszystkie odpowiedzi
-
17 czerwca 2010 21:00Moderator
Interesting use case.
At this point what you request is not possible. There is some introspection done by the service when you hit it for the first time which is why the class is required. You could always use SyncSvcUtil.exe to dynamically generate the files and compile them in to an assembly and then "deploy" the service.
Maheshwar Jayaraman - http://blogs.msdn.com/mahjayar -
17 czerwca 2010 21:16
I am attempting to dynamically create an assembly which I will then supply to a ServiceHost and see if it works.
I will try to update here with my results.
By the way the SyncSvcUtil doesn't seem to like bit fields.
Regards
Russell
-
18 czerwca 2010 13:01
Interesting use case.
At this point what you request is not possible. There is some introspection done by the service when you hit it for the first time which is why the class is required. You could always use SyncSvcUtil.exe to dynamically generate the files and compile them in to an assembly and then "deploy" the service.
Maheshwar Jayaraman - http://blogs.msdn.com/mahjayarWill it be expected that the future release of the Sync Framework will be configurable at runtime as opposed to using concrete classes as dynamically generating assemblies is quite expensive?
-
19 czerwca 2010 00:35Właściciel
Thanks for your feedback, Russell! This request has been added to the list of customer requests considered in the planning of future release.
This posting is provided "AS IS" with no warranties, and confers no rights. -
20 czerwca 2010 22:16
Thanks for that Nina.
I will be trying it out in our compact framework application and see how it goes.
Having looked at the sample code for the Windows Mobile 6.5 application was a code generator used to generate the SqlCeStorageHandler.cs class.
If it was would it be possible to get a copy of that generator as there is quite a bit of code in there and it could save me some time.
I have managed to serve up tables dynamically by generating an assembly on the fly, now I'm onto talking to them through the device.
Regards
Russell -
21 czerwca 2010 19:05Moderator
Hi Russell,
We did not use a code generator for the SqlCeStorageHandler class but this is a good feedback that we will take into consideration for a future release.
Ganeshan
- Oznaczony jako odpowiedź przez Nina HOwner 22 czerwca 2010 18:06