I have the following bits of code which, in my mind, seem like the bare basics necessary to implement the Observer pattern. Is this standard, or am I doing something wrong?
public class LayoutManager
{
public CormantTimer Timer { get; set; }
}
protected void Page_Init(object sender, EventArgs e)
{
LayoutManager.Instance.Timer = RefreshAndCycleTimer;
}
public class CormantRadDock : RadDock, ICormantControl<RadDockSetting>
{
public CormantRadDock()
{
LayoutManager.Instance.Timer.TimerEvent += DoTimerRefreshTick;
}
}
The CormantRadDock objects are dynamically created. RefreshAndCycleTimer is on Page.
I am worried that, as my project grows larger, there will be a large amount of non-related controls in LayoutManager -- just there to be subscribed to. Is this standard? Should I be doing something different?
Thanks