1 instantiation of UserPrincipal
System.DirectoryServices.AccountManagement (1)
System\DirectoryServices\AccountManagement\User.cs (1)
274
UserPrincipal u = new
UserPrincipal
(ctx);
102 references to UserPrincipal
System.DirectoryServices.AccountManagement (102)
System\DirectoryServices\AccountManagement\AD\ADAMStoreCtx.cs (1)
165
Debug.Assert(p is
UserPrincipal
);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx.cs (6)
268
TypeToLdapDict.Add(typeof(
UserPrincipal
), userPrincipalPropList);
738
principalType.IsSubclassOf(typeof(
UserPrincipal
)) ||
807
else if ((principalType == typeof(
UserPrincipal
)) || (principalType.IsSubclassOf(typeof(
UserPrincipal
))))
1581
Debug.Assert(p is
UserPrincipal
);
1686
BuildPropertySet(typeof(
UserPrincipal
), dsMembers[0].PropertiesToLoad);
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_LoadStore.cs (5)
52
if (principalType == typeof(
UserPrincipal
))
73
principalType.IsSubclassOf(typeof(
UserPrincipal
)) ||
486
BuildPropertySet(typeof(
UserPrincipal
), ds.PropertiesToLoad);
1531
if ((memberType != typeof(
UserPrincipal
)) && (!memberType.IsSubclassOf(typeof(
UserPrincipal
))) &&
System\DirectoryServices\AccountManagement\AD\ADStoreCtx_Query.cs (3)
57
if (p.IsSubclassOf(typeof(
UserPrincipal
)))
59
baseType = typeof(
UserPrincipal
);
191
if (principalType == typeof(
UserPrincipal
))
System\DirectoryServices\AccountManagement\AD\SDSUtils.cs (7)
31
if (typeof(
UserPrincipal
) == principalType)
33
p =
UserPrincipal
.MakeUser(owningContext);
53
p =
UserPrincipal
.MakeUser(owningContext);
89
if (typeof(
UserPrincipal
) == principalType)
91
p =
UserPrincipal
.MakeUser(owningContext);
111
p =
UserPrincipal
.MakeUser(owningContext);
211
if ((!(p is
UserPrincipal
)) &&
System\DirectoryServices\AccountManagement\Context.cs (2)
1227
if (t == typeof(System.DirectoryServices.AccountManagement.
UserPrincipal
) || t.IsSubclassOf(typeof(System.DirectoryServices.AccountManagement.
UserPrincipal
)))
System\DirectoryServices\AccountManagement\PrincipalCollection.cs (3)
228
public void Add(
UserPrincipal
user)
351
public bool Remove(
UserPrincipal
user)
546
public bool Contains(
UserPrincipal
user)
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx.cs (11)
48
s_maskMap.Add(typeof(
UserPrincipal
), ObjectMask.User);
80
if (principalType == typeof(
UserPrincipal
))
377
if ((principalType == typeof(
UserPrincipal
)) || (principalType.IsSubclassOf(typeof(
UserPrincipal
))))
455
Debug.Assert(p is
UserPrincipal
|| p is ComputerPrincipal);
480
Debug.Assert(p is
UserPrincipal
|| p is ComputerPrincipal);
532
Debug.Assert(p is
UserPrincipal
|| p is ComputerPrincipal);
618
if (!(p is
UserPrincipal
))
696
UserPrincipal
u =
UserPrincipal
.FindByIdentity(this.OwningContext, IdentityType.Sid, Sid.ToString());
716
Debug.Assert(p is
UserPrincipal
);
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_LoadStore.cs (40)
46
if (principalType == typeof(
UserPrincipal
) || principalType.IsSubclassOf(typeof(
UserPrincipal
)))
86
if (principalType == typeof(
UserPrincipal
))
234
if (principalType == typeof(
UserPrincipal
))
292
if (principalType == typeof(
UserPrincipal
))
544
if (principalType == typeof(
UserPrincipal
) || principalType.IsSubclassOf(typeof(
UserPrincipal
)))
547
principalType = typeof(
UserPrincipal
);
601
if ((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)},
1071
if ((memberType != typeof(
UserPrincipal
)) && (!memberType.IsSubclassOf(typeof(
UserPrincipal
))) &&
System\DirectoryServices\AccountManagement\SAM\SAMStoreCtx_Query.cs (2)
114
if (principalType == typeof(
UserPrincipal
) || principalType.IsSubclassOf(typeof(
UserPrincipal
)))
System\DirectoryServices\AccountManagement\StoreCtx.cs (1)
331
if (p is
UserPrincipal
) // includes AccountInfo and PasswordInfo
System\DirectoryServices\AccountManagement\User.cs (21)
171
public static
UserPrincipal
Current
195
UserPrincipal
user = null;
205
user =
UserPrincipal
.FindByIdentity(context, IdentityType.Sid, sidObj.ToString());
229
public static new PrincipalSearchResult<
UserPrincipal
> FindByLockoutTime(PrincipalContext context, DateTime time, MatchType type)
231
return FindByLockoutTime<
UserPrincipal
>(context, time, type);
234
public static new PrincipalSearchResult<
UserPrincipal
> FindByLogonTime(PrincipalContext context, DateTime time, MatchType type)
236
return FindByLogonTime<
UserPrincipal
>(context, time, type);
239
public static new PrincipalSearchResult<
UserPrincipal
> FindByExpirationTime(PrincipalContext context, DateTime time, MatchType type)
241
return FindByExpirationTime<
UserPrincipal
>(context, time, type);
244
public static new PrincipalSearchResult<
UserPrincipal
> FindByBadPasswordAttempt(PrincipalContext context, DateTime time, MatchType type)
246
return FindByBadPasswordAttempt<
UserPrincipal
>(context, time, type);
249
public static new PrincipalSearchResult<
UserPrincipal
> FindByPasswordSetTime(PrincipalContext context, DateTime time, MatchType type)
251
return FindByPasswordSetTime<
UserPrincipal
>(context, time, type);
254
public static new
UserPrincipal
FindByIdentity(PrincipalContext context, string identityValue)
256
return (
UserPrincipal
)FindByIdentityWithType(context, typeof(
UserPrincipal
), identityValue);
259
public static new
UserPrincipal
FindByIdentity(PrincipalContext context, IdentityType identityType, string identityValue)
261
return (
UserPrincipal
)FindByIdentityWithType(context, typeof(
UserPrincipal
), identityType, identityValue);
272
internal static
UserPrincipal
MakeUser(PrincipalContext ctx)
274
UserPrincipal
u = new UserPrincipal(ctx);