Exemplo n.º 1
0
        private static PropertyInfo FindMatchingProperty(Type type, ITypeCache typeCache, KeyValuePair <string, object> item)
        {
            var property = typeCache.GetMappedProperty(type, item.Key);

            if (property == null && item.Key == FluentCommand.AnnotationsLiteral)
            {
                property = typeCache.GetAnnotationsProperty(type);
            }

            return(property);
        }
Exemplo n.º 2
0
        private static PropertyInfo FindMatchingProperty(Type type, ITypeCache typeCache, KeyValuePair <string, object> item)
        {
            var property = typeCache.GetMappedProperty(type, item.Key);

            if (property == null && item.Key == FluentCommand.AnnotationsLiteral)
            {
                // TODO: Add AnnotationProperty method to ITypeCache
                property = typeCache.GetAllProperties(type).FirstOrDefault(x => x.PropertyType == typeof(ODataEntryAnnotations));
            }

            return(property);
        }