示例#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]);
        }
示例#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]);
        }
示例#3
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return(runtime.SelectBestFramework(
                GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName)));
 }
示例#4
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return runtime.SelectBestFramework(
         GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName));
 }
示例#5
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];
        }
示例#6
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];
        }