-
Notifications
You must be signed in to change notification settings - Fork 696
/
IVsPackageSourceProvider.cs
36 lines (33 loc) · 1.65 KB
/
IVsPackageSourceProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
namespace NuGet.VisualStudio
{
/// <summary>
/// A public API for retrieving the list of NuGet package sources.
/// </summary>
[ComImport]
[Guid("E98A1293-4F14-4CC9-8573-4E3565720AF3")]
public interface IVsPackageSourceProvider
{
/// <summary>
/// Provides the list of package sources.
/// </summary>
/// <param name="includeUnOfficial">Unofficial sources will be included in the results</param>
/// <param name="includeDisabled">Disabled sources will be included in the results</param>
/// <remarks>Does not require the UI thread.</remarks>
/// <exception cref="ArgumentException">Thrown if a NuGet configuration file is invalid.</exception>
/// <exception cref="ArgumentNullException">Thrown if a NuGet configuration file is invalid.</exception>
/// <exception cref="InvalidOperationException">Thrown if a NuGet configuration file is invalid.</exception>
/// <exception cref="InvalidDataException">Thrown if a NuGet configuration file is invalid.</exception>
/// <returns>Key: source name Value: source URI</returns>
IEnumerable<KeyValuePair<string, string>> GetSources(bool includeUnOfficial, bool includeDisabled);
/// <summary>
/// Raised when sources are added, removed, disabled, or modified.
/// </summary>
event EventHandler SourcesChanged;
}
}