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.

_______________________________________________
Mailing list: https://launchpad.net/~do-plugins
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~do-plugins
More help   : https://help.launchpad.net/ListHelp

Reply via email to