src/Misc/EFTools/EntityDesign/UI/ViewModels/MappingDetails/MappingEFElement.cs
// <summary>
//     Walks up the tree and returns the first parent that is of the Type passed in.
// </summary>
// <param name="type">The type of parent to find.</param>
Walks up the tree and returns the first parent that is of the Type passed in.
Walks up the tree and returns the first parent that is of the Type passed in .
internal MappingEFElement GetParentOfType(Type type)
        {
            if (GetType() == type)
            {
                return this;
            }
            var item = Parent;
            while (item != null)
            {
                if (item.GetType() == type)
                {
                    return item;
                }
                item = item.Parent;
            }
            return null;
        }
internal MappingEFElement GetParentOfType ( Type type ) { if ( GetType ( ) == type ) { return this ; } var item = Parent ; while ( item != null ) { if ( item . GetType ( ) == type ) { return item ; } item = item . Parent ; } return null ; }
Walks up the tree and returns the first parent that is of the Type passed in.
Walks up the tree and returns the first parent that is of the Type passed in .
type
Type
The type of parent to find.
The type of parent to find .