1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Module Upgrade to 4.1 and iLocatable

Module Upgrade to 4.1 and iLocatable

2 posts, 0 answered
  1. William
    William avatar
    108 posts
    Registered:
    15 Feb 2011
    19 Apr 2011
    Link to this post
    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

  2. Slavo
    Slavo avatar
    295 posts
    Registered:
    24 Sep 2012
    22 Apr 2011
    Link to this post
    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

2 posts, 0 answered