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


C# NuGet.PackageOperation类代码示例

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


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

示例1: AddOneFakeUninstallPackageOperation

		public PackageOperation AddOneFakeUninstallPackageOperation()
		{
			var package = new FakePackage("PackageToUninstall");			
			var operation = new PackageOperation(package, PackageAction.Uninstall);
			FakeSolution.FakeActiveProject.FakeInstallOperations.Add(operation);
			return operation;
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:7,代码来源:TestablePackageViewModel.cs

示例2: AddPackageInstallOperation

		public FakePackage AddPackageInstallOperation ()
		{
			var package = new FakePackage ("Package to install");
			var operation = new PackageOperation (package, PackageAction.Install);
			PackageOperations.Add (operation);
			return package;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:InstallPackageHelper.cs

示例3: CreateInstallActionWithOneOperation

		FakeInstallPackageAction CreateInstallActionWithOneOperation()
		{
			var operations = new PackageOperation[] {
				new PackageOperation(new FakePackage(), PackageAction.Install)
			};
			FakeInstallPackageAction action = CreateInstallAction();
			action.Operations = operations;
			return action;
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:9,代码来源:ConsolePackageActionRunnerTests.cs

示例4: AddInstallOperationWithFile

		void AddInstallOperationWithFile(string fileName)
		{
			var package = new FakePackage();
			package.AddFile(fileName);
			
			var operation = new PackageOperation(package, PackageAction.Install);
			var operations = new List<PackageOperation>();
			operations.Add(operation);
			
			action.Operations = operations;
		}
开发者ID:Netring,项目名称:SharpDevelop,代码行数:11,代码来源:InstallPackageActionTests.cs

示例5: AddOneFakeInstallPackageOperationForViewModelPackage

		public PackageOperation AddOneFakeInstallPackageOperationForViewModelPackage()
		{
			var operation = new PackageOperation(FakePackage, PackageAction.Install);
			
			FakeSolution
				.FakeActiveProject
				.FakeInstallOperations
				.Add(operation);
			
			return operation;
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:11,代码来源:TestablePackageViewModel.cs

示例6: CreateInstallActionWithOnePowerShellScript

		void CreateInstallActionWithOnePowerShellScript()
		{
			CreateInstallActionWithNoPowerShellScripts();
			
			var package = new FakePackage();
			package.AddFile(@"tools\init.ps1");
			
			var operation = new PackageOperation(package, PackageAction.Install);
			var operations = new List<PackageOperation>();
			operations.Add(operation);
			
			fakeAction.Operations = operations;
			fakeActions.Add(fakeAction);
		}
开发者ID:hpsa,项目名称:SharpDevelop,代码行数:14,代码来源:PackageActionRunnerTests.cs

示例7: AddInstallOperationForPackage

 PackageOperation AddInstallOperationForPackage(IPackage package)
 {
     var operation = new PackageOperation(package, PackageAction.Install);
     AddInstallOperationsForPackage(package, operation);
     return operation;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:6,代码来源:ReducedPackageOperationsTests.cs

示例8: ExecuteOperation

 public void ExecuteOperation(PackageOperation operation)
 {
     // Allow to call this method from outside of the class
     base.Execute(operation);
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:5,代码来源:NuGetPackageManager.cs

示例9: GetOperationKey

 private static object GetOperationKey(PackageOperation operation)
 {
     return Tuple.Create(operation.Action, operation.Package.Id, operation.Package.Version);
 }
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:4,代码来源:PackageOperationExtensions.cs

示例10: UpdatePackageWithPackageOperations

		FakePackage UpdatePackageWithPackageOperations(PackageOperation operation)
		{
			var operations = new PackageOperation[] {
				operation
			};
			FakePackage package = CreateFakePackage();
			packageManager.UpdatePackage(package, operations, true);
			return package;
		}
开发者ID:yuriykipnis,项目名称:SharpDevelop,代码行数:9,代码来源:SharpDevelopPackageManagerTests.cs

示例11: Execute

        public void Execute(PackageOperation operation)
        {
            bool packageExists = LocalRepository.Exists(operation.Package);

            if (operation.Action == PackageAction.Install)
            {
                // If the package is already installed, then skip it
                if (packageExists)
                {
                    Logger.Log(MessageLevel.Info, NuGetResources.Log_PackageAlreadyInstalled, operation.Package.GetFullName());
                }
                else
                {
                    ExecuteInstall(operation.Package);
                }
            }
            else
            {
                if (packageExists)
                {
                    ExecuteUninstall(operation.Package);
                }
            }
        }
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:24,代码来源:PackageManager.cs

示例12: IsMatch

		bool IsMatch(PackageOperation x, PackageOperation y)
		{
			return (x.Package.Id == y.Package.Id) &&
				(x.Package.Version == y.Package.Version) &&
				(x.Action == y.Action);
		}
开发者ID:Paccc,项目名称:SharpDevelop,代码行数:6,代码来源:ReducedPackageOperations.cs

示例13: GetOpposingOperationKey

 private static object GetOpposingOperationKey(PackageOperation operation)
 {
     return Tuple.Create(operation.Action == PackageAction.Install ?
                         PackageAction.Uninstall :
                         PackageAction.Install, operation.Package.Id, operation.Package.Version);
 }
开发者ID:njannink,项目名称:sonarlint-vs,代码行数:6,代码来源:PackageOperationExtensions.cs

示例14: Execute_OneProjectThatHasOlderVersionOfPackageBeingUpdated_PackageOperationsAreRun

        public void Execute_OneProjectThatHasOlderVersionOfPackageBeingUpdated_PackageOperationsAreRun()
        {
            PackageOperation operation = CreateInstallOperationWithFile(@"tools\readme.txt");
            CreateActionWithOperations(operation);
            IPackageFromRepository package = AddPackageToAction("Test", "1.0");
            IPackageManagementProject project = AddProjectToSolution();
            var expectedOperations = new PackageOperation[] { operation };

            action.Execute();

            project.AssertWasCalled(p => p.RunPackageOperations(expectedOperations));
        }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:12,代码来源:UpdateSolutionPackagesActionTests.cs

示例15: IsInstallingMSBuildFiles

		bool IsInstallingMSBuildFiles (PackageOperation operation)
		{
			return (operation.Action == PackageAction.Install) &&
				operation.Package.GetBuildFiles ().Any ();
		}
开发者ID:nerzhulart,项目名称:monodevelop,代码行数:5,代码来源:PackageManagementEventsMonitor.cs


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