public VsPackageInstallerEvents(IPackageEventsProvider eventProvider)
        {
            _eventSource = eventProvider.GetPackageEvents();

            _eventSource.PackageInstalled += Source_PackageInstalled;
            _eventSource.PackageInstalling += Source_PackageInstalling;
            _eventSource.PackageReferenceAdded += Source_PackageReferenceAdded;
            _eventSource.PackageReferenceRemoved += Source_PackageReferenceRemoved;
            _eventSource.PackageUninstalled += Source_PackageUninstalled;
            _eventSource.PackageUninstalling += Source_PackageUninstalling;
        }
Esempio n. 2
0
        public VsPackageInstallerEvents(IPackageEventsProvider eventProvider)
        {
            _eventSource = eventProvider.GetPackageEvents();

            _eventSource.PackageInstalled        += Source_PackageInstalled;
            _eventSource.PackageInstalling       += Source_PackageInstalling;
            _eventSource.PackageReferenceAdded   += Source_PackageReferenceAdded;
            _eventSource.PackageReferenceRemoved += Source_PackageReferenceRemoved;
            _eventSource.PackageUninstalled      += Source_PackageUninstalled;
            _eventSource.PackageUninstalling     += Source_PackageUninstalling;
        }
		public NuGetPackageEventsMonitor (
			IDotNetProject project,
			IPackageEventsProvider provider,
			IPackageManagementEvents packageManagementEvents)
		{
			this.project = project;
			packageEvents = provider.GetPackageEvents ();
			this.packageManagementEvents = (PackageManagementEvents)packageManagementEvents;

			packageEvents.PackageInstalled += PackageInstalled;
			packageEvents.PackageUninstalling += PackageUninstalling;
			packageEvents.PackageUninstalled += PackageUninstalled;
		}
Esempio n. 4
0
        public NuGetPackageEventsMonitor(
            IDotNetProject project,
            IPackageEventsProvider provider,
            IPackageManagementEvents packageManagementEvents)
        {
            this.project  = project;
            packageEvents = provider.GetPackageEvents();
            this.packageManagementEvents = (PackageManagementEvents)packageManagementEvents;

            packageEvents.PackageReferenceAdded += PackageReferenceAdded;
            packageEvents.PackageUninstalling   += PackageUninstalling;
            packageEvents.PackageUninstalled    += PackageUninstalled;
        }
        public VsPackageInstallerEvents(IPackageEventsProvider eventProvider, INuGetTelemetryProvider telemetryProvider)
        {
            _eventSource = eventProvider.GetPackageEvents();

            _eventSource.PackageInstalled        += Source_PackageInstalled;
            _eventSource.PackageInstalling       += Source_PackageInstalling;
            _eventSource.PackageReferenceAdded   += Source_PackageReferenceAdded;
            _eventSource.PackageReferenceRemoved += Source_PackageReferenceRemoved;
            _eventSource.PackageUninstalled      += Source_PackageUninstalled;
            _eventSource.PackageUninstalling     += Source_PackageUninstalling;

            // MEF components do not participate in Visual Studio's Package extensibility,
            // hence importing INuGetTelemetryProvider ensures that the ETW collector is
            // set up correctly.
            _ = telemetryProvider;
        }