This commit is contained in:
thosakwe 2017-02-25 15:57:28 -05:00
parent fbd26eb448
commit 7586b4c58e
4 changed files with 5 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# angel_framework
[![pub 1.0.0-dev.58](https://img.shields.io/badge/pub-1.0.0--dev.58-red.svg)](https://pub.dartlang.org/packages/angel_framework)
[![pub 1.0.0-dev.59](https://img.shields.io/badge/pub-1.0.0--dev.59-red.svg)](https://pub.dartlang.org/packages/angel_framework)
[![build status](https://travis-ci.org/angel-dart/framework.svg)](https://travis-ci.org/angel-dart/framework)
Core libraries for the Angel Framework.

View file

@ -103,7 +103,7 @@ class RequestContext extends Extensible {
/// Grabs an object by key or type from [params], [injections], or
/// [app].container. Use this to perform dependency injection
/// within a service hook.
grab(key) {
T grab<T>(key) {
if (params.containsKey(key))
return params[key];
else if (injections.containsKey(key))

View file

@ -27,9 +27,6 @@ typedef Future AngelErrorHandler(
/// A function that configures an [Angel] server in some way.
typedef Future AngelConfigurer(Angel app);
/// A function that takes no parameters.
typedef ParameterlessFunction();
/// A powerful real-time/REST/MVC server class.
class Angel extends AngelBase {
StreamController<HttpRequest> _afterProcessed =
@ -491,10 +488,11 @@ class Angel extends AngelBase {
/// Predetermines what needs to be injected for a handler to run.
InjectionRequest preInject(Function handler) {
var injection = new InjectionRequest();
if (handler is ParameterlessFunction) return injection;
ClosureMirror closureMirror = reflect(handler);
if (closureMirror.function.parameters.isEmpty) return injection;
// Load parameters
for (var parameter in closureMirror.function.parameters) {
var name = MirrorSystem.getName(parameter.simpleName);

View file

@ -1,5 +1,5 @@
name: angel_framework
version: 1.0.0-dev.58
version: 1.0.0-dev.59
description: Core libraries for the Angel framework.
author: Tobe O <thosakwe@gmail.com>
homepage: https://github.com/angel-dart/angel_framework