IImportRequestInstance.Provider

Fore Syntax

Provider: Object;

Fore.NET Syntax

Provider: object;

Description

The Provider property returns the object used as a data source.

Comments

To work with the returned object, cast it to one of the data sources interfaces.

Fore Example

Executing the example requires a time series database with the FC_COMM identifier that contains an import object with the IMP_OBJ identifier imported from a text file. Add links to the Metabase, Cubes, Dt system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    RubKey: Integer;
    Inst: IImportRequestInstance;
    Provider: IDtTextProvider;
Begin
    mb := MetabaseClass.Active;
    RubKey := mb.GetObjectKeyById("FC_COMM");
    Inst := mb.ItemByIdNamespace("IMP_OBJ", RubKey).Open(NullAs IImportRequestInstance;
    Provider := Inst.Provider As IDtTextProvider;
    Debug.WriteLine(Provider.File);
End Sub UserProc;

After executing the example name of the text file used by the import object is displayed in the console window.

Fore.NET Example

Executing the example requires a time series database with the FC_COMM identifier that contains an import object with the IMP_OBJ identifier imported from a text file.

Imports Prognoz.Platform.Interop.Cubes;
Imports Prognoz.Platform.Interop.Dt;

Public Shared Sub Main(Params: StartParams);
Var
    mb: IMetabase;
    RubKey: uinteger;
    Inst: IImportRequestInstance;
    Provider: IDtTextProvider;
Begin
    mb := Params.Metabase;
    RubKey := mb.GetObjectKeyById("FC_COMM");
    Inst := mb.ItemByIdNamespace["IMP_OBJ", RubKey].Open(NullAs IImportRequestInstance;
    Provider := Inst.Provider As IDtTextProvider;
    System.Diagnostics.Debug.WriteLine(Provider.File);
End Sub;

After executing the example name of the text file used by the import object is displayed in the console window.

See also:

IImportRequestInstance