System.Data.DataRow.GetNestedParentCount C# (CSharp) Method

GetNestedParentCount() private method

private GetNestedParentCount ( ) : int
return int
        internal int GetNestedParentCount()
        {
            int count = 0;
            DataRelation[] nestedParentRelations = _table.NestedParentRelations;
            foreach (DataRelation rel in nestedParentRelations)
            {
                if (rel == null) // don't like this but done for backward code compatability
                {
                    continue;
                }
                if (rel.ParentTable == _table) // self-nested table
                {
                    CheckForLoops(rel);
                }
                DataRow row = GetParentRow(rel);
                if (row != null)
                {
                    count++;
                }
            }
            return count;
            // Rule 1: At all times, only ONE FK  "(in a row) can be non-Null
            // we wont allow a row to have multiple parents, as we cant handle it , also in diffgram
        }