コード例 #1
0
 void BindList (SchemaManager mgr)
 {
     var om = mgr.GetObjectClassManager ();
     _list = om.Data.Values.ToList ();
     _list.Sort (SortObjectClassDTO);
     dataSourceList = new List<KeyValuePair<string,string>> ();
     foreach (var obj in _list) {
         dataSourceList.Add (new KeyValuePair<string,string> (obj.Name, obj.Description));
     }
 }
コード例 #2
0
        //returns 1 if success and 0 if failure
        public  int CreateConnection ()
        {
            try {
                ldConn = new LdapConnection ();
                if (ldConn == null)
                    throw new Exception ("Ldap Connection is null");

                bool isServerReachable = CheckServerReachability (this.server, LDAPOption.LDAP_PORT, VMDirConstants.SERVERTIMEOUT_IN_MILLI);
                if (isServerReachable == true) {
                    ldConn.VmDirSafeLDAPBind (this.server, this.bindDN, this.password);
                    _schemaManager = new SchemaManager (this);
                    _schemaManager.RefreshSchema ();
                    return 1;
                }
                return 0;

            } catch (Exception e) {
                return 0; 
            }
        }
コード例 #3
0
 public SelectObjectClassWindowController (SchemaManager mgr) : base ("SelectObjectClassWindow")
 {
     BindList (mgr);
 }