예제 #1
0
        public JsonApiDeserializerBenchmarks()
        {
            IResourceGraph resourceGraph  = DependencyFactory.CreateResourceGraph();
            var            targetedFields = new TargetedFields();

            _jsonApiDeserializer = new RequestDeserializer(resourceGraph, targetedFields);
        }
예제 #2
0
        public JsonApiDeserializerBenchmarks()
        {
            var            options        = new JsonApiOptions();
            IResourceGraph resourceGraph  = DependencyFactory.CreateResourceGraph(options);
            var            targetedFields = new TargetedFields();

            _jsonApiDeserializer = new RequestDeserializer(resourceGraph, new DefaultResourceFactory(new ServiceContainer()), targetedFields, new HttpContextAccessor());
        }
예제 #3
0
        private IResourceReadRepository <TModel, int> CreateTestRepository <TModel>(AppDbContext dbContext, IResourceGraph resourceGraph)
            where TModel : class, IIdentifiable <int>
        {
            var resourceFactory         = new TestResourceFactory();
            IDbContextResolver resolver = CreateTestDbResolver(dbContext);
            var targetedFields          = new TargetedFields();

            return(new EntityFrameworkCoreRepository <TModel, int>(targetedFields, resolver, resourceGraph, resourceFactory,
                                                                   Enumerable.Empty <IQueryConstraintProvider>(), NullLoggerFactory.Instance));
        }
        public JsonApiDeserializerBenchmarks()
        {
            var            options             = new JsonApiOptions();
            IResourceGraph resourceGraph       = _dependencyFactory.CreateResourceGraph(options);
            var            targetedFields      = new TargetedFields();
            var            request             = new JsonApiRequest();
            var            resourceFactory     = new ResourceFactory(new ServiceContainer());
            var            httpContextAccessor = new HttpContextAccessor();

            _jsonApiDeserializer = new RequestDeserializer(resourceGraph, resourceFactory, targetedFields, httpContextAccessor, request, options);
        }