/// <summary>
/// Returns the attribute value specified in the second string parameter
///
/// TODO: Need more error handling
/// </summary>
/// <param name="entry">
/// A <see cref="LdapEntry"/>
/// </param>
/// <param name="attr">
/// A <see cref="System.String"/>
/// </param>
/// <returns>
/// A <see cref="System.String"/>
/// </returns>
public static string getAttr(LdapAttributeSet attrSet, ATTRNAME attr)
{
string sAttr = attr.ToString();
Logger.Debug("Requesting Attribute value of {0}", attrSet.getAttribute(sAttr));
if (attrSet.getAttribute(sAttr) == null)
return null;
else {
Logger.Debug(" Attribute {0} -> {1}", sAttr, attrSet.getAttribute(sAttr).StringValue);
return attrSet.getAttribute(sAttr).StringValue;
}
}