Exemplo n.º 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]);
        }
Exemplo n.º 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]);
        }
Exemplo n.º 3
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return(runtime.SelectBestFramework(
                GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName)));
 }
Exemplo n.º 4
0
 public FrameworkName SelectFrameworkForRuntime(PublishRuntime runtime)
 {
     return runtime.SelectBestFramework(
         GetCurrentProject().GetTargetFrameworks().Select(f => f.FrameworkName));
 }
Exemplo n.º 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];
        }
Exemplo n.º 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];
        }