protected override void ExecuteSync(IContentNode 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); }
protected override void ExecuteSync(IContentNode 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); }
protected override void ExecuteSync(IContentNode content, Index index, object parameter) { var item = content.Retrieve(index); content.Remove(item, index); }