| Index: pkg/analysis_server/lib/src/protocol.dart
|
| diff --git a/pkg/analysis_server/lib/src/protocol.dart b/pkg/analysis_server/lib/src/protocol.dart
|
| index 7cdfa18de0c22eb00ea302288a470cda0cc29a96..2c4ecfb258e5aca1dddae53b172134cf60e7ab05 100644
|
| --- a/pkg/analysis_server/lib/src/protocol.dart
|
| +++ b/pkg/analysis_server/lib/src/protocol.dart
|
| @@ -185,6 +185,17 @@ class RequestDatum {
|
| }
|
|
|
| /**
|
| + * Return `true` if the datum is a Map containing the given [key].
|
| + */
|
| + bool hasKey(String key) {
|
| + if (datum is! Map<String, dynamic>) {
|
| + throw new RequestFailure(new Response.invalidParameter(request, path,
|
| + "be a map"));
|
| + }
|
| + return datum.containsKey(key);
|
| + }
|
| +
|
| + /**
|
| * Validate that the datum is a Map whose keys are strings, and call [f] on
|
| * each key/value pair in the map.
|
| */
|
|
|