예제 #1
0
        public static INetworkClientBuilder UseZeroFormatter(this INetworkClientBuilder clientBuilder)
        {
            var serviceCollection = clientBuilder.GetServiceCollection();

            serviceCollection.AddSingleton <IPacketSerialiser, ZeroFormatterPacketSerialiser>();
            return(clientBuilder);
        }
예제 #2
0
        public static INetworkClientBuilder UseProtobufNet(this INetworkClientBuilder clientBuilder)
        {
            var serviceCollection = clientBuilder.GetServiceCollection();

            serviceCollection.AddSingleton <IPacketSerialiser, ProtoBufNetSerialiser>();
            return(clientBuilder);
        }