Ejemplo n.º 1
0
        /// <summary>
        /// Gets the child of the given node that matches the given name. If the given node holds an object reference, resolve the target of the reference
        /// and gets the child of the target node that matches the given name.
        /// </summary>
        /// <param name="modelNode">The model node.</param>
        /// <param name="name">The name of the child to retrieve.</param>
        /// <returns></returns>
        public static IModelNode GetChildThroughReferences(this IModelNode modelNode, string name)
        {
            var child = modelNode.GetChild(name) ?? modelNode.ResolveTarget().GetChild(name);

            return(child);
        }