MONSTER: Rename Monorepo to Modules, only keep Projects under Modules.*

This commit is contained in:
Jonathan Jenne
2022-09-29 13:46:00 +02:00
parent e87b97bfec
commit 042bbce9f4
1557 changed files with 380 additions and 160017 deletions

View File

@@ -0,0 +1,36 @@
Imports System.DirectoryServices.AccountManagement
<DirectoryRdnPrefix("CN")>
<DirectoryObjectClass("Person")>
Public Class UserPrincipalEx
Inherits UserPrincipal
Public Sub New(Context As PrincipalContext)
MyBase.New(Context)
End Sub
Public Sub New(Context As PrincipalContext, samAccountName As String, Password As String, Enabled As Boolean)
MyBase.New(Context, samAccountName, Password, Enabled)
End Sub
Public Overloads Shared Function FindByIdentity(ByVal Context As PrincipalContext, ByVal IdentityValue As String) As UserPrincipalEx
Return CType(FindByIdentityWithType(Context, GetType(UserPrincipalEx), IdentityValue), UserPrincipalEx)
End Function
Public Overloads Shared Function FindByIdentity(ByVal Context As PrincipalContext, ByVal IdentityType As IdentityType, ByVal IdentityValue As String) As UserPrincipalEx
Return CType(FindByIdentityWithType(Context, GetType(UserPrincipalEx), IdentityType, IdentityValue), UserPrincipalEx)
End Function
Public Function GetAttributeValue(AttributeName As String) As String
Return TryGetAttribute(AttributeName)
End Function
Private Function TryGetAttribute(AttributeName As String) As String
Dim oAttribute = ExtensionGet(AttributeName)
If oAttribute.Length <> 1 Then
Return String.Empty
End If
Return CStr(oAttribute(0))
End Function
End Class