irek.Configuration.Config.Get C# (CSharp) 메소드

Get() 공개 메소드

Gets the specified key.
public Get ( string key ) : string
key string The key.
리턴 string
        public string Get(string key)
        {
            if (Map.ContainsKey((object)key))
            {
                string val = Map[key].ToString();
                return val;
            }
            else
            {
                throw new Errors.InvalidConfigurationKeyException("No key '" + key + "' was found in your configuration.");
            }
        }

Usage Example

예제 #1
0
파일: Listener.cs 프로젝트: theanti9/irek
 /// <summary>
 /// Initializes a new instance of the <see cref="Listener"/> class.
 /// </summary>
 /// <param name="cfg">The Config Object.</param>
 public Listener(Config cfg, List<UrlMapItem> UrlMap, Hashtable modulelist)
 {
     port = int.Parse(cfg.Get("port"));
     config = cfg;
     GlobalUrlMap = UrlMap;
     ServicePointManager.DefaultConnectionLimit = 20;
     ModuleList = modulelist;
 }