From 9e21634764590b933304ad648ea34377544f24ba Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 6 Feb 2018 23:13:26 -0500 Subject: [PATCH] Deprecated createZoneForRequest --- .idea/workspace.xml | 34 +++++++++++++++++----------------- lib/src/http/server.dart | 4 +++- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 4bb2cfab..2d3d8bfd 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -31,8 +31,8 @@ - - + + @@ -81,7 +81,6 @@ - requestedUrl cacheK resolveAl path @@ -111,6 +110,7 @@ shutdown HttpHeaders ContentType + createZ _isClosed @@ -617,14 +617,7 @@ - - - - 1493087536575 - 1493088262571 @@ -962,7 +955,14 @@ - @@ -998,7 +998,7 @@ - @@ -1057,7 +1057,6 @@ @@ -1470,8 +1470,8 @@ - - + + diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index e5e61c1c..9492b945 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -44,7 +44,7 @@ class Angel extends AngelBase { final Map _injections = {}; - /// Creates a safe zone within which a request can be handled, without crashing the application. + @deprecated Future Function( HttpRequest request, RequestContext req, ResponseContext res) createZoneForRequest; @@ -478,9 +478,11 @@ class Angel extends AngelBase { /// Default constructor. ;) Angel() : super() { bootstrapContainer(); + // ignore: deprecated_member_use createZoneForRequest = defaultZoneCreator; } + @deprecated Future defaultZoneCreator(request, req, res) async { return new ZoneSpecification( print: (Zone self, ZoneDelegate parent, Zone zone, String line) {