Beispiel #1
0
 /// <summary>
 /// Creates a new EntityFrameworkQueryableResourceCollectionDocumentBuilder
 /// </summary>
 public EntityFrameworkQueryableResourceCollectionDocumentBuilder(
     IResourceCollectionDocumentBuilder resourceCollectionDocumentBuilder,
     IQueryableEnumerationTransformer enumerationTransformer,
     IQueryableFilteringTransformer filteringTransformer,
     IQueryableSortingTransformer sortingTransformer,
     IQueryablePaginationTransformer paginationTransformer,
     IBaseUrlService baseUrlService) :
     base(resourceCollectionDocumentBuilder,
          enumerationTransformer,
          filteringTransformer,
          sortingTransformer,
          paginationTransformer,
          baseUrlService)
 {
 }
 /// <summary>
 /// Creates a new DefaultQueryableResourceCollectionDocumentBuilder
 /// </summary>
 public DefaultQueryableResourceCollectionDocumentBuilder(
     IResourceCollectionDocumentBuilder resourceCollectionDocumentBuilder,
     IQueryableEnumerationTransformer enumerationTransformer,
     IQueryableFilteringTransformer filteringTransformer,
     IQueryableSortingTransformer sortingTransformer,
     IQueryablePaginationTransformer paginationTransformer,
     IBaseUrlService baseUrlService)
 {
     _resourceCollectionDocumentBuilder = resourceCollectionDocumentBuilder;
     _enumerationTransformer            = enumerationTransformer;
     _filteringTransformer  = filteringTransformer;
     _sortingTransformer    = sortingTransformer;
     _paginationTransformer = paginationTransformer;
     _baseUrlService        = baseUrlService;
 }
        /// <summary>
        /// Creates a new FallbackDocumentBuilder
        /// </summary>
        public FallbackDocumentBuilder(ISingleResourceDocumentBuilder singleResourceDocumentBuilder,
            IQueryableResourceCollectionDocumentBuilder queryableResourceCollectionDocumentBuilder,
            IResourceCollectionDocumentBuilder resourceCollectionDocumentBuilder,
            IBaseUrlService baseUrlService)
        {
            _singleResourceDocumentBuilder = singleResourceDocumentBuilder;
            _queryableResourceCollectionDocumentBuilder = queryableResourceCollectionDocumentBuilder;
            _resourceCollectionDocumentBuilder = resourceCollectionDocumentBuilder;
            _baseUrlService = baseUrlService;

            _openBuildDocumentFromQueryableMethod =
                new Lazy<MethodInfo>(
                    () => _queryableResourceCollectionDocumentBuilder.GetType()
                        .GetMethod("BuildDocument", BindingFlags.Instance | BindingFlags.Public));

            _openBuildDocumentFromEnumerableMethod =
                new Lazy<MethodInfo>(
                    () => _resourceCollectionDocumentBuilder.GetType()
                        .GetMethod("BuildDocument", BindingFlags.Instance | BindingFlags.Public));
        }
Beispiel #4
0
        /// <summary>
        /// Creates a new FallbackDocumentBuilder
        /// </summary>
        public FallbackDocumentBuilder(ISingleResourceDocumentBuilder singleResourceDocumentBuilder,
                                       IQueryableResourceCollectionDocumentBuilder queryableResourceCollectionDocumentBuilder,
                                       IResourceCollectionDocumentBuilder resourceCollectionDocumentBuilder,
                                       ISortExpressionExtractor sortExpressionExtractor,
                                       IBaseUrlService baseUrlService)
        {
            _singleResourceDocumentBuilder = singleResourceDocumentBuilder;
            _queryableResourceCollectionDocumentBuilder = queryableResourceCollectionDocumentBuilder;
            _resourceCollectionDocumentBuilder          = resourceCollectionDocumentBuilder;
            _sortExpressionExtractor = sortExpressionExtractor;
            _baseUrlService          = baseUrlService;

            _openBuildDocumentFromQueryableMethod =
                new Lazy <MethodInfo>(
                    () => _queryableResourceCollectionDocumentBuilder.GetType()
                    .GetMethod("BuildDocument", BindingFlags.Instance | BindingFlags.Public));

            _openBuildDocumentFromEnumerableMethod =
                new Lazy <MethodInfo>(
                    () => _resourceCollectionDocumentBuilder.GetType()
                    .GetMethod("BuildDocument", BindingFlags.Instance | BindingFlags.Public));
        }