Version: Integer;
Version: integer;
The Version property returns version of publication format.
By default, publication format version is 1.
Executing the example requires that the repository contains a mobile application container with the MAC identifier.
Add links to the Metabase, Mobile system assemblies.
Sub UserProc;
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
res: MobilePublishResult;
Begin
mb := MetabaseClass.Active;
// Get the published mobile application (MA)
Mobile := mb.ItemById("MAC").Bind As IMobileApplication;
// Create a mobile application publicator
Publicator := Mobile.CreatePublicator;
// Specify a Web server and a virtual directory for publishing the mobile application
Publicator.WebApplication := "http://prognoz/PPMobile_App";
// Publish the mobile application
Publicator.Execute(Null);
// Handle the result of publishing the mobile application
If res = MobilePublishResult.Ok Then
Debug.WriteLine("Publication is successful. Publication format version: " + Publicator.Version.ToString);
Else
Debug.WriteLine("Error occurred on publishing");
End If;
End Sub UserProc;
After executing the example the MAC mobile application container is published. The console window shows a message about publication result.
The requirements and result of Fore.NET Example execution match with those in the Fore Example.
Imports Prognoz.Platform.Interop.Mobile;
…
Public Shared Sub Main(Params: StartParams);
Var
mb: IMetabase;
Mobile: IMobileApplication;
Publicator: IMobileApplicationPublicator;
res: MobilePublishResult;
Begin
mb := Params.Metabase;
// Get the published mobile application (MA)
Mobile := mb.ItemById["MAC"].Bind() As IMobileApplication;
// Create a mobile application publicator
Publicator := Mobile.CreatePublicator();
// Specify a Web server and a virtual directory for publishing the mobile application
Publicator.WebApplication := "http://prognoz/PPMobile_App";
// Publish the mobile application
Publicator.Execute(Null);
// Handle the result of publishing the mobile application
If res = MobilePublishResult.mprOk Then
System.Diagnostics.Debug.WriteLine("Publishing was successful. "
+ "Publication format version: " + Publicator.Version.ToString());
Else
System.Diagnostics.Debug.WriteLine("Error occurred on publishing");
End If;
End Sub;
See also: