Yields the resource with the specified amount.
Namespace: AGI.Parallel.Infrastructure
Assembly: AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
long YieldResource(
        string resource,
        long amount,
        bool restrictToChildren
)
Visual Basic
Function YieldResource ( _
        resource As String, _
        amount As Long, _
        restrictToChildren As Boolean _
) As Long

Parameters

resource
Type: System..::..String
The resource. You can find common values for resources using ConsumableResources.
amount
Type: System..::..Int64
The amount.
restrictToChildren
Type: System..::..Boolean
if set to true will yield resources only to child jobs.

Return Value

The resource amount currently consumed by the task.

Exceptions

Exception Condition
System..::..ArgumentNullException If resource is null.
System..::..ArgumentOutOfRangeException If amount if less than 0.
AGI.Parallel.Client..::..JobSchedulerException If error occurred during operation. For instance, yield amount was more than the amount current allocated.

See Also