本文整理汇总了C#中IPackageSourceProvider类的典型用法代码示例。如果您正苦于以下问题:C# IPackageSourceProvider类的具体用法?C# IPackageSourceProvider怎么用?C# IPackageSourceProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPackageSourceProvider类属于命名空间,在下文中一共展示了IPackageSourceProvider类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
}
开发者ID:kumavis,项目名称:NuGet,代码行数:32,代码来源:VSPackageSourceProvider.cs
示例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>();
}
开发者ID:chappoo,项目名称:nuget.copy.extension,代码行数:12,代码来源:TwoWayCommand.cs
示例3: MirrorCommand
public MirrorCommand(IPackageSourceProvider packageSourceProvider, ISettings settings, IPackageRepositoryFactory packageRepositoryFactory)
{
SourceProvider = packageSourceProvider;
Settings = settings;
RepositoryFactory = packageRepositoryFactory;
_cacheRepository = MachineCache.Default;
}
开发者ID:nickfloyd,项目名称:NuGet,代码行数:7,代码来源:MirrorCommand.cs
示例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;
}
开发者ID:modulexcite,项目名称:NuGet.Extensions,代码行数:7,代码来源:TestGetCommand.cs
示例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;
}
开发者ID:themotleyfool,项目名称:NuGet,代码行数:26,代码来源:InstallCommand.cs
示例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;
}
开发者ID:monoman,项目名称:NugetCracker,代码行数:28,代码来源:RecentProvider.cs
示例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;
}
开发者ID:themotleyfool,项目名称:NuGet,代码行数:27,代码来源:PackageRestoreManager.cs
示例8: CachedPackageSourceProvider
public CachedPackageSourceProvider(IPackageSourceProvider sourceProvider)
{
if (sourceProvider == null)
{
throw new ArgumentNullException("sourceProvider");
}
_packageSources = sourceProvider.LoadPackageSources().ToList();
}
开发者ID:sistoimenov,项目名称:NuGet2,代码行数:8,代码来源:CachedPackageSourceProvider.cs
示例9: SourcesCommand
public SourcesCommand(IPackageSourceProvider sourceProvider)
{
if (sourceProvider == null)
{
throw new ArgumentNullException("sourceProvider");
}
_sourceProvider = sourceProvider;
}
开发者ID:nickfloyd,项目名称:NuGet,代码行数:8,代码来源:SourcesCommand.cs
示例10: ToolsOptionsControl
public ToolsOptionsControl(IPackageSourceProvider packageSourceProvider, IServiceProvider serviceProvider)
{
InitializeComponent();
_serviceProvider = serviceProvider;
_packageSourceProvider = packageSourceProvider;
SetupEventHandlers();
}
开发者ID:jacksonh,项目名称:nuget,代码行数:8,代码来源:ToolsOptionsControl.cs
示例11: Details
public Details(IPackageRepositoryFactory packageRepositoryFactory, IPackageSourceProvider sourceProvider)
{
Contract.Assert(packageRepositoryFactory != null);
Contract.Assert(sourceProvider != null);
RepositoryFactory = packageRepositoryFactory;
SourceProvider = sourceProvider;
}
开发者ID:dipeshc,项目名称:NuGet.Extensions,代码行数:8,代码来源:Details.cs
示例12: FindPackageCommand
public FindPackageCommand(IPackageRepositoryFactory repositoryFactory,
IPackageSourceProvider packageSourceProvider,
ISolutionManager solutionManager,
IVsPackageManagerFactory packageManagerFactory,
IPackageRepository recentPackagesRepository,
IHttpClientEvents httpClientEvents)
: base(repositoryFactory, packageSourceProvider, solutionManager, packageManagerFactory, recentPackagesRepository, httpClientEvents, null)
{
}
开发者ID:grendello,项目名称:nuget,代码行数:9,代码来源:FindPackageCommand.cs
示例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);
}
开发者ID:xero-github,项目名称:Nuget,代码行数:56,代码来源:PackageManagerWindow.xaml.cs
示例14: RegisteredPackageSourceSettings
public RegisteredPackageSourceSettings(
ISettings settings,
IPackageSourceProvider packageSourceProvider,
PackageSource defaultPackageSource)
{
this.settings = settings;
this.packageSourceProvider = packageSourceProvider;
this.defaultPackageSource = defaultPackageSource;
ReadActivePackageSource();
}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:10,代码来源:RegisteredPackageSourceSettings.cs
示例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(); };
}
开发者ID:eerhardt,项目名称:NuGet3,代码行数:15,代码来源:SourceRepositoryProvider.cs
示例16: PowerShellHost
protected PowerShellHost(string name, IRunspaceManager runspaceManager)
{
_runspaceManager = runspaceManager;
// TODO: Take these as ctor arguments
_packageSourceProvider = ServiceLocator.GetInstance<IPackageSourceProvider>();
_solutionManager = ServiceLocator.GetInstance<ISolutionManager>();
_packageManagerFactory = ServiceLocator.GetInstance<IVsPackageManagerFactory>();
_name = name;
IsCommandEnabled = true;
}
开发者ID:grendello,项目名称:nuget,代码行数:12,代码来源:PowerShellHost.cs
示例17: UpdatesProvider
public UpdatesProvider(
Project project,
IProjectManager projectManager,
ResourceDictionary resources,
IPackageRepositoryFactory packageRepositoryFactory,
IPackageSourceProvider packageSourceProvider,
IVsPackageManagerFactory packageManagerFactory,
ProviderServices providerServices,
IProgressProvider progressProvider)
: base(project, projectManager, resources, packageRepositoryFactory, packageSourceProvider, packageManagerFactory, providerServices, progressProvider)
{
}
开发者ID:grendello,项目名称:nuget,代码行数:12,代码来源:UpdatesProvider.cs
示例18: VsPackageSourceRepository
public VsPackageSourceRepository(IPackageRepositoryFactory repositoryFactory,
IPackageSourceProvider packageSourceProvider)
{
if (repositoryFactory == null) {
throw new ArgumentNullException("repositoryFactory");
}
if (packageSourceProvider == null) {
throw new ArgumentNullException("packageSourceProvider");
}
_repositoryFactory = repositoryFactory;
_packageSourceProvider = packageSourceProvider;
}
开发者ID:larsw,项目名称:nuget,代码行数:13,代码来源:VSPackageSourceRepository.cs
示例19: GetEffectivePackageSources
public static List<PackageSource> GetEffectivePackageSources(IPackageSourceProvider sourceProvider,
IEnumerable<string> sources, IEnumerable<string> fallbackSources)
{
var allSources = sourceProvider.LoadPackageSources();
var enabledSources = sources.Any() ?
Enumerable.Empty<PackageSource>() :
allSources.Where(s => s.IsEnabled);
var addedSources = sources.Concat(fallbackSources).Select(
value => allSources.FirstOrDefault(source => CorrectName(value, source)) ?? new PackageSource(value));
return enabledSources.Concat(addedSources).Distinct().ToList();
}
开发者ID:elanwu123,项目名称:dnx,代码行数:13,代码来源:PackageSourceUtils.cs
示例20: NuGetConfigurationService
public NuGetConfigurationService(IConfigurationService configurationService, IPackageSourceProvider packageSourceProvider,
INuGetFeedVerificationService feedVerificationService)
{
Argument.IsNotNull(() => configurationService);
Argument.IsNotNull(() => packageSourceProvider);
Argument.IsNotNull(() => feedVerificationService);
_configurationService = configurationService;
_packageSourceProvider = packageSourceProvider;
_feedVerificationService = feedVerificationService;
var applicationDataDirectory = Path.GetApplicationDataDirectory();
_defaultDestinationFolder = Path.Combine(applicationDataDirectory, "plugins");
}
开发者ID:strogo,项目名称:Orc.NuGetExplorer,代码行数:14,代码来源:NuGetConfigurationService.cs
注:本文中的IPackageSourceProvider类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论