IRdsDictionaryConverter.ConvertAll

Fore Syntax

ConvertAll(Source: IRdsDictionaryConverterList);

Fore.NET Syntax

ConvertAll(Source: Prognoz.Platform.Interop.Rds.IRdsDictionaryConverterList);

Parameters

Source. MDM dictionary to be converted.

Description

The ConvertAll method converts all MDM dictionaries to table MDM dictionaries.

Comments

To check MDM repository and get the list of MDM dictionaries converted to table MDM dictionaries, use the IRdsDictionaryConverter.AllRdsDatabase method.

Fore Example

Executing the example requires an MDM repository with the 16008 key that contains MDM dictionaries required to convert to table MDM dictionaries.

Add links to the Metabase, Rds system assemblies.

Sub UserProc;
Var
    RDS_DB: IRdsDatabase;
    Converter: IRdsDictionaryConverter;
    List: IRdsDictionaryConverterList;
    Conv, NotConv: IMetabaseObjectDescriptors;
    pReasons: IRdsNotConvertibleReasons;
    pReason: IRdsNotConvertibleReason;
    i, j: Integer;
Begin
    RDS_DB := MetabaseClass.Active.Bind(16008As IRdsDatabase;
    Converter := New RdsDictionaryConverter.Create;
    List := Converter.AllRdsDatabase(RDS_DB);
    Converter.ConvertAll(List);
    Conv := List.ConvertibleDictionaries;
    NotConv := List.NotConvertibleDictionaries;
    Debug.WriteLine("Dictionaries converted: " + Conv.Count.ToString);
    For i := 0 To NotConv.Count - 1 Do
        pReasons := List.GetNotConvertibleReasons(NotConv.Item(i).Key);
        For j := 0 To pReasons.GetExplanation.Length - 1 Do
            pReason := pReasons.Item(j);
            Debug.WriteLine(pReason.GetExplanation);
        End For;
    End For;
End Sub UserProc;

After executing the example the console window displays the following:

Fore.NET Example

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

Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Rds;

Public Shared Sub Main(Params: StartParams);
Var
    RDS_DB: IRdsDatabase;
    Converter: IRdsDictionaryConverter;
    List: IRdsDictionaryConverterList;
    Conv, NotConv: IMetabaseObjectDescriptors;
    pReasons: IRdsNotConvertibleReasons;
    pReason: IRdsNotConvertibleReason;
    i, j: Integer;
Begin
    RDS_DB := Params.Metabase.Bind(16008As IRdsDatabase;
    Converter := New RdsDictionaryConverter.Create();
    List := Converter.AllRdsDatabase(RDS_DB);
    Converter.ConvertAll(List);
    Conv := List.ConvertibleDictionaries;
    NotConv := List.NotConvertibleDictionaries;
    System.Diagnostics.Debug.WriteLine("Dictionaries converted: " + Conv.Count.ToString());
    For i := 0 To NotConv.Count - 1 Do
        pReasons := List.GetNotConvertibleReasons(NotConv.Item[i].Key);
        For j := 0 To pReasons.GetExplanation().Length - 1 Do
            pReason := pReasons.Item[j];
            System.Diagnostics.Debug.WriteLine(pReason.GetExplanation());
        End For;
    End For;
End Sub;

See also:

IRdsDictionaryConverter