Config: Remove DecryptConnectionStrings

This commit is contained in:
Jonathan Jenne 2021-05-28 11:01:06 +02:00
parent 5c9eb4bf1b
commit 3d30ab7309

View File

@ -166,27 +166,6 @@ Public Class ConfigManager(Of T)
End Try End Try
End Function End Function
Public Function DecryptConnectionStrings() As Boolean
Try
Dim oType As Type = GetType(T)
Dim oProperties = oType.GetProperties()
Dim oEncryption = New EncryptionLegacy()
For Each oProperty In oProperties
If Attribute.IsDefined(oProperty, GetType(ConnectionStringAttribute)) Then
Dim oValue = oProperty.GetValue(_Config, Nothing)
Dim oDecryptedValue = oEncryption.DecryptConnectionString(oValue)
oProperty.SetValue(_Config, oDecryptedValue, Nothing)
End If
Next
Return True
Catch ex As Exception
_Logger.Error(ex)
Return False
End Try
End Function
''' <summary> ''' <summary>
''' Copies all properties from Source to Target, except those who have an attribute ''' Copies all properties from Source to Target, except those who have an attribute
''' listed in ExcludedAttributeTypes ''' listed in ExcludedAttributeTypes