@@ -9,13 +9,6 @@ import 'package:path/path.dart' as p;
99
1010import 'common.dart' ;
1111import 'events.dart' ;
12- import 'recording_directory.dart' ;
13- import 'recording_file.dart' ;
14- import 'recording_file_system_entity.dart' ;
15- import 'recording_io_sink.dart' ;
16- import 'recording_link.dart' ;
17- import 'recording_random_access_file.dart' ;
18- import 'replay_proxy_mixin.dart' ;
1912import 'result_reference.dart' ;
2013
2114/// Encodes an object into a JSON-ready representation.
@@ -43,13 +36,7 @@ const Map<TypeMatcher<dynamic>, _Encoder> _kEncoders =
4336 const TypeMatcher <p.Context >(): _encodePathContext,
4437 const TypeMatcher <ResultReference <dynamic >>(): _encodeResultReference,
4538 const TypeMatcher <LiveInvocationEvent <dynamic >>(): _encodeEvent,
46- const TypeMatcher <FileSystem >(): _encodeFileSystem,
47- const TypeMatcher <RecordingDirectory >(): _encodeFileSystemEntity,
48- const TypeMatcher <RecordingFile >(): _encodeFileSystemEntity,
49- const TypeMatcher <RecordingLink >(): _encodeFileSystemEntity,
50- const TypeMatcher <RecordingIOSink >(): _encodeIOSink,
51- const TypeMatcher <RecordingRandomAccessFile >(): _encodeRandomAccessFile,
52- const TypeMatcher <ReplayProxyMixin >(): _encodeReplayEntity,
39+ const TypeMatcher <ReplayAware >(): _encodeReplayAwareEntity,
5340 const TypeMatcher <Encoding >(): _encodeEncoding,
5441 const TypeMatcher <FileMode >(): _encodeFileMode,
5542 const TypeMatcher <FileStat >(): _encodeFileStat,
@@ -116,25 +103,7 @@ dynamic _encodeResultReference(ResultReference<dynamic> reference) =>
116103Map <String , dynamic > _encodeEvent (LiveInvocationEvent <dynamic > event) =>
117104 event.serialize ();
118105
119- String _encodeFileSystem (FileSystem fs) => kFileSystemEncodedValue;
120-
121- /// Encodes a file system entity by using its `uid` as a reference identifier.
122- /// During replay, this allows us to tie the return value of of one event to
123- /// the object of another.
124- String _encodeFileSystemEntity (
125- RecordingFileSystemEntity <FileSystemEntity > entity) {
126- return '${entity .runtimeType }@${entity .uid }' ;
127- }
128-
129- String _encodeIOSink (RecordingIOSink sink) {
130- return '${sink .runtimeType }@${sink .uid }' ;
131- }
132-
133- String _encodeRandomAccessFile (RecordingRandomAccessFile raf) {
134- return '${raf .runtimeType }@${raf .uid }' ;
135- }
136-
137- String _encodeReplayEntity (ReplayProxyMixin entity) => entity.identifier;
106+ String _encodeReplayAwareEntity (ReplayAware entity) => entity.identifier;
138107
139108String _encodeEncoding (Encoding encoding) => encoding.name;
140109
0 commit comments