Esempio n. 1
0
 internal AD_User(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass)
 {
     this.FirstName = (entry.Properties["givenname"].Value ?? "").ToString();
     this.Initials  = (entry.Properties["initials"].Value ?? "").ToString();
     this.LastName  = (entry.Properties["sn"].Value ?? "").ToString();
     this.Email     = (entry.Properties["mail"].Value ?? "").ToString();
     this.Enabled   = ((int)entry.Properties["userAccountControl"].Value & 2) == 0;
 }
Esempio n. 2
0
 protected AD_Object(DirectoryEntry entry, AD_ObjectClass oClass)
 {
     this.ObjectClass            = oClass;
     this.Path                   = entry.Path ?? "";
     this.Guid                   = new Guid((byte[])entry.Properties["objectGUID"].Value);
     this.Name                   = entry.Properties["name"].Value.ToString();
     this.Description            = entry.Properties["description"].Value?.ToString() ?? "";
     this.DistinguishedName      = entry.Properties["distinguishedName"].Value.ToString();
     this.Created                = (DateTime)entry.Properties["whenCreated"].Value;
     this.Changed                = (DateTime)entry.Properties["whenChanged"].Value;
     this.ObjectCategory         = entry.Properties["objectCategory"].Value.ToString();
     this.IsCriticalSystemObject = (bool?)entry.Properties["isCriticalSystemObject"].Value;
 }
 internal AD_ConnectionPoint(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass)
 {
 }
Esempio n. 4
0
 internal AD_Container(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass)
 {
 }
Esempio n. 5
0
 public void CreateObject(string name, AD_ObjectClass oClass)
 {
     DirectoryServices.CreateObject(this.Path, name, oClass);
 }
Esempio n. 6
0
 public AD_Object[] GetObjects(AD_ObjectClass oClass = AD_ObjectClass.All, AD_SearchScope scope = AD_SearchScope.Base)
 {
     return(DirectoryServices.GetObjects(this.Path, oClass, scope));
 }
 internal AD_PrintQueue(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass)
 {
 }
Esempio n. 8
0
 protected AD_Member(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass)
 {
     this.SAMAccountName = entry.Properties["sAMAccountName"].Value.ToString();
 }