src/Shared/EntityFramework/Core/Objects/MaterializedDataRecord.cs
// <summary>
// Creates a PropertyDescriptorCollection based on a StructuralType definition
// Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
// </summary>
// <param name="structuralType"> The structural type definition </param>
// <param name="componentType"> The type to use as the component type </param>
// <param name="isReadOnly"> Whether the properties in the collection should be read only or not </param>
Creates a PropertyDescriptorCollection based on a StructuralType definition
Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
Creates a PropertyDescriptorCollection based on a StructuralType definition Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
internal static PropertyDescriptorCollection CreatePropertyDescriptorCollection(
            StructuralType structuralType, Type componentType, bool isReadOnly)
        {
            var pdList = new List<PropertyDescriptor>();
            if (structuralType != null)
            {
                foreach (var member in structuralType.Members)
                {
                    if (member.BuiltInTypeKind
                        == BuiltInTypeKind.EdmProperty)
                    {
                        var edmPropertyMember = (EdmProperty)member;
                        var fd = new FieldDescriptor(componentType, isReadOnly, edmPropertyMember);
                        pdList.Add(fd);
                    }
                }
            }
            return (new PropertyDescriptorCollection(pdList.ToArray()));
        }
internal static PropertyDescriptorCollection CreatePropertyDescriptorCollection ( StructuralType structuralType , Type componentType , bool isReadOnly ) { var pdList = new List < PropertyDescriptor > ( ) ; if ( structuralType != null ) { foreach ( var member in structuralType . Members ) { if ( member . BuiltInTypeKind == BuiltInTypeKind . EdmProperty ) { var edmPropertyMember = ( EdmProperty ) member ; var fd = new FieldDescriptor ( componentType , isReadOnly , edmPropertyMember ) ; pdList . Add ( fd ) ; } } } return ( new PropertyDescriptorCollection ( pdList . ToArray ( ) ) ) ; }
Creates a PropertyDescriptorCollection based on a StructuralType definition
Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
Creates a PropertyDescriptorCollection based on a StructuralType definition Currently this includes a PropertyDescriptor for each primitive type property in the StructuralType
structuralType
StructuralType
The structural type definition
The structural type definition
componentType
Type
The type to use as the component type
The type to use as the component type
isReadOnly
bool
Whether the properties in the collection should be read only or not
Whether the properties in the collection should be read only or not