715bb7274a
* Can debug dependencies * Different exceptions * Uses root id only after we found it to signal the end * DataChunks are created later and need to be accounted for * format * use app ids in tests and references * check sqlite cache after serialize * use dummy to go through channels to end * fmt * Extend channel lib to batch by size * fmt * build fix * adjust limits * FIx sending * Optimize reference generation * more * remove tolist * rework closures to be constant and serializer only deals with current....references bases are cached * fix chunk creation * another bug fix * clean up with factories * add deserializer factory * Needed to reference interface * move around streamId * some clean up * Use StringBuilder pool on serialization to reduce memory pressure * remove extra * remove extra clears * Fix a flaw in batchsize * use default complete * format * loader should use 1 writer that is batched * remove redundant ref gen * Fix graphql commands by adding project id
44 lines
1.2 KiB
C#
44 lines
1.2 KiB
C#
using System.Text;
|
|
using Speckle.Sdk.Dependencies.Serialization;
|
|
using Speckle.Sdk.Serialisation.V2;
|
|
using Speckle.Sdk.Transports;
|
|
|
|
namespace Speckle.Sdk.Serialization.Testing;
|
|
|
|
public class DummyServerObjectManager : IServerObjectManager
|
|
{
|
|
public IAsyncEnumerable<(string, string)> DownloadObjects(
|
|
IReadOnlyList<string> objectIds,
|
|
IProgress<ProgressArgs>? progress,
|
|
CancellationToken cancellationToken
|
|
) => throw new NotImplementedException();
|
|
|
|
public Task<string?> DownloadSingleObject(
|
|
string objectId,
|
|
IProgress<ProgressArgs>? progress,
|
|
CancellationToken cancellationToken
|
|
) => throw new NotImplementedException();
|
|
|
|
public Task<Dictionary<string, bool>> HasObjects(
|
|
IReadOnlyList<string> objectIds,
|
|
CancellationToken cancellationToken
|
|
) => throw new NotImplementedException();
|
|
|
|
public Task UploadObjects(
|
|
IReadOnlyList<BaseItem> objects,
|
|
bool compressPayloads,
|
|
IProgress<ProgressArgs>? progress,
|
|
CancellationToken cancellationToken
|
|
)
|
|
{
|
|
long totalBytes = 0;
|
|
foreach (var item in objects)
|
|
{
|
|
totalBytes += Encoding.Default.GetByteCount(item.Json);
|
|
}
|
|
|
|
progress?.Report(new(ProgressEvent.UploadBytes, totalBytes, totalBytes));
|
|
return Task.CompletedTask;
|
|
}
|
|
}
|