当前位置: 首页>>代码示例>>C#>>正文


C# VisualStudio.PackageOperationEventArgs类代码示例

本文整理汇总了C#中NuGet.VisualStudio.PackageOperationEventArgs的典型用法代码示例。如果您正苦于以下问题:C# PackageOperationEventArgs类的具体用法?C# PackageOperationEventArgs怎么用?C# PackageOperationEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


PackageOperationEventArgs类属于NuGet.VisualStudio命名空间,在下文中一共展示了PackageOperationEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: NotifyUninstalled

 internal void NotifyUninstalled(PackageOperationEventArgs e)
 {
     if (PackageUninstalled != null)
     {
         PackageUninstalled(new VsPackageMetadata(e.Package, e.InstallPath));
     }
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:7,代码来源:VsPackageInstallerEvents.cs

示例2: NotifyInstalling

 internal void NotifyInstalling(PackageOperationEventArgs e)
 {
     if (PackageInstalling != null)
     {
         PackageInstalling(new VsPackageMetadata(e.Package, e.InstallPath));
     }
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:7,代码来源:VsPackageInstallerEvents.cs

示例3: OnUninstalling

 protected override void OnUninstalling(PackageOperationEventArgs e)
 {
     PackageEvents.NotifyUninstalling(e);
     base.OnUninstalling(e);
 }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:5,代码来源:VSPackageManager.cs

示例4: OnInstalled

 protected override void OnInstalled(PackageOperationEventArgs e)
 {
     base.OnInstalled(e);
     PackageEvents.NotifyInstalled(e);
 }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:5,代码来源:VSPackageManager.cs

示例5: OnUninstalled

        protected override void OnUninstalled(PackageOperationEventArgs e)
        {
            base.OnUninstalled(e);

            PackageEvents.NotifyUninstalled(e);
            _deleteOnRestartManager.MarkPackageDirectoryForDeletion(e.Package);
        }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:7,代码来源:VSPackageManager.cs

示例6: OnPackageReferenceRemoving

        private void OnPackageReferenceRemoving(object sender, PackageOperationEventArgs e)
        {
            var projectManager = (IProjectManager)sender;

            Project project;
            if (!_projectManagerToProject.TryGetValue(projectManager, out project))
            {
                throw new ArgumentException(Resources.Cmdlet_InvalidProjectManagerInstance, "sender");
            }

            try
            {
                if (!project.SupportsINuGetProjectSystem())
                {
                    ExecuteScript(
                        e.InstallPath,
                        PowerShellScripts.Uninstall,
                        e.Package,
                        projectManager.GetTargetFrameworkForPackage(e.Package.Id),
                        project);
                }
            }
            catch (Exception ex)
            {
                LogCore(MessageLevel.Warning, ex.Message);
            }
        }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:27,代码来源:ProcessPackageBaseCommand.cs

示例7: NotifyReferenceRemoved

 internal void NotifyReferenceRemoved(PackageOperationEventArgs e)
 {
     if (PackageReferenceRemoved != null)
     {
         PackageReferenceRemoved(new VsPackageMetadata(e.Package, e.InstallPath));
     }
 }
开发者ID:mauroa,项目名称:NuGet.VisualStudioExtension,代码行数:7,代码来源:VsPackageInstallerEvents.cs

示例8: OnPackageInstalled

 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     _scriptExecutor.ExecuteInitScript(e.InstallPath, e.Package, this);
 }
开发者ID:jacksonh,项目名称:nuget,代码行数:4,代码来源:PackagesProviderBase.cs

示例9: OnPackageReferenceRemoving

 private void OnPackageReferenceRemoving(object sender, PackageOperationEventArgs e)
 {
     Project project = FindProjectFromFileSystem(e.FileSystem);
     Debug.Assert(project != null);
     try
     {
         _providerServices.ScriptExecutor.ExecuteScript(
             e.InstallPath, 
             PowerShellScripts.Uninstall, 
             e.Package, 
             project,
             GetTargetFrameworkForPackage(e.Package.Id) ?? project.GetTargetFrameworkName(),
             this);
     }
     catch (Exception ex)
     {
         // Swallow exception for uninstall.ps1. Otherwise, there is no way to uninstall a package.
         // But we log it as a warning.
         Log(MessageLevel.Warning, ExceptionUtility.Unwrap(ex).Message);
     }
 }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:21,代码来源:PackagesProviderBase.cs

示例10: OnUninstalled

        protected override void OnUninstalled(PackageOperationEventArgs e)
        {
            base.OnUninstalled(e);

            _deleteOnRestartManager.MarkPackageDirectoryForDeletion(e.Package, createZipPackageFromPath: path => new ZipPackage(path));
        }
开发者ID:nickfloyd,项目名称:NuGet,代码行数:6,代码来源:VSPackageManager.cs

示例11: NotifyReferenceRemoved

 internal void NotifyReferenceRemoved(PackageOperationEventArgs e)
 {
     PackageReferenceRemoved(new VsPackageMetadata(e.Package, e.InstallPath, e.FileSystem));
 }
开发者ID:Newtopian,项目名称:nuget,代码行数:4,代码来源:VsPackageInstallerEvents.cs

示例12: OnPackageReferenceRemoving

        private void OnPackageReferenceRemoving(object sender, PackageOperationEventArgs e)
        {
            var projectManager = (ProjectManager)sender;

            EnvDTE.Project project;
            if (!_projectManagerToProject.TryGetValue(projectManager, out project)) {
                throw new ArgumentException(Resources.Cmdlet_InvalidProjectManagerInstance, "sender");
            }

            ExecuteScript(e.InstallPath, PowerShellScripts.Uninstall, e.Package, project);
        }
开发者ID:larsw,项目名称:nuget,代码行数:11,代码来源:ProcessPackageBaseCommand.cs

示例13: OnPackageInstalled

 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     AddToolsFolderToEnvironmentPath(e.InstallPath);
     ExecuteScript(e.InstallPath, PowerShellScripts.Init, e.Package, null);
 }
开发者ID:larsw,项目名称:nuget,代码行数:5,代码来源:ProcessPackageBaseCommand.cs

示例14: OnPackageInstalled

 private void OnPackageInstalled(object sender, PackageOperationEventArgs e)
 {
     _providerServices.ScriptExecutor.ExecuteInitScript(e.InstallPath, e.Package, this);
     PrepareOpenReadMeFile(e);
 }
开发者ID:themotleyfool,项目名称:NuGet,代码行数:5,代码来源:PackagesProviderBase.cs

示例15: OnPackageInstalling

 private void OnPackageInstalling(object sender, PackageOperationEventArgs e)
 {
     // Write disclaimer text before a package is installed
     WriteDisclaimerText(e.Package);
 }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:5,代码来源:ProcessPackageBaseCommand.cs


注:本文中的NuGet.VisualStudio.PackageOperationEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。