8 changed files with 111 additions and 2 deletions
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.PackageManagement |
||||
{ |
||||
public static class IPackageFromRepositoryExtensions |
||||
{ |
||||
public static IDisposable StartInstallOperation(this IPackageFromRepository package) |
||||
{ |
||||
return package.Repository.StartInstallOperation(package.Id); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,16 @@
@@ -0,0 +1,16 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using NuGet; |
||||
|
||||
namespace ICSharpCode.PackageManagement |
||||
{ |
||||
public static class IPackageRepositoryExtensions |
||||
{ |
||||
public static IDisposable StartInstallOperation(this IPackageRepository repository, string mainPackageId = null) |
||||
{ |
||||
return repository.StartOperation(RepositoryOperationNames.Install, mainPackageId); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,30 @@
@@ -0,0 +1,30 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using ICSharpCode.PackageManagement.Design; |
||||
using NuGet; |
||||
using Rhino.Mocks; |
||||
|
||||
namespace PackageManagement.Tests.Helpers |
||||
{ |
||||
public class FakeOperationAwarePackageRepository : FakePackageRepository, IOperationAwareRepository |
||||
{ |
||||
public string OperationStarted; |
||||
public string MainPackageIdForOperationStarted; |
||||
|
||||
IDisposable Operation = MockRepository.GenerateStub<IDisposable>(); |
||||
|
||||
public void AssertOperationIsDisposed() |
||||
{ |
||||
Operation.AssertWasCalled(o => o.Dispose()); |
||||
} |
||||
|
||||
public IDisposable StartOperation(string operationName, string mainPackageId) |
||||
{ |
||||
OperationStarted = operationName; |
||||
MainPackageIdForOperationStarted = mainPackageId; |
||||
return Operation; |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue