ImmutableInterlocked.Update Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Sobrecargas
| Name | Description |
|---|---|
| Update<T,TArg>(ImmutableArray<T>, Func<ImmutableArray<T>,TArg,ImmutableArray<T>>, TArg) |
Muta um array imutável no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio. |
| Update<T,TArg>(T, Func<T,TArg,T>, TArg) |
Muta um valor no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio. |
| Update<T>(ImmutableArray<T>, Func<ImmutableArray<T>,ImmutableArray<T>>) |
Muta um array imutável no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio. |
| Update<T>(T, Func<T,T>) |
Muta um valor no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio. |
Update<T,TArg>(ImmutableArray<T>, Func<ImmutableArray<T>,TArg,ImmutableArray<T>>, TArg)
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
Muta um array imutável no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio.
public:
generic <typename T, typename TArg>
static bool Update(System::Collections::Immutable::ImmutableArray<T> % location, Func<System::Collections::Immutable::ImmutableArray<T>, TArg, System::Collections::Immutable::ImmutableArray<T>> ^ transformer, TArg transformerArgument);
public static bool Update<T,TArg>(ref System.Collections.Immutable.ImmutableArray<T> location, Func<System.Collections.Immutable.ImmutableArray<T>,TArg,System.Collections.Immutable.ImmutableArray<T>> transformer, TArg transformerArgument) where TArg : allows ref struct;
public static bool Update<T,TArg>(ref System.Collections.Immutable.ImmutableArray<T> location, Func<System.Collections.Immutable.ImmutableArray<T>,TArg,System.Collections.Immutable.ImmutableArray<T>> transformer, TArg transformerArgument);
static member Update : ImmutableArray * Func<System.Collections.Immutable.ImmutableArray<'T>, 'Arg, System.Collections.Immutable.ImmutableArray<'T>> * 'Arg -> bool
Public Shared Function Update(Of T, TArg) (ByRef location As ImmutableArray(Of T), transformer As Func(Of ImmutableArray(Of T), TArg, ImmutableArray(Of T)), transformerArgument As TArg) As Boolean
Parâmetros de Tipo Genérico
- T
O tipo de dados no array imutável.
- TArg
O tipo de argumento passado ao transformer.
Parâmetros
- location
- ImmutableArray<T>
A matriz imutável a ser alterada.
- transformer
- Func<ImmutableArray<T>,TArg,ImmutableArray<T>>
Uma função que produz o novo array a partir do antigo. Esta função deve ser livre de efeitos secundários, pois pode ser executada várias vezes quando as corridas ocorrem com outros threads.
- transformerArgument
- TArg
O argumento para passar a transformer.
Devoluções
true se o valor da localização for alterado aplicando o resultado da transformer função; false se o valor da localização permaneceu igual porque a última invocação de transformer devolveu o valor existente.
Aplica-se a
Update<T,TArg>(T, Func<T,TArg,T>, TArg)
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
Muta um valor no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio.
public:
generic <typename T, typename TArg>
where T : class static bool Update(T % location, Func<T, TArg, T> ^ transformer, TArg transformerArgument);
public static bool Update<T,TArg>(ref T location, Func<T,TArg,T> transformer, TArg transformerArgument) where T : class;
public static bool Update<T,TArg>(ref T location, Func<T,TArg,T> transformer, TArg transformerArgument) where T : class where TArg : allows ref struct;
static member Update : 'T * Func<'T, 'Arg, 'T (requires 'T : null and 'T : null)> * 'Arg -> bool (requires 'T : null)
Public Shared Function Update(Of T As Class, TArg As Class) (ByRef location As T, transformer As Func(Of T, TArg, T), transformerArgument As TArg) As Boolean
Parâmetros de Tipo Genérico
- T
O tipo de dados.
- TArg
O tipo de argumento passado ao transformer.
Parâmetros
- location
- T
A variável ou campo a ser alterado, que pode ser acedido por múltiplos threads.
- transformer
- Func<T,TArg,T>
Uma função que altera o valor. Esta função deve ser livre de efeitos secundários, pois pode ser executada várias vezes quando as corridas ocorrem com outros threads.
- transformerArgument
- TArg
O argumento para passar a transformer.
Devoluções
true se o valor da localização for alterado aplicando o resultado da transformer função; false se o valor da localização permaneceu igual porque a última invocação de transformer devolveu o valor existente.
Aplica-se a
Update<T>(ImmutableArray<T>, Func<ImmutableArray<T>,ImmutableArray<T>>)
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
Muta um array imutável no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio.
public:
generic <typename T>
static bool Update(System::Collections::Immutable::ImmutableArray<T> % location, Func<System::Collections::Immutable::ImmutableArray<T>, System::Collections::Immutable::ImmutableArray<T>> ^ transformer);
public static bool Update<T>(ref System.Collections.Immutable.ImmutableArray<T> location, Func<System.Collections.Immutable.ImmutableArray<T>,System.Collections.Immutable.ImmutableArray<T>> transformer);
static member Update : ImmutableArray * Func<System.Collections.Immutable.ImmutableArray<'T>, System.Collections.Immutable.ImmutableArray<'T>> -> bool
Public Shared Function Update(Of T) (ByRef location As ImmutableArray(Of T), transformer As Func(Of ImmutableArray(Of T), ImmutableArray(Of T))) As Boolean
Parâmetros de Tipo Genérico
- T
O tipo de dados no array imutável.
Parâmetros
- location
- ImmutableArray<T>
A matriz imutável a ser alterada.
- transformer
- Func<ImmutableArray<T>,ImmutableArray<T>>
Uma função que produz o novo array a partir do antigo. Esta função deve ser livre de efeitos secundários, pois pode ser executada várias vezes quando as corridas ocorrem com outros threads.
Devoluções
true se o valor da localização for alterado aplicando o resultado da transformer função; false se o valor da localização permaneceu igual porque a última invocação de transformer devolveu o valor existente.
Aplica-se a
Update<T>(T, Func<T,T>)
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
- Origem:
- ImmutableInterlocked.cs
Muta um valor no local com semântica de transação de bloqueio otimista através de uma função de transformação especificada. A transformação é repetida tantas vezes quanto necessário para vencer a otimista corrida de bloqueio.
public:
generic <typename T>
where T : class static bool Update(T % location, Func<T, T> ^ transformer);
public static bool Update<T>(ref T location, Func<T,T> transformer) where T : class;
static member Update : 'T * Func<'T, 'T (requires 'T : null and 'T : null)> -> bool (requires 'T : null)
Public Shared Function Update(Of T As Class) (ByRef location As T, transformer As Func(Of T, T)) As Boolean
Parâmetros de Tipo Genérico
- T
O tipo de dados.
Parâmetros
- location
- T
A variável ou campo a ser alterado, que pode ser acedido por múltiplos threads.
- transformer
- Func<T,T>
Uma função que altera o valor. Esta função deve ser livre de efeitos secundários, pois pode ser executada várias vezes quando as corridas ocorrem com outros threads.
Devoluções
true se o valor da localização for alterado aplicando o resultado da transformer função; false se o valor da localização permaneceu igual porque a última invocação de transformer devolveu o valor existente.