protected override void Context() { base.Context(); _objectPath = new ObjectPath("root2", "B"); _pathWithModelNameFirst = _objectPath.Clone <IObjectPath>(); _pathWithModelNameFirst.AddAtFront(_modelName); }
private void updateObjectPath(IObjectPath path) { if (!path.First().Equals(_oldName)) { return; } path.Remove(_oldName); path.AddAtFront(_newName); }
public void ReplaceIn(IObjectPath objectPath) { //no element if (!objectPath.Any()) { return; } var firstPathElement = objectPath.ElementAt(0); if (string.Equals(firstPathElement, _rootName)) { return; } if (!_topContainerNames.Contains(firstPathElement)) { return; } objectPath.AddAtFront(_rootName); }