Ok, I see why your blacklist is a string -- so you can store it in an
IPreferences instance. Here's a nicer what to do that:
static IEnumerable<string> Blacklist {
get { return prefs.Get ("blacklist", DefaultBlacklist).Split (); }
set { prefs.Set ("blacklist", string.Join ("\n", value.ToArray ())); }
}
This way, this is the only piece of code that needs to know that "blacklist" is
the preference key for your blacklist, and everywhere else you can do:
foreach (string service in Blacklist) {
...
}
Blacklist = any new array, list, whatever of strings.
--
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