NServiceBus.TimeToBeReceivedMappings.TimeToBeReceivedMappings C# (CSharp) Method

TimeToBeReceivedMappings() public method

public TimeToBeReceivedMappings ( IEnumerable knownMessages, TimeSpan>.Func convention, bool doesTransportSupportDiscardIfNotReceivedBefore ) : System
knownMessages IEnumerable
convention TimeSpan>.Func
doesTransportSupportDiscardIfNotReceivedBefore bool
return System
        public TimeToBeReceivedMappings(IEnumerable<Type> knownMessages, Func<Type, TimeSpan> convention, bool doesTransportSupportDiscardIfNotReceivedBefore)
        {
            this.doesTransportSupportDiscardIfNotReceivedBefore = doesTransportSupportDiscardIfNotReceivedBefore;
            this.convention = convention;

            mappings = new ConcurrentDictionary<Type, TimeSpan>();

            foreach (var messageType in knownMessages)
            {
                mappings[messageType] = GetTimeToBeReceived(convention, messageType, doesTransportSupportDiscardIfNotReceivedBefore);
            }
        }