Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        public IObjectPath CreateModelPathFor(IObjectPath objectPath, IContainer rootContainer)
        {
            var keywordReplacer = new KeywordReplacerCollection();

            addCommonModelReplacersTo(keywordReplacer, rootContainer);
            var modelPath = objectPath.Clone <IObjectPath>();

            keywordReplacer.ReplaceIn(modelPath);
            return(modelPath);
        }
Esempio n. 3
0
        private bool canResolveMoleculeContainerPath(IObjectPath containerPath)
        {
            if (!containerPath.Any())
            {
                return(false);
            }

            var templatePath = containerPath.Clone <IObjectPath>();

            templatePath.RemoveAt(getMoleculeNameIndex(containerPath));

            return(resolveContainerPathInSpatialStructure(templatePath) != null);
        }
Esempio n. 4
0
        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));
        }
Esempio n. 5
0
        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>();
 }