IDtRecordsetUserData.UserData

Fore Syntax

UserData: IXmlDomElement;

Fore.NET Syntax

UserData: Prognoz.Platform.Interop.MsXml2.IXmlDomElement;

Description

The UserData property determines advanced settings in the XML format for custom data source or consumer.

Comments

Features of work with the XML files are presented on theExample of Working with XML Files page.

Fore Example

Connect the Dt, MathFin, Metabase, Xml system assemblies.

Class MyProvider: Object, IDtRecordsetProvider, IDtRecordsetUserData
    UserD: IXmlDomElement;
    
    Public Function Fetch: Array Of Variant;
        Var
            ResArray: Array[0..10..10Of Variant;
            i, j: integer;
        Begin
            For j := 0 To 10 Do
                For i := 0 To 1 Do
                    If i = 0 Then
                        ResArray[i, j] := "Code-" + j.ToString;
                    Else
                        ResArray[i, j] := Math.RandBetween(0100);
                    End If;
                End For;
            End For;
            Return ResArray;
    End Function Fetch;
    
    Public Function get_userData: IXmlDomElement;
        Begin
            Return UserD;
    End Function get_userData;

    Public Sub set_userData(value: IXmlDomElement);
        Begin
            UserD := value;
    End Sub set_userData;
    
End Class MyProvider;

The example is a macro containing implementation of:

Fore.NET Example

The requirements and result of the Fore.NET example execution match with those in the Fore example.

Imports Prognoz.Platform.Interop.Dt;
Imports Prognoz.Platform.Interop.MathFin;
Imports Prognoz.Platform.Interop.MsXml2;

Class MyProvider: Object, IDtRecordsetProvider, IDtRecordsetUserData
    UserD: IXmlDomElement;
    
    Public Function Fetch(): System.Array;
        Var
            ResArray: Array[0..10..10];
            i, j: integer;
            CMath: MathClass = New MathClass();
        Begin
            For j := 0 To 10 Do
                For i := 0 To 1 Do
                    If i = 0 Then
                        ResArray[i, j] := "Code-" + j.ToString();
                    Else
                        ResArray[i, j] := CMath.RandBetween(0100);
                    End If;
                End For;
            End For;
            Return ResArray;
    End Function Fetch;
    
    Public Property UserData: IXmlDomElement
        Get
        Begin
            Return UserD;
        End Get
        Set
        Begin
        End Set
    End Property UserData;

End Class MyProvider;

See also:

IDtRecordsetUserData