Ejemplo n.º 1
0
        public PackageViewModel(
            IPackageViewModelParent parent,
            IPackageFromRepository package,
            PackageManagementSelectedProjects selectedProjects,
            IPackageManagementEvents packageManagementEvents,
            IPackageActionRunner actionRunner,
            ILogger logger)
        {
            this.parent                  = parent;
            this.package                 = package;
            this.selectedProjects        = selectedProjects;
            this.packageManagementEvents = packageManagementEvents;
            this.actionRunner            = actionRunner;
            this.logger                  = CreateLogger(logger);

            CreateCommands();
        }
		protected override PackageViewModelOperationLogger CreateLogger(ILogger logger)
		{
			OperationLoggerCreated = base.CreateLogger(logger);
			return OperationLoggerCreated;
		}
		void CreateLogger()
		{
			fakePackage = MockRepository.GenerateStub<IPackage>();
			fakeLogger = MockRepository.GenerateStub<ILogger>();
			operationLogger = new PackageViewModelOperationLogger(fakeLogger, fakePackage);
		}
 protected override PackageViewModelOperationLogger CreateLogger(ILogger logger)
 {
     PackageViewModelOperationLogger operationLogger = base.CreateLogger(logger);
     operationLogger.AddingPackageMessageFormat = "Installing...{0}";
     operationLogger.RemovingPackageMessageFormat = "Uninstalling...{0}";
     operationLogger.ManagingPackageMessageFormat = "Managing...{0}";
     OperationLoggerCreated = operationLogger;
     return operationLogger;
 }