Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Add uninstalled plugins and descriptions on "plugins" command #599

Merged
merged 5 commits into from
Jun 5, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove "SystemLog", remove Count <= 0 branch since it's always > 0
  • Loading branch information
joeqian10 committed Jun 2, 2020
commit 63c55f018482279f7009e2533f68c0c0d531be3c
24 changes: 10 additions & 14 deletions neo-cli/CLI/MainService.Plugins.cs
Original file line number Diff line number Diff line change
@@ -105,24 +105,20 @@ private void OnPluginsCommand()
dic.Add("RpcNep5Tracker", "Enquiries NEP-5 balance and transactions history of accounts through RPC");
dic.Add("RpcServer", "Enables RPC for the node");
dic.Add("StatesDumper", "Exports Neo-CLI status data");
dic.Add("SystemLog", "Prints the consensus log");

if (Plugin.Plugins.Count > 0)
{
Console.WriteLine("Installed plugins:");
Plugin.Plugins.ForEach(p =>
Console.WriteLine("Installed plugins:");
Plugin.Plugins.ForEach(p =>
{
if (dic.TryGetValue(p.Name, out string description))
{
var description = dic.GetValueOrDefault(p.Name, "Description");
Console.WriteLine("\t" + p.Name + "\t" + description);
dic.Remove(p.Name);
});
Console.WriteLine("Uninstalled plugins:");
dic.ForEach(p => Console.WriteLine("\t" + p.Key + "\t" + p.Value));
}
else
{
Console.WriteLine("No installed plugins");
}
}
});

Console.WriteLine();
Console.WriteLine("Uninstalled plugins:");
dic.ForEach(p => Console.WriteLine("\t" + p.Key + "\t" + p.Value));
}
}
}