HttpContentJsonExtensions.ReadFromJsonAsync Metódus

Definíció

Túlterhelések

Name Description
ReadFromJsonAsync(HttpContent, Type, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync<T>(HttpContent, JsonTypeInfo<T>, CancellationToken)

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

ReadFromJsonAsync(HttpContent, Type, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Paraméterek

content
HttpContent

Az olvasandó tartalom.

type
Type

A deszerializálni kívánt objektum típusa, amelybe vissza szeretne térni.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Az aszinkron műveletet képviselő tevékenységobjektum.

Attribútumok

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes:

ReadFromJsonAsync(HttpContent, Type, JsonSerializerOptions, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Paraméterek

content
HttpContent

Az olvasandó tartalom.

type
Type

A deszerializálni kívánt objektum típusa, amelybe vissza szeretne térni.

options
JsonSerializerOptions

A deszerializálás során a viselkedés szabályozásának lehetőségei. Az alapértelmezett beállítások a megadott Webbeállítások.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Az aszinkron műveletet képviselő tevékenységobjektum.

Attribútumok

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes:

ReadFromJsonAsync(HttpContent, Type, JsonSerializerContext, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

public static System.Threading.Tasks.Task<object?> ReadFromJsonAsync(this System.Net.Http.HttpContent content, Type type, System.Text.Json.Serialization.JsonSerializerContext context, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : System.Net.Http.HttpContent * Type * System.Text.Json.Serialization.JsonSerializerContext * System.Threading.CancellationToken -> System.Threading.Tasks.Task<obj>
<Extension()>
Public Function ReadFromJsonAsync (content As HttpContent, type As Type, context As JsonSerializerContext, Optional cancellationToken As CancellationToken = Nothing) As Task(Of Object)

Paraméterek

content
HttpContent

Az olvasandó tartalom.

type
Type

A deszerializálni kívánt objektum típusa, amelybe vissza szeretne térni.

context
JsonSerializerContext

A deszerializálási viselkedés szabályozásához használt JsonSerializerContext.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Az aszinkron műveletet képviselő tevékenységobjektum.

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes:

ReadFromJsonAsync<T>(HttpContent, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

Típusparaméterek

T

A deszerializálandó céltípus.

Paraméterek

content
HttpContent

Az olvasandó tartalom.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Task<T>

Az aszinkron műveletet képviselő tevékenységobjektum.

Attribútumok

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes:

ReadFromJsonAsync<T>(HttpContent, JsonSerializerOptions, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.JsonSerializerOptions? options, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, options As JsonSerializerOptions, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

Típusparaméterek

T

A deszerializálandó céltípus.

Paraméterek

content
HttpContent

Az olvasandó tartalom.

options
JsonSerializerOptions

A deszerializálás során a viselkedés szabályozásának lehetőségei. Az alapértelmezett beállítások a megadott Webbeállítások.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Task<T>

Az aszinkron műveletet képviselő tevékenységobjektum.

Attribútumok

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes:

ReadFromJsonAsync<T>(HttpContent, JsonTypeInfo<T>, CancellationToken)

Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs
Forrás:
HttpContentJsonExtensions.cs

Beolvassa a HTTP-tartalmat, és visszaadja azt az értéket, amely a tartalom Aszinkron műveletben JSON-ként való deszerializálásából ered.

public static System.Threading.Tasks.Task<T?> ReadFromJsonAsync<T>(this System.Net.Http.HttpContent content, System.Text.Json.Serialization.Metadata.JsonTypeInfo<T> jsonTypeInfo, System.Threading.CancellationToken cancellationToken = default);
static member ReadFromJsonAsync : System.Net.Http.HttpContent * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'T> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
<Extension()>
Public Function ReadFromJsonAsync(Of T) (content As HttpContent, jsonTypeInfo As JsonTypeInfo(Of T), Optional cancellationToken As CancellationToken = Nothing) As Task(Of T)

Típusparaméterek

T

A deszerializálandó céltípus.

Paraméterek

content
HttpContent

Az olvasandó tartalom.

jsonTypeInfo
JsonTypeInfo<T>

A deszerializálási viselkedés szabályozásához használt JsonTypeInfo.

cancellationToken
CancellationToken

Lemondási jogkivonat, amelyet más objektumok vagy szálak használhatnak a lemondásról szóló értesítés fogadásához.

Válaszok

Task<T>

Az aszinkron műveletet képviselő tevékenységobjektum.

Kivételek

A lemondási jogkivonat megszakadt. Ezt a kivételt a rendszer a visszaadott tevékenységben tárolja.

A következőre érvényes: