Skip to content

Commit

Permalink
Merge pull request #154 from Mrxx99/feature/item-template-root-namespace
Browse files Browse the repository at this point in the history
Default namespace for item templates
  • Loading branch information
Takoooooo authored Jan 10, 2023
2 parents 19bba9e + 6b88841 commit fada2e5
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
14 changes: 13 additions & 1 deletion templates/csharp/templatedcontrol/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
"symbols": {
"namespace": {
"description": "Namespace for the generated code",
"replaces": "AvaloniaAppTemplate.Namespace",
"type": "parameter"
},
"DefaultNamespace": {
"type": "bind",
"binding": "msbuild:RootNamespace"
},
"NamespaceReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "namespace",
"fallbackVariableName": "DefaultNamespace"
},
"replaces": "AvaloniaAppTemplate.Namespace"
}
},
"tags": {
Expand Down
14 changes: 13 additions & 1 deletion templates/csharp/usercontrol/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
"symbols": {
"namespace": {
"description": "Namespace for the generated code",
"replaces": "AvaloniaAppTemplate.Namespace",
"type": "parameter"
},
"DefaultNamespace": {
"type": "bind",
"binding": "msbuild:RootNamespace"
},
"NamespaceReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "namespace",
"fallbackVariableName": "DefaultNamespace"
},
"replaces": "AvaloniaAppTemplate.Namespace"
}
},
"tags": {
Expand Down
14 changes: 13 additions & 1 deletion templates/csharp/window/.template.config/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,20 @@
"symbols": {
"namespace": {
"description": "Namespace for the generated code",
"replaces": "AvaloniaAppTemplate.Namespace",
"type": "parameter"
},
"DefaultNamespace": {
"type": "bind",
"binding": "msbuild:RootNamespace"
},
"NamespaceReplacer": {
"type": "generated",
"generator": "coalesce",
"parameters": {
"sourceVariableName": "namespace",
"fallbackVariableName": "DefaultNamespace"
},
"replaces": "AvaloniaAppTemplate.Namespace"
}
},
"tags": {
Expand Down

0 comments on commit fada2e5

Please sign in to comment.