jj
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
Imports System.Configuration
|
||||
Imports System
|
||||
|
||||
Public Class AppConfig
|
||||
|
||||
@@ -10,21 +9,21 @@ Public Class AppConfig
|
||||
Dim appsettings As AppSettingsSection = appconfig.AppSettings
|
||||
Dim settings As KeyValueConfigurationCollection = appsettings.Settings
|
||||
|
||||
Dim values As New ConfigValues()
|
||||
|
||||
values.username = settings.Item("dpma_username").Value
|
||||
values.password = settings.Item("dpma_password").Value
|
||||
values.query = settings.Item("dpma_query").Value
|
||||
values.queryIgnore = settings.Item("dpma_query_ignore").Value
|
||||
values.connstring = settings.Item("sql_connstring").Value
|
||||
values.database = settings.Item("sql_database").Value
|
||||
values.searchType = settings.Item("search_type").Value
|
||||
Dim values As New ConfigValues() With {
|
||||
.username = settings.Item("dpma_username").Value,
|
||||
.password = settings.Item("dpma_password").Value,
|
||||
.query = settings.Item("dpma_query").Value,
|
||||
.queryIgnore = settings.Item("dpma_query_ignore").Value,
|
||||
.connstring = settings.Item("sql_connstring").Value,
|
||||
.database = settings.Item("sql_database").Value,
|
||||
.searchType = settings.Item("search_type").Value
|
||||
}
|
||||
|
||||
Return values
|
||||
End Function
|
||||
|
||||
Public Shared Function GetVersion()
|
||||
Dim assembly As System.Reflection.Assembly = System.Reflection.Assembly.GetExecutingAssembly()
|
||||
Dim assembly As Reflection.Assembly = Reflection.Assembly.GetExecutingAssembly()
|
||||
Dim fvi As FileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location)
|
||||
Dim version As String = fvi.FileVersion
|
||||
Return version
|
||||
@@ -40,7 +39,4 @@ Public Class ConfigValues
|
||||
Public connstring As String
|
||||
Public database As String
|
||||
Public searchType As String
|
||||
|
||||
Public Sub New()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user