[mapguide-commits] r6262 - in
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI: Mapping ObjectModels
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Nov 29 10:51:12 EST 2011
Author: jng
Date: 2011-11-29 07:51:12 -0800 (Tue, 29 Nov 2011)
New Revision: 6262
Modified:
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapGroup.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaceExtensions.cs
Log:
#1872: Make public some ctors which were previously internal.
Also combine a whole assortment of extension method classes into a single extension method class.
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapGroup.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapGroup.cs 2011-11-29 15:42:41 UTC (rev 6261)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapGroup.cs 2011-11-29 15:51:12 UTC (rev 6262)
@@ -43,6 +43,11 @@
this.ObjectId = Guid.NewGuid().ToString();
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RuntimeMapGroup"/> class.
+ /// </summary>
+ /// <param name="map">The map.</param>
+ /// <param name="name">The name.</param>
public RuntimeMapGroup(RuntimeMap map, string name)
: this()
{
@@ -52,7 +57,12 @@
_disableChangeTracking = false;
}
- internal RuntimeMapGroup(RuntimeMap map, IMapLayerGroup group)
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RuntimeMapGroup"/> class.
+ /// </summary>
+ /// <param name="map">The map.</param>
+ /// <param name="group">The group.</param>
+ public RuntimeMapGroup(RuntimeMap map, IMapLayerGroup group)
: this(map, group.Name)
{
_disableChangeTracking = true;
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2011-11-29 15:42:41 UTC (rev 6261)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMapLayer.cs 2011-11-29 15:51:12 UTC (rev 6262)
@@ -107,6 +107,11 @@
this.Group = string.Empty;
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RuntimeMapLayer"/> class.
+ /// </summary>
+ /// <param name="parent">The parent.</param>
+ /// <param name="ldf">The LDF.</param>
public RuntimeMapLayer(RuntimeMap parent, ILayerDefinition ldf)
: this(parent)
{
@@ -139,6 +144,17 @@
_disableChangeTracking = false;
}
+ /// <summary>
+ /// Initializes a new instance of the <see cref="RuntimeMapLayer"/> class.
+ /// </summary>
+ /// <param name="parent">The parent.</param>
+ /// <param name="source">The source.</param>
+ public RuntimeMapLayer(RuntimeMap parent, IMapLayer source)
+ : this(parent, source, (ILayerDefinition)parent.CurrentConnection.ResourceService.GetResource(source.ResourceId))
+ {
+ _disableChangeTracking = false;
+ }
+
internal RuntimeMapLayer(RuntimeMap parent, IMapLayer source, ILayerDefinition ldf)
: this(parent, (IBaseMapLayer)source, ldf)
{
Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaceExtensions.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaceExtensions.cs 2011-11-29 15:42:41 UTC (rev 6261)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/ObjectModels/LayerInterfaceExtensions.cs 2011-11-29 15:51:12 UTC (rev 6262)
@@ -33,7 +33,7 @@
/// <summary>
/// Extension method clas
/// </summary>
- public static class BlockSymbolExtensions
+ public static class ExtensionMethods
{
/// <summary>
/// Sets the color of the block.
@@ -56,13 +56,7 @@
Check.NotNull(sym, "sym");
sym.LayerColor = Utility.SerializeHTMLColor(c, true);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class FontSymbolExtensions
- {
/// <summary>
/// Applies properties (name, italic, bold, underline) from the characteristics of the specified font
/// </summary>
@@ -87,13 +81,7 @@
Check.NotNull(sym, "sym");
sym.ForegroundColor = Utility.SerializeHTMLColor(c, true);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class VectorLayerExtensions
- {
/// <summary>
/// Determines whether the vector layer has scale ranges
/// </summary>
@@ -118,13 +106,7 @@
var list = new List<IVectorScaleRange>(vl.VectorScaleRange);
return list.Count;
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class VectorScaleRangeExtensions
- {
/// <summary>
/// Purge the specified scale range of the following styles
/// </summary>
@@ -163,13 +145,7 @@
{
range.RemoveStyles(geomTypes);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class LayerDefinitionExtensions
- {
/// <summary>
/// Gets the coordinate system WKT.
/// </summary>
@@ -320,13 +296,7 @@
}
}
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class LayerExtensionMethods
- {
/// <summary>
/// Gets the referenced schema of this vector layer
/// </summary>
@@ -339,13 +309,7 @@
else
return vl.FeatureName.Split(':')[0];
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class W2DSymbolTypeExtensions
- {
/// <summary>
/// Sets the color of the fill.
/// </summary>
@@ -378,13 +342,7 @@
Check.NotNull(sym, "sym");
sym.TextColor = Utility.SerializeHTMLColor(c, true);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class TextSymbolExtensions
- {
/// <summary>
/// Sets the color of the foreground.
/// </summary>
@@ -420,13 +378,7 @@
sym.Bold = f.Bold.ToString();
sym.Underlined = f.Underline.ToString();
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class FillExtensions
- {
/// <summary>
/// Sets the color of the background.
/// </summary>
@@ -448,13 +400,7 @@
Check.NotNull(fil, "fil");
fil.ForegroundColor = Utility.SerializeHTMLColor(c, true);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class GridColorStyleExtensions
- {
/// <summary>
/// Sets the color of the transparency.
/// </summary>
@@ -465,13 +411,7 @@
Check.NotNull(style, "style");
style.TransparencyColor = Utility.SerializeHTMLColor(c, true);
}
- }
- /// <summary>
- /// Extension method class
- /// </summary>
- public static class GridSurfaceStyleExtensions
- {
/// <summary>
/// Sets the default color.
/// </summary>
More information about the mapguide-commits
mailing list