Beispiel #1
0
        public RestContainerBuilder(IRestContainer parent)
            : this()
        {
            parent.AssertNotNull(nameof(parent));

            _registrations.Add(parent);
        }
Beispiel #2
0
        public static IRestContainer Union(this IRestContainer container, IRestContainer with)
        {
            container.AssertNotNull(nameof(container));
            with.AssertNotNull(nameof(with));

            return(new CompositeProvider(new[] { with, container }));
        }
Beispiel #3
0
        public RestClient(IRestContainer container)
        {
            container.AssertNotNull(nameof(container));

            _container          = container;
            _clientFactory      = _container.Required <IHttpClientFactory>();
            _executionStrategy  = _container.Required <IHttpExecutionStrategy>();
            _httpResponseMapper = _container.Required <IHttpResponseMapper>();
            _requestMapper      = _container.Required <IHttpRequestMapper>();
        }
        public EndpointProxy(IRestEndpoint endpoint, EndpointMetadata metadata, IRestContainer components)
        {
            endpoint.AssertNotNull(nameof(endpoint));
            metadata.AssertNotNull(nameof(metadata));
            components.AssertNotNull(nameof(components));

            _endpoint         = endpoint;
            _metadata         = metadata;
            _modelMapper      = components.Required <RestModelMapper>();
            _resultValidators = components.Resolve <IInvocatioтFilter>().ToList();
        }