Am I missing a pattern?
Posted
by
Ryan Pedersen
on Programmers
See other posts from Programmers
or by Ryan Pedersen
Published on 2012-12-11T02:21:09Z
Indexed on
2012/12/11
5:18 UTC
Read the original article
Hit count: 400
I have a class that is a singleton and off of the singleton are properties that hold the instances of all the performance counters in my application.
public interface IPerformanceCounters
{
IPerformanceCounter AccountServiceCallRate { get; }
IPerformanceCounter AccountServiceCallDuration { get; }
Above is an incomplete snippet of the interface for the class "PerformanceCounters" that is the singleton.
I really don't like the plural part of the name and thought about changing it to "PerformanceCounterCollection" but stopped because it really isn't a collection. I also thought about "PerformanceCounterFactory" but it is really a factory either. After failing with these two names and a couple more that aren't worth mentioning I thought that I might be missing a pattern.
Is there a name that make sense or a change that I could make towards a standardized pattern that would help me put some polish on this object and get rid of the plural name?
I understand that I might be splitting hairs here but that is why I thought that the "Programmers" exchange was the place for this kind of thing. If it is not... I am sorry and I will not make that mistake again.
Thanks!
© Programmers or respective owner