From 00628ab31b79a78e1c22c298ca0086bdf28065a7 Mon Sep 17 00:00:00 2001 From: askazakov Date: Thu, 30 Dec 2021 16:29:14 +0500 Subject: [PATCH] use coalesce instead of join --- .../.template.config/template.json | 23 ++++--------------- .../.template.config/template.json | 23 ++++--------------- .../.template.config/template.json | 23 ++++--------------- 3 files changed, 15 insertions(+), 54 deletions(-) diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json index 48017c6262..31a3118bad 100644 --- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json +++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json @@ -90,35 +90,22 @@ "datatype": "string", "cases": [ { - "condition": "(framework == '' && consoleApp == true)", + "condition": "(consoleApp == true)", "value": "net6.0" }, { - "condition": "(framework == '' && consoleApp == false)", + "condition": "(consoleApp == false)", "value": "netstandard2.0" - }, - { - "condition": "(framework != '')", - "value": "" } ] } }, "frameworkValue": { "type": "generated", - "generator": "join", - "description": "join framework and frameworkDefault", + "generator": "coalesce", "parameters": { - "symbols": [ - { - "type": "ref", - "value": "framework" - }, - { - "type": "ref", - "value": "frameworkDefault" - } - ] + "sourceVariableName": "framework", + "fallbackVariableName": "frameworkDefault" }, "replaces": "$(Framework)" }, diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json index e195a7edce..707c7abdaa 100644 --- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json +++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json @@ -90,35 +90,22 @@ "datatype": "string", "cases": [ { - "condition": "(framework == '' && consoleApp == true)", + "condition": "(consoleApp == true)", "value": "net6.0" }, { - "condition": "(framework == '' && consoleApp == false)", + "condition": "(consoleApp == false)", "value": "netstandard2.0" - }, - { - "condition": "(framework != '')", - "value": "" } ] } }, "frameworkValue": { "type": "generated", - "generator": "join", - "description": "join framework and frameworkDefault", + "generator": "coalesce", "parameters": { - "symbols": [ - { - "type": "ref", - "value": "framework" - }, - { - "type": "ref", - "value": "frameworkDefault" - } - ] + "sourceVariableName": "framework", + "fallbackVariableName": "frameworkDefault" }, "replaces": "$(Framework)" }, diff --git a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json index 6763121c4a..3f0344e042 100644 --- a/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json +++ b/templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json @@ -90,35 +90,22 @@ "datatype": "string", "cases": [ { - "condition": "(framework == '' && consoleApp == true)", + "condition": "(consoleApp == true)", "value": "net6.0" }, { - "condition": "(framework == '' && consoleApp == false)", + "condition": "(consoleApp == false)", "value": "netstandard2.0" - }, - { - "condition": "(framework != '')", - "value": "" } ] } }, "frameworkValue": { "type": "generated", - "generator": "join", - "description": "join framework and frameworkDefault", + "generator": "coalesce", "parameters": { - "symbols": [ - { - "type": "ref", - "value": "framework" - }, - { - "type": "ref", - "value": "frameworkDefault" - } - ] + "sourceVariableName": "framework", + "fallbackVariableName": "frameworkDefault" }, "replaces": "$(Framework)" },