Click here to Skip to main content
12,074,485 members (62,589 online)
Click here to Skip to main content

Tagged as

Stats

6.3K views
166 downloads
6 bookmarked
Posted

Event traffic calming

, 26 Jan 2013 CPOL
How to build an object to calm down event traffic.
using System;

namespace SampleDomain
{
    public class Program
    {
        public static void Main(string[] args)
        {
            var repository = new OrderRepository();
            
            repository.OrderArrived += OrderArrived;
            
            repository.StartGenerating();
            Console.ReadLine();
            repository.StopGenerating();
        }
        
        private static void OrderArrived(object sender, EventArgs e)
        {
            Console.WriteLine("Order arrived");
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Erich Ledesma
Architect SunHotels
Spain Spain
I Received a Bachelor's Degree in Computer Science at the Mathematics and Computer Science Faculty, University of Havana, Cuba.

I mainly work in web applications using C# and some Javascript. Some very few times do some Java.

You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.160208.1 | Last Updated 26 Jan 2013
Article Copyright 2013 by Erich Ledesma
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid