AllDictionary(Source: IRdsDictionary): IRdsDictionaryConverterList;
AllDictionary(Source: Prognoz.Platform.Interop.Rds.IRdsDictionary): Prognoz.Platform.Interop.Rds.IRdsDictionaryConverterList;
Source. MDM dictionary to be converted.
The AllDictionary property returns the list of MDM dictionaries converted to table MDM dictionaries.
To convert all MDM dictionaries to table MDM dictionaries, use the IRdsDictionaryConverter.ConvertAll method.
Executing the example requires an MDM dictionary with the 16012 key.
Add links to the Metabase, Rds system assemblies.
Sub UserProc;
Var
RDS: IRdsDictionary;
Converter: IRdsDictionaryConverter;
List: IRdsDictionaryConverterList;
NotConv: IMetabaseObjectDescriptors;
pReasons: IRdsNotConvertibleReasons;
i, j: Integer;
strs: Array Of String;
Begin
RDS := MetabaseClass.Active.Bind(16012) As IRdsDictionary;
Converter := New RdsDictionaryConverter.Create;
List := Converter.AllDictionary(RDS);
NotConv := List.NotConvertibleDictionaries;
For i := 0 To NotConv.Count - 1 Do
pReasons := List.GetNotConvertibleReasons(NotConv.Item(i).Key);
strs := pReasons.GetExplanation;
For j := 0 To strs.Length - 1 Do
Debug.WriteLine(strs[j]);
End For;
End For;
End Sub UserProc;
After executing the example the console window displays the reasons, due to which MDM dictionary cannot be converted to table MDM dictionary.
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: IRdsDictionary;
Converter: IRdsDictionaryConverter;
List: IRdsDictionaryConverterList;
NotConv: IMetabaseObjectDescriptors;
pReasons: IRdsNotConvertibleReasons;
i, j: Integer;
strs: System.Array;
Begin
RDS := Params.Metabase.Bind(16012) As IRdsDictionary;
Converter := New RdsDictionaryConverter.Create();
List := Converter.AllDictionary[RDS];
NotConv := List.NotConvertibleDictionaries;
For i := 0 To NotConv.Count - 1 Do
pReasons := List.GetNotConvertibleReasons(NotConv.Item[i].Key);
strs := pReasons.GetExplanation();
For j := 0 To strs.Length - 1 Do
System.Diagnostics.Debug.WriteLine(strs[j]);
End For;
End For;
End Sub;
See also: