locked
Suggestions to add additional attributes to a file store RRS feed

  • Question

  • I need to sync a file store with some online storage, which provides additional attrbiutes such as user ratings. I want to reuse FileSyncProvider and extend it to handle the additional attributes. Anyone can suggest a best solution to do this? Thank you!
    Friday, March 19, 2010 12:57 AM

Answers

  • To answer the question more directly, no you won't really be able to extend the FSP to do what you want.  So a Simple Provider is probably the best alternative.
    Monday, March 22, 2010 11:41 PM
  • Like Jessie said, there is no way that you can extend the FileSyncProvider to add the additional attributes from your online store.  But one thing you could do is to write a separate provider on top of the simple provider to sync those extra attributes, that are not present in your local store; and at the same time use the file sync provider to sync the actual files. At your app then you would have to find a way to link the data you sync with the file sync provider to the one you synchronized with the simple provider.

     

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Monday, March 22, 2010 11:48 PM

All replies

  • you might want to check out the File Sync with Simple Custom Provider sample here: http://code.msdn.microsoft.com/sync/Release/ProjectReleases.aspx?ReleaseId=3592
    Friday, March 19, 2010 2:42 AM
  • Actually I don't think JuneT understood my question. Let me try to rephase - I have a local file store that is based on a plain windows folder. And I have an online store that also holds some files but with additional attribute, suh as user ratings. The question is how to get the additional attribute, such as user ratings, synced between the two stores, realizing the file store itself doesn't have such attribute. Yes I may write a custom provider and handle everything myself, but I don't want to do that because 90% of what I need is in the FileSyncProvider. So, the question is if I could *extend* FileSyncProvider to monitor/sync additional attributes as well?

     

    Friday, March 19, 2010 10:34 PM
  • Friendly Dog II,

    I think JuneT understood your question. Check the sample. Simple providers allow you to sync any attribute you want. You can add one more custom field - Rating (so that when rating changes, the file is synced). Then you just need to (read) report this field in the EnumerateItems() method, and (write) update this field in the UpdateItem() and CreateItem() methods.

    Hope this helps.

    Adrian

    Monday, March 22, 2010 10:17 PM
  • To answer the question more directly, no you won't really be able to extend the FSP to do what you want.  So a Simple Provider is probably the best alternative.
    Monday, March 22, 2010 11:41 PM
  • Like Jessie said, there is no way that you can extend the FileSyncProvider to add the additional attributes from your online store.  But one thing you could do is to write a separate provider on top of the simple provider to sync those extra attributes, that are not present in your local store; and at the same time use the file sync provider to sync the actual files. At your app then you would have to find a way to link the data you sync with the file sync provider to the one you synchronized with the simple provider.

     

     


    Maria del Mar Alvarez Rohena Microsoft Sync Framework
    Monday, March 22, 2010 11:48 PM
  • The sample does NOT apply to my question. Thank you.
    Tuesday, March 23, 2010 12:32 AM
  • Actually I don't think JuneT understood my question. Let me try to rephase - I have a locl file store that is based on a plain windows folder. And I have an online store that also holds some files but with additional attribute, suh as user ratings. The question is how to get the additional attribute, such as user ratings, synced between the two stores, realizing the file store itself doesn't have such attribute. Yes I may write a custom provider and handle everything myself, but I don't want to do that because 90% of what I need is in the FileSyncProvider. So, the question is if I could *extend* FileSyncProvider to monitor/sync additional attributes as well?

     


    It is exactly what I need, I understand this part, It's good for reference, Thanks for your instruction!
    Wednesday, November 24, 2010 3:48 AM