Exemple #1
0
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout <ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context => await Task.Delay(context.Message.Size));
            });
        }
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout<ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context => await Task.Delay(context.Message.Size));
            });
        }
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout<ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context =>
                {
                    await Console.Out.WriteLineAsync($"Started: {context.Message.Filename}");

                    await Task.Delay(context.Message.Size);

                    await Console.Out.WriteLineAsync($"Stopped: {context.Message.Filename}");
                });
            });
        }
        protected override void ConfigureInputQueueEndpoint(IInMemoryReceiveEndpointConfigurator configurator)
        {
            base.ConfigureInputQueueEndpoint(configurator);

            configurator.Turnout <ProcessFile>(_busFactoryConfigurator, x =>
            {
                x.SuperviseInterval = TimeSpan.FromSeconds(1);
                x.SetJobFactory(async context =>
                {
                    await Console.Out.WriteLineAsync($"Started: {context.Message.Filename}");

                    await Task.Delay(context.Message.Size);

                    await Console.Out.WriteLineAsync($"Stopped: {context.Message.Filename}");
                });
            });
        }