本文整理汇总了C#中ICSharpCode.PackageManagement.Design.FakePackageManagementSolution类的典型用法代码示例。如果您正苦于以下问题:C# FakePackageManagementSolution类的具体用法?C# FakePackageManagementSolution怎么用?C# FakePackageManagementSolution使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FakePackageManagementSolution类属于ICSharpCode.PackageManagement.Design命名空间,在下文中一共展示了FakePackageManagementSolution类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateUpdatePackageInAllProjects
void CreateUpdatePackageInAllProjects(string packageId, SemanticVersion version)
{
fakeSolution = new FakePackageManagementSolution();
fakeSourceRepository = new FakePackageRepository();
var packageReference = new PackageReference(packageId, version, null, null, false, false);
updatePackageInAllProjects = new UpdatePackageInAllProjects(packageReference, fakeSolution, fakeSourceRepository);
}
示例2: CreateViewModel
void CreateViewModel(
FakePackageManagementSolution solution,
IThreadSafePackageManagementEvents packageManagementEvents)
{
fakeTaskFactory = new FakeTaskFactory();
fakeLicenseAcceptanceService = new FakeLicenseAcceptanceService();
fakeSelectProjectsService = new FakeSelectProjectsService();
userPrompts = new ManagePackagesUserPrompts(
packageManagementEvents,
fakeLicenseAcceptanceService,
fakeSelectProjectsService);
fakeActionRunner = new FakePackageActionRunner();
packagesViewModels = new PackagesViewModels(
solution,
fakeRegisteredPackageRepositories,
packageManagementEvents,
fakeActionRunner,
fakeTaskFactory);
viewTitle = new ManagePackagesViewTitle(solution);
viewModel = new ManagePackagesViewModel(
packagesViewModels,
viewTitle,
packageManagementEvents,
userPrompts);
fakeTaskFactory.ExecuteAllFakeTasks();
}
示例3: CreateViewModel
void CreateViewModel(FakePackageManagementSolution fakeSolution)
{
viewModel = new TestableUpdatedPackageViewModel(fakeSolution);
fakeProject = fakeSolution.FakeProjectToReturnFromGetProject;
fakeActionRunner = viewModel.FakeActionRunner;
fakePackageManagementEvents = viewModel.FakePackageManagementEvents;
}
示例4: CreateViewModel
void CreateViewModel(FakePackageManagementSolution fakeSolution)
{
viewModelParent = MockRepository.GenerateStub<IPackageViewModelParent>();
viewModel = new TestableUpdatedPackageViewModel(viewModelParent, fakeSolution);
fakeProject = fakeSolution.FakeProjectToReturnFromGetProject;
fakeActionRunner = viewModel.FakeActionRunner;
fakePackageManagementEvents = viewModel.FakePackageManagementEvents;
}
示例5: TestablePackageViewModel
public TestablePackageViewModel(FakePackageManagementSolution solution)
: this(
new FakePackage(),
solution,
new FakePackageManagementEvents(),
new FakePackageActionRunner(),
new FakeLogger())
{
}
示例6: CreateProvider
void CreateProvider()
{
fakeSolution = new FakePackageManagementSolution();
fakeRegisteredRepositories = new FakeRegisteredPackageRepositories();
fakePowerShellDetection = new FakePowerShellDetection();
provider = new PackageManagementConsoleHostProvider(
fakeSolution,
fakeRegisteredRepositories,
fakePowerShellDetection);
}
示例7: TestablePackageViewModel
public TestablePackageViewModel(FakePackageManagementSolution solution)
: this(
new FakePackage("Test"),
new PackageManagementSelectedProjects(solution),
new FakePackageManagementEvents(),
new FakePackageActionRunner(),
new FakeLogger())
{
this.FakeSolution = solution;
}
示例8: CreateViewModel
void CreateViewModel(FakePackageManagementSolution solution)
{
viewModel = new TestablePackageViewModel(solution);
fakePackage = viewModel.FakePackage;
this.fakeSolution = solution;
fakePackageManagementEvents = viewModel.FakePackageManagementEvents;
fakeLogger = viewModel.FakeLogger;
fakeInstallPackageAction = solution.FakeProjectToReturnFromGetProject.FakeInstallPackageAction;
fakeUninstallPackageAction = solution.FakeProjectToReturnFromGetProject.FakeUninstallPackageAction;
fakeActionRunner = viewModel.FakeActionRunner;
}
示例9: TestableInstalledPackageViewModel
public TestableInstalledPackageViewModel(FakePackageManagementSolution solution)
: this(
new FakePackage(),
new SelectedProjectsForInstalledPackages(solution),
new FakePackageManagementEvents(),
new FakePackageActionRunner(),
new FakeLogger())
{
this.FakeSolution = solution;
solution.FakeActiveMSBuildProject = ProjectHelper.CreateTestProject("MyProject");
}
示例10: DesignTimePackagesViewModel
public DesignTimePackagesViewModel(
DesignTimeRegisteredPackageRepositories registeredPackageRepositories,
FakePackageManagementSolution solution)
: base(
registeredPackageRepositories,
new PackageViewModelFactory(solution, null, null),
new PackageManagementTaskFactory())
{
PageSize = 3;
AddPackageViewModels();
}
示例11: CreateViewModel
void CreateViewModel(FakePackageManagementSolution solution)
{
viewModelParent = MockRepository.GenerateStub<IPackageViewModelParent>();
viewModel = new TestablePackageViewModel(viewModelParent, solution);
fakePackage = viewModel.FakePackage;
this.fakeSolution = solution;
fakePackageManagementEvents = viewModel.FakePackageManagementEvents;
fakeLogger = viewModel.FakeLogger;
fakeUninstallPackageAction = solution.FakeProjectToReturnFromGetProject.FakeUninstallPackageAction;
fakeActionRunner = viewModel.FakeActionRunner;
}
示例12: CreateViewModel
void CreateViewModel(FakePackageManagementSolution solution)
{
taskFactory = new FakeTaskFactory();
registeredPackageRepositories = new FakeRegisteredPackageRepositories();
var packageViewModelFactory = new FakePackageViewModelFactory();
viewModel = new UpdatedPackagesViewModel(
solution,
registeredPackageRepositories,
packageViewModelFactory,
taskFactory);
}
示例13: CreateViewModel
void CreateViewModel(
FakePackageManagementSolution solution,
FakeRegisteredPackageRepositories registeredPackageRepositories,
FakePackageActionRunner actionRunner)
{
packageViewModelFactory = new FakePackageViewModelFactory {
FakeSolution = solution,
FakeActionRunner = actionRunner
};
CreateViewModel(solution, registeredPackageRepositories, packageViewModelFactory);
}
示例14: TestableUpdatedPackageViewModel
public TestableUpdatedPackageViewModel(
IPackageViewModelParent parent,
FakePackageManagementSolution solution)
: this(parent,
new FakePackage(),
new SelectedProjectsForUpdatedPackages(solution),
new FakePackageManagementEvents(),
new FakePackageActionRunner(),
new FakeLogger())
{
this.FakeSolution = solution;
}
示例15: CreateHost
void CreateHost()
{
host = new TestablePackageManagementConsoleHost();
fakeSolution = host.FakeSolution;
scriptingConsole = host.FakeScriptingConsole;
powerShellHost = host.FakePowerShellHostFactory.FakePowerShellHost;
fakeRegisteredPackageRepositories = host.FakeRegisteredPackageRepositories;
}