本文整理汇总了C#中ItemList.AddRange方法的典型用法代码示例。如果您正苦于以下问题:C# ItemList.AddRange方法的具体用法?C# ItemList.AddRange怎么用?C# ItemList.AddRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ItemList
的用法示例。
在下文中一共展示了ItemList.AddRange方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddReferencesRecursive
protected void AddReferencesRecursive(ContentItem current, ItemList referrers)
{
referrers.AddRange(Find.Items.Where.Detail().Eq(Item).Select());
foreach (ContentItem child in current.GetChildren())
{
AddReferencesRecursive(child, referrers);
}
}
示例2: AddReferencesRecursive
protected void AddReferencesRecursive(ContentItem current, ItemList referrers)
{
referrers.AddRange(Content.Search.Repository.Find(Parameter.Equal(null, Item).Detail()));
foreach (ContentItem child in current.Children.WhereAccessible())
{
AddReferencesRecursive(child, referrers);
}
}
示例3: DoExecute
protected override ItemList DoExecute()
{
var item = this.innerCommand.DataStorage.GetFakeItem(this.Item.ID);
var itemList = new ItemList();
itemList.AddRange(item.Children.Select(child => this.innerCommand.DataStorage.GetSitecoreItem(child.ID, this.Item.Language)));
return itemList;
}
示例4: AddReferencesRecursive
protected void AddReferencesRecursive(ContentItem current, ItemList referrers)
{
referrers.AddRange(Content.Search.Repository.Find(Parameter.Equal(null, Item).Detail()));
//Find.Items.Where.Detail().Eq(Item).Select());
foreach (ContentItem child in current.GetChildren())
{
AddReferencesRecursive(child, referrers);
}
}
示例5: DoExecute
protected override ItemList DoExecute()
{
var item = this.dataStorage.GetFakeItem(this.Item.ID);
var itemList = new ItemList();
if (item == null)
{
return itemList;
}
var children = item.Children.Select(child => this.dataStorage.GetSitecoreItem(child.ID, this.Item.Language));
itemList.AddRange(children);
return itemList;
}
示例6: GetScriptedQueries
protected static string GetScriptedQueries(string sources, Item contextItem, ItemList items)
{
var unusedLocations = string.Empty;
foreach (var location in new ListString(sources))
{
if (IsScripted(location))
{
var scriptLocation = location.Replace("script:", "").Trim();
items.AddRange(RunEnumeration(scriptLocation, contextItem));
}
else
{
unusedLocations += unusedLocations.Length > 0 ? "|" + location : location;
}
}
return unusedLocations;
}