Exemplo n.º 1
0
 public Endpoint EndpointFor(object model)
 {
     return(new Endpoint()
     {
         IsAuthorized = _authorization.IsAuthorized(model),
         Url = _urls.UrlFor(model)
     });
 }
Exemplo n.º 2
0
        public void Invoke <T>() where T : class
        {
            var input = _request.Get <T>();

            if (_authorization.IsAuthorized(input))
            {
                _factory.BuildPartial(typeof(T)).InvokePartial();
            }
        }
Exemplo n.º 3
0
        public string Invoke <T>(string categoryOrHttpMethod = null) where T : class
        {
            var output = string.Empty;
            var input  = _request.Get <T>();

            if (_authorization.IsAuthorized(input, categoryOrHttpMethod))
            {
                output = invokeWrapped(typeof(T), categoryOrHttpMethod);
            }
            return(output);
        }
Exemplo n.º 4
0
        public string Invoke <T>() where T : class
        {
            var output = string.Empty;
            var input  = _request.Get <T>();

            if (_authorization.IsAuthorized(input))
            {
                output = invokeWrapped(typeof(T));
            }
            return(output);
        }
Exemplo n.º 5
0
        public async Task <string> Invoke <T>(string categoryOrHttpMethod = null) where T : class
        {
            var output = string.Empty;
            var input  = _request.Get <T>();

            if (_authorization.IsAuthorized(input, categoryOrHttpMethod))
            {
                output = await invokeWrapped(typeof(T), categoryOrHttpMethod).ConfigureAwait(false);
            }
            return(output);
        }