Skip to content

Commit 00628ab

Browse files
askazakovAndreyAkinshin
authored andcommitted
use coalesce instead of join
1 parent 2d379b3 commit 00628ab

File tree

3 files changed

+15
-54
lines changed
  • templates/templates
    • BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config
    • BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config
    • BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config

3 files changed

+15
-54
lines changed

templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.CSharp/.template.config/template.json

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,22 @@
9090
"datatype": "string",
9191
"cases": [
9292
{
93-
"condition": "(framework == '' && consoleApp == true)",
93+
"condition": "(consoleApp == true)",
9494
"value": "net6.0"
9595
},
9696
{
97-
"condition": "(framework == '' && consoleApp == false)",
97+
"condition": "(consoleApp == false)",
9898
"value": "netstandard2.0"
99-
},
100-
{
101-
"condition": "(framework != '')",
102-
"value": ""
10399
}
104100
]
105101
}
106102
},
107103
"frameworkValue": {
108104
"type": "generated",
109-
"generator": "join",
110-
"description": "join framework and frameworkDefault",
105+
"generator": "coalesce",
111106
"parameters": {
112-
"symbols": [
113-
{
114-
"type": "ref",
115-
"value": "framework"
116-
},
117-
{
118-
"type": "ref",
119-
"value": "frameworkDefault"
120-
}
121-
]
107+
"sourceVariableName": "framework",
108+
"fallbackVariableName": "frameworkDefault"
122109
},
123110
"replaces": "$(Framework)"
124111
},

templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.FSharp/.template.config/template.json

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,22 @@
9090
"datatype": "string",
9191
"cases": [
9292
{
93-
"condition": "(framework == '' && consoleApp == true)",
93+
"condition": "(consoleApp == true)",
9494
"value": "net6.0"
9595
},
9696
{
97-
"condition": "(framework == '' && consoleApp == false)",
97+
"condition": "(consoleApp == false)",
9898
"value": "netstandard2.0"
99-
},
100-
{
101-
"condition": "(framework != '')",
102-
"value": ""
10399
}
104100
]
105101
}
106102
},
107103
"frameworkValue": {
108104
"type": "generated",
109-
"generator": "join",
110-
"description": "join framework and frameworkDefault",
105+
"generator": "coalesce",
111106
"parameters": {
112-
"symbols": [
113-
{
114-
"type": "ref",
115-
"value": "framework"
116-
},
117-
{
118-
"type": "ref",
119-
"value": "frameworkDefault"
120-
}
121-
]
107+
"sourceVariableName": "framework",
108+
"fallbackVariableName": "frameworkDefault"
122109
},
123110
"replaces": "$(Framework)"
124111
},

templates/templates/BenchmarkDotNet.BenchmarkProjectTemplate.VB/.template.config/template.json

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,35 +90,22 @@
9090
"datatype": "string",
9191
"cases": [
9292
{
93-
"condition": "(framework == '' && consoleApp == true)",
93+
"condition": "(consoleApp == true)",
9494
"value": "net6.0"
9595
},
9696
{
97-
"condition": "(framework == '' && consoleApp == false)",
97+
"condition": "(consoleApp == false)",
9898
"value": "netstandard2.0"
99-
},
100-
{
101-
"condition": "(framework != '')",
102-
"value": ""
10399
}
104100
]
105101
}
106102
},
107103
"frameworkValue": {
108104
"type": "generated",
109-
"generator": "join",
110-
"description": "join framework and frameworkDefault",
105+
"generator": "coalesce",
111106
"parameters": {
112-
"symbols": [
113-
{
114-
"type": "ref",
115-
"value": "framework"
116-
},
117-
{
118-
"type": "ref",
119-
"value": "frameworkDefault"
120-
}
121-
]
107+
"sourceVariableName": "framework",
108+
"fallbackVariableName": "frameworkDefault"
122109
},
123110
"replaces": "$(Framework)"
124111
},

0 commit comments

Comments
 (0)