本文整理汇总了C#中ISolutionManager类的典型用法代码示例。如果您正苦于以下问题:C# ISolutionManager类的具体用法?C# ISolutionManager怎么用?C# ISolutionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISolutionManager类属于命名空间,在下文中一共展示了ISolutionManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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;
};
}
示例2: DefaultHost
public DefaultHost(ISolutionManager solutionManager)
{
_solutionManager = solutionManager;
_commands.Add("npm", HandleNpmCommand);
_commands.Add("clear", HandleClearCommand);
}
示例3: VsSettings
public VsSettings(ISolutionManager solutionManager, ISettings defaultSettings, IFileSystemProvider fileSystemProvider)
{
if (solutionManager == null)
{
throw new ArgumentNullException("solutionManager");
}
if (defaultSettings == null)
{
throw new ArgumentNullException("defaultSettings");
}
if (fileSystemProvider == null)
{
throw new ArgumentNullException("fileSystemProvider");
}
_solutionManager = solutionManager;
_defaultSettings = defaultSettings;
_fileSystemProvider = fileSystemProvider;
EventHandler eventHandler = (src, eventArgs) =>
{
_solutionSettings = null;
};
_solutionManager.SolutionOpened += eventHandler;
_solutionManager.SolutionClosed += eventHandler;
}
示例4: 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;
}
示例5: 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;
}
示例6: VsSourceControlTracker
public VsSourceControlTracker(
ISolutionManager solutionManager,
IFileSystemProvider fileSystemProvider,
IVsTrackProjectDocuments2 projectTracker,
ISettings solutionSettings)
{
if (projectTracker == null)
{
throw new ArgumentNullException("projectTracker");
}
_solutionManager = solutionManager;
_projectTracker = projectTracker;
_fileSystemProvider = fileSystemProvider;
_solutionSettings = solutionSettings;
_projectDocumentListener = new TrackProjectDocumentEventListener(this);
_solutionManager.SolutionOpened += OnSolutionOpened;
_solutionManager.SolutionClosed += OnSolutionClosed;
if (_solutionManager.IsSolutionOpen)
{
StartTracking();
}
}
示例7: 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;
}
}
示例8: RepositorySettings
internal RepositorySettings(
ISolutionManager solutionManager,
IFileSystemProvider fileSystemProvider,
IVsSourceControlTracker sourceControlTracker) :
this(solutionManager, fileSystemProvider, sourceControlTracker, machineWideSettings: null)
{
}
示例9: GetDefaultScaffolderCmdlet
internal GetDefaultScaffolderCmdlet(ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory, IScaffoldingConfigStore configStore)
: base(solutionManager, packageManagerFactory, null)
{
_configStore = new Lazy<IScaffoldingConfigStore>(() => {
return configStore ?? new XmlScaffoldingConfigStore(SolutionManager);
});
}
示例10: VsSolution
public VsSolution(DteSolution dteSolution, ISolutionManager solutionManager, IVsPackageManager packageManager)
{
_name = String.Format(
CultureInfo.CurrentCulture,
Strings.Label_Solution,
dteSolution.GetName());
_solution = solutionManager;
_packageManager = packageManager;
var repo = (SharedPackageRepository)packageManager.LocalRepository;
_installedSolutionLevelPackages = new CoreInteropInstalledPackagesList(
new PackageReferenceRepository(repo.PackageReferenceFile.FullPath, repo));
DteSolution = dteSolution;
// Add V2-related interop features
AddFeature(() => packageManager.LocalRepository);
AddFeature<IPackageManager>(() => packageManager);
AddFeature<IPackageCacheRepository>(() => MachineCache.Default);
// the source repository of the local repo of the solution
AddFeature<SourceRepository>(() =>
{
var localRepo = new NuGet.Client.Interop.V2SourceRepository(
null,
packageManager.LocalRepository,
"");
return localRepo;
});
// Add PowerShell feature
AddFeature<PowerShellScriptExecutor>(() =>
new VsPowerShellScriptExecutor(ServiceLocator.GetInstance<IScriptExecutor>()));
}
示例11: 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;
}
}
示例12: 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;
}
示例13: PackagesProviderBase
protected PackagesProviderBase(
IPackageRepository localRepository,
ResourceDictionary resources,
ProviderServices providerServices,
IProgressProvider progressProvider,
ISolutionManager solutionManager)
{
if (resources == null)
{
throw new ArgumentNullException("resources");
}
if (providerServices == null)
{
throw new ArgumentNullException("providerServices");
}
if (solutionManager == null)
{
throw new ArgumentNullException("solutionManager");
}
_localRepository = localRepository;
_providerServices = providerServices;
_progressProvider = progressProvider;
_solutionManager = solutionManager;
_resources = resources;
_outputConsole = new Lazy<IConsole>(() => providerServices.OutputConsoleProvider.CreateOutputConsole(requirePowerShellHost: false));
}
示例14: VsSettings
public VsSettings(ISolutionManager solutionManager)
: this(solutionManager,
Settings.LoadDefaultSettings(GetSolutionSettingsFileSystem(solutionManager)),
new PhysicalFileSystemProvider())
{
// Review: Do we need to pass in the VsFileSystemProvider here instead of hardcoding PhysicalFileSystems?
}
示例15: PackageRestoreManager
public PackageRestoreManager(ISourceRepositoryProvider sourceRepositoryProvider, ISettings settings, ISolutionManager solutionManager)
{
if(sourceRepositoryProvider == null)
{
throw new ArgumentNullException("sourceRepositoryProvider");
}
if (settings == null)
{
throw new ArgumentNullException("settings");
}
if(solutionManager == null)
{
throw new ArgumentNullException("solutionManager");
}
SourceRepositoryProvider = sourceRepositoryProvider;
Settings = settings;
SolutionManager = solutionManager;
SolutionManager.NuGetProjectAdded += OnNuGetProjectAdded;
SolutionManager.SolutionOpened += OnSolutionOpenedOrClosed;
SolutionManager.SolutionClosed += OnSolutionOpenedOrClosed;
}