Cross Version support with IsolatedStorageProvider

4 posts, 2 answers
  1. Joe
    Joe avatar
    4 posts
    Member since:
    May 2019

    Posted 28 Jul 2019 Link to this post

    Hello,

    I'm using IsolatedStorageProvider to save/load RadGridView settings in my application and I also wanted to provide the ability to serialize/deserialize settings when the application gets updated to a newer version of Telerik controls. If I were to use PersistenceManager, this would be possible via PersistenceManager.AllowCrossVersion property, but I cannot find anything similar when using IsolatedStorageProvider.

    How can assembly upgrades be handled with IsolatedStorageProvider?

  2. Answer
    Martin Ivanov
    Admin
    Martin Ivanov avatar
    2480 posts

    Posted 29 Jul 2019 Link to this post

    Hello Mario,

    The IsolatedStorageProvider works with PersistenceManager internally. Also, it allows you to create and provide the manager manually. This is done via the constructor of the provider and it will allow you to set the AllowCrossVersion property. Here is an example:
    var manager = new PersistenceManager() { AllowCrossVersion = true };
    var storageProvider = new IsolatedStorageProvider(manager);
    I hope this helps.

    Regards,
    Martin Ivanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Joe
    Joe avatar
    4 posts
    Member since:
    May 2019

    Posted 29 Jul 2019 in reply to Martin Ivanov Link to this post

    Thanks Martin.

    One more followup question. AllowCrossVersion flag is important when loading settings saved with an older assembly, but what about saving the settings? The way I see it is that the older settings will be overwritten when saving so it shouldn't matter if the AllowCrossVersion flag is set in the IsolatedStorageProvider. Is my thinking correct, or should I still set the flag before calling IsolatedStorageProvider.SaveToStorage()?

  4. Answer
    Martin Ivanov
    Admin
    Martin Ivanov avatar
    2480 posts

    Posted 29 Jul 2019 Link to this post

    Hello Mario,

    You are correct. The AllowCrossVersion flag is used only when loading settings.

    Regards,
    Martin Ivanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top