コード例 #1
0
ファイル: Configurer.cs プロジェクト: ravikp/NServiceBus
        private static string GetInputQueue(MsmqTransportConfig msmqTransportConfig)
        {
            var unicastBusConfig = Configure.GetConfigSection <UnicastBusConfig>();

            var inputQueue = unicastBusConfig.LocalAddress;

            if (inputQueue == null)
            {
                inputQueue = msmqTransportConfig.InputQueue;
            }
            return(inputQueue);
        }
コード例 #2
0
        public T GetConfiguration <T>() where T : class, new()
        {
            if (typeof(T) == typeof(MsmqTransportConfig))
            {
                var config = new MsmqTransportConfig
                {
                    MaxRetries = 0
                };

                return(config as T);
            }

            // Respect app.config for other sections not defined in this method
            return(ConfigurationManager.GetSection(typeof(T).Name) as T);
        }
コード例 #3
0
        public T GetConfiguration <T>() where T : class, new()
        {
            //To Provide FLR Config
            if (typeof(T) == typeof(MsmqTransportConfig))
            {
                var flrConfig = new MsmqTransportConfig
                {
                    MaxRetries = 2
                };

                return(flrConfig as T);
            }

            // To in app.config for other sections not defined in this method, otherwise return null.
            return(ConfigurationManager.GetSection(typeof(T).Name) as T);
        }