Formatting
This commit is contained in:
parent
13ad8a6d2e
commit
a2d6a633aa
2 changed files with 9 additions and 15 deletions
|
@ -141,7 +141,7 @@ class Container {
|
|||
/// Shorthand for registering a factory that injects a singleton when it runs.
|
||||
///
|
||||
/// In many cases, you might prefer this to [registerFactory].
|
||||
///
|
||||
///
|
||||
/// Returns [f].
|
||||
T Function(Container) registerLazySingleton<T>(T Function(Container) f,
|
||||
{Type as}) {
|
||||
|
@ -157,7 +157,7 @@ class Container {
|
|||
|
||||
/// Registers a factory. Any attempt to resolve the
|
||||
/// type within *this* container will return the result of [f].
|
||||
///
|
||||
///
|
||||
/// Returns [f].
|
||||
T Function(Container) registerFactory<T>(T Function(Container) f, {Type as}) {
|
||||
as ??= T;
|
||||
|
@ -172,7 +172,7 @@ class Container {
|
|||
|
||||
/// Registers a singleton. Any attempt to resolve the
|
||||
/// type within *this* container will return [object].
|
||||
///
|
||||
///
|
||||
/// Returns [object].
|
||||
T registerSingleton<T>(T object, {Type as}) {
|
||||
as ??= T == dynamic ? as : T;
|
||||
|
|
|
@ -79,9 +79,7 @@ class _ReflectedTypeMirror extends ReflectedType {
|
|||
_ReflectedTypeMirror(this.mirror)
|
||||
: super(
|
||||
dart.MirrorSystem.getName(mirror.simpleName),
|
||||
mirror.typeVariables
|
||||
.map((m) => _ReflectedTypeParameter(m))
|
||||
.toList(),
|
||||
mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(),
|
||||
mirror.reflectedType,
|
||||
);
|
||||
|
||||
|
@ -111,9 +109,7 @@ class _ReflectedClassMirror extends ReflectedClass {
|
|||
_ReflectedClassMirror(this.mirror)
|
||||
: super(
|
||||
dart.MirrorSystem.getName(mirror.simpleName),
|
||||
mirror.typeVariables
|
||||
.map((m) => _ReflectedTypeParameter(m))
|
||||
.toList(),
|
||||
mirror.typeVariables.map((m) => _ReflectedTypeParameter(m)).toList(),
|
||||
[],
|
||||
[],
|
||||
_declarationsOf(mirror),
|
||||
|
@ -141,8 +137,8 @@ class _ReflectedClassMirror extends ReflectedClass {
|
|||
var value = mirror.declarations[key];
|
||||
|
||||
if (value is dart.MethodMirror && !value.isConstructor) {
|
||||
out.add(_ReflectedDeclarationMirror(
|
||||
dart.MirrorSystem.getName(key), value));
|
||||
out.add(
|
||||
_ReflectedDeclarationMirror(dart.MirrorSystem.getName(key), value));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -245,9 +241,7 @@ class _ReflectedMethodMirror extends ReflectedFunction {
|
|||
'This object was reflected without a ClosureMirror, and therefore cannot be directly invoked.');
|
||||
}
|
||||
|
||||
return _ReflectedInstanceMirror(closureMirror.invoke(
|
||||
invocation.memberName,
|
||||
invocation.positionalArguments,
|
||||
invocation.namedArguments));
|
||||
return _ReflectedInstanceMirror(closureMirror.invoke(invocation.memberName,
|
||||
invocation.positionalArguments, invocation.namedArguments));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue