Index: Core/Common/src/Core.Common.Base/Geometry/Math2D.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Base/Geometry/Math2D.cs (.../Math2D.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -280,24 +280,21 @@ // ... but not collinear, so no intersection possible: return Segment2DIntersectSegment2DResult.CreateNoIntersectResult(); } - else + // Segments are at an angle and may intersect: + double sI = PerpDotProduct(v, w) / d; + if (sI < 0.0 || sI > 1.0) { - // Segments are at an angle and may intersect: - double sI = PerpDotProduct(v, w) / d; - if (sI < 0.0 || sI > 1.0) - { - return Segment2DIntersectSegment2DResult.CreateNoIntersectResult(); - } + return Segment2DIntersectSegment2DResult.CreateNoIntersectResult(); + } - double tI = PerpDotProduct(u, w) / d; - if (tI < 0.0 || tI > 1.0) - { - return Segment2DIntersectSegment2DResult.CreateNoIntersectResult(); - } - - Point2D intersectionPoint = segment1.FirstPoint + u.Multiply(sI); - return Segment2DIntersectSegment2DResult.CreateIntersectionResult(intersectionPoint); + double tI = PerpDotProduct(u, w) / d; + if (tI < 0.0 || tI > 1.0) + { + return Segment2DIntersectSegment2DResult.CreateNoIntersectResult(); } + + Point2D intersectionPoint = segment1.FirstPoint + u.Multiply(sI); + return Segment2DIntersectSegment2DResult.CreateIntersectionResult(intersectionPoint); } /// @@ -372,12 +369,9 @@ // Segments intersect at a point: return Segment2DIntersectSegment2DResult.CreateIntersectionResult(intersectionPoint1); } - else - { - // Segments overlap: - Point2D intersectionPoint2 = segment2.FirstPoint + v.Multiply(t1); - return Segment2DIntersectSegment2DResult.CreateOverlapResult(intersectionPoint1, intersectionPoint2); - } + // Segments overlap: + Point2D intersectionPoint2 = segment2.FirstPoint + v.Multiply(t1); + return Segment2DIntersectSegment2DResult.CreateOverlapResult(intersectionPoint1, intersectionPoint2); } private static bool IsSegmentAsPointIntersectionDegenerateScenario(Segment2D segment1, Segment2D segment2) @@ -424,12 +418,9 @@ double maxY = Math.Max(colinearSegment.FirstPoint.Y, colinearSegment.SecondPoint.Y); return minY <= point.Y && point.Y <= maxY; } - else - { - double minX = Math.Min(colinearSegment.FirstPoint.X, colinearSegment.SecondPoint.X); - double maxX = Math.Max(colinearSegment.FirstPoint.X, colinearSegment.SecondPoint.X); - return minX <= point.X && point.X <= maxX; - } + double minX = Math.Min(colinearSegment.FirstPoint.X, colinearSegment.SecondPoint.X); + double maxX = Math.Max(colinearSegment.FirstPoint.X, colinearSegment.SecondPoint.X); + return minX <= point.X && point.X <= maxX; } /// Index: Core/Common/src/Core.Common.Base/Geometry/Point2D.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Base/Geometry/Point2D.cs (.../Point2D.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Base/Geometry/Point2D.cs (.../Point2D.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -47,12 +47,12 @@ /// /// Gets or sets the x coordinate. /// - public double X { get; private set; } + public double X { get; } /// /// Gets or sets the y coordinate. /// - public double Y { get; private set; } + public double Y { get; } /// /// Determines the 2D vector defined by the difference of two . Index: Core/Common/src/Core.Common.Base/Geometry/Point3D.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Base/Geometry/Point3D.cs (.../Point3D.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Base/Geometry/Point3D.cs (.../Point3D.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -44,17 +44,17 @@ /// /// Gets or sets the x coordinate. /// - public double X { get; private set; } + public double X { get; } /// /// Gets or sets the y coordinate. /// - public double Y { get; private set; } + public double Y { get; } /// /// Gets or sets the z coordinate. /// - public double Z { get; private set; } + public double Z { get; } public override bool Equals(object obj) { Index: Core/Common/src/Core.Common.Base/Geometry/Segment2D.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Base/Geometry/Segment2D.cs (.../Segment2D.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Base/Geometry/Segment2D.cs (.../Segment2D.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -56,12 +56,12 @@ /// /// The first of the . /// - public Point2D FirstPoint { get; private set; } + public Point2D FirstPoint { get; } /// /// The second of the . /// - public Point2D SecondPoint { get; private set; } + public Point2D SecondPoint { get; } /// /// Gets the (euclidean) length of the segment. Index: Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs (.../DialogBase.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Common/src/Core.Common.Controls/Dialogs/DialogBase.cs (.../DialogBase.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -144,7 +144,7 @@ private static Icon BitmapToIcon(Bitmap icon) { - return (icon == null) ? null : Icon.FromHandle(icon.GetHicon()); + return icon == null ? null : Icon.FromHandle(icon.GetHicon()); } } } \ No newline at end of file Index: Core/Common/src/Core.Common.Controls/Forms/DoubleBufferedTreeView.cs =================================================================== diff -u -r49c5da81f49a23dd6e66526d264a08bf510e6963 -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Controls/Forms/DoubleBufferedTreeView.cs (.../DoubleBufferedTreeView.cs) (revision 49c5da81f49a23dd6e66526d264a08bf510e6963) +++ Core/Common/src/Core.Common.Controls/Forms/DoubleBufferedTreeView.cs (.../DoubleBufferedTreeView.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -111,8 +111,8 @@ get { OperatingSystem os = Environment.OSVersion; - return (os.Platform == PlatformID.Win32NT) && - ((os.Version.Major > 5) || ((os.Version.Major == 5) && (os.Version.Minor == 1))); + return os.Platform == PlatformID.Win32NT && + (os.Version.Major > 5 || (os.Version.Major == 5 && os.Version.Minor == 1)); } } @@ -121,7 +121,7 @@ get { OperatingSystem os = Environment.OSVersion; - return (os.Platform == PlatformID.Win32NT) && (os.Version.Major >= 6); + return os.Platform == PlatformID.Win32NT && os.Version.Major >= 6; } } Index: Core/Common/src/Core.Common.Controls/PresentationObjects/WrappedObjectContextBase.cs =================================================================== diff -u -rb2b9fdf365e70928a05c57966eeed30d9050e528 -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Controls/PresentationObjects/WrappedObjectContextBase.cs (.../WrappedObjectContextBase.cs) (revision b2b9fdf365e70928a05c57966eeed30d9050e528) +++ Core/Common/src/Core.Common.Controls/PresentationObjects/WrappedObjectContextBase.cs (.../WrappedObjectContextBase.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -48,7 +48,7 @@ /// /// Gets the data wrapped in this presentation object. /// - public T WrappedData { get; private set; } + public T WrappedData { get; } #region IEquatable members Index: Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/Forms/MessageWindow/MessageWindow.cs (.../MessageWindow.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -175,7 +175,7 @@ { foreach (ToolStripItem item in contextMenu.Items) { - item.Enabled = (messagesDataGridView.Rows.Count > 0); + item.Enabled = messagesDataGridView.Rows.Count > 0; } } Index: Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/Forms/PropertyGridView/PropertyGridView.cs (.../PropertyGridView.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -160,7 +160,7 @@ [SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)] protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { - if ((keyData == Keys.Tab) || (keyData == (Keys.Tab | Keys.Shift))) + if (keyData == Keys.Tab || keyData == (Keys.Tab | Keys.Shift)) { GridItem selectedItem = SelectedGridItem; GridItem root = selectedItem; Index: Core/Common/src/Core.Common.Gui/Forms/SelectViewDialog.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/SelectViewDialog.cs (.../SelectViewDialog.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/Forms/SelectViewDialog.cs (.../SelectViewDialog.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -117,29 +117,29 @@ var boundsIndicator = new RectangleF(e.Bounds.Left + itemSize.Width, e.Bounds.Top, indicatorSize.Width, e.Bounds.Height); - e.Graphics.DrawString(itemAsString, defaultItemFont, (selected) ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); + e.Graphics.DrawString(itemAsString, defaultItemFont, selected ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); e.Graphics.DrawString(defaultIndicatorText, defaultItemFont, Brushes.LightGray, boundsIndicator); } else { - e.Graphics.DrawString(itemAsString, lbFont, (selected) ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); + e.Graphics.DrawString(itemAsString, lbFont, selected ? new SolidBrush(SystemColors.HighlightText) : Brushes.Black, e.Bounds); } e.DrawFocusRectangle(); } private void ListBoxSelectedIndexChanged(object sender, EventArgs e) { - checkBoxDefault.Checked = (listBox.SelectedItem != null && - listBox.SelectedItem.ToString() == DefaultViewName); + checkBoxDefault.Checked = listBox.SelectedItem != null && + listBox.SelectedItem.ToString() == DefaultViewName; } private void CheckBoxDefaultCheckedChanged(object sender, EventArgs e) { string previousName = DefaultViewName; if (listBox.SelectedItem.ToString() == DefaultViewName) { - DefaultViewName = (checkBoxDefault.Checked) + DefaultViewName = checkBoxDefault.Checked ? listBox.SelectedItem.ToString() : null; } Index: Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/Forms/SplashScreen/SplashScreen.xaml.cs (.../SplashScreen.xaml.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -114,7 +114,7 @@ private void SetSupportValues() { - Visibility supportVisibility = (string.IsNullOrWhiteSpace(SupportPhoneNumber) || string.IsNullOrWhiteSpace(SupportEmail)) ? Visibility.Collapsed : Visibility.Visible; + Visibility supportVisibility = string.IsNullOrWhiteSpace(SupportPhoneNumber) || string.IsNullOrWhiteSpace(SupportEmail) ? Visibility.Collapsed : Visibility.Visible; LabelSupportTitle.Visibility = supportVisibility; LabelSupportPhoneNumberTitle.Visibility = supportVisibility; Index: Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/Forms/ViewHost/DocumentViewController.cs (.../DocumentViewController.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -185,7 +185,7 @@ private ViewInfo GetViewInfoUsingDialog(object data, IList viewInfoList) { Type defaultViewTypeForData = GetDefaultViewTypeForData(data); - string defaultViewName = (defaultViewTypeForData != null) + string defaultViewName = defaultViewTypeForData != null ? viewInfoList.First(vi => vi.ViewType == defaultViewTypeForData).Description : null; @@ -224,7 +224,7 @@ private bool IsViewData(IView view, object data) { ViewInfo viewInfo = GetViewInfoForView(view); - return data.Equals(view.Data) || (IsDataForView(data, viewInfo) && Equals(viewInfo.GetViewData(data), view.Data)); + return data.Equals(view.Data) || IsDataForView(data, viewInfo) && Equals(viewInfo.GetViewData(data), view.Data); } private static bool IsDataForView(object data, ViewInfo info) Index: Core/Common/src/Core.Common.Gui/Forms/ViewHost/ToolViewLocation.cs =================================================================== diff -u -r223b2a4edc4ac816051c7eeecb735c34a6246574 -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/Forms/ViewHost/ToolViewLocation.cs (.../ToolViewLocation.cs) (revision 223b2a4edc4ac816051c7eeecb735c34a6246574) +++ Core/Common/src/Core.Common.Gui/Forms/ViewHost/ToolViewLocation.cs (.../ToolViewLocation.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -40,5 +40,5 @@ /// Below the location reserved for document views. /// Bottom - }; + } } \ No newline at end of file Index: Core/Common/src/Core.Common.Gui/GuiCore.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/GuiCore.cs (.../GuiCore.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -144,7 +144,7 @@ #region Implementation: ISettingsOwner - public GuiCoreSettings FixedSettings { get; private set; } + public GuiCoreSettings FixedSettings { get; } #endregion Index: Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.Gui/PropertyBag/DynamicPropertyBag.cs (.../DynamicPropertyBag.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -73,12 +73,12 @@ /// /// Gets the collection of properties contained within this . /// - public ICollection Properties { get; private set; } + public ICollection Properties { get; } /// /// Gets the object wrapped inside this . /// - public object WrappedObject { get; private set; } + public object WrappedObject { get; } public override string ToString() { Index: Core/Common/src/Core.Common.IO/Readers/SqLiteDatabaseReaderBase.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/src/Core.Common.IO/Readers/SqLiteDatabaseReaderBase.cs (.../SqLiteDatabaseReaderBase.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/src/Core.Common.IO/Readers/SqLiteDatabaseReaderBase.cs (.../SqLiteDatabaseReaderBase.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -97,7 +97,7 @@ /// True if the command was successful and a new resultset is available, false otherwise. protected static bool MoveNext(IDataReader sqliteDataReader) { - return sqliteDataReader.Read() || (sqliteDataReader.NextResult() && sqliteDataReader.Read()); + return sqliteDataReader.Read() || sqliteDataReader.NextResult() && sqliteDataReader.Read(); } /// Index: Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs (.../RoundedPoint2DCollectionTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Base.Test/Data/RoundedPoint2DCollectionTest.cs (.../RoundedPoint2DCollectionTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -48,7 +48,7 @@ { new Point2D(2.35, 3.85), new Point2D(4.63, 2.10), - new Point2D(6.74, 1.59), + new Point2D(6.74, 1.59) }; CollectionAssert.AreEqual(expectedPoints, collection); } @@ -94,7 +94,7 @@ { new Point2D(2.35, 3.85), new Point2D(4.63, 2.10), - new Point2D(6.74, 1.59), + new Point2D(6.74, 1.59) }; var index = 0; foreach (Point2D roundedPoint in collection) @@ -110,7 +110,7 @@ { new Point2D(2.353, 3.846), new Point2D(4.625, 2.104), - new Point2D(6.738, 1.593), + new Point2D(6.738, 1.593) }; } } Index: Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Base.Test/Geometry/Math2DTest.cs (.../Math2DTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -187,7 +187,7 @@ var linePoints = new[] { new Point2D(1.1, 2.2), - new Point2D(3.3, 4.4), + new Point2D(3.3, 4.4) }; // Call @@ -307,7 +307,7 @@ var originalLine = new[] { new Point2D(0.0, 0.0), - new Point2D(20.0, 60.0), + new Point2D(20.0, 60.0) }; double[] lengths = GetLengthsBasedOnRelative(new[] @@ -996,7 +996,7 @@ var points = new[] { new Point2D(0, 0), - new Point2D(1, 0), + new Point2D(1, 0) }; points[nullIndex] = null; @@ -1060,7 +1060,7 @@ var random = new Random(21); var points = new[] { - new Point2D(random.NextDouble(), random.NextDouble()), + new Point2D(random.NextDouble(), random.NextDouble()) }; // Call Index: Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Geometry.Test/AdvancedMath2DTest.cs (.../AdvancedMath2DTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -189,7 +189,7 @@ new Point2D(2, 3), new Point2D(2, 4), new Point2D(6, 4), - new Point2D(6, 0), + new Point2D(6, 0) }; // Call Index: Core/Common/test/Core.Common.Gui.Test/ExceptionDialogTest.cs =================================================================== diff -u -rd372f6daa918d18feb719e78d5fdc315f2a1b0f5 -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/ExceptionDialogTest.cs (.../ExceptionDialogTest.cs) (revision d372f6daa918d18feb719e78d5fdc315f2a1b0f5) +++ Core/Common/test/Core.Common.Gui.Test/ExceptionDialogTest.cs (.../ExceptionDialogTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -124,7 +124,7 @@ // Assert var button = new ButtonTester("buttonOpenLog"); - var buttonOpenLog = (Button)button.TheObject; + var buttonOpenLog = (Button) button.TheObject; Assert.IsFalse(buttonOpenLog.Enabled); } @@ -149,7 +149,7 @@ // Assert var button = new ButtonTester("buttonOpenLog"); - var buttonOpenLog = (Button)button.TheObject; + var buttonOpenLog = (Button) button.TheObject; Assert.IsTrue(buttonOpenLog.Enabled); } Index: Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowLogAppenderTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowLogAppenderTest.cs (.../MessageWindowLogAppenderTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/MessageWindow/MessageWindowLogAppenderTest.cs (.../MessageWindowLogAppenderTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -123,7 +123,7 @@ var mocks = new MockRepository(); var messageWindow = mocks.Stub(); messageWindow.Expect(w => w.AddMessage(Arg.Is.Equal(level), - Arg.Matches(time => (time - dataTime) <= new TimeSpan(0, 0, 0, 0, 5)), + Arg.Matches(time => time - dataTime <= new TimeSpan(0, 0, 0, 0, 5)), Arg.Is.Equal(expectedText))); mocks.ReplayAll(); @@ -157,7 +157,7 @@ var mocks = new MockRepository(); var messageWindow = mocks.Stub(); messageWindow.Expect(w => w.AddMessage(Arg.Is.Equal(level), - Arg.Matches(time => (time - dataTime) <= new TimeSpan(0, 0, 0, 0, 2)), + Arg.Matches(time => time - dataTime <= new TimeSpan(0, 0, 0, 0, 2)), Arg.Is.Equal(messageText))); mocks.ReplayAll(); @@ -190,7 +190,7 @@ var mocks = new MockRepository(); var messageWindow = mocks.Stub(); messageWindow.Expect(w => w.AddMessage(Arg.Is.Equal(level), - Arg.Matches(time => (time - dataTime) <= new TimeSpan(0, 0, 0, 0, 2)), + Arg.Matches(time => time - dataTime <= new TimeSpan(0, 0, 0, 0, 2)), Arg.Is.Equal(messageText))); mocks.ReplayAll(); @@ -224,7 +224,7 @@ var mocks = new MockRepository(); var messageWindow = mocks.Stub(); messageWindow.Expect(w => w.AddMessage(Arg.Is.Equal(level), - Arg.Matches(time => (time - dataTime) <= new TimeSpan(0, 0, 0, 0, 2)), + Arg.Matches(time => time - dataTime <= new TimeSpan(0, 0, 0, 0, 2)), Arg.Is.Equal(expectedText))); mocks.ReplayAll(); Index: Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/PropertyGridView/PropertyResolverTest.cs (.../PropertyResolverTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -132,7 +132,7 @@ var propertyInfos = new PropertyInfo[] { new PropertyInfo(), - new PropertyInfo(), + new PropertyInfo() }; var resolver = new PropertyResolver(propertyInfos); @@ -155,7 +155,7 @@ var propertyInfos = new PropertyInfo[] { new PropertyInfo(), - new PropertyInfo(), + new PropertyInfo() }; var resolver = new PropertyResolver(propertyInfos); @@ -180,7 +180,7 @@ new PropertyInfo(), new PropertyInfo(), new PropertyInfo(), - new PropertyInfo(), + new PropertyInfo() }; var resolver = new PropertyResolver(propertyInfos); @@ -202,7 +202,7 @@ // Setup var propertyInfos = new PropertyInfo[] { - new PropertyInfo(), + new PropertyInfo() }; var resolver = new PropertyResolver(propertyInfos); @@ -225,7 +225,7 @@ var propertyInfos = new PropertyInfo[] { new PropertyInfo(), - new PropertyInfo(), + new PropertyInfo() }; var resolver = new PropertyResolver(propertyInfos); Index: Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Gui.Test/Forms/SplashScreen/SplashScreenTest.cs (.../SplashScreenTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -129,7 +129,7 @@ private static string GetLabelText(FrameworkElement parent, string labelName) { var label = FindControlRecursively(parent, labelName) as Label; - return (label != null) ? label.Content.ToString() : ""; + return label != null ? label.Content.ToString() : ""; } private static bool GetIsControlVisible(FrameworkElement parent, string ctrlName) Index: Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs (.../PropertyInfoTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Gui.Test/Plugin/PropertyInfoTest.cs (.../PropertyInfoTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -76,7 +76,7 @@ var info = new PropertyInfo { DataType = typeof(int), - PropertyObjectType = typeof(TestObjectProperties), + PropertyObjectType = typeof(TestObjectProperties) }; int data = new Random(21).Next(); Index: Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs (.../PropertySpecDescriptorTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.Gui.Test/PropertyBag/PropertySpecDescriptorTest.cs (.../PropertySpecDescriptorTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -287,9 +287,9 @@ } [TypeConverter(typeof(ExpandableObjectConverter))] - public AnotherClassWithProperties ComplexSubPropertyWithExandableObjectConverter { get; set; } + public AnotherClassWithProperties ComplexSubPropertyWithExandableObjectConverter { get; } - public AnotherClassWithProperties ComplexSubProperty { get; set; } + public AnotherClassWithProperties ComplexSubProperty { get; } #region IsReadOnly state influencing testing members Index: Core/Common/test/Core.Common.TestUtil.Test/ControlsTestHelperTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.TestUtil.Test/ControlsTestHelperTest.cs (.../ControlsTestHelperTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.TestUtil.Test/ControlsTestHelperTest.cs (.../ControlsTestHelperTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -47,7 +47,7 @@ DataSource = new[] { Tuple.Create(value1, "A"), - Tuple.Create(value2, "B"), + Tuple.Create(value2, "B") }, ValueMember = "Item1", DisplayMember = "Item2" Index: Core/Common/test/Core.Common.TestUtil.Test/DataGridViewTestHelperTest.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.TestUtil.Test/DataGridViewTestHelperTest.cs (.../DataGridViewTestHelperTest.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.TestUtil.Test/DataGridViewTestHelperTest.cs (.../DataGridViewTestHelperTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -212,12 +212,12 @@ public void AssertCellIsDisabled_DisabledCell_DoesNotThrowAssertionException() { // Setup - var row = new DataGridViewRow() + var row = new DataGridViewRow { ReadOnly = true, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.GrayText), BackColor = Color.FromKnownColor(KnownColor.DarkGray) @@ -238,12 +238,12 @@ public void AssertCellIsEnabled_EnabledCell_DoesNotThrowAssertionException(bool readOnlyProperty) { // Setup - var row = new DataGridViewRow() + var row = new DataGridViewRow { ReadOnly = readOnlyProperty, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.ControlText), BackColor = Color.FromKnownColor(KnownColor.White) @@ -331,36 +331,36 @@ { get { - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = false, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.GrayText), BackColor = Color.FromKnownColor(KnownColor.DarkGray) }) } }).SetName("ReadOnlyPropertyFalse"); - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = true, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.ControlText), BackColor = Color.FromKnownColor(KnownColor.DarkGray) }) } }).SetName("ForeColorPropertyEnabledColor"); - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = true, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.GrayText), BackColor = Color.FromKnownColor(KnownColor.White) @@ -374,36 +374,36 @@ { get { - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = true, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.ControlText), BackColor = Color.FromKnownColor(KnownColor.White) }) } }).SetName("ReadOnlyPropertyTrue"); - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = false, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.GrayText), BackColor = Color.FromKnownColor(KnownColor.White) }) } }).SetName("ForeColorPropertyDisabledColor"); - yield return new TestCaseData(new DataGridViewRow() + yield return new TestCaseData(new DataGridViewRow { ReadOnly = false, Cells = { - new DataCell(new DataGridViewCellStyle() + new DataCell(new DataGridViewCellStyle { ForeColor = Color.FromKnownColor(KnownColor.ControlText), BackColor = Color.FromKnownColor(KnownColor.DarkGray) Index: Core/Common/test/Core.Common.TestUtil/EnumTestFixture.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.TestUtil/EnumTestFixture.cs (.../EnumTestFixture.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Common/test/Core.Common.TestUtil/EnumTestFixture.cs (.../EnumTestFixture.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -72,10 +72,7 @@ { return ((ResourcesDisplayNameAttribute) attributes[0]).DisplayName; } - else - { - return null; - } + return null; } } } \ No newline at end of file Index: Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs =================================================================== diff -u -re60dbf2fd41434270cad4efba20446e19ede0d2e -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision e60dbf2fd41434270cad4efba20446e19ede0d2e) +++ Core/Common/test/Core.Common.TestUtil/WpfTestHelper.xaml.cs (.../WpfTestHelper.xaml.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -83,29 +83,26 @@ { throw new NotImplementedException(); } - else + WindowsFormsTestHelper.CloseAll(); // just in case, since we have mixed WPF / WF app + + Close(); + + if (window != null) { - WindowsFormsTestHelper.CloseAll(); // just in case, since we have mixed WPF / WF app + window.Closed += WindowOnClosed; - Close(); + window.Close(); + window.Close(); - if (window != null) + while (window.IsVisible) { - window.Closed += WindowOnClosed; - + Application.DoEvents(); + Application.DoEvents(); window.Close(); - window.Close(); - - while (window.IsVisible) - { - Application.DoEvents(); - Application.DoEvents(); - window.Close(); - } - - window.Closed -= WindowOnClosed; - window = null; } + + window.Closed -= WindowOnClosed; + window = null; } } Index: Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs =================================================================== diff -u -r7ac739bd142fda419737a1e3ce328f373ab3531f -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs (.../MultipleAreaSeries.cs) (revision 7ac739bd142fda419737a1e3ce328f373ab3531f) +++ Core/Components/src/Core.Components.OxyPlot/CustomSeries/MultipleAreaSeries.cs (.../MultipleAreaSeries.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -44,7 +44,7 @@ Color = OxyColors.Automatic; } - public List Areas { get; private set; } + public List Areas { get; } /// /// Gets or sets the color of the curve. Index: Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs =================================================================== diff -u -r4dbfc20ef0200e34db43efeb8899d72e4046cc5b -rb9238c12b280f700b45fc0141ac1a2087e7ba4ba --- Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs (.../FeatureBasedMapDataTest.cs) (revision 4dbfc20ef0200e34db43efeb8899d72e4046cc5b) +++ Core/Components/test/Core.Components.Gis.Test/Data/FeatureBasedMapDataTest.cs (.../FeatureBasedMapDataTest.cs) (revision b9238c12b280f700b45fc0141ac1a2087e7ba4ba) @@ -140,7 +140,7 @@ { "Attribute1", "Attribute2", - "Attribute3", + "Attribute3" }, metaData); } }