do-plugins team mailing list archive
-
do-plugins team
-
Mailing list archive
-
Message #00360
Re: Proposed merge of lp:~karol-bedkowski/do-plugins/systemservices into lp:do-plugins/community-future
More importantly, GetServices () returns a null if the services directory is not found. Returning an empty list is much nicer. If you return an IEnumerable<string> instead of List<string>, you can just return Enumerable.Empty<string> () if the path is not found. This allows you to safely remove your check for null (if you had one!).
Instead of:
public static readonly string defaultBlackList = "rc\nrcS\nrmnologin\nrestart\nmount*\numount*\nudev*\nstop-*\n";
Maybe try:
static readonly IEnumerable<string> blacklistedServices =
new [] { "rc, "nrcS", "rmnologin", "restart", "mount*", "umount*", "udev*", "stop-*" };
--
https://code.edge.launchpad.net/~karol-bedkowski/do-plugins/systemservices/+merge/2317
You are subscribed to branch lp:do-plugins/community-future.
References