public PluginsListBoxItem([NotNull] IFeed feed, [NotNull] BasePluginDescriptor plugin, bool canInstall, bool canUninstall, bool canUpdate, bool isInstalled) { Assert.ArgumentNotNull(feed, nameof(feed)); Assert.ArgumentNotNull(plugin, nameof(plugin)); InitializeComponent(); DataContext = plugin; Feed = feed; Plugin = plugin; CanInstall = canInstall; CanUninstall = canUninstall; CanUpdate = canUpdate; IsInstalled = isInstalled; Plugin.PropertyChanged += HandlePropertyChanged; var packagePlugin = plugin as PackagePluginDescriptor; if (packagePlugin != null) { PrereleaseTextBlock.Visibility = packagePlugin.Package.IsReleaseVersion() ? Visibility.Collapsed : Visibility.Visible; } Refresh(); }
public void Initialize([NotNull] BasePluginDescriptor plugin) { Assert.ArgumentNotNull(plugin, nameof(plugin)); Plugin = plugin; }