Logo Search packages:      
Sourcecode: lat version File versions  Download package

string [] lat::ServerData::GetAllAttributes ( string  objClass ) [inline]

Gets a list of all attributes for the given object class.

Parameters:
objClassName of object class

Definition at line 90 of file ServerData.cs.

            {
                  try {

                        LdapSchema schema = server.GetSchema ();
                        LdapObjectClassSchema ocs = schema.getObjectClassSchema ( objClass );
                        
                        List<string> attrs = new List<string> ();
                        
                        if (ocs.RequiredAttributes != null) {
                              foreach (string r in ocs.RequiredAttributes)
                                    if (!attrs.Contains (r))
                                          attrs.Add (r);
                        }

                        if (ocs.OptionalAttributes != null) {
                              foreach (string o in ocs.OptionalAttributes)
                                    if (!attrs.Contains (o))
                                          attrs.Add (o);
                        }

                        attrs.Sort ();
                        return attrs.ToArray ();

                  } catch (Exception e) {
                        Log.Debug (e);
                        return null;
                  }
            }

Generated by  Doxygen 1.6.0   Back to index