New-PodeStateDictionary
SYNOPSIS
Creates a new concurrent dictionary for use in the shared state.
SYNTAX
New-PodeStateDictionary [[-Data] <Hashtable>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Creates a new concurrent dictionary for use in the shared state. This is useful for storing key-value pairs in a thread-safe manner.
EXAMPLES
EXAMPLE 1
Set-PodeState -Name 'MyDictionary' -Value (New-PodeStateDictionary)
EXAMPLE 2
Set-PodeState -Name 'MyDictionary' -Value (New-PodeStateDictionary -Data @{ 'Key1' = 'Value1'; 'Key2' = 'Value2' })
PARAMETERS
-Data
An optional hashtable of initial key-value pairs to populate the dictionary.
Type: Hashtable
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProgressAction
{{ Fill ProgressAction Description }}
Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.