Blog.DAL.UstawieniaServices.getSettings C# (CSharp) Method

getSettings() public method

public getSettings ( string key ) : string
key string
return string
        public string getSettings(string key)
        {
            #region walidacja
            if (String.IsNullOrEmpty(key)) throw new ArgumentException("Klucz nie może być pusty", key);
            if (String.IsNullOrWhiteSpace(key)) throw new ArgumentException("Klucz nie może zawierać białych znaków", key);
            if (!existSettings(key)) throw new ArgumentException("Podany klucz: "+key+" nie istnieje", key);
            #endregion

            return _ustawienia.getSettings(key);
        }