本文整理汇总了C#中IContent.Remove方法的典型用法代码示例。如果您正苦于以下问题:C# IContent.Remove方法的具体用法?C# IContent.Remove怎么用?C# IContent.Remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IContent
的用法示例。
在下文中一共展示了IContent.Remove方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExecuteSync
protected override void ExecuteSync(IContent content, Index index, object parameter)
{
var oldName = index;
var newName = new Index(parameter);
var renamedObject = content.Retrieve(oldName);
content.Remove(renamedObject, oldName);
content.Add(renamedObject, newName);
}
示例2: ExecuteSync
protected override void ExecuteSync(IContent content, Index index, object parameter)
{
var oldName = index;
var renamedObject = content.Retrieve(oldName);
content.Remove(renamedObject, oldName);
var newName = AddPrimitiveKeyCommand.GenerateStringKey(content.Value, content.Descriptor, (string)parameter);
content.Add(renamedObject, newName);
}
示例3: ExecuteSync
protected override IActionItem ExecuteSync(IContent content, object index, object parameter, IEnumerable<IDirtiable> dirtiables)
{
var oldName = (string)index;
var newName = (string)parameter;
var removedObject = content.Retrieve(oldName);
content.Remove(oldName);
content.Add(newName, removedObject);
return null;
}
示例4: ExecuteSync
protected override IActionItem ExecuteSync(IContent content, object index, object parameter, IEnumerable<IDirtiable> dirtiables)
{
var indices = (Tuple<int, int>)parameter;
var sourceIndex = indices.Item1;
var targetIndex = indices.Item2;
content.Remove(sourceIndex);
content.Add(targetIndex);
return null;
}
示例5: ExecuteSync
protected override void ExecuteSync(IContent content, Index index, object parameter)
{
var indices = (Tuple<int, int>)parameter;
var sourceIndex = new Index(indices.Item1);
var targetIndex = new Index(indices.Item2);
var value = content.Retrieve(sourceIndex);
content.Remove(value, sourceIndex);
content.Add(value, targetIndex);
}
示例6: RemoveContent
public void RemoveContent(IContent content)
{
content.Remove();
AppState.TriggerNotification(content.Name + " content removed");
}
示例7: ExecuteSync
protected override IActionItem ExecuteSync(IContent content, object index, object parameter, IEnumerable<IDirtiable> dirtiables)
{
content.Remove(index);
return null;
}