Beispiel #1
0
        public static string GetParameterName(this TargetFramework framework)
        {
            var parameter = framework.Id.Version;

            //special case for 1.x
            if (framework.IsVersion1x())
            {
                parameter = "1x";
            }

            parameter = parameter.Replace(".", string.Empty);

            if (framework.IsNetCoreApp())
            {
                return($"UseNetCore{parameter}");
            }

            if (framework.IsNetStandard())
            {
                return($"UseNetStandard{parameter}");
            }

            return(string.Empty);
        }
Beispiel #2
0
 public static bool IsNetCoreApp1x(this TargetFramework framework)
 {
     return(framework.IsNetCoreApp() &&
            framework.IsVersion1x());
 }
Beispiel #3
0
 public static bool IsNetStandard1x(this TargetFramework framework)
 {
     return(framework.IsNetStandard() &&
            framework.IsVersion1x());
 }
Beispiel #4
0
 public static bool IsNetCoreApp1x(this TargetFramework framework) => framework.IsNetCoreApp() && framework.IsVersion1x();