November Happy Hour will be moved to Thursday December 5th.

PageDefinition.CheckUsage

Vote:
 

The CheckUsage method in the PageDefinition class doesn't have any description in the SDK. I can of course use Reflector to understand it, but since it returns a DataSet it's easy to miss something. If possible I would love it if someone from EPiServer could provide a brief description about it? I'm especially interested in edge cases to watch out for when verifying that a PageDefinition isn't used.

#46478
Dec 14, 2010 14:25
Vote:
 

Hi!

I not sure I have the answers you're looking for, but we have added some information that will appear in a future SDK:

/// <summary>
/// Retrieves information about the usage of the <see cref="PageDefinition"/>.
/// </summary>
/// <param name="onlyLanguageSpecific">if set to <c>true</c> only language specific usage is retrieved.</param>
/// <param name="isDynamic">if set to <c>true</c> only dynamic properties will be considered.</param>
/// <returns>A <see cref="DataSet"/> containing a table where each row represents usage on a page and language branch.</returns>

The only place we use it in the UI is for the warning about possible loss of data that appears when you change a property definition from language specific to non language specific.

Regards

Per Gunsarfs
EPiServer Development Team

#46483
Dec 14, 2010 17:07
Vote:
 

Thank you!

You don't use it when removing properties (PageDefinitions)?

What I'm trying to figure out is if this method could be used to determine if a PageDefinition could be removed without possible causing any damage to data. Would love feedback on that :)

#46488
Edited, Dec 14, 2010 20:01
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.