Example #1
0
        protected virtual PropertyInfo GetInterfaceNamedStructureIdProperty(Type structureType, IEnumerable <PropertyInfo> properties)
        {
            if (!structureType.IsInterface)
            {
                return(null);
            }

            var propertyName = StructureIdPropertyNames.GetInterfaceTypeNamePropertyNameFor(structureType);

            return(properties.SingleOrDefault(p => p.Name.Equals(propertyName)));
        }
Example #2
0
        protected virtual PropertyInfo GetTypeNamedStructureIdProperty(Type structureType, IEnumerable <PropertyInfo> properties)
        {
            var propertyName = StructureIdPropertyNames.GetTypeNamePropertyNameFor(structureType);

            return(properties.SingleOrDefault(p => p.Name.Equals(propertyName)));
        }