#region ILocatable
private ProviderTrackedList<LocationItemUrlData> urls;
/// <summary>
/// Gets or sets a value indicating whether to auto generate an unique URL.
/// </summary>
/// <value>
/// <c>true</c> if to auto generate an unique URL otherwise, <c>false</c>.
/// </value>
[NonSerializableProperty]
public bool AutoGenerateUniqueUrl
{
get { return false; }
}
/// <summary>
/// Gets a collection of URL data for this item.
/// </summary>
/// <value> The collection of URL data.</value>
[NonSerializableProperty]
public virtual IList<LocationItemUrlData> Urls
{
get
{
if (this.urls == null)
this.urls = new ProviderTrackedList<LocationItemUrlData>(this, "Urls");
this.urls.SetCollectionParent(this);
return this.urls;
}
}
/// <summary>
/// Gets a collection of URL data for this item.
/// </summary>
/// <value>The collection of URL data.</value>
[NonSerializableProperty]
IEnumerable<UrlData> ILocatable.Urls
{
get
{
return this.Urls.Cast<UrlData>();
}
}
/// <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>
public void ClearUrls(bool excludeDefault)
{
if (this.urls != null)
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>
public void RemoveUrls(Func<UrlData, bool> predicate)
{
if (this.urls != null)
this.urls.RemoveUrls(predicate);
}
#endregion