本文整理汇总了C#中Dependency.GetFullName方法的典型用法代码示例。如果您正苦于以下问题:C# Dependency.GetFullName方法的具体用法?C# Dependency.GetFullName怎么用?C# Dependency.GetFullName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dependency
的用法示例。
在下文中一共展示了Dependency.GetFullName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ResolveDependencies
async Task ResolveDependencies(List<string> list, List<string> list2, List<Package> packages,
Dependency depInfo, bool useFullName = false, bool noCheckout = false) {
var pn = depInfo.GetFullName();
if (!noCheckout && list.Contains(depInfo.Name)) {
Repository.Log("Conflicting package, not resolving {0}", pn);
return;
}
var dp = ResolvePackageName(pn);
if (dp == null)
throw new NoSourceFoundException(String.Format("No source found with {0}", pn));
var name = dp.GetFullName();
if (list2.Contains(name)) {
Repository.Log("Duplicate package, skipping {0}", name);
return;
}
list2.Add(name);
await GetAndAddPackage(dp).ConfigureAwait(false);
var package = Package.Factory.Open(Repo,
WorkDir.GetChildDirectoryWithName(useFullName ? name : depInfo.Name), name);
list.Add(depInfo.Name);
packages.Add(package);
foreach (var dep in package.MetaData.GetDependencies())
await ResolveDependencies(list, list2, packages, dep, useFullName, noCheckout);
OrderPackageLast(list, packages, package);
}
示例2: GetBundle
public SpecificVersion GetBundle(Dependency bundle) {
lock (Bundles) {
if (!Bundles.ContainsKey(bundle.Name))
return null;
var bundles = Bundles[bundle.Name];
if (!bundles.Any())
return null;
if (bundle.Version == null && bundle.Branch == null)
return new SpecificVersion(bundle.Name, Dependency.FindLatestPreferNonBranched(bundles));
if (bundles.Contains(bundle.VersionData))
return new SpecificVersion(bundle.GetFullName());
var m = _dependencyVersionMatcher.MatchesConstraints(bundles, bundle.Version, bundle.Branch);
return m == null ? null : new SpecificVersion(bundle.Name, m);
}
}
示例3: GetPackageMetadataPath
IAbsoluteFilePath GetPackageMetadataPath(Dependency x) {
return Repo.PackagesPath.GetChildFileWithName(x.GetFullName() + Repository.PackageFormat);
}
示例4: GetPackage
public SpecificVersion GetPackage(Dependency package) {
lock (Packages) {
if (!Packages.ContainsKey(package.Name))
return null;
var packages = Packages[package.Name];
if (package.Version == null && package.Branch == null)
return GetLatest(package, packages);
if (packages.Contains(package.VersionData))
return new SpecificVersion(package.GetFullName());
var m = _dependencyVersionMatcher.MatchesConstraints(packages, package.Version, package.Branch);
return m == null ? null : new SpecificVersion(package.Name, m);
}
}
示例5: AddDependencies
async Task AddDependencies(Bundle bundle, Dictionary<string, string> packages, List<string> deps,
BundleScope scope, bool includeOptional, bool remote) {
foreach (var dep in bundle.Dependencies) {
var d = new Dependency(dep.Key, dep.Value);
if (deps.Contains(dep.Key)) {
Repository.Log("Conflicting bundle dependency {0}, skipping", dep.Key);
continue;
}
deps.Add(dep.Key);
var depCol = await GetCol(d.GetFullName(), remote).ConfigureAwait(false);
await ResolveDependencies(depCol, packages, deps, scope, includeOptional).ConfigureAwait(false);
}
}