Język

IDownstreamApi.PatchForAppAsync Metoda

Definicja

Przeciążenia

Nazwisko Opis
PatchForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi i zwracaniem danych. Domyślnie dane wejściowe są serializowane w formacie JSON, a zwracane dane są deserializowane z formatu JSON, ale można podać własny serializator i własny deserializacji w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

PatchForAppAsync<TInput,TOutput>(String, TInput, JsonTypeInfo<TInput>, JsonTypeInfo<TOutput>, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi i zwracaniem danych. Domyślnie dane wejściowe są serializowane w formacie JSON, a zwracane dane są deserializowane z formatu JSON, ale można podać własny serializator i własny deserializacji w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

PatchForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi . Domyślnie dane wejściowe są serializowane w formacie JSON, ale możesz podać własny serializator w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

PatchForAppAsync<TInput>(String, TInput, JsonTypeInfo<TInput>, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi . Domyślnie dane wejściowe są serializowane w formacie JSON, ale możesz podać własny serializator w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

PatchForAppAsync<TInput,TOutput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi i zwracaniem danych. Domyślnie dane wejściowe są serializowane w formacie JSON, a zwracane dane są deserializowane z formatu JSON, ale można podać własny serializator i własny deserializacji w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

public System.Threading.Tasks.Task<TOutput?> PatchForAppAsync<TInput,TOutput>(string? serviceName, TInput input, Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod>? downstreamApiOptionsOverride = default, System.Threading.CancellationToken cancellationToken = default) where TOutput : class;
abstract member PatchForAppAsync : string * 'Input * Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Output (requires 'Output : null)> (requires 'Output : null)
Public Function PatchForAppAsync(Of TInput, TOutput) (serviceName As String, input As TInput, Optional downstreamApiOptionsOverride As Action(Of DownstreamApiOptionsReadOnlyHttpMethod) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TOutput)

Parametry typu

TInput

Ogólny typ danych wejściowych.

TOutput

Ogólny typ danych wyjściowych.

Parametry

serviceName
String

Nazwa usługi opisującej podrzędny interfejs API. Dla jednego podrzędnego DownstreamApiOptionsinterfejsu API może istnieć kilka konfiguracji o nazwach mapowanych na poszczególne sekcje. Możesz przekazać wartość null, ale w takim przypadku downstreamApiOptionsOverride należy je ustawić.

input
TInput

Dane wysyłane do podrzędnego internetowego interfejsu API za pośrednictwem treści lub żądania HTTP.

downstreamApiOptionsOverride
Action<DownstreamApiOptionsReadOnlyHttpMethod>

[Opcjonalnie] Zastępuje opcje proponowane w konfiguracji opisanej przez serviceName.

cancellationToken
CancellationToken

Zwraca

Task<TOutput>

Wartość zwrócona przez podrzędny internetowy interfejs API.

Przykłady

var result = await _downstreamApi.PatchForAppAsync<MyItem, IEnumerable<MyItem>>(
       "MyService",
       myItem,
       options =>
       {
         options.RelativePath = $"api/todolist/{myItem.Id}";
       });

Dotyczy

PatchForAppAsync<TInput,TOutput>(String, TInput, JsonTypeInfo<TInput>, JsonTypeInfo<TOutput>, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi i zwracaniem danych. Domyślnie dane wejściowe są serializowane w formacie JSON, a zwracane dane są deserializowane z formatu JSON, ale można podać własny serializator i własny deserializacji w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

public System.Threading.Tasks.Task<TOutput?> PatchForAppAsync<TInput,TOutput>(string? serviceName, TInput input, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TInput> inputJsonTypeInfo, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TOutput> outputJsonTypeInfo, Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod>? downstreamApiOptionsOverride = default, System.Threading.CancellationToken cancellationToken = default) where TOutput : class;
abstract member PatchForAppAsync : string * 'Input * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Input> * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Output (requires 'Output : null)> * Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<'Output (requires 'Output : null)> (requires 'Output : null)
Public Function PatchForAppAsync(Of TInput, TOutput) (serviceName As String, input As TInput, inputJsonTypeInfo As JsonTypeInfo(Of TInput), outputJsonTypeInfo As JsonTypeInfo(Of TOutput), Optional downstreamApiOptionsOverride As Action(Of DownstreamApiOptionsReadOnlyHttpMethod) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of TOutput)

Parametry typu

TInput

Ogólny typ danych wejściowych.

TOutput

Ogólny typ danych wyjściowych.

Parametry

serviceName
String

Nazwa usługi opisującej podrzędny interfejs API. Dla jednego podrzędnego DownstreamApiOptionsinterfejsu API może istnieć kilka konfiguracji o nazwach mapowanych na poszczególne sekcje. Możesz przekazać wartość null, ale w takim przypadku downstreamApiOptionsOverride należy je ustawić.

input
TInput

Dane wysyłane do podrzędnego internetowego interfejsu API za pośrednictwem treści lub żądania HTTP.

inputJsonTypeInfo
JsonTypeInfo<TInput>

Metadane serializacji JSON dla funkcji TInput

outputJsonTypeInfo
JsonTypeInfo<TOutput>

Metadane serializacji JSON dla funkcji TOutput

downstreamApiOptionsOverride
Action<DownstreamApiOptionsReadOnlyHttpMethod>

[Opcjonalnie] Zastępuje opcje proponowane w konfiguracji opisanej przez serviceName.

cancellationToken
CancellationToken

Zwraca

Task<TOutput>

Wartość zwrócona przez podrzędny internetowy interfejs API.

Przykłady

var result = await _downstreamApi.PatchForAppAsync<MyItem, IEnumerable<MyItem>>(
       "MyService",
       myItem,
       options =>
       {
         options.RelativePath = $"api/todolist/{myItem.Id}";
       });

Dotyczy

PatchForAppAsync<TInput>(String, TInput, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi . Domyślnie dane wejściowe są serializowane w formacie JSON, ale możesz podać własny serializator w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

public System.Threading.Tasks.Task PatchForAppAsync<TInput>(string? serviceName, TInput input, Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod>? downstreamApiOptionsOverride = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PatchForAppAsync : string * 'Input * Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function PatchForAppAsync(Of TInput) (serviceName As String, input As TInput, Optional downstreamApiOptionsOverride As Action(Of DownstreamApiOptionsReadOnlyHttpMethod) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametry typu

TInput

Ogólny typ danych wejściowych.

Parametry

serviceName
String

Nazwa usługi opisującej podrzędny interfejs API. Dla jednego podrzędnego DownstreamApiOptionsinterfejsu API może istnieć kilka konfiguracji o nazwach mapowanych na poszczególne sekcje. Możesz przekazać wartość null, ale w takim przypadku downstreamApiOptionsOverride należy je ustawić.

input
TInput

Dane wysyłane do podrzędnego internetowego interfejsu API za pośrednictwem treści lub żądania HTTP.

downstreamApiOptionsOverride
Action<DownstreamApiOptionsReadOnlyHttpMethod>

[Opcjonalnie] Zastępuje opcje proponowane w konfiguracji opisanej przez serviceName.

cancellationToken
CancellationToken

Zwraca

Wartość zwrócona przez podrzędny internetowy interfejs API.

Przykłady

await _downstreamApi.PatchForAppAsync<MyItem>(
      "MyService",
      myItem,
      options =>
      {
        options.RelativePath = $"api/todolist/{myItem.Id}";
      });

Dotyczy

PatchForAppAsync<TInput>(String, TInput, JsonTypeInfo<TInput>, Action<DownstreamApiOptionsReadOnlyHttpMethod>, CancellationToken)

Wywołania przy użyciu Patchinterfejsu API podrzędnego z niektórymi danymi wejściowymi . Domyślnie dane wejściowe są serializowane w formacie JSON, ale możesz podać własny serializator w akcji przekazywanej downstreamApiOptionsOverride przez parametr .

public System.Threading.Tasks.Task PatchForAppAsync<TInput>(string? serviceName, TInput input, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TInput> inputJsonTypeInfo, Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod>? downstreamApiOptionsOverride = default, System.Threading.CancellationToken cancellationToken = default);
abstract member PatchForAppAsync : string * 'Input * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Input> * Action<Microsoft.Identity.Abstractions.DownstreamApiOptionsReadOnlyHttpMethod> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function PatchForAppAsync(Of TInput) (serviceName As String, input As TInput, inputJsonTypeInfo As JsonTypeInfo(Of TInput), Optional downstreamApiOptionsOverride As Action(Of DownstreamApiOptionsReadOnlyHttpMethod) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametry typu

TInput

Ogólny typ danych wejściowych.

Parametry

serviceName
String

Nazwa usługi opisującej podrzędny interfejs API. Dla jednego podrzędnego DownstreamApiOptionsinterfejsu API może istnieć kilka konfiguracji o nazwach mapowanych na poszczególne sekcje. Możesz przekazać wartość null, ale w takim przypadku downstreamApiOptionsOverride należy je ustawić.

input
TInput

Dane wysyłane do podrzędnego internetowego interfejsu API za pośrednictwem treści lub żądania HTTP.

inputJsonTypeInfo
JsonTypeInfo<TInput>

Metadane serializacji JSON dla funkcji TInput

downstreamApiOptionsOverride
Action<DownstreamApiOptionsReadOnlyHttpMethod>

[Opcjonalnie] Zastępuje opcje proponowane w konfiguracji opisanej przez serviceName.

cancellationToken
CancellationToken

Zwraca

Wartość zwrócona przez podrzędny internetowy interfejs API.

Przykłady

await _downstreamApi.PatchForAppAsync<MyItem>(
      "MyService",
      myItem,
      options =>
      {
        options.RelativePath = $"api/todolist/{myItem.Id}";
      });

Dotyczy