Make RequestContext generic

This commit is contained in:
Tobe O 2018-08-19 23:28:27 -04:00
parent 91c97c78b9
commit ffbbb75c8c
2 changed files with 48 additions and 32 deletions

View file

@ -3,7 +3,7 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<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/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$/lib/src/core/request_context.dart" beforeDir="false" afterPath="$PROJECT_DIR$/lib/src/core/request_context.dart" afterDir="false" /> <change beforePath="$PROJECT_DIR$/CHANGELOG.md" beforeDir="false" afterPath="$PROJECT_DIR$/CHANGELOG.md" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/.tmp/" /> <ignored path="$PROJECT_DIR$/.tmp/" />
<ignored path="$PROJECT_DIR$/temp/" /> <ignored path="$PROJECT_DIR$/temp/" />
@ -77,6 +77,18 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<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="304">
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="service.dart" pinned="false" current-in-tab="false"> <file leaf-file-name="service.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/core/service.dart"> <entry file="file://$PROJECT_DIR$/lib/src/core/service.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
@ -89,11 +101,11 @@
</provider> </provider>
</entry> </entry>
</file> </file>
<file leaf-file-name="request_context.dart" pinned="false" current-in-tab="true"> <file leaf-file-name="request_context.dart" pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart"> <entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2032"> <state relative-caret-position="200">
<caret line="127" column="7" selection-start-line="127" selection-start-column="7" selection-end-line="127" selection-end-column="7" /> <caret line="70" column="16" lean-forward="true" selection-start-line="70" selection-start-column="16" selection-end-line="70" selection-end-column="16" />
<folding> <folding>
<element signature="e#47#67#0" expanded="true" /> <element signature="e#47#67#0" expanded="true" />
</folding> </folding>
@ -264,9 +276,9 @@
<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/server.dart" /> <option value="$PROJECT_DIR$/lib/src/core/server.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$/CHANGELOG.md" />
<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/request_context.dart" /> <option value="$PROJECT_DIR$/lib/src/core/request_context.dart" />
<option value="$PROJECT_DIR$/CHANGELOG.md" />
</list> </list>
</option> </option>
</component> </component>
@ -685,14 +697,7 @@
<workItem from="1533353660185" duration="262000" /> <workItem from="1533353660185" duration="262000" />
<workItem from="1534009494986" duration="594000" /> <workItem from="1534009494986" duration="594000" />
<workItem from="1534546784803" duration="353000" /> <workItem from="1534546784803" duration="353000" />
<workItem from="1534547885788" duration="6784000" /> <workItem from="1534547885788" duration="6986000" />
</task>
<task id="LOCAL-00082" summary="Fixed all broken tests">
<created>1526440469836</created>
<option name="number" value="00082" />
<option name="presentableId" value="LOCAL-00082" />
<option name="project" value="LOCAL" />
<updated>1526440469836</updated>
</task> </task>
<task id="LOCAL-00083" summary="1.1.3"> <task id="LOCAL-00083" summary="1.1.3">
<created>1526440683707</created> <created>1526440683707</created>
@ -1030,7 +1035,14 @@
<option name="project" value="LOCAL" /> <option name="project" value="LOCAL" />
<updated>1534735212787</updated> <updated>1534735212787</updated>
</task> </task>
<option name="localTasksCounter" value="131" /> <task id="LOCAL-00131" summary="Make RequestContext generic">
<created>1534735654118</created>
<option name="number" value="00131" />
<option name="presentableId" value="LOCAL-00131" />
<option name="project" value="LOCAL" />
<updated>1534735654118</updated>
</task>
<option name="localTasksCounter" value="132" />
<servers /> <servers />
</component> </component>
<component name="TestHistory"> <component name="TestHistory">
@ -1066,7 +1078,7 @@
</history-entry> </history-entry>
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="169083000" /> <option name="totallyTimeSpent" value="169285000" />
</component> </component>
<component name="TodoView"> <component name="TodoView">
<todo-panel id="selected-file"> <todo-panel id="selected-file">
@ -1079,13 +1091,14 @@
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="37" y="23" width="1403" height="784" extended-state="0" /> <frame x="37" y="23" width="1403" height="784" extended-state="0" />
<editor active="true" />
<layout> <layout>
<window_info anchor="right" id="Palette" order="3" /> <window_info anchor="right" id="Palette" order="3" />
<window_info anchor="bottom" id="Tool Output" order="7" /> <window_info anchor="bottom" id="Tool Output" order="7" />
<window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.5035524" side_tool="true" weight="0.34188035" /> <window_info anchor="bottom" id="Event Log" order="7" sideWeight="0.5035524" side_tool="true" weight="0.34188035" />
<window_info anchor="right" id="Maven Projects" order="3" /> <window_info anchor="right" id="Maven Projects" order="3" />
<window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" /> <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
<window_info active="true" anchor="bottom" id="Dart Analysis" order="7" visible="true" weight="0.31004366" /> <window_info anchor="bottom" id="Dart Analysis" order="7" weight="0.31004366" />
<window_info anchor="right" id="Flutter Outline" order="4" /> <window_info anchor="right" id="Flutter Outline" order="4" />
<window_info id="Capture Tool" order="2" /> <window_info id="Capture Tool" order="2" />
<window_info id="Designer" order="2" /> <window_info id="Designer" order="2" />
@ -1103,7 +1116,7 @@
<window_info anchor="bottom" id="Run" order="2" sideWeight="0.4964476" weight="0.3973799" /> <window_info anchor="bottom" id="Run" order="2" sideWeight="0.4964476" weight="0.3973799" />
<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 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" weight="0.27920645" /> <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.27920645" />
<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" />
@ -1128,7 +1141,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="Added `Service.findOne` tests" />
<MESSAGE value="Bump version -&gt; 1.1.5" /> <MESSAGE value="Bump version -&gt; 1.1.5" />
<MESSAGE value="Patched another cast bug" /> <MESSAGE value="Patched another cast bug" />
<MESSAGE value="Removed random_string dependency" /> <MESSAGE value="Removed random_string dependency" />
@ -1153,7 +1165,8 @@
<MESSAGE value="Remove all usage of dart2_constant" /> <MESSAGE value="Remove all usage of dart2_constant" />
<MESSAGE value="Add more to parseId" /> <MESSAGE value="Add more to parseId" />
<MESSAGE value="Make parseId static + docs" /> <MESSAGE value="Make parseId static + docs" />
<option name="LAST_COMMIT_MESSAGE" value="Make parseId static + docs" /> <MESSAGE value="Make RequestContext generic" />
<option name="LAST_COMMIT_MESSAGE" value="Make RequestContext generic" />
</component> </component>
<component name="XDebuggerManager"> <component name="XDebuggerManager">
<breakpoint-manager> <breakpoint-manager>
@ -1506,16 +1519,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="256">
<caret line="16" column="54" selection-start-line="16" selection-start-column="54" selection-end-line="16" selection-end-column="54" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/test/primitives_test.dart"> <entry file="file://$PROJECT_DIR$/test/primitives_test.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state> <state>
@ -1547,14 +1550,24 @@
</entry> </entry>
<entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart"> <entry file="file://$PROJECT_DIR$/lib/src/core/request_context.dart">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="2032"> <state relative-caret-position="200">
<caret line="127" column="7" selection-start-line="127" selection-start-column="7" selection-end-line="127" selection-end-column="7" /> <caret line="70" column="16" lean-forward="true" selection-start-line="70" selection-start-column="16" selection-end-line="70" selection-end-column="16" />
<folding> <folding>
<element signature="e#47#67#0" expanded="true" /> <element signature="e#47#67#0" expanded="true" />
</folding> </folding>
</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="304">
<caret line="19" column="13" selection-start-line="19" selection-start-column="13" selection-end-line="19" selection-end-column="13" />
</first_editor>
<second_editor />
</state>
</provider>
</entry>
</component> </component>
<component name="masterDetails"> <component name="masterDetails">
<states> <states>

View file

@ -14,4 +14,7 @@
* Removed all `@deprecated` symbols. * Removed all `@deprecated` symbols.
* `Service.toId` was renamed to `Service.parseId`; it also now uses its * `Service.toId` was renamed to `Service.parseId`; it also now uses its
single type argument to determine how to parse a value. single type argument to determine how to parse a value.
* In addition, this method was also made `static`. * In addition, this method was also made `static`.
* `RequestContext` and `ResponseContext` are now generic, and take a
single type argument pointing to the underlying request/response type,
respectively.