本文整理汇总了C#中IPackageSourceProvider类的典型用法代码示例。如果您正苦于以下问题:C# IPackageSourceProvider类的具体用法?C# IPackageSourceProvider怎么用?C# IPackageSourceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPackageSourceProvider类属于命名空间,在下文中一共展示了IPackageSourceProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VsPackageSourceProvider
private VsPackageSourceProvider(
ISettings settings,
IPackageSourceProvider packageSourceProvider,
IVsShellInfo vsShellInfo,
ISolutionManager solutionManager)
{
if (settings == null)
{
throw new ArgumentNullException("settings");
}
if (packageSourceProvider == null)
{
throw new ArgumentNullException("packageSourceProvider");
}
if (vsShellInfo == null)
{
throw new ArgumentNullException("vsShellInfo");
}
_packageSourceProvider = packageSourceProvider;
_solutionManager = solutionManager;
_settings = settings;
_vsShellInfo = vsShellInfo;
if (null != _solutionManager)
{
_solutionManager.SolutionClosed += OnSolutionOpenedOrClosed;
_solutionManager.SolutionOpened += OnSolutionOpenedOrClosed;
}
}
示例2: 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>();
}
示例3: MirrorCommand
public MirrorCommand(IPackageSourceProvider packageSourceProvider, ISettings settings, IPackageRepositoryFactory packageRepositoryFactory)
{
SourceProvider = packageSourceProvider;
Settings = settings;
RepositoryFactory = packageRepositoryFactory;
_cacheRepository = MachineCache.Default;
}
示例4: 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;
}
示例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: 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;
}
示例7: PackageRestoreManager
internal PackageRestoreManager(
DTE dte,
ISolutionManager solutionManager,
IFileSystemProvider fileSystemProvider,
IPackageRepositoryFactory packageRepositoryFactory,
IPackageSourceProvider 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;
}
示例8: CachedPackageSourceProvider
public CachedPackageSourceProvider(IPackageSourceProvider sourceProvider)
{
if (sourceProvider == null)
{
throw new ArgumentNullException("sourceProvider");
}
_packageSources = sourceProvider.LoadPackageSources().ToList();
}
示例9: SourcesCommand
public SourcesCommand(IPackageSourceProvider sourceProvider)
{
if (sourceProvider == null)
{
throw new ArgumentNullException("sourceProvider");
}
_sourceProvider = sourceProvider;
}
示例10: ToolsOptionsControl
public ToolsOptionsControl(IPackageSourceProvider packageSourceProvider, IServiceProvider serviceProvider)
{
InitializeComponent();
_serviceProvider = serviceProvider;
_packageSourceProvider = packageSourceProvider;
SetupEventHandlers();
}
示例11: Details
public Details(IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider)
{
Contract.Assert(packageRepositoryFactory != null);
Contract.Assert(sourceProvider != null);
RepositoryFactory = packageRepositoryFactory;
SourceProvider = sourceProvider;
}
示例12: FindPackageCommand
public FindPackageCommand(IPackageRepositoryFactory repositoryFactory,
IPackageSourceProvider packageSourceProvider,
ISolutionManager solutionManager,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepository recentPackagesRepository,
IHttpClientEvents httpClientEvents)
: base(repositoryFactory, packageSourceProvider, solutionManager, packageManagerFactory, recentPackagesRepository, httpClientEvents, null)
{
}
示例13: PackageManagerWindow
private PackageManagerWindow(Project project,
DTE dte,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepositoryFactory repositoryFactory,
IPackageSourceProvider packageSourceProvider,
IRecentPackageRepository recentPackagesRepository,
IHttpClientEvents httpClientEvents,
IProductUpdateService productUpdateService,
IPackageRestoreManager packageRestoreManager,
ISolutionManager solutionManager,
IOptionsPageActivator optionPageActivator)
: base(F1Keyword)
{
InitializeComponent();
#if !VS10
// set unique search guid for VS11
explorer.SearchCategory = new Guid("{85566D5F-E585-411F-B299-5BF006E9F11E}");
#endif
_httpClientEvents = httpClientEvents;
if (_httpClientEvents != null)
{
_httpClientEvents.SendingRequest += OnSendingRequest;
}
_productUpdateService = productUpdateService;
_optionsPageActivator = optionPageActivator;
_activeProject = project;
// replace the ConsoleOutputProvider with SmartOutputConsoleProvider so that we can clear
// the console the first time an entry is written to it
var providerServices = new ProviderServices();
_smartOutputConsoleProvider = new SmartOutputConsoleProvider(providerServices.OutputConsoleProvider);
providerServices.OutputConsoleProvider = _smartOutputConsoleProvider;
_providerSettings = providerServices.ProviderSettings;
AddUpdateBar(productUpdateService);
AddRestoreBar(packageRestoreManager);
InsertDisclaimerElement();
AdjustSortComboBoxWidth();
PreparePrereleaseComboBox();
SetupProviders(
project,
dte,
packageManagerFactory,
repositoryFactory,
packageSourceProvider,
providerServices,
recentPackagesRepository,
httpClientEvents,
solutionManager,
packageRestoreManager);
}
示例14: RegisteredPackageSourceSettings
public RegisteredPackageSourceSettings(
ISettings settings,
IPackageSourceProvider packageSourceProvider,
PackageSource defaultPackageSource)
{
this.settings = settings;
this.packageSourceProvider = packageSourceProvider;
this.defaultPackageSource = defaultPackageSource;
ReadActivePackageSource();
}
示例15: SourceRepositoryProvider
/// <summary>
/// Non-MEF constructor
/// </summary>
public SourceRepositoryProvider(IPackageSourceProvider packageSourceProvider, IEnumerable<Lazy<INuGetResourceProvider>> resourceProviders)
{
_packageSourceProvider = packageSourceProvider;
_resourceProviders = resourceProviders;
_repositories = new List<SourceRepository>();
// Refresh the package sources
Init();
// Hook up event to refresh package sources when the package sources changed
packageSourceProvider.PackageSourcesChanged += (sender, e) => { Init(); };
}