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 objectIds, IProgress? progress, CancellationToken cancellationToken ) => throw new NotImplementedException(); public Task DownloadSingleObject( string objectId, IProgress? progress, CancellationToken cancellationToken ) => throw new NotImplementedException(); public Task> HasObjects( IReadOnlyList objectIds, CancellationToken cancellationToken ) => throw new NotImplementedException(); public Task UploadObjects( IReadOnlyList objects, bool compressPayloads, IProgress? 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; } }