From ecfcd68561f9a24810ef08588e45d10140f7bdf7 Mon Sep 17 00:00:00 2001 From: Schaefer Date: Tue, 20 Mar 2018 13:30:08 -0400 Subject: [PATCH] Added snippets Added snippets for PSCustomObject and Hashtable Fixes #1186 --- snippets/PowerShell.json | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/snippets/PowerShell.json b/snippets/PowerShell.json index 9fb67df773..9fb4d01ee1 100644 --- a/snippets/PowerShell.json +++ b/snippets/PowerShell.json @@ -913,5 +913,23 @@ "body": [ "[Diagnostics.CodeAnalysis.SuppressMessageAttribute('${1:PSProvideDefaultParameterValue}', '', Scope='Function', Target='${2:*}')]" ] - } + }, + "PSCustomObject": { + "prefix": "PSCustomObject", + "body": [ + "[PSCustomObject]@{", + "\t${1:Name} = ${2:Value}", + "}" + ], + "description": "Creates a PSCustomObject" + }, + "Hashtable": { + "prefix": "Hashtable", + "body": [ + "\\$${1:Var} = @{", + "\t${2:Name} = ${3:Value}", + "}" + ], + "description": "Creates a Hashtable" + } }