using System.Collections.Generic;
namespace BL
{
//hop_conf
public class Conf
{
#region Singleton Instantiation
Conf () { RegisterVariables (); }
public static Conf Instance
{
get { return Singleton.instance; }
}
class Singleton
{
static Singleton () { }
internal static readonly Conf instance =
new Conf ();
}
#endregion
private IDictionary
public IDictionary
{
get { return _innerHash; }
}
private void RegisterVariables ()
{
_innerHash.Add ( "varName" , "theVarName" );
_innerHash.Add ( "appName" , "theAppName" );
_innerHash.Add ( "appNameLong" , "theAppNameLong" );
} //eof method RegisterVariables
} //eof class Conf
} //eof namespace
//how-to access conf variables BL.Conf.Instance.Vars [ "varName" ] would give you "theVarName
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!