1 instantiation of UserPrincipal
System.DirectoryServices.AccountManagement (1)
System\DirectoryServices\AccountManagement\User.cs (1)
274UserPrincipal u = new UserPrincipal(ctx);
102 references to UserPrincipal
System.DirectoryServices.AccountManagement (102)
System\DirectoryServices\AccountManagement\AD\ADAMStoreCtx.cs (1)
165Debug.Assert(p is UserPrincipal);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (6)
268TypeToLdapDict.Add(typeof(UserPrincipal), userPrincipalPropList); 738principalType.IsSubclassOf(typeof(UserPrincipal)) || 807else if ((principalType == typeof(UserPrincipal)) || (principalType.IsSubclassOf(typeof(UserPrincipal)))) 1581Debug.Assert(p is UserPrincipal); 1686BuildPropertySet(typeof(UserPrincipal), dsMembers[0].PropertiesToLoad);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (5)
52if (principalType == typeof(UserPrincipal)) 73principalType.IsSubclassOf(typeof(UserPrincipal)) || 486BuildPropertySet(typeof(UserPrincipal), ds.PropertiesToLoad); 1531if ((memberType != typeof(UserPrincipal)) && (!memberType.IsSubclassOf(typeof(UserPrincipal))) &&
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (3)
57if (p.IsSubclassOf(typeof(UserPrincipal))) 59baseType = typeof(UserPrincipal); 191if (principalType == typeof(UserPrincipal))
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (7)
31if (typeof(UserPrincipal) == principalType) 33p = UserPrincipal.MakeUser(owningContext); 53p = UserPrincipal.MakeUser(owningContext); 89if (typeof(UserPrincipal) == principalType) 91p = UserPrincipal.MakeUser(owningContext); 111p = UserPrincipal.MakeUser(owningContext); 211if ((!(p is UserPrincipal)) &&
System\DirectoryServices\AccountManagement\Context.cs (2)
1227if (t == typeof(System.DirectoryServices.AccountManagement.UserPrincipal) || t.IsSubclassOf(typeof(System.DirectoryServices.AccountManagement.UserPrincipal)))
System\DirectoryServices\AccountManagement\PrincipalCollection.cs (3)
228public void Add(UserPrincipal user) 351public bool Remove(UserPrincipal user) 546public bool Contains(UserPrincipal user)
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (11)
48s_maskMap.Add(typeof(UserPrincipal), ObjectMask.User); 80if (principalType == typeof(UserPrincipal)) 377if ((principalType == typeof(UserPrincipal)) || (principalType.IsSubclassOf(typeof(UserPrincipal)))) 455Debug.Assert(p is UserPrincipal || p is ComputerPrincipal); 480Debug.Assert(p is UserPrincipal || p is ComputerPrincipal); 532Debug.Assert(p is UserPrincipal || p is ComputerPrincipal); 618if (!(p is UserPrincipal)) 696UserPrincipal u = UserPrincipal.FindByIdentity(this.OwningContext, IdentityType.Sid, Sid.ToString()); 716Debug.Assert(p is UserPrincipal);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (40)
46if (principalType == typeof(UserPrincipal) || principalType.IsSubclassOf(typeof(UserPrincipal))) 86if (principalType == typeof(UserPrincipal)) 234if (principalType == typeof(UserPrincipal)) 292if (principalType == typeof(UserPrincipal)) 544if (principalType == typeof(UserPrincipal) || principalType.IsSubclassOf(typeof(UserPrincipal))) 547principalType = typeof(UserPrincipal); 601if ((principalType == typeof(UserPrincipal)) && SAMUtils.IsOfObjectClass(de, "User")) 644{PropertyNames.PrincipalDisplayName, typeof(UserPrincipal), "FullName", new FromWinNTConverterDelegate(StringFromWinNTConverter), new ToWinNTConverterDelegate(StringToWinNTConverter)}, 645{PropertyNames.PrincipalDescription, typeof(UserPrincipal), "Description", new FromWinNTConverterDelegate(StringFromWinNTConverter), new ToWinNTConverterDelegate(StringToWinNTConverter)}, 649{PropertyNames.PrincipalDistinguishedName, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 650{PropertyNames.PrincipalGuid, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 651{PropertyNames.PrincipalUserPrincipalName, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 658{PropertyNames.AuthenticablePrincipalEnabled, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 659{PropertyNames.AuthenticablePrincipalCertificates, typeof(UserPrincipal), "*******", new FromWinNTConverterDelegate(CertFromWinNTConverter), new ToWinNTConverterDelegate(CertToWinNT)}, 666{PropertyNames.UserEmailAddress, typeof(UserPrincipal), "*******", new FromWinNTConverterDelegate(EmailFromWinNTConverter), new ToWinNTConverterDelegate(EmailToWinNTConverter)}, 669{PropertyNames.AcctInfoLastLogon, typeof(UserPrincipal), "LastLogin", new FromWinNTConverterDelegate(DateFromWinNTConverter), null}, 670{PropertyNames.AcctInfoPermittedWorkstations, typeof(UserPrincipal), "LoginWorkstations", new FromWinNTConverterDelegate(MultiStringFromWinNTConverter), new ToWinNTConverterDelegate(MultiStringToWinNTConverter)}, 671{PropertyNames.AcctInfoPermittedLogonTimes, typeof(UserPrincipal), "LoginHours", new FromWinNTConverterDelegate(BinaryFromWinNTConverter), new ToWinNTConverterDelegate(LogonHoursToWinNTConverter)}, 672{PropertyNames.AcctInfoExpirationDate, typeof(UserPrincipal), "AccountExpirationDate", new FromWinNTConverterDelegate(DateFromWinNTConverter), new ToWinNTConverterDelegate(AcctExpirDateToNTConverter)}, 673{PropertyNames.AcctInfoSmartcardRequired, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 674{PropertyNames.AcctInfoDelegationPermitted, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 675{PropertyNames.AcctInfoBadLogonCount, typeof(UserPrincipal), "BadPasswordAttempts", new FromWinNTConverterDelegate(IntFromWinNTConverter), null}, 676{PropertyNames.AcctInfoHomeDirectory, typeof(UserPrincipal), "HomeDirectory", new FromWinNTConverterDelegate(StringFromWinNTConverter), new ToWinNTConverterDelegate(StringToWinNTConverter)}, 677{PropertyNames.AcctInfoHomeDrive, typeof(UserPrincipal), "HomeDirDrive", new FromWinNTConverterDelegate(StringFromWinNTConverter), new ToWinNTConverterDelegate(StringToWinNTConverter)}, 678{PropertyNames.AcctInfoScriptPath, typeof(UserPrincipal), "LoginScript", new FromWinNTConverterDelegate(StringFromWinNTConverter), new ToWinNTConverterDelegate(StringToWinNTConverter)}, 681{PropertyNames.PwdInfoLastPasswordSet, typeof(UserPrincipal), "PasswordAge", new FromWinNTConverterDelegate(ElapsedTimeFromWinNTConverter), null}, 682{PropertyNames.PwdInfoLastBadPasswordAttempt, typeof(UserPrincipal), "*******", new FromWinNTConverterDelegate(LastBadPwdAttemptFromWinNTConverter), null}, 683{PropertyNames.PwdInfoPasswordNotRequired, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 684{PropertyNames.PwdInfoPasswordNeverExpires, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 685{PropertyNames.PwdInfoCannotChangePassword, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 686{PropertyNames.PwdInfoAllowReversiblePasswordEncryption, typeof(UserPrincipal), "UserFlags", new FromWinNTConverterDelegate(UserFlagsFromWinNTConverter), new ToWinNTConverterDelegate(UserFlagsToWinNTConverter)}, 691{PropertyNames.UserGivenName, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 692{PropertyNames.UserMiddleName, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 693{PropertyNames.UserSurname, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 694{PropertyNames.UserVoiceTelephoneNumber, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 695{PropertyNames.UserEmployeeID, typeof(UserPrincipal), null, null, new ToWinNTConverterDelegate(ExceptionToWinNTConverter)}, 1071if ((memberType != typeof(UserPrincipal)) && (!memberType.IsSubclassOf(typeof(UserPrincipal))) &&
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_Query.cs (2)
114if (principalType == typeof(UserPrincipal) || principalType.IsSubclassOf(typeof(UserPrincipal)))
System\DirectoryServices\AccountManagement\StoreCtx.cs (1)
331if (p is UserPrincipal) // includes AccountInfo and PasswordInfo
System\DirectoryServices\AccountManagement\User.cs (21)
171public static UserPrincipal Current 195UserPrincipal user = null; 205user = UserPrincipal.FindByIdentity(context, IdentityType.Sid, sidObj.ToString()); 229public static new PrincipalSearchResult<UserPrincipal> FindByLockoutTime(PrincipalContext context, DateTime time, MatchType type) 231return FindByLockoutTime<UserPrincipal>(context, time, type); 234public static new PrincipalSearchResult<UserPrincipal> FindByLogonTime(PrincipalContext context, DateTime time, MatchType type) 236return FindByLogonTime<UserPrincipal>(context, time, type); 239public static new PrincipalSearchResult<UserPrincipal> FindByExpirationTime(PrincipalContext context, DateTime time, MatchType type) 241return FindByExpirationTime<UserPrincipal>(context, time, type); 244public static new PrincipalSearchResult<UserPrincipal> FindByBadPasswordAttempt(PrincipalContext context, DateTime time, MatchType type) 246return FindByBadPasswordAttempt<UserPrincipal>(context, time, type); 249public static new PrincipalSearchResult<UserPrincipal> FindByPasswordSetTime(PrincipalContext context, DateTime time, MatchType type) 251return FindByPasswordSetTime<UserPrincipal>(context, time, type); 254public static new UserPrincipal FindByIdentity(PrincipalContext context, string identityValue) 256return (UserPrincipal)FindByIdentityWithType(context, typeof(UserPrincipal), identityValue); 259public static new UserPrincipal FindByIdentity(PrincipalContext context, IdentityType identityType, string identityValue) 261return (UserPrincipal)FindByIdentityWithType(context, typeof(UserPrincipal), identityType, identityValue); 272internal static UserPrincipal MakeUser(PrincipalContext ctx) 274UserPrincipal u = new UserPrincipal(ctx);