[mapguide-commits] r4327 - trunk/Tools/Maestro/MaestroAPI
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Sun Nov 1 17:36:48 EST 2009
Author: ksgeograf
Date: 2009-11-01 17:36:48 -0500 (Sun, 01 Nov 2009)
New Revision: 4327
Modified:
trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs
Log:
Maestro: Fixed reading the site version from the Native connection
Modified: trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs
===================================================================
--- trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs 2009-11-01 21:46:37 UTC (rev 4326)
+++ trunk/Tools/Maestro/MaestroAPI/LocalNativeConnection.cs 2009-11-01 22:36:48 UTC (rev 4327)
@@ -388,13 +388,30 @@
return m;
}
- //TODO: Figure out where to read this
public override Version SiteVersion
{
get
{
- return SiteVersions.GetVersion(KnownSiteVersions.MapGuideOS1_2);
- }
+ try
+ {
+ MgSite site = m_con.GetSite();
+
+ MgServerAdmin amd = new MgServerAdmin();
+ amd.Open(new MgUserInformation(m_sessionId));
+
+ MgPropertyCollection col = amd.GetInformationProperties();
+
+ for (int i = 0; i < col.Count; i++)
+ if (col[i].Name == "ServerVersion")
+ return new Version(((MgStringProperty)col[i]).GetValue());
+ }
+ catch
+ {
+ }
+
+ //Default
+ return SiteVersions.GetVersion(KnownSiteVersions.MapGuideOS1_2);
+ }
}
More information about the mapguide-commits
mailing list