public static LoggerAuditSinkConfiguration RabbitMq( this LoggerAuditSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, IConnection connection, IBinaryFormatter binaryFormatter, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, bool autoCloseConnection = true) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, connection, binaryFormatter, autoCloseConnection); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public static LoggerSinkConfiguration RabbitMq( this LoggerSinkConfiguration configuration, Action <RabbitMqSinkOptions> optionsSetup, AmqpTcpEndpoint endpoint, Action <ConnectionFactory> connectionFactorySetup, IBinaryFormatter binaryFormatter, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, LoggingLevelSwitch levelSwitch = null, string clientProviderName = null) { RabbitMqSinkOptions options = configuration.Create(optionsSetup); RabbitMqSink rabbitMqSink = new RabbitMqSink(options, endpoint, connectionFactorySetup, binaryFormatter, clientProviderName); configuration.Sink(rabbitMqSink, restrictedToMinimumLevel, levelSwitch); return(configuration); }
public static void DeserializeTo <T>(this IBinaryFormatter binaryFormatter, HGlobalCache <byte> hGCache, T obj) { binaryFormatter.DeserializeTo(hGCache, RWHelper.CreateWriter(obj)); }
public static void DeserializeTo <T>(this IBinaryFormatter binaryFormatter, Stream stream, T obj) { binaryFormatter.DeserializeTo(stream, RWHelper.CreateWriter(obj)); }
public static void DeserializeTo <T>(this IBinaryFormatter binaryFormatter, byte[] bytes, T obj) { binaryFormatter.DeserializeTo(bytes, RWHelper.CreateWriter(obj)); }
public static void DeserializeTo <T>(this IBinaryFormatter binaryFromatter, ReadOnlySpan <byte> text, T obj) { binaryFromatter.DeserializeTo(text, RWHelper.CreateWriter(obj)); }