0
votes

I have ReactiveObject as my ModelBase class, I am using silverlight client and WCF service built on .net 4.0 at server side.

My ReactiveUI_SL5 assembly version is 4.0.2, when making service call I am getting runtime exception that Can't Deserialize

Message I am getting is SecurityException unhandled. Message= the data contract type reactiveUi.reactiveobject cannot be deserialized because ondeserialized method setupRxObj is not public.

How to make it working? Where can I get latest versoin of ReactiveUI_SL if this has been fixed?

May be I am using any older version but can't find any latest version than 4.0.2 for silverlight, while installing using nuget also getting error below Could not install package 'Splat 1.3.1'. You are trying to install this package into a project that targets 'Silverlight,Version=v5.0', but the package does not contain any assembly references or content files that are compatible with that framework

1
Probably best to not send a object that inherits from ReactiveObject. I generally create a minimal class (POCO) that it is purely there for sending from client to server and vice ce versa.Oliver
Source of ReactiveObject has declared it as DataContract but all of property is marked as [IgnoreDataMember] but because it is reactive and I am using stateless viewmodel pattern I have ReactiveObject is my BaseModel class. Is there any way it can be ignnored from serializing without changing its source code?Rajnikant

1 Answers

0
votes

I Realised that there is no support of reactive ui for Silverlight from version 4.6.7 so downloaded source code from https://github.com/reactiveui/ReactiveUI/tree/rxui4 and added

Silverlight condition to ReactiveObject's setupRxObject method.

    [OnDeserialized] //Added Silverlight here
#if WP7 || SILVERLIGHT
    public
#endif 
    void setupRxObj(StreamingContext sc) { setupRxObj(); }

Recompiled and worked.