New-PodeStateBag
SYNOPSIS
Creates a new concurrent bag for use in the shared state.
SYNTAX
New-PodeStateBag [[-Data] <Object[]>] [-ProgressAction <ActionPreference>] [<CommonParameters>]
DESCRIPTION
Creates a new concurrent bag for use in the shared state. This is useful for storing a collection of objects in a thread-safe manner.
EXAMPLES
EXAMPLE 1
Set-PodeState -Name 'MyBag' -Value (New-PodeStateBag)
EXAMPLE 2
Set-PodeState -Name 'MyBag' -Value (New-PodeStateBag -Data @(1, 2, 3))
PARAMETERS
-Data
An optional array of initial objects to populate the bag.
Type: Object[]
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.