Default to const EmptyReflector()
This commit is contained in:
parent
6822657f26
commit
edcbf9f639
8 changed files with 255 additions and 188 deletions
|
@ -12,7 +12,7 @@
|
||||||
<entry key="angel_container">
|
<entry key="angel_container">
|
||||||
<value>
|
<value>
|
||||||
<list>
|
<list>
|
||||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.5/lib" />
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.7/lib" />
|
||||||
</list>
|
</list>
|
||||||
</value>
|
</value>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -454,7 +454,7 @@
|
||||||
</properties>
|
</properties>
|
||||||
<CLASSES>
|
<CLASSES>
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/analyzer-0.32.4/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.5/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.7/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+3/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_http_exception-1.0.0+3/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_model-1.0.0+1/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_model-1.0.0+1/lib" />
|
||||||
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib" />
|
<root url="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib" />
|
||||||
|
|
|
@ -4,15 +4,12 @@
|
||||||
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
|
<list default="true" id="7b89ff1e-1260-4dcf-9c3d-345de0471ea1" name="Default" comment="">
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/libraries/Dart_Packages.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/example/main.dart" beforeDir="false" afterPath="$PROJECT_DIR$/example/main.dart" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/core/hooked_service.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/hooked_service.dart" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/core/injection.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/injection.dart" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/lib/src/core/injection.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/injection.dart" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/core/routable.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/routable.dart" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/lib/src/core/request_context.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/request_context.dart" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/lib/src/core/response_context.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/response_context.dart" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/core/server.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/server.dart" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/lib/src/core/server.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/server.dart" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/core/service.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/service.dart" afterDir="false" />
|
<change beforePath="$PROJECT_DIR$/lib/src/http/controller.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/http/controller.dart" afterDir="false" />
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/http/angel_http.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/http/angel_http.dart" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/lib/src/util.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/util.dart" afterDir="false" />
|
|
||||||
<change beforePath="$PROJECT_DIR$/test/hooked_test.dart" beforeDir="false" afterPath="$PROJECT_DIR$/test/hooked_test.dart" afterDir="false" />
|
|
||||||
</list>
|
</list>
|
||||||
<ignored path="$PROJECT_DIR$/.tmp/" />
|
<ignored path="$PROJECT_DIR$/.tmp/" />
|
||||||
<ignored path="$PROJECT_DIR$/temp/" />
|
<ignored path="$PROJECT_DIR$/temp/" />
|
||||||
|
@ -62,17 +59,59 @@
|
||||||
<file leaf-file-name="util.dart" pinned="false" current-in-tab="false">
|
<file leaf-file-name="util.dart" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/util.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/util.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="256">
|
<state relative-caret-position="96">
|
||||||
<caret line="16" column="10" selection-start-line="16" selection-start-column="10" selection-end-line="16" selection-end-column="10" />
|
<caret line="6" column="27" selection-start-line="6" selection-start-column="27" selection-end-line="6" selection-end-column="27" />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="injection.dart" pinned="false" current-in-tab="true">
|
<file leaf-file-name="CHANGELOG.md" pinned="false" current-in-tab="true">
|
||||||
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="556">
|
||||||
|
<caret line="66" column="26" selection-start-line="66" selection-start-column="26" selection-end-line="66" selection-end-column="26" />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="pubspec.yaml" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="112">
|
||||||
|
<caret line="7" column="20" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="injection.dart" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/injection.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/core/injection.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="128">
|
<state relative-caret-position="25">
|
||||||
<caret line="8" column="65" selection-start-line="8" selection-start-column="65" selection-end-line="8" selection-end-column="65" />
|
<caret line="85" column="36" selection-start-line="85" selection-start-column="36" selection-end-line="85" selection-end-column="36" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="request_context.dart" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="64">
|
||||||
|
<caret line="4" column="2" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="2" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
|
<file leaf-file-name="accepts_test.dart" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/accepts_test.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="261">
|
||||||
|
<caret line="34" column="5" selection-start-line="34" selection-start-column="5" selection-end-line="34" selection-end-column="5" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#20#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
@ -80,8 +119,8 @@
|
||||||
<file leaf-file-name="server.dart" pinned="false" current-in-tab="false">
|
<file leaf-file-name="server.dart" pinned="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/server.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/core/server.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="129">
|
<state relative-caret-position="347">
|
||||||
<caret line="162" column="17" selection-start-line="162" selection-start-column="17" selection-end-line="162" selection-end-column="17" />
|
<caret line="355" column="11" lean-forward="true" selection-start-line="355" selection-start-column="11" selection-end-line="355" selection-end-column="11" />
|
||||||
<folding>
|
<folding>
|
||||||
<element signature="e#38#58#0" expanded="true" />
|
<element signature="e#38#58#0" expanded="true" />
|
||||||
</folding>
|
</folding>
|
||||||
|
@ -89,6 +128,18 @@
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
|
<file leaf-file-name="response_context.dart" pinned="false" current-in-tab="false">
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="66">
|
||||||
|
<caret line="244" column="53" selection-start-line="244" selection-start-column="53" selection-end-line="244" selection-end-column="53" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#48#68#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
</file>
|
||||||
</leaf>
|
</leaf>
|
||||||
</component>
|
</component>
|
||||||
<component name="FileTemplateManagerImpl">
|
<component name="FileTemplateManagerImpl">
|
||||||
|
@ -128,9 +179,9 @@
|
||||||
<find>stopw</find>
|
<find>stopw</find>
|
||||||
<find>release</find>
|
<find>release</find>
|
||||||
<find>handleRe</find>
|
<find>handleRe</find>
|
||||||
<find>mirrors</find>
|
|
||||||
<find>get container</find>
|
<find>get container</find>
|
||||||
<find>Parameter</find>
|
<find>Parameter</find>
|
||||||
|
<find>mirrors</find>
|
||||||
</findStrings>
|
</findStrings>
|
||||||
<replaceStrings>
|
<replaceStrings>
|
||||||
<replace>FutureOr</replace>
|
<replace>FutureOr</replace>
|
||||||
|
@ -217,26 +268,26 @@
|
||||||
<option value="$PROJECT_DIR$/performance/hello/main.dart" />
|
<option value="$PROJECT_DIR$/performance/hello/main.dart" />
|
||||||
<option value="$PROJECT_DIR$/test/precontained_test.dart" />
|
<option value="$PROJECT_DIR$/test/precontained_test.dart" />
|
||||||
<option value="$PROJECT_DIR$/test/primitives_test.dart" />
|
<option value="$PROJECT_DIR$/test/primitives_test.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/request_context.dart" />
|
|
||||||
<option value="$PROJECT_DIR$/lib/src/http/http_request_context.dart" />
|
<option value="$PROJECT_DIR$/lib/src/http/http_request_context.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
|
|
||||||
<option value="$PROJECT_DIR$/example/handle_error.dart" />
|
<option value="$PROJECT_DIR$/example/handle_error.dart" />
|
||||||
<option value="$PROJECT_DIR$/test/server_test.dart" />
|
<option value="$PROJECT_DIR$/test/server_test.dart" />
|
||||||
<option value="$PROJECT_DIR$/example/json.dart" />
|
<option value="$PROJECT_DIR$/example/json.dart" />
|
||||||
<option value="$PROJECT_DIR$/test/routing_test.dart" />
|
<option value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/http/http_response_context.dart" />
|
<option value="$PROJECT_DIR$/lib/src/http/http_response_context.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/response_context.dart" />
|
|
||||||
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
|
||||||
<option value="$PROJECT_DIR$/lib/src/http/angel_http.dart" />
|
<option value="$PROJECT_DIR$/lib/src/http/angel_http.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/hooked_service.dart" />
|
<option value="$PROJECT_DIR$/lib/src/core/hooked_service.dart" />
|
||||||
<option value="$PROJECT_DIR$/test/hooked_test.dart" />
|
<option value="$PROJECT_DIR$/test/hooked_test.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/service.dart" />
|
<option value="$PROJECT_DIR$/lib/src/core/service.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/server.dart" />
|
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/routable.dart" />
|
<option value="$PROJECT_DIR$/lib/src/core/routable.dart" />
|
||||||
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.3/lib/src/mirrors/reflector.dart" />
|
<option value="$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.3/lib/src/mirrors/reflector.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/util.dart" />
|
<option value="$PROJECT_DIR$/lib/src/util.dart" />
|
||||||
<option value="$PROJECT_DIR$/example/main.dart" />
|
<option value="$PROJECT_DIR$/example/main.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/lib/src/core/request_context.dart" />
|
||||||
<option value="$PROJECT_DIR$/lib/src/core/injection.dart" />
|
<option value="$PROJECT_DIR$/lib/src/core/injection.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/lib/src/core/response_context.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/lib/src/http/controller.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/lib/src/core/server.dart" />
|
||||||
|
<option value="$PROJECT_DIR$/CHANGELOG.md" />
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
|
@ -256,8 +307,8 @@
|
||||||
<packageJsonPaths />
|
<packageJsonPaths />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectFrameBounds">
|
<component name="ProjectFrameBounds">
|
||||||
<option name="x" value="64" />
|
<option name="x" value="80" />
|
||||||
<option name="y" value="41" />
|
<option name="y" value="23" />
|
||||||
<option name="width" value="1342" />
|
<option name="width" value="1342" />
|
||||||
<option name="height" value="784" />
|
<option name="height" value="784" />
|
||||||
</component>
|
</component>
|
||||||
|
@ -314,6 +365,11 @@
|
||||||
<item name="framework" type="cbb8eebc:String" user="framework" />
|
<item name="framework" type="cbb8eebc:String" user="framework" />
|
||||||
<item name="performance/hello" type="cbb8eebc:String" user="performance/hello" />
|
<item name="performance/hello" type="cbb8eebc:String" user="performance/hello" />
|
||||||
</path>
|
</path>
|
||||||
|
<path>
|
||||||
|
<item name="Root" type="cbb8eebc:String" user="Root" />
|
||||||
|
<item name="framework" type="cbb8eebc:String" user="framework" />
|
||||||
|
<item name="test" type="cbb8eebc:String" user="test" />
|
||||||
|
</path>
|
||||||
</expand>
|
</expand>
|
||||||
<select />
|
<select />
|
||||||
</subPane>
|
</subPane>
|
||||||
|
@ -362,7 +418,7 @@
|
||||||
</list>
|
</list>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="RunManager" selected="Dart Test.Controller Tests">
|
<component name="RunManager" selected="Dart Command Line App.main.dart">
|
||||||
<configuration name="Can serialize function result as JSON in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
|
<configuration name="Can serialize function result as JSON in routing_test.dart" type="DartTestRunConfigurationType" factoryName="Dart Test" nameIsGenerated="true">
|
||||||
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
<option name="filePath" value="$PROJECT_DIR$/test/routing_test.dart" />
|
||||||
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
<option name="scope" value="GROUP_OR_TEST_BY_NAME" />
|
||||||
|
@ -662,14 +718,7 @@
|
||||||
<workItem from="1534009494986" duration="594000" />
|
<workItem from="1534009494986" duration="594000" />
|
||||||
<workItem from="1534546784803" duration="353000" />
|
<workItem from="1534546784803" duration="353000" />
|
||||||
<workItem from="1534547885788" duration="9908000" />
|
<workItem from="1534547885788" duration="9908000" />
|
||||||
<workItem from="1534793956753" duration="12414000" />
|
<workItem from="1534793956753" duration="14213000" />
|
||||||
</task>
|
|
||||||
<task id="LOCAL-00109" summary="Removed random_string dependency">
|
|
||||||
<created>1534547132671</created>
|
|
||||||
<option name="number" value="00109" />
|
|
||||||
<option name="presentableId" value="LOCAL-00109" />
|
|
||||||
<option name="project" value="LOCAL" />
|
|
||||||
<updated>1534547132671</updated>
|
|
||||||
</task>
|
</task>
|
||||||
<task id="LOCAL-00110" summary="Switch to MediaType">
|
<task id="LOCAL-00110" summary="Switch to MediaType">
|
||||||
<created>1534692805087</created>
|
<created>1534692805087</created>
|
||||||
|
@ -1007,19 +1056,17 @@
|
||||||
<option name="project" value="LOCAL" />
|
<option name="project" value="LOCAL" />
|
||||||
<updated>1534816646962</updated>
|
<updated>1534816646962</updated>
|
||||||
</task>
|
</task>
|
||||||
<option name="localTasksCounter" value="158" />
|
<task id="LOCAL-00158" summary="ioc uses executeHandler">
|
||||||
|
<created>1534819472503</created>
|
||||||
|
<option name="number" value="00158" />
|
||||||
|
<option name="presentableId" value="LOCAL-00158" />
|
||||||
|
<option name="project" value="LOCAL" />
|
||||||
|
<updated>1534819472503</updated>
|
||||||
|
</task>
|
||||||
|
<option name="localTasksCounter" value="159" />
|
||||||
<servers />
|
<servers />
|
||||||
</component>
|
</component>
|
||||||
<component name="TestHistory">
|
<component name="TestHistory">
|
||||||
<history-entry file="All_Tests - 2018.07.09 at 12h 48m 12s.xml">
|
|
||||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
|
||||||
</history-entry>
|
|
||||||
<history-entry file="tests_in_find_one_test_dart - 2018.07.12 at 11h 13m 12s.xml">
|
|
||||||
<configuration name="tests in find_one_test.dart" configurationId="DartTestRunConfigurationType" />
|
|
||||||
</history-entry>
|
|
||||||
<history-entry file="tests_in_find_one_test_dart - 2018.07.12 at 11h 14m 14s.xml">
|
|
||||||
<configuration name="tests in find_one_test.dart" configurationId="DartTestRunConfigurationType" />
|
|
||||||
</history-entry>
|
|
||||||
<history-entry file="tests_in_find_one_test_dart - 2018.07.12 at 11h 16m 10s.xml">
|
<history-entry file="tests_in_find_one_test_dart - 2018.07.12 at 11h 16m 10s.xml">
|
||||||
<configuration name="tests in find_one_test.dart" configurationId="DartTestRunConfigurationType" />
|
<configuration name="tests in find_one_test.dart" configurationId="DartTestRunConfigurationType" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
|
@ -1041,9 +1088,18 @@
|
||||||
<history-entry file="All_Tests - 2018.08.20 at 22h 14m 22s.xml">
|
<history-entry file="All_Tests - 2018.08.20 at 22h 14m 22s.xml">
|
||||||
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
<configuration name="All Tests" configurationId="DartTestRunConfigurationType" />
|
||||||
</history-entry>
|
</history-entry>
|
||||||
|
<history-entry file="tests_in_accepts_test_dart - 2018.08.20 at 22h 44m 02s.xml">
|
||||||
|
<configuration name="tests in accepts_test.dart" configurationId="DartTestRunConfigurationType" />
|
||||||
|
</history-entry>
|
||||||
|
<history-entry file="tests_in_anonymous_service_test_dart - 2018.08.20 at 22h 44m 10s.xml">
|
||||||
|
<configuration name="tests in anonymous_service_test.dart" configurationId="DartTestRunConfigurationType" />
|
||||||
|
</history-entry>
|
||||||
|
<history-entry file="Controller_Tests - 2018.08.20 at 22h 44m 19s.xml">
|
||||||
|
<configuration name="Controller Tests" configurationId="DartTestRunConfigurationType" />
|
||||||
|
</history-entry>
|
||||||
</component>
|
</component>
|
||||||
<component name="TimeTrackingManager">
|
<component name="TimeTrackingManager">
|
||||||
<option name="totallyTimeSpent" value="184621000" />
|
<option name="totallyTimeSpent" value="186420000" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TodoView">
|
<component name="TodoView">
|
||||||
<todo-panel id="selected-file">
|
<todo-panel id="selected-file">
|
||||||
|
@ -1055,7 +1111,7 @@
|
||||||
</todo-panel>
|
</todo-panel>
|
||||||
</component>
|
</component>
|
||||||
<component name="ToolWindowManager">
|
<component name="ToolWindowManager">
|
||||||
<frame x="64" y="41" width="1342" height="784" extended-state="0" />
|
<frame x="80" y="23" width="1342" height="784" extended-state="0" />
|
||||||
<editor active="true" />
|
<editor active="true" />
|
||||||
<layout>
|
<layout>
|
||||||
<window_info anchor="right" id="Palette" order="3" />
|
<window_info anchor="right" id="Palette" order="3" />
|
||||||
|
@ -1079,9 +1135,9 @@
|
||||||
<window_info id="Image Layers" order="2" />
|
<window_info id="Image Layers" order="2" />
|
||||||
<window_info anchor="right" id="Capture Analysis" order="3" />
|
<window_info anchor="right" id="Capture Analysis" order="3" />
|
||||||
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32905984" />
|
<window_info anchor="bottom" id="Version Control" order="7" weight="0.32905984" />
|
||||||
<window_info active="true" anchor="bottom" id="Run" order="2" sideWeight="0.4964476" visible="true" weight="0.3973799" />
|
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.4964476" weight="0.3973799" />
|
||||||
<window_info anchor="bottom" id="Terminal" order="7" weight="0.44978166" />
|
<window_info anchor="bottom" id="Terminal" order="7" weight="0.44978166" />
|
||||||
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.27846155" />
|
<window_info content_ui="combo" id="Project" order="0" weight="0.27846155" />
|
||||||
<window_info anchor="bottom" id="Find" order="1" weight="0.32905984" />
|
<window_info anchor="bottom" id="Find" order="1" weight="0.32905984" />
|
||||||
<window_info anchor="right" id="SciView" order="4" />
|
<window_info anchor="right" id="SciView" order="4" />
|
||||||
<window_info anchor="right" id="Theme Preview" order="3" />
|
<window_info anchor="right" id="Theme Preview" order="3" />
|
||||||
|
@ -1106,7 +1162,6 @@
|
||||||
</component>
|
</component>
|
||||||
<component name="VcsManagerConfiguration">
|
<component name="VcsManagerConfiguration">
|
||||||
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
|
||||||
<MESSAGE value="Completely remove RequestContext.io" />
|
|
||||||
<MESSAGE value="Completely remove ResponseContext.io" />
|
<MESSAGE value="Completely remove ResponseContext.io" />
|
||||||
<MESSAGE value="Rename HTTP request+response impl, drop the "impl"" />
|
<MESSAGE value="Rename HTTP request+response impl, drop the "impl"" />
|
||||||
<MESSAGE value="Make lazy parsing the default" />
|
<MESSAGE value="Make lazy parsing the default" />
|
||||||
|
@ -1131,7 +1186,8 @@
|
||||||
<MESSAGE value="Make LockableBytesBuilder public" />
|
<MESSAGE value="Make LockableBytesBuilder public" />
|
||||||
<MESSAGE value="Remove ResponseContext.dispose" />
|
<MESSAGE value="Remove ResponseContext.dispose" />
|
||||||
<MESSAGE value="Remove releaseCOrrespondingRequest" />
|
<MESSAGE value="Remove releaseCOrrespondingRequest" />
|
||||||
<option name="LAST_COMMIT_MESSAGE" value="Remove releaseCOrrespondingRequest" />
|
<MESSAGE value="ioc uses executeHandler" />
|
||||||
|
<option name="LAST_COMMIT_MESSAGE" value="ioc uses executeHandler" />
|
||||||
</component>
|
</component>
|
||||||
<component name="XDebuggerManager">
|
<component name="XDebuggerManager">
|
||||||
<breakpoint-manager>
|
<breakpoint-manager>
|
||||||
|
@ -1139,30 +1195,6 @@
|
||||||
</breakpoint-manager>
|
</breakpoint-manager>
|
||||||
</component>
|
</component>
|
||||||
<component name="editorHistoryManager">
|
<component name="editorHistoryManager">
|
||||||
<entry file="file:///usr/local/Cellar/dart/2.0.0/libexec/lib/core/list.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="149">
|
|
||||||
<caret line="53" column="15" selection-start-line="53" selection-start-column="15" selection-end-line="53" selection-end-column="15" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/test/general_test.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="160">
|
|
||||||
<caret line="15" column="69" selection-start-line="15" selection-start-column="69" selection-end-line="15" selection-end-column="69" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/metadata.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="149">
|
|
||||||
<caret line="27" column="32" selection-start-line="27" selection-start-column="32" selection-end-line="27" selection-end-column="32" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#40#104#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/test/serialize_test.dart">
|
<entry file="file://$PROJECT_DIR$/test/serialize_test.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="176">
|
<state relative-caret-position="176">
|
||||||
|
@ -1307,16 +1339,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="257">
|
|
||||||
<caret line="20" column="15" selection-start-line="20" selection-start-column="15" selection-end-line="20" selection-end-column="15" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#47#67#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/http/http_request_context.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/http/http_request_context.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="80">
|
<state relative-caret-position="80">
|
||||||
|
@ -1324,16 +1346,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
|
||||||
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
|
||||||
<state split_layout="SPLIT">
|
|
||||||
<first_editor relative-caret-position="468">
|
|
||||||
<caret line="33" column="69" selection-start-line="33" selection-start-column="69" selection-end-line="33" selection-end-column="69" />
|
|
||||||
</first_editor>
|
|
||||||
<second_editor />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/http/http_response_context.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/http/http_response_context.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="99">
|
<state relative-caret-position="99">
|
||||||
|
@ -1358,16 +1370,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="51">
|
|
||||||
<caret line="278" column="3" selection-start-line="278" selection-start-column="3" selection-end-line="278" selection-end-column="3" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#48#68#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/performance/hello/main.dart">
|
<entry file="file://$PROJECT_DIR$/performance/hello/main.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="258">
|
<state relative-caret-position="258">
|
||||||
|
@ -1429,13 +1431,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/http/controller.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="304">
|
|
||||||
<caret line="45" column="27" selection-start-line="45" selection-start-column="27" selection-end-line="45" selection-end-column="27" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/test/di_test.dart">
|
<entry file="file://$PROJECT_DIR$/test/di_test.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="176">
|
<state relative-caret-position="176">
|
||||||
|
@ -1443,16 +1438,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/server.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="129">
|
|
||||||
<caret line="162" column="17" selection-start-line="162" selection-start-column="17" selection-end-line="162" selection-end-column="17" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#38#58#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.2/lib/src/mirrors/reflector.dart">
|
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.2/lib/src/mirrors/reflector.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="220">
|
<state relative-caret-position="220">
|
||||||
|
@ -1488,13 +1473,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="112">
|
|
||||||
<caret line="7" column="20" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib/src/router.dart">
|
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_route-3.0.0/lib/src/router.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="97">
|
<state relative-caret-position="97">
|
||||||
|
@ -1502,23 +1480,6 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/routable.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="86">
|
|
||||||
<caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
|
|
||||||
<folding>
|
|
||||||
<element signature="e#40#60#0" expanded="true" />
|
|
||||||
</folding>
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/util.dart">
|
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
|
||||||
<state relative-caret-position="256">
|
|
||||||
<caret line="16" column="10" selection-start-line="16" selection-start-column="10" selection-end-line="16" selection-end-column="10" />
|
|
||||||
</state>
|
|
||||||
</provider>
|
|
||||||
</entry>
|
|
||||||
<entry file="file://$PROJECT_DIR$/example/main.dart">
|
<entry file="file://$PROJECT_DIR$/example/main.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="150">
|
<state relative-caret-position="150">
|
||||||
|
@ -1529,10 +1490,105 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="64">
|
||||||
|
<caret line="4" column="2" selection-start-line="4" selection-start-column="2" selection-end-line="4" selection-end-column="2" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$USER_HOME$/.pub-cache/hosted/pub.dartlang.org/angel_container-1.0.0-alpha.5/lib/src/reflector.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="430">
|
||||||
|
<caret line="53" column="7" selection-start-line="53" selection-start-column="7" selection-end-line="53" selection-end-column="7" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/src/core/injection.dart">
|
<entry file="file://$PROJECT_DIR$/lib/src/core/injection.dart">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state relative-caret-position="128">
|
<state relative-caret-position="25">
|
||||||
<caret line="8" column="65" selection-start-line="8" selection-start-column="65" selection-end-line="8" selection-end-column="65" />
|
<caret line="85" column="36" selection-start-line="85" selection-start-column="36" selection-end-line="85" selection-end-column="36" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/response_context.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="66">
|
||||||
|
<caret line="244" column="53" selection-start-line="244" selection-start-column="53" selection-end-line="244" selection-end-column="53" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#48#68#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/http/controller.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="109">
|
||||||
|
<caret line="100" column="45" lean-forward="true" selection-start-line="100" selection-start-column="45" selection-end-line="100" selection-end-column="45" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#42#62#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/test/accepts_test.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="261">
|
||||||
|
<caret line="34" column="5" selection-start-line="34" selection-start-column="5" selection-end-line="34" selection-end-column="5" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#0#20#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pubspec.lock">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="208">
|
||||||
|
<caret line="13" column="12" selection-start-line="13" selection-start-column="12" selection-end-line="13" selection-end-column="12" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/pubspec.yaml">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="112">
|
||||||
|
<caret line="7" column="20" selection-start-line="7" selection-start-column="20" selection-end-line="7" selection-end-column="20" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/util.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="96">
|
||||||
|
<caret line="6" column="27" selection-start-line="6" selection-start-column="27" selection-end-line="6" selection-end-column="27" />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/routable.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="86">
|
||||||
|
<caret line="86" column="8" selection-start-line="86" selection-start-column="8" selection-end-line="86" selection-end-column="8" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#40#60#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/src/core/server.dart">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state relative-caret-position="347">
|
||||||
|
<caret line="355" column="11" lean-forward="true" selection-start-line="355" selection-start-column="11" selection-end-line="355" selection-end-column="11" />
|
||||||
|
<folding>
|
||||||
|
<element signature="e#38#58#0" expanded="true" />
|
||||||
|
</folding>
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/CHANGELOG.md">
|
||||||
|
<provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
|
||||||
|
<state split_layout="SPLIT">
|
||||||
|
<first_editor relative-caret-position="556">
|
||||||
|
<caret line="66" column="26" selection-start-line="66" selection-start-column="26" selection-end-line="66" selection-end-column="26" />
|
||||||
|
</first_editor>
|
||||||
|
<second_editor />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
@ -62,3 +62,6 @@ as in many cases it is unnecessary and slows down response time.
|
||||||
* Removed `ResponseContext.dispose`.
|
* Removed `ResponseContext.dispose`.
|
||||||
* Removed the now-obsolete `ResponseContext.end`.
|
* Removed the now-obsolete `ResponseContext.end`.
|
||||||
* Removed the now-obsolete `ResponseContext.releaseCorrespondingRequest`.
|
* Removed the now-obsolete `ResponseContext.releaseCorrespondingRequest`.
|
||||||
|
* `preInject` now takes a `Reflector` as its second argument.
|
||||||
|
* `Angel.reflector` defaults to `const EmptyReflector()`, disabling
|
||||||
|
reflection out-of-the-box.
|
|
@ -8,10 +8,16 @@ const List<Type> _primitiveTypes = [String, int, num, double, Null];
|
||||||
///
|
///
|
||||||
/// Calling [ioc] also auto-serializes the result of a [handler].
|
/// Calling [ioc] also auto-serializes the result of a [handler].
|
||||||
RequestHandler ioc(Function handler, {Iterable<String> optional: const []}) {
|
RequestHandler ioc(Function handler, {Iterable<String> optional: const []}) {
|
||||||
var injection = preInject(handler);
|
InjectionRequest injection;
|
||||||
injection.optional.addAll(optional ?? []);
|
RequestHandler contained;
|
||||||
var contained = handleContained(handler, injection);
|
|
||||||
return (req, res) {
|
return (req, res) {
|
||||||
|
if (injection == null) {
|
||||||
|
injection = preInject(handler, req.app.container.reflector);
|
||||||
|
injection.optional.addAll(optional ?? []);
|
||||||
|
contained = handleContained(handler, injection);
|
||||||
|
}
|
||||||
|
|
||||||
return req.app.executeHandler(contained, req, res);
|
return req.app.executeHandler(contained, req, res);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -127,22 +133,22 @@ class InjectionRequest {
|
||||||
parameters = {};
|
parameters = {};
|
||||||
}
|
}
|
||||||
|
|
||||||
final TypeMirror _Parameter = reflectType(Parameter);
|
|
||||||
|
|
||||||
/// Predetermines what needs to be injected for a handler to run.
|
/// Predetermines what needs to be injected for a handler to run.
|
||||||
InjectionRequest preInject(Function handler) {
|
InjectionRequest preInject(Function handler, Reflector reflector) {
|
||||||
var injection = new InjectionRequest();
|
var injection = new InjectionRequest();
|
||||||
|
|
||||||
ClosureMirror closureMirror = reflect(handler);
|
var closureMirror = reflector.reflectFunction(handler);
|
||||||
|
|
||||||
if (closureMirror.function.parameters.isEmpty) return injection;
|
if (closureMirror.parameters.isEmpty) return injection;
|
||||||
|
|
||||||
// Load parameters
|
// Load parameters
|
||||||
for (var parameter in closureMirror.function.parameters) {
|
for (var parameter in closureMirror.parameters) {
|
||||||
var name = MirrorSystem.getName(parameter.simpleName);
|
var name = parameter.name;
|
||||||
var type = parameter.type.reflectedType;
|
var type = parameter.type.reflectedType;
|
||||||
|
|
||||||
var p = parameter.metadata
|
var _Parameter = reflector.reflectType(Parameter);
|
||||||
|
|
||||||
|
var p = parameter.annotations
|
||||||
.firstWhere((m) => m.type.isAssignableTo(_Parameter),
|
.firstWhere((m) => m.type.isAssignableTo(_Parameter),
|
||||||
orElse: () => null)
|
orElse: () => null)
|
||||||
?.reflectee as Parameter;
|
?.reflectee as Parameter;
|
||||||
|
@ -160,7 +166,7 @@ InjectionRequest preInject(Function handler) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!parameter.isNamed) {
|
if (!parameter.isNamed) {
|
||||||
if (parameter.isOptional) injection.optional.add(name);
|
if (!parameter.isRequired) injection.optional.add(name);
|
||||||
|
|
||||||
if (type == RequestContext || type == ResponseContext) {
|
if (type == RequestContext || type == ResponseContext) {
|
||||||
injection.required.add(type);
|
injection.required.add(type);
|
||||||
|
|
|
@ -2,7 +2,7 @@ library angel_framework.http.request_context;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:io' show Cookie, HttpHeaders, HttpSession, InternetAddress;
|
import 'dart:io' show Cookie, HttpHeaders, HttpSession, InternetAddress;
|
||||||
import 'dart:mirrors';
|
//import 'dart:mirrors';
|
||||||
|
|
||||||
import 'package:angel_container/angel_container.dart';
|
import 'package:angel_container/angel_container.dart';
|
||||||
import 'package:body_parser/body_parser.dart';
|
import 'package:body_parser/body_parser.dart';
|
||||||
|
|
|
@ -242,7 +242,7 @@ abstract class ResponseContext<RawResponse>
|
||||||
"Controller '${split[0]}' does not contain any action named '${split[1]}'");
|
"Controller '${split[0]}' does not contain any action named '${split[1]}'");
|
||||||
|
|
||||||
final head =
|
final head =
|
||||||
controller.findExpose().path.toString().replaceAll(_straySlashes, '');
|
controller.findExpose(app.container.reflector).path.toString().replaceAll(_straySlashes, '');
|
||||||
final tail = matched
|
final tail = matched
|
||||||
.makeUri(params.keys.fold<Map<String, dynamic>>({}, (out, k) {
|
.makeUri(params.keys.fold<Map<String, dynamic>>({}, (out, k) {
|
||||||
return out..[k.toString()] = params[k];
|
return out..[k.toString()] = params[k];
|
||||||
|
|
|
@ -10,7 +10,6 @@ import 'package:angel_http_exception/angel_http_exception.dart';
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel_route/angel_route.dart';
|
||||||
import 'package:combinator/combinator.dart';
|
import 'package:combinator/combinator.dart';
|
||||||
import 'package:logging/logging.dart';
|
import 'package:logging/logging.dart';
|
||||||
import 'package:meta/meta.dart';
|
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
import '../http/http.dart';
|
import '../http/http.dart';
|
||||||
|
@ -299,7 +298,7 @@ class Angel extends Routable {
|
||||||
_isProduction = true;
|
_isProduction = true;
|
||||||
_add(v) {
|
_add(v) {
|
||||||
if (v is Function && !_preContained.containsKey(v)) {
|
if (v is Function && !_preContained.containsKey(v)) {
|
||||||
_preContained[v] = preInject(v);
|
_preContained[v] = preInject(v, container.reflector);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -336,8 +335,10 @@ class Angel extends Routable {
|
||||||
/// Runs with DI, and *always* reflects. Prefer [runContained].
|
/// Runs with DI, and *always* reflects. Prefer [runContained].
|
||||||
Future runReflected(
|
Future runReflected(
|
||||||
Function handler, RequestContext req, ResponseContext res) {
|
Function handler, RequestContext req, ResponseContext res) {
|
||||||
var h =
|
var h = handleContained(
|
||||||
handleContained(handler, _preContained[handler] = preInject(handler));
|
handler,
|
||||||
|
_preContained[handler] =
|
||||||
|
preInject(handler, req.app.container.reflector));
|
||||||
return new Future.sync(() => h(req, res));
|
return new Future.sync(() => h(req, res));
|
||||||
// return closureMirror.apply(args).reflectee;
|
// return closureMirror.apply(args).reflectee;
|
||||||
}
|
}
|
||||||
|
@ -359,7 +360,7 @@ class Angel extends Routable {
|
||||||
}
|
}
|
||||||
|
|
||||||
Angel(
|
Angel(
|
||||||
{@required Reflector reflector,
|
{Reflector reflector: const EmptyReflector(),
|
||||||
this.logger,
|
this.logger,
|
||||||
this.eagerParseRequestBodies: false,
|
this.eagerParseRequestBodies: false,
|
||||||
this.allowMethodOverrides: true,
|
this.allowMethodOverrides: true,
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
library angel_framework.http.controller;
|
library angel_framework.http.controller;
|
||||||
|
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:mirrors';
|
import 'package:angel_container/angel_container.dart';
|
||||||
|
|
||||||
import 'package:angel_route/angel_route.dart';
|
import 'package:angel_route/angel_route.dart';
|
||||||
import 'package:meta/meta.dart';
|
import 'package:meta/meta.dart';
|
||||||
|
|
||||||
|
@ -35,8 +34,8 @@ class Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load global expose decl
|
// Load global expose decl
|
||||||
ClassMirror classMirror = reflectClass(this.runtimeType);
|
var classMirror = app.container.reflector.reflectClass(this.runtimeType);
|
||||||
Expose exposeDecl = findExpose();
|
Expose exposeDecl = findExpose(app.container.reflector);
|
||||||
|
|
||||||
if (exposeDecl == null) {
|
if (exposeDecl == null) {
|
||||||
throw new Exception(
|
throw new Exception(
|
||||||
|
@ -45,36 +44,37 @@ class Controller {
|
||||||
|
|
||||||
var routable = new Routable();
|
var routable = new Routable();
|
||||||
app.mount(exposeDecl.path, routable);
|
app.mount(exposeDecl.path, routable);
|
||||||
TypeMirror typeMirror = reflectType(this.runtimeType);
|
var typeMirror = app.container.reflector.reflectType(this.runtimeType);
|
||||||
String name = exposeDecl.as?.isNotEmpty == true
|
String name = exposeDecl.as?.isNotEmpty == true
|
||||||
? exposeDecl.as
|
? exposeDecl.as
|
||||||
: MirrorSystem.getName(typeMirror.simpleName);
|
: typeMirror.name;
|
||||||
|
|
||||||
app.controllers[name] = this;
|
app.controllers[name] = this;
|
||||||
|
|
||||||
// Pre-reflect methods
|
// Pre-reflect methods
|
||||||
InstanceMirror instanceMirror = reflect(this);
|
var instanceMirror = app.container.reflector.reflectInstance(this);
|
||||||
final handlers = <RequestHandler>[]
|
final handlers = <RequestHandler>[]
|
||||||
..addAll(exposeDecl.middleware)
|
..addAll(exposeDecl.middleware)
|
||||||
..addAll(middleware);
|
..addAll(middleware);
|
||||||
final routeBuilder = _routeBuilder(instanceMirror, routable, handlers);
|
final routeBuilder = _routeBuilder(instanceMirror, routable, handlers);
|
||||||
classMirror.instanceMembers.forEach(routeBuilder);
|
classMirror.declarations.forEach(routeBuilder);
|
||||||
configureRoutes(routable);
|
configureRoutes(routable);
|
||||||
return new Future.value();
|
return new Future.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Function(Symbol, MethodMirror) _routeBuilder(
|
void Function(ReflectedDeclaration) _routeBuilder(
|
||||||
InstanceMirror instanceMirror,
|
ReflectedInstance instanceMirror,
|
||||||
Routable routable,
|
Routable routable,
|
||||||
Iterable<RequestHandler> handlers) {
|
Iterable<RequestHandler> handlers) {
|
||||||
return (Symbol methodName, MethodMirror method) {
|
return (ReflectedDeclaration decl) {
|
||||||
if (method.isRegularMethod &&
|
var methodName = decl.name;
|
||||||
methodName != #toString &&
|
|
||||||
methodName != #noSuchMethod &&
|
if (methodName != 'toString' &&
|
||||||
methodName != #call &&
|
methodName != 'noSuchMethod' &&
|
||||||
methodName != #equals &&
|
methodName != 'call' &&
|
||||||
methodName != #==) {
|
methodName != 'equals' &&
|
||||||
Expose exposeDecl = method.metadata
|
methodName != '==') {
|
||||||
|
Expose exposeDecl = decl.function.annotations
|
||||||
.map((m) => m.reflectee)
|
.map((m) => m.reflectee)
|
||||||
.firstWhere((r) => r is Expose, orElse: () => null);
|
.firstWhere((r) => r is Expose, orElse: () => null);
|
||||||
|
|
||||||
|
@ -87,9 +87,10 @@ class Controller {
|
||||||
..addAll(exposeDecl.middleware);
|
..addAll(exposeDecl.middleware);
|
||||||
String name = exposeDecl.as?.isNotEmpty == true
|
String name = exposeDecl.as?.isNotEmpty == true
|
||||||
? exposeDecl.as
|
? exposeDecl.as
|
||||||
: MirrorSystem.getName(methodName);
|
: methodName;
|
||||||
|
|
||||||
// Check if normal
|
// Check if normal
|
||||||
|
var method = decl.function;
|
||||||
if (method.parameters.length == 2 &&
|
if (method.parameters.length == 2 &&
|
||||||
method.parameters[0].type.reflectedType == RequestContext &&
|
method.parameters[0].type.reflectedType == RequestContext &&
|
||||||
method.parameters[1].type.reflectedType == ResponseContext) {
|
method.parameters[1].type.reflectedType == ResponseContext) {
|
||||||
|
@ -103,7 +104,7 @@ class Controller {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var injection = preInject(reflectedMethod);
|
var injection = preInject(reflectedMethod, app.container.reflector);
|
||||||
|
|
||||||
if (exposeDecl?.allowNull?.isNotEmpty == true)
|
if (exposeDecl?.allowNull?.isNotEmpty == true)
|
||||||
injection.optional?.addAll(exposeDecl.allowNull);
|
injection.optional?.addAll(exposeDecl.allowNull);
|
||||||
|
@ -119,8 +120,8 @@ class Controller {
|
||||||
void configureRoutes(Routable routable) {}
|
void configureRoutes(Routable routable) {}
|
||||||
|
|
||||||
/// Finds the [Expose] declaration for this class.
|
/// Finds the [Expose] declaration for this class.
|
||||||
Expose findExpose() => reflectClass(runtimeType)
|
Expose findExpose(Reflector reflector) => reflector.reflectClass(runtimeType)
|
||||||
.metadata
|
.annotations
|
||||||
.map((m) => m.reflectee)
|
.map((m) => m.reflectee)
|
||||||
.firstWhere((r) => r is Expose, orElse: () => null) as Expose;
|
.firstWhere((r) => r is Expose, orElse: () => null) as Expose;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue