Module Upgrade to 4.1 and iLocatable

Posted by Community Admin on 03-Aug-2018 19:33

Module Upgrade to 4.1 and iLocatable

All Replies

Posted by Community Admin on 19-Apr-2011 00:00

Hey folks,

I'm trying to upgrade modules to 4.1 and am running into the following compile errors:

Error    1    'GlossaryModuleProject.Model.GlossaryItem' does not implement interface member 'Telerik.Sitefinity.GenericContent.Model.ILocatable.RemoveUrls(System.Func<Telerik.Sitefinity.GenericContent.Model.UrlData,bool>)'  

Error    2    'GlossaryModuleProject.Model.GlossaryItem' does not implement interface member 'Telerik.Sitefinity.GenericContent.Model.ILocatable.ClearUrls(bool)'   

This is using the sample Products Module.

Obviously, there's a need to implement those two members.  Can you let me know how to do so and what they should contains?

Thanks

- William

Posted by Community Admin on 22-Apr-2011 00:00

Hello William,

Here is the implementation of those two methods from the upgraded Products module:

/// <summary>
/// Clears the Urls collection for this item.
/// </summary>
/// <param name="excludeDefault">if set to <c>true</c> default urls will not be cleared.</param>
void ILocatable.ClearUrls(bool excludeDefault = false)
    this.urls.ClearUrls(excludeDefault);
 
/// <summary>
/// Removes all urls that satisfy the condition that is checked in the predicate function.
/// </summary>
/// <param name="predicate">A function to test each element for a condition.</param>
void ILocatable.RemoveUrls(Func<UrlData, bool> predicate)
    this.urls.RemoveUrls(predicate);

I've omitted to include those in the blog post providing instructions. I'll update it to also contain the implementation of those two methods.


Best wishes,
Slavo
the Telerik team

This thread is closed