Skip to content

)}

KeyedOperationQueue.EnqueueOperation(string, Action) method

Defined in

Type: KeyedOperationQueue Namespace: Akavache Assembly: Akavache.Core.dll

Applies to

net9.0, net9.0-maccatalyst18.0, net9.0-macos15.0, net9.0-tvos18.0, net9.0-android35.0, net9.0-ios18.0, net8.0, net8.0-android34.0, net8.0-macos14.5, net8.0-ios18.0, net8.0-maccatalyst18.0, net8.0-macos15.0, net8.0-tvos18.0, net8.0-ios17.5, net8.0-maccatalyst17.5, net8.0-macos14.2, net8.0-tvos17.2, netstandard2.1, netstandard2.0

Overloads

  • 1. public IObservable<Unit> EnqueueOperation(string key, Action action)
  • 2. public IObservable<T> EnqueueOperation<T>(string key, Func<T> calculationFunc)

1. Overload

public IObservable<Unit> EnqueueOperation(string key, Action action)

View source

Summary: Queue an operation to run in the background. All operations with the same key will run in sequence, waiting for the previous operation to complete.

Parameters

NameTypeDescription
keystringThe key to use.
actionActionA method to run in the background.

Returns: IObservable -- A future representing when the operation completes.

2. Overload

public IObservable<T> EnqueueOperation<T>(string key, Func<T> calculationFunc)

View source

Summary: Queue an operation to run in the background that returns a value. All operations with the same key will run in sequence, waiting for the previous operation to complete.

Type parameters

NameDescription
TThe type of item in the queue.

Parameters

NameTypeDescription
keystringThe key to use.
calculationFuncFuncA method to run in the background that returns a single value.

Returns: IObservable -- A future value.