private bool TryGetTypeMappingAndPropertyOptions(Type reflectedType,
                                                  PropertyInfo propertyInfo,
                                                  out TypeMappingOptions typeMapping,
                                                  out PropertyMappingOptions propertyOptions)
 {
     typeMapping     = GetTypeMapping(reflectedType);
     propertyOptions = typeMapping.GetPropertyOptions(propertyInfo);
     return(true);
 }
        private HttpMethod GetCombinedPropertyAccessMode(PropertyInfo propertyInfo,
                                                         ConstructorSpec constructorSpec,
                                                         PropertyMappingOptions opts)
        {
            var accessModeFromWrappedFilter = this.wrappedFilter.GetPropertyAccessMode(propertyInfo, constructorSpec);

            accessModeFromWrappedFilter |= PatchOfTypeIsAllowed(propertyInfo.PropertyType) ? HttpMethod.Patch : 0;

            Type elementType;

            if (propertyInfo.PropertyType.TryGetEnumerableElementType(out elementType))
            {
                accessModeFromWrappedFilter |=
                    (TypeIsMappedAsTransformedType(elementType) && PostOfTypeIsAllowed(elementType))
                        ? HttpMethod.Post
                        : 0;
            }
            return((opts.Method & opts.MethodMask) | (accessModeFromWrappedFilter & ~(opts.MethodMask)));
        }
        private HttpMethod GetCombinedPropertyItemAccessMode(Type type, PropertyInfo propertyInfo, PropertyMappingOptions opts)
        {
            var accessModeFromWrappedFilter = this.wrappedFilter.GetPropertyItemAccessMode(type, propertyInfo);

            accessModeFromWrappedFilter |= this.wrappedFilter.PatchOfTypeIsAllowed(type) ? HttpMethod.Patch : 0;
            return((opts.ItemMethod & opts.ItemMethodMask)
                   | (accessModeFromWrappedFilter
                      & ~(opts.ItemMethodMask)));
        }