本文整理汇总了C#中IPackagePathResolver类的典型用法代码示例。如果您正苦于以下问题:C# IPackagePathResolver类的具体用法?C# IPackagePathResolver怎么用?C# IPackagePathResolver使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IPackagePathResolver类属于命名空间,在下文中一共展示了IPackagePathResolver类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateSharedRepository
public ISharedPackageRepository CreateSharedRepository(
IPackagePathResolver pathResolver,
IFileSystem fileSystem,
IFileSystem configSettingsFileSystem)
{
return new SharedPackageRepository(pathResolver, fileSystem, configSettingsFileSystem);
}
示例2: CreateSharedRepository
public ISharedPackageRepository CreateSharedRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
{
PathResolverPassedToCreateSharedRepository = pathResolver;
FileSystemPassedToCreateSharedRepository = fileSystem;
ConfigSettingsFileSystemPassedToCreateSharedRepository = configSettingsFileSystem;
return FakeSharedRepository;
}
示例3: PackageManager
public PackageManager(
IPackageRepository sourceRepository,
IPackagePathResolver pathResolver,
IFileSystem fileSystem,
ISharedPackageRepository localRepository)
{
if (sourceRepository == null)
{
throw new ArgumentNullException("sourceRepository");
}
if (pathResolver == null)
{
throw new ArgumentNullException("pathResolver");
}
if (fileSystem == null)
{
throw new ArgumentNullException("fileSystem");
}
if (localRepository == null)
{
throw new ArgumentNullException("localRepository");
}
SourceRepository = sourceRepository;
DependencyResolver = new DependencyResolverFromRepo(sourceRepository);
PathResolver = pathResolver;
FileSystem = fileSystem;
LocalRepository = localRepository;
DependencyVersion = DependencyVersion.Lowest;
CheckDowngrade = true;
}
示例4: SharpDevelopProjectManager
public SharpDevelopProjectManager(IPackageRepository sourceRepository,
IPackagePathResolver pathResolver,
IProjectSystem project,
IPackageRepository localRepository)
: base(sourceRepository, pathResolver, project, localRepository)
{
}
示例5: GetLocalRepository
public static IPackageRepository GetLocalRepository(IPackagePathResolver pathResolver, IFileSystem nugetPackagesFileSystem)
{
IPackageRepository localRepository = new ChocolateyLocalPackageRepository(pathResolver, nugetPackagesFileSystem);
localRepository.PackageSaveMode = PackageSaveModes.Nupkg;
return localRepository;
}
示例6: Ps1ScaffolderLocator
public Ps1ScaffolderLocator(IPowershellCommandInvoker commandInvoker, IPackageManager packageManager, IPackagePathResolver pathResolver, FileSystem.IFileSystem fileSystem, IScaffoldingConfigStore configStore)
{
_commandInvoker = commandInvoker;
_packageManager = packageManager;
_pathResolver = pathResolver ?? packageManager.PathResolver;
_fileSystem = fileSystem;
_configStore = configStore;
}
示例7: VsProjectManager
public VsProjectManager(
VsPackageManager packageManager,
IPackagePathResolver pathResolver,
IProjectSystem project,
IPackageRepository localRepository)
: base(packageManager, pathResolver, project, localRepository)
{
_packageManager = packageManager;
}
示例8: SharedPackageRepository
public SharedPackageRepository(IPackagePathResolver resolver, IFileSystem fileSystem, IFileSystem configSettingsFileSystem)
: base(resolver, fileSystem)
{
if (configSettingsFileSystem == null)
{
throw new ArgumentNullException("configSettingsFileSystem");
}
_packageReferenceFile = new PackageReferenceFile(configSettingsFileSystem, Constants.PackageReferenceFile);
}
示例9: SharpDevelopPackageManager
public SharpDevelopPackageManager(
IPackageRepository sourceRepository,
IProjectSystem projectSystem,
IFileSystem fileSystem,
ISharedPackageRepository localRepository,
IPackagePathResolver pathResolver)
: base(
sourceRepository,
pathResolver,
fileSystem,
localRepository)
{
this.projectSystem = projectSystem;
CreateProjectManager();
}
示例10: ServerPackageRepository
public ServerPackageRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem)
{
if (pathResolver == null)
{
throw new ArgumentNullException("pathResolver");
}
if (fileSystem == null)
{
throw new ArgumentNullException("fileSystem");
}
_fileSystem = fileSystem;
_pathResolver = pathResolver;
}
示例11: LocalPackageRepository
public LocalPackageRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, bool enableCaching)
{
if (pathResolver == null)
{
throw new ArgumentNullException("pathResolver");
}
if (fileSystem == null)
{
throw new ArgumentNullException("fileSystem");
}
FileSystem = fileSystem;
PathResolver = pathResolver;
_enableCaching = enableCaching;
}
示例12: ServerPackageRepository
public ServerPackageRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, Func<string, bool, bool> getSetting = null)
{
if (pathResolver == null)
{
throw new ArgumentNullException("pathResolver");
}
if (fileSystem == null)
{
throw new ArgumentNullException("fileSystem");
}
_fileSystem = fileSystem;
_pathResolver = pathResolver;
_getSetting = getSetting ?? GetBooleanAppSetting;
}
示例13: CreateLockFileLibrary
public static LockFileLibrary CreateLockFileLibrary(LockFileLibrary previousLibrary, IPackagePathResolver resolver, IPackage package, string correctedPackageName = null)
{
var lockFileLib = new LockFileLibrary();
// package.Id is read from nuspec and it might be in wrong casing.
// correctedPackageName should be the package name used by dependency graph and
// it has the correct casing that runtime needs during dependency resolution.
lockFileLib.Name = correctedPackageName ?? package.Id;
lockFileLib.Version = package.Version;
lockFileLib.Sha512 = File.ReadAllText(resolver.GetHashPath(package.Id, package.Version));
// If the shas are equal then do nothing
if (previousLibrary?.Sha512 == lockFileLib.Sha512)
{
lockFileLib.Files = previousLibrary.Files;
lockFileLib.IsServiceable = previousLibrary.IsServiceable;
}
else
{
lockFileLib.Files = package.GetFiles().Select(p => p.Path).ToList();
var installPath = resolver.GetInstallPath(package.Id, package.Version);
foreach (var filePath in lockFileLib.Files)
{
if (!string.Equals(Path.GetExtension(filePath), ".dll", StringComparison.OrdinalIgnoreCase))
{
continue;
}
var assemblyPath = Path.Combine(installPath, filePath);
try
{
if (IsAssemblyServiceable(assemblyPath))
{
lockFileLib.IsServiceable = true;
break;
}
}
catch
{
// Just move on to the next file
}
}
}
return lockFileLib;
}
示例14: LocalPackageRepository
public LocalPackageRepository(IPackagePathResolver pathResolver, IFileSystem fileSystem, IReport report, bool enableCaching)
{
if (pathResolver == null)
{
throw new ArgumentNullException(nameof(pathResolver));
}
if (fileSystem == null)
{
throw new ArgumentNullException(nameof(fileSystem));
}
FileSystem = fileSystem;
PathResolver = pathResolver;
_enableCaching = enableCaching;
_report = report;
}
示例15: PackageManager
public PackageManager(IPackageRepository sourceRepository, IPackagePathResolver pathResolver, IFileSystem fileSystem, IPackageRepository localRepository)
{
if (sourceRepository == null) {
throw new ArgumentNullException("sourceRepository");
}
if (pathResolver == null) {
throw new ArgumentNullException("pathResolver");
}
if (fileSystem == null) {
throw new ArgumentNullException("fileSystem");
}
if (localRepository == null) {
throw new ArgumentNullException("localRepository");
}
SourceRepository = sourceRepository;
PathResolver = pathResolver;
FileSystem = fileSystem;
LocalRepository = localRepository;
}