public PropertyDefinitionProvider(IContentTypeProvider contentTypeProvider, IPropertyMappingProvider propertyMappingProvider, IPropertyDefinitionCreator propertyDefinitionCreator)
        {
            foreach (var contentType in contentTypeProvider.GetAll())
            {
                var propertyDefinitions = new List <PropertyDefinitionDescriptor>();

                foreach (var property in contentType.Type.GetProperties())
                {
                    var mapping = propertyMappingProvider.Get(property);

                    if (mapping.PropertyMappingType == PropertyMappingType.Ignored)
                    {
                        continue;
                    }

                    if (mapping.PropertyMappingType == PropertyMappingType.CoreInterface)
                    {
                        continue;
                    }

                    if (mapping.PropertyMappingType == PropertyMappingType.Incomplete)
                    {
                        continue;
                    }

                    propertyDefinitions.Add(propertyDefinitionCreator.Create(property));
                }

                Values[contentType.Id] = propertyDefinitions.AsReadOnly();
            }
        }
        public ContentTypeCoreInterfaceProvider(IContentTypeProvider contentTypeProvider, ICoreInterfaceProvider coreInterfaceProvider)
        {
            foreach (var contentType in contentTypeProvider.GetAll())
            {
                var coreInterfaces = contentType.Type.GetInterfaces()
                                     .Select(i => coreInterfaceProvider.GetFor(i))
                                     .Where(i => i != null);

                CoreInterfacesByContentTypeId[contentType.Id] = coreInterfaces;
            }
        }