I want to have a generic event that I can fire that will take a custom eventArgs> e
Here is my code so far
public event resultsEventHandler<T> returnResults;
public delegate void resultsEventHandler<T>(object sender, resultEventArgs<ObservableEntityCollection<T>> e);
protected virtual void OnreturnResults(resultEventArgs<ObservableEntityCollection<T>> > e)
{
if (returnResults != null)
{
returnResults<T>(this, e);
}
}
public class resultEventArgs<ObservableEntityCollection<T>> : EventArgs
{
private readonly ObservableEntityCollection<T> _results;
public resultEventArgs(ObservableEntityCollection<T> results)
{
this._results = results;
}
public ObservableEntityCollection<T>> queryResult
{
get { return _results; }
}
}