public static INetworkClientBuilder UseZeroFormatter(this INetworkClientBuilder clientBuilder) { var serviceCollection = clientBuilder.GetServiceCollection(); serviceCollection.AddSingleton <IPacketSerialiser, ZeroFormatterPacketSerialiser>(); return(clientBuilder); }
public static INetworkClientBuilder UseProtobufNet(this INetworkClientBuilder clientBuilder) { var serviceCollection = clientBuilder.GetServiceCollection(); serviceCollection.AddSingleton <IPacketSerialiser, ProtoBufNetSerialiser>(); return(clientBuilder); }