< Summary

Class:Decentraland.Renderer.RendererServices.TransportServiceCodeGen
Assembly:Decentraland.Protocol.GeneratedCode
File(s):/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/renderer_services/TransportService.gen.cs
Covered lines:4
Uncovered lines:0
Coverable lines:4
Total lines:35
Line coverage:100% (4 of 4)
Covered branches:0
Total branches:0

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity NPath complexity Sequence coverage
RegisterService[Context](...)0%110100%

File(s)

/tmp/workspace/unity-renderer/unity-renderer/Assets/Scripts/MainScripts/DCL/DecentralandProtocol/Decentraland/renderer/renderer_services/TransportService.gen.cs

#LineLine coverage
 1// AUTOGENERATED, DO NOT EDIT
 2// Type definitions for server implementations of ports.
 3// package: decentraland.renderer.renderer_services
 4// file: decentraland/renderer/renderer_services/transport.proto
 5using System.Collections.Generic;
 6using System.Threading;
 7using Cysharp.Threading.Tasks;
 8using Google.Protobuf;
 9using rpc_csharp.protocol;
 10using rpc_csharp;
 11namespace Decentraland.Renderer.RendererServices {
 12public interface ITransportService<Context>
 13{
 14
 15  IUniTaskAsyncEnumerable<Payload> OpenTransportStream(IUniTaskAsyncEnumerable<Payload> streamRequest, Context context);
 16
 17}
 18
 19public static class TransportServiceCodeGen
 20{
 21  public const string ServiceName = "TransportService";
 22
 23  public static void RegisterService<Context>(RpcServerPort<Context> port, ITransportService<Context> service)
 24  {
 125    var result = new ServerModuleDefinition<Context>();
 26
 127    result.bidirectionalStreamDefinition.Add("OpenTransportStream", (IUniTaskAsyncEnumerable<ByteString> payload, Contex
 28      return ProtocolHelpers.SerializeMessageEnumerator<Payload>(service.OpenTransportStream(
 29        ProtocolHelpers.DeserializeMessageEnumerator<Payload>(payload, s => Payload.Parser.ParseFrom(s)), context));
 30    });
 31
 132    port.RegisterModule(ServiceName, (port) => UniTask.FromResult(result));
 133  }
 34}
 35}