[mapguide-commits] r8740 - in trunk/Tools/Maestro: Maestro.Editors/Generic/XmlEditor/AutoCompletion Maestro.Editors/LayerDefinition/Vector Maestro.MapViewer Maestro.Packaging OSGeo.MapGuide.MaestroAPI OSGeo.MapGuide.MaestroAPI/Commands OSGeo.MapGuide.MaestroAPI/Mapping OSGeo.MapGuide.MaestroAPI.Local OSGeo.MapGuide.MaestroAPI.Tests OSGeo.MapGuide.MaestroAPI.Tests/CrossConnection OSGeo.MapGuide.ObjectModels OSGeo.MapGuide.ObjectModels/Common OSGeo.MapGuide.ObjectModels/RuntimeMap/v2_6_0 Properties Thirdparty/SharpDevelop

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue Aug 11 10:09:38 PDT 2015


Author: jng
Date: 2015-08-11 10:09:38 -0700 (Tue, 11 Aug 2015)
New Revision: 8740

Modified:
   trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/AutoCompletion/XmlSchemaCompletionDataCollection.cs
   trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
   trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs
   trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
   trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
   trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalRuntimeMap.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/CrossConnection/ResourceMigratorTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/MiscTests.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Commands/CreateRuntimeMap.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs
   trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v2_6_0/RuntimeMapImpl.cs
   trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs
   trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs
Log:
#2565: The RES-instigated cleanup continues. This one having emphasis on using epsilon-based comparison for floats and doubles when comparing equality and testing if a value is zero or not.

Modified: trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/AutoCompletion/XmlSchemaCompletionDataCollection.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/AutoCompletion/XmlSchemaCompletionDataCollection.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.Editors/Generic/XmlEditor/AutoCompletion/XmlSchemaCompletionDataCollection.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -316,7 +316,10 @@
                             {
                                 // remove previous segment
                                 int j;
-                                for (j = result.Length - 1; j >= 0 && result[j] != outputSeparator; j--) ;
+                                for (j = result.Length - 1; j >= 0 && result[j] != outputSeparator; j--)
+                                {
+                                }
+
                                 if (j > 0)
                                 {
                                     result.Length = j;

Modified: trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.Editors/LayerDefinition/Vector/VectorLayerStyleSectionCtrl.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -206,9 +206,9 @@
                     double minY = vy.MinScale.HasValue ? vy.MinScale.Value : 0;
                     double maxY = vy.MaxScale.HasValue ? vy.MaxScale.Value : double.MaxValue;
 
-                    if (minX == minY)
+                    if (Math.Abs(minX - minY) < double.Epsilon)
                     {
-                        if (maxX == maxY)
+                        if (Math.Abs(maxX - maxY) < double.Epsilon)
                             return 0;
                         else
                             return maxX > maxY ? 1 : -1;

Modified: trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.MapViewer/LegendPresenter.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -193,8 +193,8 @@
                         type = LAYER_RASTER;
                 }
 
-                String[] typeStyles = new String[] { "PointTypeStyle", "LineTypeStyle", "AreaTypeStyle", "CompositeTypeStyle" };
-                String[] ruleNames = new String[] { "PointRule", "LineRule", "AreaRule", "CompositeRule" };
+                string[] typeStyles = { "PointTypeStyle", "LineTypeStyle", "AreaTypeStyle", "CompositeTypeStyle" };
+                string[] ruleNames = { "PointRule", "LineRule", "AreaRule", "CompositeRule" };
 
                 node.ToolTipText = string.Format(Properties.Resources.DefaultLayerTooltip, Environment.NewLine, layer.Name, layer.FeatureSourceID, layer.QualifiedClassName);
                 //Do this if not cached already from a previous run

Modified: trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.MapViewer/MapViewer.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -468,7 +468,7 @@
 
             ApplyPaintTranslateTransform(e);
 
-            if (mouseWheelSx.HasValue && mouseWheelSy.HasValue && mouseWheelSx.Value != 0.0 && mouseWheelSy.Value != 0.0)
+            if (mouseWheelSx.HasValue && mouseWheelSy.HasValue && !mouseWheelSx.Value.IsZero() && !mouseWheelSy.Value.IsZero())
             {
                 e.Graphics.ScaleTransform(mouseWheelSx.Value, mouseWheelSy.Value);
             }
@@ -1166,7 +1166,7 @@
             _extX2 = _orgX2 = env.MaxX;
             _extY1 = _orgY1 = env.MaxY;
 
-            if ((_orgX1 - _orgX2) == 0 || (_orgY1 - _orgY2) == 0)
+            if ((_orgX1 - _orgX2).IsZero() || (_orgY1 - _orgY2).IsZero())
             {
                 _extX1 = _orgX1 = -.1;
                 _extY2 = _orgX2 = .1;
@@ -1807,7 +1807,7 @@
             var oldScale = _map.ViewScale;
             _map.ViewScale = newScale;
 
-            if (oldScale != _map.ViewScale)
+            if (Math.Abs(oldScale - _map.ViewScale) > double.Epsilon)
             {
                 var handler = this.MapScaleChanged;
                 if (handler != null)
@@ -1844,7 +1844,7 @@
                     {
                         index = i;
                         bestDiff = scaleDiff;
-                        if (bestDiff == 0)
+                        if (bestDiff.IsZero())
                         {
                             //perfect match
                             break;

Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageBuilder.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -132,7 +132,7 @@
         public PackageBuilder(IServerConnection connection)
         {
             if (connection == null)
-                throw new ArgumentNullException("connection"); //NOXLATE
+                throw new ArgumentNullException(nameof(connection)); //NOXLATE
             m_connection = connection;
         }
 

Modified: trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Maestro.Packaging/PackageProgress.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -318,7 +318,7 @@
                     case ProgressType.Uploading:
                         {
                             HideTotal();
-                            if (pg == total)
+                            if (Math.Abs(pg - total) < double.Epsilon)
                             {
                                 OperationLabel.Text = Strings.ProgressWaitingForServer;
                                 CurrentProgress.Style = ProgressBarStyle.Marquee;

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Commands/CreateRuntimeMap.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Commands/CreateRuntimeMap.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Commands/CreateRuntimeMap.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -21,6 +21,7 @@
 #endregion Disclaimer / License
 
 using OSGeo.MapGuide.ObjectModels.RuntimeMap;
+using System;
 
 namespace OSGeo.MapGuide.MaestroAPI.Commands
 {
@@ -78,6 +79,7 @@
     /// A bitmask that defines what information to include in a CreateRuntimeMap or DescribeRuntimeMap
     /// response.
     /// </summary>
+    [Flags]
     public enum RuntimeMapRequestedFeatures : int
     {
         /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Enums.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -125,6 +125,7 @@
     /// <summary>
     /// Flags that can be used for the QueryMapFeatures operation
     /// </summary>
+    [Flags]
     public enum QueryMapFeaturesLayerAttributes : int
     {
         /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Mapping/RuntimeMap.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -242,7 +242,7 @@
             var orgX2 = ext.MaxX;
             var orgY1 = ext.MaxY;
 
-            if ((orgX1 - orgX2) == 0 || (orgY1 - orgY2) == 0)
+            if ((orgX1 - orgX2).IsZero() || (orgY1 - orgY2).IsZero())
             {
                 orgX1 = -.1;
                 orgX2 = .1;

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI/Utility.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -53,6 +53,16 @@
     /// </summary>
     public static class Utility
     {
+        public static bool IsZero(this float val)
+        {
+            return Math.Abs(val) < float.Epsilon;
+        }
+
+        public static bool IsZero(this double val)
+        {
+            return Math.Abs(val) < double.Epsilon;
+        }
+
         /// <summary>
         /// Creates the polygon WKT for the given bounding box
         /// </summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalRuntimeMap.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalRuntimeMap.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Local/LocalRuntimeMap.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -248,7 +248,7 @@
         public override void SetViewCenter(double x, double y)
         {
             var center = this.ViewCenter;
-            if (center.X != x || center.Y != y)
+            if (Math.Abs(center.X - x) > double.Epsilon || Math.Abs(center.Y - y) > double.Epsilon)
             {
                 _impl.SetViewCenterXY(x, y);
                 OnPropertyChanged(nameof(ViewCenter));

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/CrossConnection/ResourceMigratorTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/CrossConnection/ResourceMigratorTests.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/CrossConnection/ResourceMigratorTests.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -64,8 +64,7 @@
 
             var emptyDataList = new ResourceDataList() { ResourceData = new System.ComponentModel.BindingList<ResourceDataListResourceData>() };
 
-            string [] resources = new string[]
-            {
+            string [] resources = {
                 "Library://Test/Data.FeatureSource",
                 "Library://Test/Data1.FeatureSource",
                 "Library://Test/Data2.FeatureSource",
@@ -133,8 +132,7 @@
 
             var emptyDataList = new ResourceDataList() { ResourceData = new System.ComponentModel.BindingList<ResourceDataListResourceData>() };
 
-            string[] resources = new string[]
-            {
+            string[] resources = {
                 "Library://Test/Data.FeatureSource",
                 "Library://Test/Data1.FeatureSource",
                 "Library://Test/Data2.FeatureSource",
@@ -211,8 +209,7 @@
 
             var emptyDataList = new ResourceDataList() { ResourceData = new System.ComponentModel.BindingList<ResourceDataListResourceData>() };
 
-            string[] resources = new string[]
-            {
+            string[] resources = {
                 "Library://Test/Data.FeatureSource",
                 "Library://Test/Data1.FeatureSource",
                 "Library://Test/Data2.FeatureSource",
@@ -286,8 +283,7 @@
 
             var emptyDataList = new ResourceDataList() { ResourceData = new System.ComponentModel.BindingList<ResourceDataListResourceData>() };
 
-            string[] resources = new string[]
-            {
+            string[] resources = {
                 "Library://Test/Data.FeatureSource",
                 "Library://Test/Data1.FeatureSource",
                 "Library://Test/Data2.FeatureSource",

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/MiscTests.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/MiscTests.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.MaestroAPI.Tests/MiscTests.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -1,23 +1,23 @@
-#region Disclaimer / License
-
-// Copyright (C) 2014, Jackie Ng
-// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
-//
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either
-// version 2.1 of the License, or (at your option) any later version.
-//
-// This library is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-// Lesser General Public License for more details.
-//
-// You should have received a copy of the GNU Lesser General Public
-// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
-//
-
+#region Disclaimer / License
+
+// Copyright (C) 2014, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
 #endregion Disclaimer / License
 using NUnit.Framework;
 using OSGeo.MapGuide.MaestroAPI.Internal;
@@ -75,7 +75,7 @@
         [Test]
         public void TestArgParser()
         {
-            string[] args = new string[] { "-foo", "-bar:snafu", "-whatever:" };
+            string[] args = { "-foo", "-bar:snafu", "-whatever:" };
 
             var parser = new ArgumentParser(args);
             Assert.IsFalse(parser.IsDefined("snafu"));

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/Common/IEnvelope.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -63,6 +63,16 @@
     /// </summary>
     public static class EnvelopeExtensions
     {
+        static bool IsZero(this float val)
+        {
+            return Math.Abs(val) < float.Epsilon;
+        }
+
+        static bool IsZero(this double val)
+        {
+            return Math.Abs(val) < double.Epsilon;
+        }
+
         /// <summary>
         /// Gets whether the given instance is empty
         /// </summary>
@@ -71,10 +81,10 @@
         public static bool IsEmpty(this IEnvelope env)
         {
             return env == null ||
-               (Math.Abs(env.MaxX) < double.Epsilon &&
-                Math.Abs(env.MaxY) < double.Epsilon &&
-                Math.Abs(env.MinX) < double.Epsilon &&
-                Math.Abs(env.MinY) < double.Epsilon);
+               (env.MaxX.IsZero() &&
+                env.MaxY.IsZero() &&
+                env.MinX.IsZero() &&
+                env.MinY.IsZero());
         }
 
         /// <summary>

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/ResourceContentVersionChecker.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -37,8 +37,8 @@
     /// </summary>
     public sealed class ResourceContentVersionChecker : IDisposable
     {
-        private XmlReader _reader;
-        private Stream _stream;
+        private readonly XmlReader _reader;
+        private readonly Stream _stream;
 
         /// <summary>
         /// Constructor

Modified: trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v2_6_0/RuntimeMapImpl.cs
===================================================================
--- trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v2_6_0/RuntimeMapImpl.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/OSGeo.MapGuide.ObjectModels/RuntimeMap/v2_6_0/RuntimeMapImpl.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -136,22 +136,16 @@
         : IReadOnlyCollection<TInterface>
         where TImpl : TInterface
     {
-        private IList<TImpl> _list;
+        private readonly IList<TImpl> _list;
 
         protected ReadOnlyCollectionWrapper(IList<TImpl> list)
         {
             _list = list;
         }
 
-        public int Count
-        {
-            get { return _list.Count; }
-        }
+        public int Count => _list.Count;
 
-        public TInterface this[int index]
-        {
-            get { return _list[index]; }
-        }
+        public TInterface this[int index] => _list[index];
 
         private class Enumerator : IEnumerator<TInterface>
         {
@@ -164,19 +158,13 @@
                 _innerList = list;
             }
 
-            public TInterface Current
-            {
-                get { return _innerList[_pos]; }
-            }
+            public TInterface Current => _innerList[_pos];
 
             public void Dispose()
             {
             }
 
-            object System.Collections.IEnumerator.Current
-            {
-                get { return _innerList[_pos]; }
-            }
+            object System.Collections.IEnumerator.Current => _innerList[_pos];
 
             public bool MoveNext()
             {
@@ -184,34 +172,19 @@
                 return _pos <= _innerList.Count - 1;
             }
 
-            public void Reset()
-            {
-                _pos = -1;
-            }
+            public void Reset() => _pos = -1;
         }
 
-        public IEnumerator<TInterface> GetEnumerator()
-        {
-            return new Enumerator(_list);
-        }
+        public IEnumerator<TInterface> GetEnumerator() => new Enumerator(_list);
 
-        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
-        {
-            return _list.GetEnumerator();
-        }
+        System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => _list.GetEnumerator();
     }
 
     partial class RuntimeMapLayer : IRuntimeLayerInfo
     {
-        int IRuntimeLayerInfo.LayerType
-        {
-            get { return Convert.ToInt32(this.Type); }
-        }
+        int IRuntimeLayerInfo.LayerType => Convert.ToInt32(this.Type);
 
-        IFeatureSourceInfo IRuntimeLayerInfo.FeatureSource
-        {
-            get { return this.FeatureSource; }
-        }
+        IFeatureSourceInfo IRuntimeLayerInfo.FeatureSource => this.FeatureSource;
 
         private ScaleRangeCollection _roScales;
 
@@ -229,41 +202,23 @@
             }
         }
 
-        string IRuntimeMapLegendElement.ObjectID
-        {
-            get { return this.ObjectId; }
-        }
+        string IRuntimeMapLegendElement.ObjectID => this.ObjectId;
 
-        string IRuntimeMapLegendElement.ParentID
-        {
-            get { return this.ParentId; }
-        }
+        string IRuntimeMapLegendElement.ParentID => this.ParentId;
     }
 
     partial class FeatureSourceInfo : IFeatureSourceInfo
     {
-        string IFeatureSourceInfo.ResourceID
-        {
-            get { return this.ResourceId; }
-        }
+        string IFeatureSourceInfo.ResourceID => this.ResourceId;
     }
 
     partial class RuntimeMapGroup : IRuntimeLayerGroupInfo
     {
-        int IRuntimeLayerGroupInfo.GroupType
-        {
-            get { return Convert.ToInt32(this.Type); }
-        }
+        int IRuntimeLayerGroupInfo.GroupType => Convert.ToInt32(this.Type);
 
-        string IRuntimeMapLegendElement.ObjectID
-        {
-            get { return this.ObjectId; }
-        }
+        string IRuntimeMapLegendElement.ObjectID => this.ObjectId;
 
-        string IRuntimeMapLegendElement.ParentID
-        {
-            get { return this.ParentId; }
-        }
+        string IRuntimeMapLegendElement.ParentID => this.ParentId;
     }
 
     internal class ReadOnlyLayerCollection : ReadOnlyCollectionWrapper<IRuntimeLayerInfo, RuntimeMapLayer>,
@@ -332,10 +287,7 @@
 
     partial class FeatureStyleInfo : IFeatureStyleInfo
     {
-        int IFeatureStyleInfo.Type
-        {
-            get { return Convert.ToInt32(this.Type); }
-        }
+        int IFeatureStyleInfo.Type => Convert.ToInt32(this.Type);
 
         private RuleInfoCollection _roRules;
 
@@ -359,10 +311,7 @@
 
     partial class RuleInfo : IRuleInfo
     {
-        string IRuleInfo.IconBase64
-        {
-            get { return this.Icon; }
-        }
+        string IRuleInfo.IconBase64 => this.Icon;
     }
 
     partial class CoordinateSystemType : ICoordinateSystemInfo

Modified: trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs
===================================================================
--- trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Properties/CodeAnalysisRules.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -37,6 +37,9 @@
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0071", Justification = "This is just plain pedantry")]
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0138", Justification = "The author prefers to be explicit")]
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0004", Justification = "If one is specified, it's to satisfy an XML serialization contract")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0022", Justification = "If I'm swallowing up an exception, it is intentional")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language Usage Opportunities", "RECS0011", Justification = "It's if/else because it's more readable that a single long ternary expression")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0030", Justification = "<Pending>")]
 
 //TODO: Review these ones as we get further clarity about what string comparisons should be culture-sensitive and which ones shouldn't be
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0060", Justification = "To be reviewed at a later time")]

Modified: trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs
===================================================================
--- trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs	2015-08-11 16:22:58 UTC (rev 8739)
+++ trunk/Tools/Maestro/Thirdparty/SharpDevelop/GlobalAssemblyInfo.cs	2015-08-11 17:09:38 UTC (rev 8740)
@@ -36,6 +36,22 @@
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Virtual member call in constructor", "RECS0021")]
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Use 'var' keyword", "RECS0091")]
 [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Nullable type can be simplified", "RECS0013")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Replace with '|='", "RECS0033", Justification = "The author prefers clarity of code")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Replace with '&='", "RECS0093", Justification = "The author prefers clarity of code")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Not implemented", "RECS0083", Justification = "A NotImplementedException is thrown for a reason")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0029", Justification = "Needed to satisfy an XML serialization contract")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0001", Justification = "Other parts may exist in the future")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0071", Justification = "This is just plain pedantry")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Code", "RECS0138", Justification = "The author prefers to be explicit")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0004", Justification = "If one is specified, it's to satisfy an XML serialization contract")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0060", Justification = "To be reviewed at a later time")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0061", Justification = "To be reviewed at a later time")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0062", Justification = "To be reviewed at a later time")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0063", Justification = "To be reviewed at a later time")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language", "CSE0001", Justification = "<Pending>")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0163", Justification = "<Pending>")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Common Practices and Code Improvements", "RECS0092", Justification = "<Pending>")]
+[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language Usage Opportunities", "RECS0011", Justification = "<Pending>")]
 
 internal static class RevisionClass
 {



More information about the mapguide-commits mailing list