ImmutableInterlocked.Update Método
Definição
Sobrecargas
| Update<T,TArg>(ImmutableArray<T>, Func<ImmutableArray<T>,TArg,ImmutableArray<T>>, TArg) |
Modifica uma matriz imutável in-loco com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race. |
| Update<T,TArg>(T, Func<T,TArg,T>, TArg) |
Modifica um valor no local com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race. |
| Update<T>(ImmutableArray<T>, Func<ImmutableArray<T>,ImmutableArray<T>>) |
Modifica uma matriz imutável in-loco com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race. |
| Update<T>(T, Func<T,T>) |
Modifica um valor no local com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race. |
Update<T,TArg>(ImmutableArray<T>, Func<ImmutableArray<T>,TArg,ImmutableArray<T>>, TArg)
Modifica uma matriz imutável in-loco com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race.
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);
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
- T
O tipo de dados na matriz imutável.The type of data in the immutable array.
- TArg
O tipo de argumento passado para o transformer .The type of argument passed to the transformer.
Parâmetros
- location
- ImmutableArray<T>
A matriz imutável a ser alterada.The immutable array to be changed.
- transformer
- Func<ImmutableArray<T>,TArg,ImmutableArray<T>>
Uma função que produz a nova matriz a partir do antigo.A function that produces the new array from the old. Essa função deve ser gratuita por efeito colateral, pois pode ser executada várias vezes quando ocorrem corridas com outros threads.This function should be side-effect free, as it may run multiple times when races occur with other threads.
- transformerArgument
- TArg
O argumento a passar para transformer.The argument to pass to transformer.
Retornos
true se o valor do local foi alterado aplicando o resultado da função transformer; false se o valor do local permaneceu o mesmo porque a última invocação de transformer retornou o valor existente.true if the location's value is changed by applying the result of the transformer function; false if the location's value remained the same because the last invocation of transformer returned the existing value.
Aplica-se a
Update<T,TArg>(T, Func<T,TArg,T>, TArg)
Modifica um valor no local com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race.
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;
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
- T
O tipo de dados.The type of data.
- TArg
O tipo de argumento passado para o transformer .The type of argument passed to the transformer.
Parâmetros
- location
- T
A variável ou o campo a ser alterado, que pode ser acessado por vários threads.The variable or field to be changed, which may be accessed by multiple threads.
- transformer
- Func<T,TArg,T>
Uma função que modifica o valor.A function that mutates the value. Essa função deverá ser livre de efeito colateral, pois poderá ser executada várias vezes quando ocorrerem concorrências com outros threads.This function should be side-effect free, as it may run multiple times when races occur with other threads.
- transformerArgument
- TArg
O argumento a passar para transformer.The argument to pass to transformer.
Retornos
true se o valor do local foi alterado aplicando o resultado da função transformer; false se o valor do local permaneceu o mesmo porque a última invocação de transformer retornou o valor existente.true if the location's value is changed by applying the result of the transformer function; false if the location's value remained the same because the last invocation of transformer returned the existing value.
Aplica-se a
Update<T>(ImmutableArray<T>, Func<ImmutableArray<T>,ImmutableArray<T>>)
Modifica uma matriz imutável in-loco com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates an immutable array in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race.
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
- T
O tipo de dados na matriz imutável.The type of data in the immutable array.
Parâmetros
- location
- ImmutableArray<T>
A matriz imutável a ser alterada.The immutable array to be changed.
- transformer
- Func<ImmutableArray<T>,ImmutableArray<T>>
Uma função que produz a nova matriz a partir do antigo.A function that produces the new array from the old. Essa função deve ser gratuita por efeito colateral, pois pode ser executada várias vezes quando ocorrem corridas com outros threads.This function should be side-effect free, as it may run multiple times when races occur with other threads.
Retornos
true se o valor do local foi alterado aplicando o resultado da função transformer; false se o valor do local permaneceu o mesmo porque a última invocação de transformer retornou o valor existente.true if the location's value is changed by applying the result of the transformer function; false if the location's value remained the same because the last invocation of transformer returned the existing value.
Aplica-se a
Update<T>(T, Func<T,T>)
Modifica um valor no local com semântica de transação de bloqueio otimista por meio de uma função de transformação especificada.Mutates a value in-place with optimistic locking transaction semantics via a specified transformation function. A transformação será repetida tantas vezes quanto forem necessárias para ganhar a concorrência de bloqueio otimista.The transformation is retried as many times as necessary to win the optimistic locking race.
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
- T
O tipo de dados.The type of data.
Parâmetros
- location
- T
A variável ou o campo a ser alterado, que pode ser acessado por vários threads.The variable or field to be changed, which may be accessed by multiple threads.
- transformer
- Func<T,T>
Uma função que modifica o valor.A function that mutates the value. Essa função deverá ser livre de efeito colateral, pois poderá ser executada várias vezes quando ocorrerem concorrências com outros threads.This function should be side-effect free, as it may run multiple times when races occur with other threads.
Retornos
true se o valor do local foi alterado aplicando o resultado da função transformer; false se o valor do local permaneceu o mesmo porque a última invocação de transformer retornou o valor existente.true if the location's value is changed by applying the result of the transformer function; false if the location's value remained the same because the last invocation of transformer returned the existing value.