Part of the Singleton template is usually a private constructor, so other classes cannot create new instances.
A workaround for parameters coming from outside the class is to add the "Init" or "Configure" function:
public static void Configure(NameValueCollection properties) { }
Of course, if you forget to call this function, you can get behavior that you do not want; therefore, you can set the "Configured" flag or something similar so that your other functions can react accordingly if that function has not yet been called.
Bradleydotnet
source share