src/Shared/EntityFramework/Core/SchemaObjectModel/StructuredType.cs
// <summary>
// See if a name is a member in a type or any of its base types
// </summary>
// <param name="name"> name to look for </param>
// <param name="definingType"> if defined, the type that defines it </param>
// <param name="definingMember"> if defined, the member that defines it </param>
// <returns> how name was defined </returns>
See if a name is a member in a type or any of its base types
See if a name is a member in a type or any of its base types
private HowDefined DefinesMemberName(string name, out StructuredType definingType, out SchemaElement definingMember)
        {
            if (NamedMembers.ContainsKey(name))
            {
                definingType = this;
                definingMember = NamedMembers[name];
                return HowDefined.AsMember;
            }
            definingMember = NamedMembers.LookUpEquivalentKey(name);
            Debug.Assert(definingMember == null, "we allow the scenario that members can have same name but different cases");
            if (IsTypeHierarchyRoot)
            {
                definingType = null;
                definingMember = null;
                return HowDefined.NotDefined;
            }
            return BaseType.DefinesMemberName(name, out definingType, out definingMember);
        }
private HowDefined DefinesMemberName ( string name , out StructuredType definingType , out SchemaElement definingMember ) { if ( NamedMembers . ContainsKey ( name ) ) { definingType = this ; definingMember = NamedMembers [ name ] ; return HowDefined . AsMember ; } definingMember = NamedMembers . LookUpEquivalentKey ( name ) ; Debug . Assert ( definingMember == null , " " ) ; if ( IsTypeHierarchyRoot ) { definingType = null ; definingMember = null ; return HowDefined . NotDefined ; } return BaseType . DefinesMemberName ( name , out definingType , out definingMember ) ; }
See if a name is a member in a type or any of its base types
See if a name is a member in a type or any of its base types
None
name
string
name to look for
name to look for
StructuredType
out
SchemaElement
out
definingType
if defined, the type that defines it
if defined the type that defines it
definingMember
if defined, the member that defines it
if defined the member that defines it