Custom AFDataReference 2.x Context and TimeContext not set

Discussion created by JoelBrabant on Nov 16, 2009
Latest reply on Nov 20, 2009 by hanyong

I have a working 1.3 DR that I need to convert to a 2.x DR.


When I use my 2.x DR from PSE, the GetValue method returns an error.


When I break into the first line of the GetValue Method code, I can see that the Context and TimeContext are set to Nothing....


Am I missing something in the implementation?


I use this

Public Overrides Function GetValue(ByVal context As Object, ByVal timeContext As Object, ByVal inputAttributes As OSIsoft.AF.Asset.AFAttributeList, ByVal inputValues As OSIsoft.AF.Asset.AFValues) As OSIsoft.AF.Asset.AFValue

I have also the SupportedContext and Methods like this

Public Overrides ReadOnly Property SupportedContexts() As OSIsoft.AF.Asset.AFDataReferenceContext
        Return AFDataReferenceContext.All
    End Get
End Property

Public Overrides ReadOnly Property SupportedMethods() As OSIsoft.AF.Asset.AFDataReferenceMethod
        Dim suppMethods As AFDataReferenceMethod = CType ((AFDataReferenceMethod.GetValue & AFDataReferenceMethod.GetValues), AFDataReferenceMethod)
        Return suppMethods
    End Get
End Property