private ShovelConfigurationContent(string sourceUri, string sourceQueue, string destinationUri, string destinationQueue = "", string destinationExchange = "", string destinationRoutingKey = "", AckMode ackMode = null, DeleteAfter deleteAfter = null, uint prefetchCount = 1000, uint reconnectDelaySeconds = 1, bool addForwardHeaders = false) { SourceUri = sourceUri; SourceQueue = sourceQueue; DestinationUri = destinationUri; if (!string.IsNullOrWhiteSpace(destinationQueue)) { DestinationQueue = destinationQueue; } else { DestinationExchange = destinationExchange; if (!string.IsNullOrWhiteSpace(destinationRoutingKey)) { DestinationRoutingKey = destinationRoutingKey; } } AckMode = ackMode ?? AckMode.OnConfirm; DeleteAfter = deleteAfter ?? DeleteAfter.Never; PrefetchCount = prefetchCount; ReconnectDelaySeconds = reconnectDelaySeconds; AddForwardHeaders = addForwardHeaders; }
public ShovelConfigurationContent(string sourceUri, string sourceQueue, string destinationUri, string destinationQueue, AckMode ackMode = null, DeleteAfter deleteAfter = null, uint prefetchCount = 1000, uint reconnectDelaySeconds = 1, bool addForwardHeaders = false) : this(sourceUri, sourceQueue, destinationUri, destinationQueue, "", "", ackMode, deleteAfter, prefetchCount, reconnectDelaySeconds, addForwardHeaders) { }
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { return(reader.Value != null?AckMode.Parse(reader.Value.ToString()) : null); }