Ejemplo n.º 1
0
        protected PackageDescriptor given_spec(string id, string version, string authors, string description, string title = null, string owners = null, string projectUrl = null, string licenseUrl = null, string requireLicenseAcceptance = null, string tags = null)
        {
            var spec = String.Format(template, id, version, authors, description, title, owners, projectUrl, licenseUrl, requireLicenseAcceptance, tags);
            var doc  = new XmlDocument();

            doc.LoadXml(spec);
            return(Descriptor = NuConverter.ConvertSpecificationToDescriptor(doc));
        }
Ejemplo n.º 2
0
        static IEnumerable <string> ParseNugetDependencies(string oDataValue)
        {
            if (oDataValue == null || ((oDataValue = oDataValue.Trim()) == string.Empty))
            {
                return(Enumerable.Empty <string>());
            }

            return(from dependency in oDataValue.Split('|')
                   let splits = dependency.Split(':')
                                where splits.Length >= 1
                                let dep = new PackageDependencyBuilder(splits[0]).SetVersionVertices(NuConverter.ConvertNuGetVersionRange(splits.Length > 1 ? splits[1] : ""))
                                          select dep.ToString());
        }
Ejemplo n.º 3
0
 string version(string s)
 {
     return(NuConverter.ConvertNuGetVersionRange(s).Select(x => x.ToString()).JoinString(" and "));
 }