Exemple #1
0
        static async Task Main(string[] args)
        {
            var builder = new ContainerBuilder();

            ReAuthEndpointConfig     reAuthEndpointConfig     = ConfigReader.ReadReAuthConfig();
            PfsServiceEndPointConfig pfsServiceEndPointConfig = ConfigReader.ReadPfsServiceEndPoitConfig();

            builder.RegisterInstance(reAuthEndpointConfig);
            builder.RegisterInstance(pfsServiceEndPointConfig);
            builder.RegisterModule(new HandlerModule());
            builder.RegisterModule(new ServiceModule());

            builder.RegisterModule(new ReceiverModule());

            var container = builder.Build();

            var endPointPfsServices = container.Resolve <EndPointPfsServices>();
            var endPointReAuth      = container.Resolve <EndPointReAuth>();


            await endPointPfsServices.Start(container);

            await endPointReAuth.Start(container);

            Console.ReadLine();

            await endPointReAuth.Stop();

            await endPointPfsServices.Stop();
        }
Exemple #2
0
 public EndPointPfsServices(PfsServiceEndPointConfig config)
 {
     _queue      = config.Queue;
     _errorQueue = config.ErrorQueue;
     _maxDop     = config.MaxDop;
     _immediateNumberOfRetries = config.ImmediateNumberOfRetries;
     _delayedNumberOfRetries   = config.DelayedNumberOfRetries;
     _delayedTimeIncrease      = config.DelayedTimeIncrease;
     _install = config.Install;
 }
        public static PfsServiceEndPointConfig ReadPfsServiceEndPoitConfig()
        {
            PfsServiceEndPointConfig config = new PfsServiceEndPointConfig
            {
                DelayedNumberOfRetries   = 10,
                ImmediateNumberOfRetries = 10,
                MaxDop              = 8,
                Queue               = "pfs.services",
                ErrorQueue          = "pfs.services.error",
                DelayedTimeIncrease = new TimeSpan(0, 0, 20),
                Install             = true
            };

            return(config);
        }