private void setCommandConstants() { ObjectType = new ObjectTypeResolver().TypeFor <TStartValue>(); CommandType = AppConstants.Commands.EditCommand; var newStartValuePath = _newContainerPath.Clone <IObjectPath>().AndAdd(_originalStartValue.Name); Description = AppConstants.Commands.EditPath(ObjectType, _originalStartValue.Path, newStartValuePath); }
public IObjectPath CreateModelPathFor(IObjectPath objectPath, IContainer rootContainer) { var keywordReplacer = new KeywordReplacerCollection(); addCommonModelReplacersTo(keywordReplacer, rootContainer); var modelPath = objectPath.Clone <IObjectPath>(); keywordReplacer.ReplaceIn(modelPath); return(modelPath); }
private bool canResolveMoleculeContainerPath(IObjectPath containerPath) { if (!containerPath.Any()) { return(false); } var templatePath = containerPath.Clone <IObjectPath>(); templatePath.RemoveAt(getMoleculeNameIndex(containerPath)); return(resolveContainerPathInSpatialStructure(templatePath) != null); }
private IParameter resolveMoleculeParameterInSpatialStructure(IObjectPath containerPath, string name) { if (!containerPath.Any() || !canResolveMoleculeContainerPath(containerPath)) { return(null); } var templatePath = containerPath.Clone <IObjectPath>(); templatePath.RemoveAt(getMoleculeNameIndex(containerPath)); templatePath.Add(Constants.MOLECULE_PROPERTIES); return(resolveParameterInSpatialStructure(templatePath, name)); }
private IParameter resolveParameterInSpatialStructure(IObjectPath containerPath, string parameterName) { var parameterPath = containerPath.Clone <IObjectPath>().AndAdd(parameterName); return(resolveParameterPathInSpatialStructure(parameterPath)); }
protected override void Because() { _clonePath = _objectPath.Clone <IObjectPath>(); }