/// <summary> /// Allows for return of setting when instantiated /// </summary> /// <param name="key">Key of item to retrieve the value</param> /// <returns>Value contents</returns> public ConnectionStringSafe ConnectionString(string key) { ConnectionStringSafe ReturnData = ConnectionStrings.Find(x => x.Key == key).CastSafe <ConnectionStringSafe>(); if (ThrowException && ReturnData.Value == TypeExtension.DefaultString) { throw new System.DataMisalignedException(String.Format("Connection string is missing or has an empty value. {0}", key)); } return(ReturnData); }