Files
speckle-sharp-sdk/src/Speckle.Sdk/Serialisation/Utilities/OperationTask.cs
T
Adam Hathcock 4c3e572bfe clean up from progress (#78)
* progress intermediate commit

* add progress for download

* remove unused code

* remove batch sent callbacks

* multi-threaded deserialize works

* Progress for download and deserialization

* Fix tests

* Have less indeterminate deserialization

* fix deserialization

* make download faster with buffered stream

* put local receive back

* remove unused callback

* fmt

* Progress for serialization and upload

* fix uploading

* clean up from progress

* merge fixes and fmt
2024-08-22 11:18:16 +01:00

24 lines
637 B
C#

namespace Speckle.Sdk.Serialisation.Utilities;
internal readonly struct OperationTask<T>
where T : struct
{
public readonly T OperationType;
public readonly object? InputValue;
public readonly TaskCompletionSource<object?>? Tcs;
public OperationTask(T operationType, object? inputValue = null, TaskCompletionSource<object?>? tcs = null)
{
OperationType = operationType;
InputValue = inputValue;
Tcs = tcs;
}
public void Deconstruct(out T operationType, out object? inputValue, out TaskCompletionSource<object?>? tcs)
{
operationType = OperationType;
inputValue = InputValue;
tcs = Tcs;
}
}