FormatVersion: Integer;
FormatVersion: integer;
The FormatVersion property returns information about the version of the object published in the mobile application.
The value of the FormatVersion property is used by the mobile application to determine if it is compatible with this object.
Executing the example requires that the repository contains a mobile application with the MA_PUB identifier. Add links to the Metabase, Mobile system assemblies.
Example execution result: the console window displays the names of mobile applications to be published.
Imports Prognoz.Platform.Interop.Metabase;
Imports Prognoz.Platform.Interop.Mobile;
...
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
MaPubObs: IMobileApplicationPublishObjects;
i: Integer;
MaPubObj: IMobileApplicationPublishObject;
PublishObject: IMobilePublishObject;
formatVersion: integer;
Begin
mb := Params.Metabase;
// Get the published mobile application (MA)
Mobile := mb.ItemById["MA_PUB"].Bind() As IMobileApplication;
// Create a mobile application publicator
Publicator := Mobile.CreatePublicator();
// Get the mobile application objects
MaPubObs := Publicator.Items;
For i := 0 To MaPubObs.Count - 1 Do
MaPubObj := MaPubObs.Item[i];
If MaPubObj.IsValid Then
PublishObject := MaPubObj.PublishObject;
// Display the objects version
formatVersion := PublishObject.FormatVersion;
System.Diagnostics.Debug.WriteLine("Name: " + PublishObject.Object.Name);
System.Diagnostics.Debug.WriteLine("Version a published object: " + formatVersion.ToString());
End If;
End For;
End Sub;
Example execution result: the console window displays the names of mobile applications that are published using the scheduled tasks container.
See also: