< Back
Lock-PodeObject
Post
NAME Lock-PodeObject
SYNOPSIS
Places a temporary lock on a object while a ScriptBlock is invoked.
SYNTAX
Lock-PodeObject [-Object] <Object> [-ScriptBlock] <ScriptBlock> [-Return] [<CommonParameters>]
DESCRIPTION
Places a temporary lock on a object while a ScriptBlock is invoked.
PARAMETERS
-Object <Object>
The object to lock.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock to invoke.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Return [<SwitchParameter>]
If supplied, any values from the ScriptBlock will be returned.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Object
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Lock-PodeObject -Object $SomeArray -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$result = (Lock-PodeObject -Return -Object $SomeArray -ScriptBlock { /* logic */ })
RELATED LINKS
SYNOPSIS
Places a temporary lock on a object while a ScriptBlock is invoked.
SYNTAX
Lock-PodeObject [-Object] <Object> [-ScriptBlock] <ScriptBlock> [-Return] [<CommonParameters>]
DESCRIPTION
Places a temporary lock on a object while a ScriptBlock is invoked.
PARAMETERS
-Object <Object>
The object to lock.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The ScriptBlock to invoke.
Required? true
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Return [<SwitchParameter>]
If supplied, any values from the ScriptBlock will be returned.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
System.Object
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Lock-PodeObject -Object $SomeArray -ScriptBlock { /* logic */ }
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>$result = (Lock-PodeObject -Return -Object $SomeArray -ScriptBlock { /* logic */ })
RELATED LINKS