Skip to content

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

welshronaldo edited this page May 30, 2022 · 4 revisions

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

Retrieves a reference type from json format against the specified key

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>

Remarks

Internally deserializes from JSON

Clone this wiki locally