How to fetch the list of all the localized and locally created Components in a Folder for a particular Publication using core service?
Currently I am first fetching all the Components using the following code.
public static IEnumerable<XNode> GetFolderItems(string folderUri, ItemType itemType)
{
OrganizationalItemItemsFilterData filter = new OrganizationalItemItemsFilterData();
IEnumerable<XNode> folderItems = null;
XElement folderData = null;
filter.ItemTypes = new[] { ItemType.Component };
filter.Recursive = true;
folderData = Client.GetListXml(folderUri, filter);
folderItems = folderData != null ? folderData.Nodes() : null;
return folderItems;
}
After fetching the Folder Components, then for each Folder item I call the following method to fetch the localized/locally created status.
public static bool GetComponentLocalizedStatus(string componentUri)
{
ComponentData componentdata;
bool status = false;
componentdata = Client.Read(componentUri, new ReadOptions()) as ComponentData;
if (componentdata.BluePrintInfo.IsShared == false)
{
status = true;
}
else
status = false;
return status;
}
This approach is not efficient. Is there a way to fetch the locally created/ localized Components present in a Folder in single go?