Does this interface already exist in the standard .NET libraries?
Posted
by
VoidStar
on Stack Overflow
See other posts from Stack Overflow
or by VoidStar
Published on 2012-10-31T22:46:03Z
Indexed on
2012/10/31
23:00 UTC
Read the original article
Hit count: 144
I found myself needing a simple generic interface, and I wrote it, but it turned out to be pretty much the world's simplest interface. I was wondering if it already exists by some other name. I just want to make sure I'm not reinventing something that is already included with the .NET framework.
interface IReceiver<T>
{
void Receive(T obj);
}
I can't really find a good list of "standard" interfaces that came with .NET. Does the structure of this interface look familiar to anyone? Have I reinvented something that is already standard?
EDIT: I have a data object and a number of objects interested in receiving the data. Objects interested in receiving the data implement the interface, so that 'routing' lists and maps can send the data to them. The idea is full generalization in the routing, the routing will be data-driven.
© Stack Overflow or respective owner