protected override void Context()
 {
     base.Context();
     _objectPath             = new ObjectPath("root2", "B");
     _pathWithModelNameFirst = _objectPath.Clone <IObjectPath>();
     _pathWithModelNameFirst.AddAtFront(_modelName);
 }
Beispiel #2
0
 private void updateObjectPath(IObjectPath path)
 {
     if (!path.First().Equals(_oldName))
     {
         return;
     }
     path.Remove(_oldName);
     path.AddAtFront(_newName);
 }
Beispiel #3
0
        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);
        }