Files
sdk/pkg/analyzer/lib/instrumentation/plugin_data.dart
T
Mike Fairhurst 7ba5584c2e [analysis_server] Fix outdated desin Service->Server, use Service->Logger.
Also multiplex the service rather than the logger, so that we can
multiplex a crash reporting instrumentation service with a file logging
instrumentation service.

Change-Id: I7720c55e26225c27d2d9447a0156b2ca83da6598
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122100
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-11-04 21:31:26 +00:00

27 lines
818 B
Dart

// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
/// Information about a plugin.
class PluginData {
/// The id used to uniquely identify the plugin.
final String pluginId;
/// The name of the plugin.
final String name;
/// The version of the plugin.
final String version;
/// Initialize a newly created set of data about a plugin.
PluginData(this.pluginId, this.name, this.version);
/// Add the information about the plugin to the list of [fields] to be sent to
/// the instrumentation server.
void addToFields(List<String> fields) {
fields.add(pluginId);
fields.add(name ?? '');
fields.add(version ?? '');
}
}