I have a console app that is using the Core Service to try and retrieve localized and local components for a given publication Id. I've had a look at the documentation on SDL Live Content and have managed to get as far as the following:
using (var client = new BlueprintReports.CoreService.CoreServiceClient("basicHttp"))
{
var filterdata = new RepositoryItemsFilterData();
filterdata.Recursive = true;
filterdata.ItemTypes = new[] { ItemType.Component };
XElement resultxml = client.GetListXml(_publicationId, filterdata);
if (resultxml != null)
{
foreach (var component in resultxml.Elements())
{
var compData = (ComponentData)client.Read(component.Attribute("ID").Value,
new ReadOptions());
if (compData.BluePrintInfo.IsLocalized == true)
{
Console.WriteLine(component.Attribute("ID").Value);
}
}
}
Console.Read();
}
What the above code is doing is writing out the tcm Id of each localized component. However what I also need to do is check against local components i.e. components that have been created at the specific publication (_publicationId in the above example).
Does anyone know if this is possible?