Skip to content

Pact Cache DualLayerCacheService GetAsync T (string System Text Json JsonSerializerOptions)

welshronaldo edited this page May 30, 2022 · 4 revisions

DualLayerCacheService.GetAsync<T>(string, JsonSerializerOptions) Method

Retrieves a reference type from json format against the specified key

public override System.Threading.Tasks.Task<T> GetAsync<T>(string key, System.Text.Json.JsonSerializerOptions jsonOptions=null)
    where T : class;

Type parameters

T

Parameters

key System.String

jsonOptions System.Text.Json.JsonSerializerOptions
Optional options to override the default STJ ones

Returns

System.Threading.Tasks.Task<T>

Implements GetAsync(string, JsonSerializerOptions)

Remarks

Internally deserializes from JSON

Clone this wiki locally