NetSparkle 3.x provides ChannelAppCastFilter to easily filter app cast items by a specific channel (e.g., beta, alpha, or preview). This is useful for allowing users to opt-in to specific update tracks.
To use it, set the AppCastHelper.AppCastFilter property on your SparkleUpdater instance.
Configuration Options
- ChannelSearchNames: A
List<string> of channel names to search for (e.g., new List<string>() {"beta"}). It uses a simple string.Contains invariant lowercase check. - RemoveOlderItems: If
true, it removes items that don't match the channel. If false, it keeps old versions (useful for rollbacks). - KeepItemsWithNoChannelInfo: If
false, it removes all items that do not match the specified channel. Warning: Setting this to false may prevent users on a beta version from updating to a non-beta version.
// Example setup for a beta channel filter
var filter = new ChannelAppCastFilter
{
ChannelSearchNames = new List<string> { "beta" },
RemoveOlderItems = true,
KeepItemsWithNoChannelInfo = false
};
// Apply to the helper
sparkleUpdater.AppCastHelper.AppCastFilter = filter;