Click here to Skip to main content
15,886,806 members
Articles / Programming Languages / C#

An Event Pool

Rate me:
Please Sign up or sign in to vote.
4.68/5 (48 votes)
21 Feb 2004CPOL4 min read 153.6K   3.1K   105  
An event pool helps manage large amounts of events that otherwise clutter up your code and make maintenance difficult.
/*
Copyright (c) 2004, Marc Clifton
All rights reserved.
Usage restricted under the terms of the BSD License conditions:
http://opensource.org/licenses/bsd-license.php
*/

using System;
using System.Drawing;
using System.Reflection;

namespace XmlGuiGenerator
{
	public class ObjectModel : PropertyModelBase
	{
		public override void SetValue(object obj, PropertyInfo pi, string val)
		{
			try
			{
				pi.SetValue(obj, val, null);
			}
			catch
			{
				throw new PropertySetException("ObjectModel setter failed.");
			}
		}
	}
}

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)


Written By
Architect Interacx
United States United States
Blog: https://marcclifton.wordpress.com/
Home Page: http://www.marcclifton.com
Research: http://www.higherorderprogramming.com/
GitHub: https://github.com/cliftonm

All my life I have been passionate about architecture / software design, as this is the cornerstone to a maintainable and extensible application. As such, I have enjoyed exploring some crazy ideas and discovering that they are not so crazy after all. I also love writing about my ideas and seeing the community response. As a consultant, I've enjoyed working in a wide range of industries such as aerospace, boatyard management, remote sensing, emergency services / data management, and casino operations. I've done a variety of pro-bono work non-profit organizations related to nature conservancy, drug recovery and women's health.

Comments and Discussions