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

void lat::ServerData::GetAllAttributes ( List< string >  objClass,
out string[]  required,
out string[]  optional 
) [inline]

Gets a list of required and optional attributes for the given object classes.

Parameters:
objClassList of object classes
requiredRequired attributes
optionalOptional attributes

Definition at line 126 of file ServerData.cs.

            {
                  try {

                        LdapSchema schema = server.GetSchema ();
                        LdapObjectClassSchema ocs;
                        
                        List<string> r_attrs = new List<string> ();
                        List<string> o_attrs = new List<string> ();
                              
                        foreach (string c in objClass) {

                              ocs = schema.getObjectClassSchema ( c );

                              if (ocs.RequiredAttributes != null) {

                                    foreach (string r in ocs.RequiredAttributes)
                                          if (!r_attrs.Contains (r))
                                                r_attrs.Add (r);
                              }

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

                        required = r_attrs.ToArray ();
                        optional = o_attrs.ToArray ();

                  } catch (Exception e) {

                        required = null;
                        optional = null;

                        Log.Debug (e);
                  }
            }

Generated by  Doxygen 1.6.0   Back to index