Example #1
0
        // Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION}
        // Sample input: dnx-coreclr-win-x86.1.0.0.0
        // Sample output: 1.0.0.0
        private static string GetRuntimeVersion(PublishRuntime runtime)
        {
            if (runtime == null)
            {
                return(string.Empty);
            }

            var segments = runtime.Name.Split(new[] { '.' }, 2);

            return(segments[1]);
        }
Example #2
0
        // Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION}
        // Sample input: dnx-coreclr-win-x86.1.0.0.0
        // Sample output: coreclr
        private static string GetRuntimeFlavor(PublishRuntime runtime)
        {
            if (runtime == null)
            {
                return(string.Empty);
            }

            var segments = runtime.Name.Split(new[] { '.' }, 2);

            segments = segments[0].Split(new[] { '-' }, 4);
            return(segments[1]);
        }
Example #3
0
        // Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION}
        // Sample input: dnx-coreclr-win-x86.1.0.0.0
        // Sample output: 1.0.0.0
        private static string GetRuntimeVersion(PublishRuntime runtime)
        {
            if (runtime == null)
            {
                return string.Empty;
            }

            var segments = runtime.Name.Split(new[] { '.' }, 2);
            return segments[1];
        }
Example #4
0
        // Expected runtime name format: dnx-{FLAVOR}-{OS}-{ARCHITECTURE}.{VERSION}
        // Sample input: dnx-coreclr-win-x86.1.0.0.0
        // Sample output: coreclr
        private static string GetRuntimeFlavor(PublishRuntime runtime)
        {
            if (runtime == null)
            {
                return string.Empty;
            }

            var segments = runtime.Name.Split(new[] { '.' }, 2);
            segments = segments[0].Split(new[] { '-' }, 4);
            return segments[1];
        }
Example #5
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return runtime.SelectBestFramework(
         GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName));
 }
Example #6
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return(runtime.SelectBestFramework(
                GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName)));
 }