Index: runtime/observatory/lib/event.dart |
diff --git a/runtime/observatory/lib/event.dart b/runtime/observatory/lib/event.dart |
index fbbd3e5460bd9162f83e3fd6be7892245df8c638..e79b16b3c6120c1f42688d2912e732ceb35a7897 100644 |
--- a/runtime/observatory/lib/event.dart |
+++ b/runtime/observatory/lib/event.dart |
@@ -284,6 +284,31 @@ class ConnectionClosedEvent implements M.ConnectionClosedEvent { |
} |
} |
+class ServiceRegisteredEvent implements M.ServiceRegisteredEvent { |
+ final DateTime timestamp; |
+ final String service; |
+ final String method; |
+ final String alias; |
+ ServiceRegisteredEvent( |
+ this.timestamp, this.service, this.method, this.alias) { |
+ assert(timestamp != null); |
+ assert(service != null); |
+ assert(method != null); |
+ assert(alias != null); |
+ } |
+} |
+ |
+class ServiceUnregisteredEvent implements M.ServiceUnregisteredEvent { |
+ final DateTime timestamp; |
+ final String service; |
+ final String method; |
+ ServiceUnregisteredEvent(this.timestamp, this.service, this.method) { |
+ assert(timestamp != null); |
+ assert(service != null); |
+ assert(method != null); |
+ } |
+} |
+ |
M.Event createEventFromServiceEvent(S.ServiceEvent event) { |
switch (event.kind) { |
case S.ServiceEvent.kVMUpdate: |
@@ -339,6 +364,12 @@ M.Event createEventFromServiceEvent(S.ServiceEvent event) { |
return new InspectEvent(event.timestamp, event.isolate, event.inspectee); |
case S.ServiceEvent.kGC: |
return new GCEvent(event.timestamp, event.isolate); |
+ case S.ServiceEvent.kServiceRegistered: |
+ return new ServiceRegisteredEvent( |
+ event.timestamp, event.service, event.method, event.alias); |
+ case S.ServiceEvent.kServiceUnregistered: |
+ return new ServiceUnregisteredEvent( |
+ event.timestamp, event.service, event.method); |
case S.ServiceEvent.kNone: |
return new NoneEvent(event.timestamp, event.isolate); |
default: |