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; }
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) { }
internal AD_Container(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass) { }
public void CreateObject(string name, AD_ObjectClass oClass) { DirectoryServices.CreateObject(this.Path, name, oClass); }
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) { }
protected AD_Member(DirectoryEntry entry, AD_ObjectClass oClass) : base(entry, oClass) { this.SAMAccountName = entry.Properties["sAMAccountName"].Value.ToString(); }