Esempio n. 1
0
 private static NuGetFramework GetPortableFramework(int profileNumber)
 {
     return(new NuGetFramework(
                FrameworkConstants.FrameworkIdentifiers.Portable,
                FrameworkConstants.EmptyVersion,
                FrameworkNameHelpers.GetPortableProfileNumberString(profileNumber)));
 }
Esempio n. 2
0
        public static NuGetFramework GetTargetFramework(string frameworkString)
        {
            bool flag = false;
            var  targetFrameworkMonikerPrefix = _targetFrameworkMonikerPrefixes.FirstOrDefault(t => frameworkString.StartsWith(t.Key, StringComparison.OrdinalIgnoreCase) && (flag = true));

            if (flag == false)
            {
                return(new NuGetFramework(frameworkString));
            }

            var versionText = frameworkString.Substring(targetFrameworkMonikerPrefix.Key.Length);

            return(new NuGetFramework(targetFrameworkMonikerPrefix.Value, FrameworkNameHelpers.GetVersion(versionText)));
        }