none
Property<> No Longer a part of Rx? RRS feed

  • Question

  • The Release notes indicate that properties (Property, Property<>) were removed in Rx build 1.0.2317.0.  I'm in the process of porting a large Silverlight 3 project with RIA Services and Rx to Silverlight 4 with RIA Services RTW and build v1.0.2563.0.  Property<> was used quite liberally throughout and not being the original programmer I'm not quite sure what to use in place of Property<>.   Any suggestions?

    Here's an example of some of the code:


            public EntryViewModel()
            {
                this.groupDisposable = new CompositeDisposable();
                this.Entries = new Property<PagedCollectionView>();
             

                this.groupDisposable.Add(this.Entries
                    .ToObservable()
                    .Do(pcv => pcv.SortDescriptions.Add(new SortDescription(
                        ObjectReflection.GetPropertyName<EntryLog>(e => e.EntryDate),
                        ListSortDirection.Descending)))
                    .Do(pcv => pcv.MoveCurrentToFirst())
                    .Subscribe());
            }

    Thanks for any help you can give! 

     

     

    Tuesday, June 15, 2010 10:18 PM

Answers

  • As we believe IProperty needs more design work we decided to remove it until we have done the design work. For now you could try to define a version of IProperty yourself or try using Dave's suggestion.

     

    Sorry for the inconvenience!

     

    Jeffrey

    Wednesday, June 16, 2010 4:57 PM

All replies

  • Hi,

    You could try to use BehaviorSubject<PagedCollectionView> instead.  Then wherever the this.Entries setter is being called change it to this.Entries.OnNext(value) instead.

    Not sure if it will cover all of the previous functionality, but if it was only being used to track change events then I think this should be fine.

    Note that the Rx team did say that IProperty may be returning in a subsequent release, if I remember correctly.

    - Dave


    http://davesexton.com/blog
    Wednesday, June 16, 2010 4:05 AM
  • As we believe IProperty needs more design work we decided to remove it until we have done the design work. For now you could try to define a version of IProperty yourself or try using Dave's suggestion.

     

    Sorry for the inconvenience!

     

    Jeffrey

    Wednesday, June 16, 2010 4:57 PM
  • Thanks for the reply.  Just one more question.  I notice on your DevLabs web page there are separate downloads for Silverlight 3 and Silverlight 4.  Since I'm migrating from VS2008/SL3/RIA beta/Rx 1.0.2149.0 to  VS2010/SL4/RIA RTW do I need to migrate to Rx SL4 as well?  Or can I stick with the older version that is already in place.

    Again, thanks for your help!

    leslie :)

    Wednesday, June 16, 2010 9:39 PM
  • There are several binary incompatibilities between SL3 and SL4, if you plan to develop for SL4, you'll want to get the SL4 version of Rx.

     

    Regards,

     

    Jeffrey

    Wednesday, June 16, 2010 10:03 PM