private string parameterFullPathFor(SensitivityParameter sensitivityParameter) { if (sensitivityParameter?.Parameter == null) { return(string.Empty); } return(_entityPathResolver.FullPathFor(sensitivityParameter.Parameter)); }
private T[] allEntitiesMatching <T>(IContainer container, string path) where T : class, IEntity { if (string.IsNullOrEmpty(path)) { return(Array.Empty <T>()); } var pathArray = path.ToPathArray(); validate(pathArray); // no wild cards => it's a single path and do not need to inspect if (!path.Contains(WILD_CARD)) { var entity = container.EntityAt <T>(pathArray); return(entity == null?Array.Empty <T>() : new[] { entity }); } var regex = new Regex(createSearchPattern(pathArray), RegexOptions.IgnoreCase); var parentContainerPath = $"{_entityPathResolver.FullPathFor(container)}{ObjectPath.PATH_DELIMITER}"; return(container.GetAllChildren <T>(x => pathMatches(regex, parentContainerPath, x)).ToArray()); }
public string FullPathFor(IObjectBase objectBase, bool addSimulationName = false) { var entity = objectBase as IEntity; if (entity == null) { return(objectBase.Name); } if (addSimulationName) { return(_entityPathResolver.FullPathFor(entity)); } return(_entityPathResolver.PathFor(entity)); }