Esempio n. 1
0
        public static IClientBuilder UseProtobufNet(this IClientBuilder clientBuilder)
        {
            var serviceCollection = clientBuilder.GetServiceCollection();

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

            serviceCollection.AddSingleton <IPacketSerialiser, ZeroFormatterPacketSerialiser>();
            return(clientBuilder);
        }
        public static IClientBuilder UseMessagePack(this IClientBuilder clientBuilder)
        {
            var serviceCollection = clientBuilder.GetServiceCollection();

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