Method WithCode
WithCode<TDescription>(TDescription, WithCodeAction)
Provides an easy way to run a function as a single background job. You can also run Job.WithCode on the main thread and still take advantage of Burst compilation to speed up execution.
Declaration
public static TDescription WithCode<TDescription>(this TDescription description, LambdaSingleJobDescriptionConstructionMethods.WithCodeAction code) where TDescription : ISingleJobDescription
Parameters
Type | Name | Description |
---|---|---|
TDescription | description | The target object |
LambdaSingleJobDescriptionConstructionMethods.WithCodeAction | code | Lambda that provides the execution for the job. |
Returns
Type | Description |
---|---|
TDescription | The target object, suitable for chaining multiple methods |
Type Parameters
Name | Description |
---|---|
TDescription | Type of target object |