本文整理汇总了C#中IPackageRepositoryFactory类的典型用法代码示例。如果您正苦于以下问题:C# IPackageRepositoryFactory类的具体用法?C# IPackageRepositoryFactory怎么用?C# IPackageRepositoryFactory使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPackageRepositoryFactory类属于命名空间,在下文中一共展示了IPackageRepositoryFactory类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetPackageCommand
public GetPackageCommand(IPackageRepositoryFactory repositoryFactory,
IVsPackageSourceProvider packageSourceProvider,
ISolutionManager solutionManager,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepository recentPackagesRepository,
IHttpClientEvents httpClientEvents,
IProductUpdateService productUpdateService)
: base(solutionManager, packageManagerFactory, httpClientEvents)
{
if (repositoryFactory == null)
{
throw new ArgumentNullException("repositoryFactory");
}
if (packageSourceProvider == null)
{
throw new ArgumentNullException("packageSourceProvider");
}
if (recentPackagesRepository == null)
{
throw new ArgumentNullException("recentPackagesRepository");
}
_repositoryFactory = repositoryFactory;
_packageSourceProvider = packageSourceProvider;
_recentPackagesRepository = recentPackagesRepository;
_productUpdateService = productUpdateService;
}
示例2: RecentProvider
public RecentProvider(
Project project,
IPackageRepository localRepository,
ResourceDictionary resources,
IPackageRepositoryFactory packageRepositoryFactory,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepository recentPackagesRepository,
IPackageSourceProvider packageSourceProvider,
ProviderServices providerServices,
IProgressProvider progressProvider,
ISolutionManager solutionManager) :
base(
project,
localRepository,
resources,
packageRepositoryFactory,
null,
packageManagerFactory,
providerServices,
progressProvider,
solutionManager)
{
_recentPackagesRepository = recentPackagesRepository;
_packageManagerFactory = packageManagerFactory;
_packageRepositoryFactory = packageRepositoryFactory;
_packageSourceProvider = packageSourceProvider;
}
示例3: VsPackageManagerFactory
public VsPackageManagerFactory(ISolutionManager solutionManager,
IPackageRepositoryFactory repositoryFactory,
IFileSystemProvider fileSystemProvider,
IRepositorySettings repositorySettings,
IRecentPackageRepository recentPackagesRepository)
{
if (solutionManager == null) {
throw new ArgumentNullException("solutionManager");
}
if (repositoryFactory == null) {
throw new ArgumentNullException("repositoryFactory");
}
if (fileSystemProvider == null) {
throw new ArgumentNullException("fileSystemProvider");
}
if (repositorySettings == null) {
throw new ArgumentNullException("repositorySettings");
}
_fileSystemProvider = fileSystemProvider;
_repositorySettings = repositorySettings;
_solutionManager = solutionManager;
_repositoryFactory = repositoryFactory;
_recentPackageRepository = recentPackagesRepository;
_solutionManager.SolutionClosing += (sender, e) => {
_repositoryInfo = null;
};
}
示例4: InstallPackageCommand
internal InstallPackageCommand(
ISolutionManager solutionManager,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepositoryFactory repositoryFactory,
IVsPackageSourceProvider packageSourceProvider,
IHttpClientEvents httpClientEvents,
IProductUpdateService productUpdateService,
IVsCommonOperations vsCommonOperations,
IDeleteOnRestartManager deleteOnRestartManager,
bool networkAvailable)
: base(solutionManager, packageManagerFactory, httpClientEvents, vsCommonOperations, deleteOnRestartManager)
{
_productUpdateService = productUpdateService;
_repositoryFactory = repositoryFactory;
_packageSourceProvider = packageSourceProvider;
DependencyVersion = DependencyVersion.Lowest;
if (networkAvailable)
{
_isNetworkAvailable = isNetworkAvailable();
}
else
{
_isNetworkAvailable = false;
}
}
示例5: InstallCommand
protected internal InstallCommand(
IPackageRepositoryFactory packageRepositoryFactory,
IPackageSourceProvider sourceProvider,
ISettings configSettings,
IPackageRepository cacheRepository)
{
if (packageRepositoryFactory == null)
{
throw new ArgumentNullException("packageRepositoryFactory");
}
if (sourceProvider == null)
{
throw new ArgumentNullException("sourceProvider");
}
if (configSettings == null)
{
throw new ArgumentNullException("configSettings");
}
RepositoryFactory = packageRepositoryFactory;
SourceProvider = sourceProvider;
_cacheRepository = cacheRepository;
_configSettings = configSettings;
}
示例6: TestGetCommand
public TestGetCommand(IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider, IPackageRepository cacheRepository, Mock<MockFileSystem> fileSystem)
: base(cacheRepository, fileSystem.Object, new MemoryBasedPackageCache(new Mock<IConsole>().Object))
{
RepositoryFactory = packageRepositoryFactory;
SourceProvider = sourceProvider;
mockFileSystem = fileSystem;
}
示例7: GetAggregate
public static IPackageRepository GetAggregate(this IPackageSourceProvider provider, IPackageRepositoryFactory factory, bool ignoreFailingRepositories, IEnumerable<string> feeds)
{
Func<string, IPackageRepository> createRepository = factory.CreateRepository;
if (ignoreFailingRepositories)
{
createRepository = (source) =>
{
try
{
return factory.CreateRepository(source);
}
catch (InvalidOperationException)
{
return null;
}
};
}
var repositories = (from item in feeds
let repository = createRepository(provider.ResolveSource(item))
where repository != null
select repository).ToArray();
return new AggregateRepository(repositories) { IgnoreFailingRepositories = ignoreFailingRepositories };
}
示例8: PackageRestoreManager
internal PackageRestoreManager(
DTE dte,
ISolutionManager solutionManager,
IFileSystemProvider fileSystemProvider,
IPackageRepositoryFactory packageRepositoryFactory,
IVsPackageSourceProvider packageSourceProvider,
IVsPackageManagerFactory packageManagerFactory,
IVsPackageInstallerEvents packageInstallerEvents,
IPackageRepository localCacheRepository,
IVsThreadedWaitDialogFactory waitDialogFactory,
ISettings settings)
{
Debug.Assert(solutionManager != null);
_dte = dte;
_fileSystemProvider = fileSystemProvider;
_solutionManager = solutionManager;
_packageRepositoryFactory = packageRepositoryFactory;
_packageSourceProvider = packageSourceProvider;
_waitDialogFactory = waitDialogFactory;
_packageManagerFactory = packageManagerFactory;
_localCacheRepository = localCacheRepository;
_settings = settings;
_solutionManager.ProjectAdded += OnProjectAdded;
_solutionManager.SolutionOpened += OnSolutionOpenedOrClosed;
_solutionManager.SolutionClosed += OnSolutionOpenedOrClosed;
packageInstallerEvents.PackageReferenceAdded += OnPackageReferenceAdded;
}
示例9: PackageDownloadingService
public PackageDownloadingService(IAgentSettingsManager agentSettingsManager,
IRetrievePackageQuery allPackagesQuery,
ILocalPackageCache agentCache,
IAgentConfigurationManager agentConfigurationManager,
ILogger logger,
IHubCommunicator hubCommunicator,
IInstalledPackageArchive installCache,
IPackageRepositoryFactory packageRepositoryFactory,
IPackagesList allPackagesList,
ICurrentlyDownloadingList currentlyDownloadingList,
CompletedInstallationTaskList installationResults,
IAgentWatchList watchList,
IInstallationManager installationManager,INotificationService notificationService)
{
_settingsManager = agentSettingsManager;
AllPackagesQuery = allPackagesQuery;
AgentCache = agentCache;
_agentConfigurationManager = agentConfigurationManager;
_logger = logger;
_hubCommunicator = hubCommunicator;
_installCache = installCache;
_packageRepository = packageRepositoryFactory.CreateRepository(agentSettingsManager.Settings.NuGetRepository);
_allPackagesList = allPackagesList;
_currentlyDownloadingList = currentlyDownloadingList;
_installationResults = installationResults;
_watchList = watchList;
_installationManager = installationManager;
_notificationService = notificationService;
TimedTask = new TimedSingleExecutionTask(agentSettingsManager.Settings.PackageSyncIntervalMs, FetchPackages,
_logger);
}
示例10: MirrorCommand
public MirrorCommand(IPackageSourceProvider packageSourceProvider, ISettings settings, IPackageRepositoryFactory packageRepositoryFactory)
{
SourceProvider = packageSourceProvider;
Settings = settings;
RepositoryFactory = packageRepositoryFactory;
_cacheRepository = MachineCache.Default;
}
示例11: TwoWayCommand
/// <summary>
/// Initializes a new instance of the <see cref="TwoWayCommand"/> class.
/// </summary>
/// <param name="repositoryFactory">The repository factory.</param>
/// <param name="sourceProvider">The source provider.</param>
protected TwoWayCommand(IPackageRepositoryFactory repositoryFactory, IPackageSourceProvider sourceProvider) {
RepositoryFactory = repositoryFactory;
SourceProvider = sourceProvider;
Sources = new List<string>();
Destinations = new List<string>();
_packageList = new List<string>();
}
示例12: VsPackageInstaller
public VsPackageInstaller(IVsPackageManagerFactory packageManagerFactory,
IScriptExecutor scriptExecutor,
IPackageRepositoryFactory repositoryFactory)
{
_packageManagerFactory = packageManagerFactory;
_scriptExecutor = scriptExecutor;
_repositoryFactory = repositoryFactory;
}
示例13: NuGetFeedVerificationService
public NuGetFeedVerificationService(IPackageRepositoryFactory packageRepositoryFactory, IAuthenticationSilencerService authenticationSilencerService)
{
Argument.IsNotNull(() => packageRepositoryFactory);
Argument.IsNotNull(() => authenticationSilencerService);
_packageRepositoryFactory = packageRepositoryFactory;
_authenticationSilencerService = authenticationSilencerService;
}
示例14: InstallCommand
public InstallCommand(IPackageRepositoryFactory packageRepositoryFactory)
{
if (packageRepositoryFactory == null) {
throw new ArgumentNullException("packageRepositoryFactory");
}
RepositoryFactory = packageRepositoryFactory;
}
示例15: Details
public Details(IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider)
{
Contract.Assert(packageRepositoryFactory != null);
Contract.Assert(sourceProvider != null);
RepositoryFactory = packageRepositoryFactory;
SourceProvider = sourceProvider;
}