다음은 사용자 세부 정보가 포함 된 ItemCheckedout의 세부 정보를 가져 오는 샘플 코드입니다.
public static Dictionary<bool,string> ItemCheckedOutDetails(string ItemUri, CoreServiceClient client, ReadOptions readOpt, ItemType itemType)
{
Dictionary<bool, string> itemDetails = null;
FullVersionInfo itemInfo = null;
if (itemType == ItemType.Component)
{
// reading the component data
var itemData = (ComponentData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.Page)
{
// reading the page data
var itemData = (PageData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.StructureGroup)
{
// reading the structuregroup data
var itemData = (StructureGroupData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.Publication)
{
// reading the Publication data
var itemData = (PublicationData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.ComponentTemplate)
{
// reading the component template data
var itemData = (ComponentTemplateData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.PageTemplate)
{
// reading the Page template data
var itemData = (PageTemplateData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
else if (itemType == ItemType.MultimediaType)
{
// reading the Multimedia Type data
var itemData = (MultimediaTypeData)client.Read(ItemUri, readOpt);
itemInfo = (FullVersionInfo)itemData.VersionInfo;
}
if (itemInfo != null)
{
if (itemInfo.LockType.Value == LockType.CheckedOut)
{
itemDetails.Add(true, itemInfo.CheckOutUser.Title);
}
}
return itemDetails;
}
@ 크리스 ... 감사하는 집합 LockType와 내가 모두 세부 사항 –
대답은 집합 LockType 값은 실제로 비트 값이며, 또한 플래그를'가질 수 –