2022-01-10 15:50:13 +01:00

29 lines
1.1 KiB
VB.net

Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Namespace Methods.GetAttributeValue
Public Class GetAttributeValueMethod
Inherits BaseMethod
Public Sub New(pLogConfig As LogConfig, pDatabaseIDB As MSSQLServer, pDatabaseECM As MSSQLServer, pGlobalState As GlobalState)
MyBase.New(pLogConfig, pDatabaseIDB, pDatabaseECM, pGlobalState)
End Sub
Public Function Run(pData As GetAttributeValueRequest) As GetAttributeValueResponse
Try
If Helpers.TestObjectIdExists(pData.ObjectId) = False Then
LogAndThrow("ObjectId does not exist!")
End If
Dim oValue As Object
' TODO: Implement GetAttributeValue
Return New GetAttributeValueResponse(pData.ObjectId, oValue)
Catch ex As Exception
Logger.Warn("Error occurred while getting attribute value!")
Return New GetAttributeValueResponse(ex)
End Try
End Function
End Class
End Namespace