src/Misc/EFTools/XmlCore/UI/ViewModels/Explorer/ExplorerEFElement.cs
/// <summary>
///     Execute command to rename ExplorerEFElement's model-item.
/// </summary>
/// <param name="cpc"></param>
/// <param name="newName"></param>
/// <returns></returns>
Execute command to rename ExplorerEFElement's model-item.
Execute command to rename ExplorerEFElement ' s model - item .
protected virtual bool RenameModelElement(CommandProcessorContext cpc, string newName)
        {
            var efNameableItem = ModelItem as EFNameableItem;
            if (null != efNameableItem
                &&
                null != efNameableItem.Artifact
                &&
                null != efNameableItem.Artifact.ModelManager)
            {
                CommandProcessor.InvokeSingleCommand(
                    cpc
                    , efNameableItem.Artifact.ModelManager.CreateRenameCommand(efNameableItem, newName, true));
                return true;
            }
            return false;
        }
protected virtual bool RenameModelElement ( CommandProcessorContext cpc , string newName ) { var efNameableItem = ModelItem as EFNameableItem ; if ( null != efNameableItem && null != efNameableItem . Artifact && null != efNameableItem . Artifact . ModelManager ) { CommandProcessor . InvokeSingleCommand ( cpc , efNameableItem . Artifact . ModelManager . CreateRenameCommand ( efNameableItem , newName , true ) ) ; return true ; } return false ; }
Execute command to rename ExplorerEFElement's model-item.
Execute command to rename ExplorerEFElement ' s model - item .
// call RenameCommand
None
cpc
CommandProcessorContext
None
newName
string
None