#653 newlines in comments.

#653 newlines in comments.

--- unity/Assets/Scripts/QuestEditor/EditorComponent.cs
+++ unity/Assets/Scripts/QuestEditor/EditorComponent.cs
@@ -159,7 +159,7 @@

         commentUIE = new UIElementEditable(Game.EDITOR, scrollArea.GetScrollTransform());
         commentUIE.SetLocation(0.5f, offset, 19, 15);
-        commentUIE.SetText(component.comment);
+        commentUIE.SetText(component.comment.Replace("\n", '\n'));
         offset += commentUIE.HeightToTextPadding(1);
         commentUIE.SetButton(delegate { SetComment(); });
         new UIElementBorder(commentUIE);


More thoroughly test collection debugger views (#22828)

* Include collections with contents in types tested.

* Make TestDebuggerAttributes_Null confirm exception throw was ANE

* Verify items are displayed for debugger correctly.

--- src/Common/tests/System/Collections/DebugView.Tests.cs
+++ src/Common/tests/System/Collections/DebugView.Tests.cs
@@ -4,6 +4,7 @@

 using System.Collections.Generic;
 using System.Diagnostics;
+using System.Linq;
 using System.Reflection;
 using Xunit;

@@ -29,6 +30,35 @@
             yield return new object[] { new SortedDictionary<long, Guid>().Values };
             yield return new object[] { new SortedList<string, int>().Keys };
             yield return new object[] { new SortedList<float, long>().Values };
+
+            yield return new object[] { new Dictionary<int, string>{{1, "One"}, {2, "Two"}} };
+            yield return new object[] { new HashSet<string>{"One", "Two"} };
+
+            LinkedList<object> linkedList = new LinkedList<object>();
+            linkedList.AddFirst(1);
+            linkedList.AddLast(2);
+            yield return new object[] { linkedList };
+            yield return new object[] { new List<int>{1, 2} };
+
+            Queue<double> queue = new Queue<double>();
+            queue.Enqueue(1);
+            queue.Enqueue(2);
+            yield return new object[] { queue };
+            yield return new object[] { new SortedDictionary<string, int>{{"One", 1}, {"Two", 2}} };
+            yield return new object[] { new SortedList<int, string>{{1, "One"}, {2, "Two"}} };
+            yield return new object[] { new SortedSet<int>{1, 2} };
+
+            var stack = new Stack<object>();
+            stack.Push(1);
+            stack.Push(2);
+            yield return new object[] { stack };
+
+            yield return new object[] { new Dictionary<double, float>{{1.0, 1.0f}, {2.0, 2.0f}}.Keys };
+            yield return new object[] { new Dictionary<float, double>{{1.0f, 1.0}, {2.0f, 2.0}}.Values };
+            yield return new object[] { new SortedDictionary<Guid, string>{{Guid.NewGuid(), "One"}, {Guid.NewGuid(), "Two"}}.Keys };
+            yield return new object[] { new SortedDictionary<long, Guid>{{1L, Guid.NewGuid()}, {2L, Guid.NewGuid()}}.Values };
+            yield return new object[] { new SortedList<string, int>{{"One", 1}, {"Two", 2}}.Keys };
+            yield return new object[] { new SortedList<float, long>{{1f, 1L}, {2f, 2L}}.Values };
         }

         [Theory]
@@ -37,7 +67,10 @@
         public static void TestDebuggerAttributes(object obj)
         {
             DebuggerAttributes.ValidateDebuggerDisplayReferences(obj);
-            DebuggerAttributes.ValidateDebuggerTypeProxyProperties(obj);
+            DebuggerAttributeInfo info = DebuggerAttributes.ValidateDebuggerTypeProxyProperties(obj);
+            PropertyInfo itemProperty = info.Properties.Single(pr => pr.GetCustomAttribute<DebuggerBrowsableAttribute>().State == DebuggerBrowsableState.RootHidden);
+            Array items = itemProperty.GetValue(info.Instance) as Array;
+            Assert.Equal((obj as IEnumerable).Cast<object>().ToArray(), items.Cast<object>());
         }

         [Theory]
@@ -46,7 +79,8 @@
         public static void TestDebuggerAttributes_Null(object obj)
         {
             Type proxyType = DebuggerAttributes.GetProxyType(obj);
-            Assert.Throws<TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null));
+            TargetInvocationException tie = Assert.Throws<TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null));
+            Assert.IsType<ArgumentNullException>(tie.InnerException);
         }
     }
 }


Added cache support

Added cache support

--- src/Core2D.Avalonia/Renderers/AvaloniaShapeRenderer.cs
+++ src/Core2D.Avalonia/Renderers/AvaloniaShapeRenderer.cs
@@ -15,7 +15,11 @@
     public class AvaloniaShapeRenderer : ShapeRenderer
     {
         private readonly IDictionary<ShapeStyle, AvaloniaBrushCache> _brushCache;
-
+        private readonly IDictionary<MatrixObject, Matrix> _matrixCache;
+        private readonly IDictionary<CubicBezierShape, Geometry> _cubicGeometryCache;
+        private readonly IDictionary<QuadraticBezierShape, Geometry> _quadGeometryCache;
+        private readonly IDictionary<PathShape, Geometry> _pathGeometryCache;
+        private readonly IDictionary<EllipseShape, Geometry> _ellipseGeometryCache;
         private ISet<BaseShape> _selected;

         public override ISet<BaseShape> Selected
@@ -27,6 +31,11 @@
         public AvaloniaShapeRenderer()
         {
             _brushCache = new Dictionary<ShapeStyle, AvaloniaBrushCache>();
+            _matrixCache = new Dictionary<MatrixObject, Matrix>();
+            _cubicGeometryCache = new Dictionary<CubicBezierShape, Geometry>();
+            _quadGeometryCache = new Dictionary<QuadraticBezierShape, Geometry>();
+            _pathGeometryCache = new Dictionary<PathShape, Geometry>();
+            _ellipseGeometryCache = new Dictionary<EllipseShape, Geometry>();
             _selected = new HashSet<BaseShape>();
         }

@@ -47,6 +56,42 @@
             double width = Math.Abs(Math.Max(p1.X + dx, p2.X + dx) - x);
             double height = Math.Abs(Math.Max(p1.Y + dy, p2.Y + dy) - y);
             return new Rect(x, y, width, height);
+        }
+
+        private AvaloniaBrushCache? GetBrushCache(ShapeStyle style)
+        {
+            if (style == null)
+            {
+                return null;
+            }
+            if (!_brushCache.TryGetValue(style, out var cache))
+            {
+                _brushCache[style] = AvaloniaBrushCache.FromDrawStyle(style);
+                return _brushCache[style];
+            }
+            return cache;
+        }
+
+        private static Matrix ToMatrixTransform(MatrixObject matrix)
+        {
+            return new Matrix(
+                matrix.M11, matrix.M12,
+                matrix.M21, matrix.M22,
+                matrix.OffsetX, matrix.OffsetY);
+        }
+
+        private Matrix? GetMatrixCache(MatrixObject matrix)
+        {
+            if (matrix == null)
+            {
+                return null;
+            }
+            if (!_matrixCache.TryGetValue(matrix, out var cache))
+            {
+                _matrixCache[matrix] = ToMatrixTransform(matrix);
+                return _matrixCache[matrix];
+            }
+            return cache;
         }

         private static Geometry ToGeometry(CubicBezierShape cubicBezier, ShapeStyle style, double dx, double dy)
@@ -142,47 +187,149 @@
             return new EllipseGeometry(rect);
         }

-        private AvaloniaBrushCache? GetOrCreateCache(ShapeStyle style)
-        {
-            if (style == null)
-            {
-                return null;
-            }
-            if (!_brushCache.TryGetValue(style, out var cache))
-            {
+        private Geometry GetGeometryCache(CubicBezierShape cubic, ShapeStyle style, double dx, double dy)
+        {
+            if (cubic == null)
+            {
+                return null;
+            }
+            if (!_cubicGeometryCache.TryGetValue(cubic, out var cache))
+            {
+                var geometry = ToGeometry(cubic, style, dx, dy);
+                if (geometry != null)
+                {
+                    _cubicGeometryCache[cubic] = geometry;
+                    return _cubicGeometryCache[cubic];
+                }
+                return null;
+            }
+            return cache;
+        }
+
+        private Geometry GetGeometryCache(QuadraticBezierShape quad, ShapeStyle style, double dx, double dy)
+        {
+            if (quad == null)
+            {
+                return null;
+            }
+            if (!_quadGeometryCache.TryGetValue(quad, out var cache))
+            {
+                var geometry = ToGeometry(quad, style, dx, dy);
+                if (geometry != null)
+                {
+                    _quadGeometryCache[quad] = geometry;
+                    return _quadGeometryCache[quad];
+                }
+                return null;
+            }
+            return cache;
+        }
+
+        private Geometry GetGeometryCache(PathShape path, ShapeStyle style, double dx, double dy)
+        {
+            if (path == null)
+            {
+                return null;
+            }
+            if (!_pathGeometryCache.TryGetValue(path, out var cache))
+            {
+                var geometry = ToGeometry(path, style, dx, dy);
+                if (geometry != null)
+                {
+                    _pathGeometryCache[path] = geometry;
+                    return _pathGeometryCache[path];
+                }
+                return null;
+            }
+            return cache;
+        }
+
+        private Geometry GetGeometryCache(EllipseShape ellipse, ShapeStyle style, double dx, double dy)
+        {
+            if (ellipse == null)
+            {
+                return null;
+            }
+            if (!_ellipseGeometryCache.TryGetValue(ellipse, out var cache))
+            {
+                var geometry = ToGeometry(ellipse, style, dx, dy);
+                if (geometry != null)
+                {
+                    _ellipseGeometryCache[ellipse] = geometry;
+                    return _ellipseGeometryCache[ellipse];
+                }
+                return null;
+            }
+            return cache;
+        }
+
+        public override void InvalidateCache(ShapeStyle style)
+        {
+            if (style != null)
+            {
+                if (!_brushCache.TryGetValue(style, out var cache))
+                {
+                    cache.Dispose();
+                }
                 _brushCache[style] = AvaloniaBrushCache.FromDrawStyle(style);
-                return _brushCache[style];
-            }
-            return cache;
-        }
-
-        private static Matrix ToMatrixTransform(MatrixObject matrix)
-        {
-            return new Matrix(
-                matrix.M11, matrix.M12,
-                matrix.M21, matrix.M22,
-                matrix.OffsetX, matrix.OffsetY);
-        }
-
-        public override void InvalidateCache(ShapeStyle style)
-        {
-            // TODO: Implement InvalidateCache method.
+            }
         }

         public override void InvalidateCache(MatrixObject matrix)
         {
-            // TODO: Implement InvalidateCache method.
+            if (matrix != null)
+            {
+                _matrixCache[matrix] = ToMatrixTransform(matrix);
+            }
         }

         public override void InvalidateCache(BaseShape shape, ShapeStyle style, double dx, double dy)
         {
-            // TODO: Implement InvalidateCache method.
+            switch (shape)
+            {
+                case CubicBezierShape cubic:
+                    {
+                        var geometry = ToGeometry(cubic, style, dx, dy);
+                        if (geometry != null)
+                        {
+                            _cubicGeometryCache[cubic] = geometry;
+                        }
+                    }
+                    break;
+                case QuadraticBezierShape quad:
+                    {
+                        var geometry = ToGeometry(quad, style, dx, dy);
+                        if (geometry != null)
+                        {
+                            _quadGeometryCache[quad] = geometry;
+                        }
+                    }
+                    break;
+                case PathShape path:
+                    {
+                        var geometry = ToGeometry(path, style, dx, dy);
+                        if (geometry != null)
+                        {
+                            _pathGeometryCache[path] = geometry;
+                        }
+                    }
+                    break;
+                case EllipseShape ellipse:
+                    {
+                        var geometry = ToGeometry(ellipse, style, dx, dy);
+                        if (geometry != null)
+                        {
+                            _ellipseGeometryCache[ellipse] = geometry;
+                        }
+                    }
+                    break;
+            }
         }

         public override object PushMatrix(object dc, MatrixObject matrix)
         {
             var _dc = dc as DrawingContext;
-            return _dc.PushPreTransform(ToMatrixTransform(matrix));
+            return _dc.PushPreTransform(GetMatrixCache(matrix).Value);
         }

         public override void PopMatrix(object dc, object state)
@@ -193,38 +340,38 @@

         public override void DrawLine(object dc, LineShape line, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
+            var cache = GetBrushCache(style);
             var _dc = dc as DrawingContext;
             _dc.DrawLine(style.IsStroked ? cache?.StrokePen : null, ToPoint(line.StartPoint, dx, dy), ToPoint(line.Point, dx, dy));
         }

         public override void DrawCubicBezier(object dc, CubicBezierShape cubicBezier, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
-            var _dc = dc as DrawingContext;
-            var geometry = ToGeometry(cubicBezier, style, dx, dy);
+            var cache = GetBrushCache(style);
+            var _dc = dc as DrawingContext;
+            var geometry = GetGeometryCache(cubicBezier, style, dx, dy);
             _dc.DrawGeometry(style.IsFilled ? cache?.Fill : null, style.IsStroked ? cache?.StrokePen : null, geometry);
         }

         public override void DrawQuadraticBezier(object dc, QuadraticBezierShape quadraticBezier, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
-            var _dc = dc as DrawingContext;
-            var geometry = ToGeometry(quadraticBezier, style, dx, dy);
+            var cache = GetBrushCache(style);
+            var _dc = dc as DrawingContext;
+            var geometry = GetGeometryCache(quadraticBezier, style, dx, dy);
             _dc.DrawGeometry(style.IsFilled ? cache?.Fill : null, style.IsStroked ? cache?.StrokePen : null, geometry);
         }

         public override void DrawPath(object dc, PathShape path, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
-            var _dc = dc as DrawingContext;
-            var geometry = ToGeometry(path, style, dx, dy);
+            var cache = GetBrushCache(style);
+            var _dc = dc as DrawingContext;
+            var geometry = GetGeometryCache(path, style, dx, dy);
             _dc.DrawGeometry(style.IsFilled ? cache?.Fill : null, style.IsStroked ? cache?.StrokePen : null, geometry);
         }

         public override void DrawRectangle(object dc, RectangleShape rectangle, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
+            var cache = GetBrushCache(style);
             var _dc = dc as DrawingContext;
             var rect = ToRect(rectangle.TopLeft, rectangle.BottomRight, dx, dy);
             if (style.IsFilled)
@@ -239,15 +386,16 @@

         public override void DrawEllipse(object dc, EllipseShape ellipse, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
-            var _dc = dc as DrawingContext;
+            var cache = GetBrushCache(style);
+            var _dc = dc as DrawingContext;
+            // FIXME: var geometry = GetGeometryCache(ellipse, style, dx, dy);
             var geometry = ToGeometry(ellipse, style, dx, dy);
             _dc.DrawGeometry(style.IsFilled ? cache?.Fill : null, style.IsStroked ? cache?.StrokePen : null, geometry);
         }

         public override void DrawText(object dc, TextShape text, ShapeStyle style, double dx, double dy)
         {
-            var cache = GetOrCreateCache(style);
+            var cache = GetBrushCache(style);
             var _dc = dc as DrawingContext;
             var rect = ToRect(text.TopLeft, text.BottomRight, dx, dy);
             if (style.IsFilled)


Removed Height/Width.

Removed Height/Width.

--- src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
+++ src/Discord.Net.Core/Entities/Messages/EmbedBuilder.cs
@@ -16,7 +16,7 @@

         public EmbedBuilder()
         {
-            _model = new Embed {Type = "rich"};
+            _model = new Embed { Type = "rich" };
             _fields = new List<Field>();
         }

@@ -213,8 +213,6 @@
         private Thumbnail _model;

         public string Url { get { return _model.Url; } set { _model.Url = value; } }
-        public Optional<int> Height { get { return _model.Height; } set { _model.Height = value; } }
-        public Optional<int> Width { get { return _model.Width; } set { _model.Width = value; } }

         public EmbedThumbnailBuilder()
         {
@@ -226,16 +224,6 @@
             Url = url;
             return this;
         }
-        public EmbedThumbnailBuilder WithHeight(int height)
-        {
-            Height = height;
-            return this;
-        }
-        public EmbedThumbnailBuilder WithWidth(int width)
-        {
-            Width = width;
-            return this;
-        }

         internal Thumbnail ToModel() => _model;
     }
@@ -245,8 +233,6 @@
         private Image _model;

         public string Url { get { return _model.Url; } set { _model.Url = value; } }
-        public Optional<int> Height { get { return _model.Height; } set { _model.Height = value; } }
-        public Optional<int> Width { get { return _model.Width; } set { _model.Width = value; } }

         public EmbedImageBuilder()
         {
@@ -258,16 +244,6 @@
             Url = url;
             return this;
         }
-        public EmbedImageBuilder WithHeight(int height)
-        {
-            Height = height;
-            return this;
-        }
-        public EmbedImageBuilder WithWidth(int width)
-        {
-            Width = width;
-            return this;
-        }

         internal Image ToModel() => _model;
     }


Added MySql support for ON DELETE and ON UPDATE

--- src/FluentMigrator.Runner/Generators/MySqlGenerator.cs
+++ src/FluentMigrator.Runner/Generators/MySqlGenerator.cs
@@ -18,6 +18,7 @@

 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.Text;
 using FluentMigrator.Expressions;
 using FluentMigrator.Model;
@@ -71,14 +72,16 @@
 			string primaryColumns = GetColumnList(expression.ForeignKey.PrimaryColumns);
 			string foreignColumns = GetColumnList(expression.ForeignKey.ForeignColumns);

-			string sql = "ALTER TABLE `{0}` ADD CONSTRAINT {1} FOREIGN KEY ({2}) REFERENCES {3} ({4})";
+			string sql = "ALTER TABLE `{0}` ADD CONSTRAINT {1} FOREIGN KEY ({2}) REFERENCES {3} ({4}){5}{6}";

 			return String.Format(sql,
 							expression.ForeignKey.ForeignTable,
 							expression.ForeignKey.Name,
 							foreignColumns,
 							expression.ForeignKey.PrimaryTable,
-							primaryColumns
+                            primaryColumns,
+                            FormatCascade("DELETE", expression.ForeignKey.OnDelete),
+                            FormatCascade("UPDATE", expression.ForeignKey.OnUpdate)
 							);
 		}

@@ -216,5 +219,26 @@
 			}
 			return result.TrimEnd(',');
 		}
+
+        protected string FormatCascade(string onWhat, Rule rule)
+        {
+            string action = "NO ACTION";
+            switch (rule)
+            {
+                case Rule.None:
+                    return "";
+                case Rule.Cascade:
+                    action = "CASCADE";
+                    break;
+                case Rule.SetNull:
+                    action = "SET NULL";
+                    break;
+                case Rule.SetDefault:
+                    action = "SET DEFAULT";
+                    break;
+            }
+
+            return string.Format(" ON {0} {1}", onWhat, action);
+        }
 	}
 }


Initial support for async player mode, to control player externally.

--- samples/PortMidiPlayer.cs
+++ samples/PortMidiPlayer.cs
@@ -3,13 +3,16 @@
 using System.IO;
 using System.Text;
 using System.Threading;
+using Commons.Music.Midi;
 #if Moonlight
 using MidiOutput = System.IntPtr;
+using System.Windows;
 #else
 using PortMidiSharp;
-#endif
-
-namespace Commons.Music.Midi
+using Timer = System.Timers.Timer;
+#endif
+
+namespace Commons.Music.Midi.Player
 {
 	public class Driver
 	{
@@ -20,10 +23,17 @@
 #else
 			var output = MidiDeviceManager.OpenOutput (MidiDeviceManager.DefaultOutputDeviceID);
 #endif
+
+			bool syncMode = false;
+
 			foreach (var arg in args) {
+				if (arg == "--sync") {
+					syncMode = true;
+					continue;
+				}
 				var parser = new SmfReader (File.OpenRead (arg));
 				parser.Parse ();
-#if true
+#if false
 /* // test reader/writer sanity
 				using (var outfile = File.Create ("testtest.mid")) {
 					var data = parser.Music;
@@ -46,16 +56,22 @@
 						gen.WriteTrack (tr);
 				}
 */
-
-				var player = new PortMidiSyncPlayer (output, parser.Music);
-				player.PlayerLoop ();
-#else
-				var player = new PortMidiPlayer (output, parser.MusicData);
+#else
+
+				// To sync player, just use it.
+				if (syncMode) {
+					var syncPlayer = new PortMidiSyncPlayer (output, parser.Music);
+					syncPlayer.PlayerLoop ();
+					return;
+				}
+
+				var player = new PortMidiPlayer (output, parser.Music);
+				player.StartLoop ();
 				player.PlayAsync ();
-				Console.WriteLine ("empty line to quit, P to pause");
+				Console.WriteLine ("empty line to quit, P to pause and resume");
 				while (true) {
 					string line = Console.ReadLine ();
-					if (line == "p") {
+					if (line == "P") {
 						if (player.State == PlayerState.Playing)
 							player.PauseAsync ();
 						else
@@ -65,6 +81,8 @@
 						player.Dispose ();
 						break;
 					}
+					else
+						Console.WriteLine ("what do you mean by '{0}' ?", line);
 				}
 #endif
 			}
@@ -111,10 +129,8 @@

 		public void Play ()
 		{
-			if (pause_handle != null) {
+			if (pause_handle != null)
 				pause_handle.Set ();
-				pause_handle = null;
-			}
 		}

 		public void Pause ()
@@ -126,18 +142,24 @@

 		public void PlayerLoop ()
 		{
-			while (true) {
-				pause_handle.WaitOne ();
-				if (stop)
-					break;
-				if (pause) {
-					pause_handle.Reset ();
-					pause = false;
-					continue;
-				}
-				if (event_idx == events.Count)
-					break;
-				HandleEvent (events [event_idx++]);
+			try {
+				while (true) {
+					pause_handle.WaitOne ();
+					if (stop)
+						break;
+					if (pause) {
+						pause_handle.Reset ();
+						pause = false;
+						continue;
+					}
+					if (event_idx == events.Count)
+						break;
+					HandleEvent (events [event_idx++]);
+				}
+			} catch (ThreadAbortException ex) {
+				Console.WriteLine ("Aborted player loop");
+				// FIXME: call pause (to shut down all notes)
+				// FIXME: call ResetAbort()
 			}
 		}

@@ -212,22 +234,39 @@

 		public PortMidiPlayer (MidiOutput output, SmfMusic music)
 		{
+			State = PlayerState.Stopped;
 			player = new PortMidiSyncPlayer (output, music);
-			sync_player_thread = new Thread (new ThreadStart (delegate { player.Play (); }));
-			State = PlayerState.Stopped;
+			ThreadStart ts = delegate {
+				player.Pause ();
+				player.PlayerLoop ();
+				};
+			sync_player_thread = new Thread (ts);
 		}

 		public PlayerState State { get; set; }

 		public void Dispose ()
 		{
-			player.Dispose ();
-			if (sync_player_thread.ThreadState == ThreadState.Running)
+			switch (sync_player_thread.ThreadState) {
+			case ThreadState.Stopped:
+			case ThreadState.AbortRequested:
+			case ThreadState.Aborted:
+				break;
+			default:
 				sync_player_thread.Abort ();
+				break;
+			}
+		}
+
+		public void StartLoop ()
+		{
+			sync_player_thread.Start ();
 		}

 		public void PlayAsync ()
 		{
+TextWriter.Null.WriteLine ("STATE: " + State); // FIXME: mono somehow fails to initialize this auto property.
+
 			switch (State) {
 			case PlayerState.Playing:
 				return; // do nothing
@@ -237,6 +276,7 @@
 				return;
 			case PlayerState.Stopped:
 				player.Play ();
+				State = PlayerState.Playing;
 				return;
 			}
 		}
@@ -254,3 +294,4 @@
 		}
 	}
 }
+


Update RequestDelegateFactory.cs (#41371)

--- src/Http/Http.Extensions/src/RequestDelegateFactory.cs
+++ src/Http/Http.Extensions/src/RequestDelegateFactory.cs
@@ -1788,6 +1788,7 @@
         if (task.IsCompletedSuccessfully)
         {
             task.GetAwaiter().GetResult();
+            return Task.CompletedTask;
         }

         return ExecuteAwaited(task);


Resolution for "The path must be absolute" on published projects

Trying to replace the internal "." folder with the local assembly path in order to have an absolute path for the PhysicalFileStorage class at startup ("The path must be absolute" error at startup for published projects)

May resolve the issue of #376 on dev

--- src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs
+++ src/Microsoft.AspNetCore.Blazor.Server/BlazorConfig.cs
@@ -29,6 +29,11 @@
             var configLines = File.ReadLines(configFilePath).ToList();
             SourceMSBuildPath = configLines[0];

+            if (SourceMSBuildPath == ".")
+            {
+                SourceMSBuildPath = assemblyPath;
+            }
+
             var sourceMsBuildDir = Path.GetDirectoryName(SourceMSBuildPath);
             SourceOutputAssemblyPath = Path.Combine(sourceMsBuildDir, configLines[1]);


Lazy create ResourceInvoker.InvokeResultFilters statemachine

--- src/Mvc/Mvc.Core/src/Infrastructure/ResourceInvoker.cs
+++ src/Mvc/Mvc.Core/src/Infrastructure/ResourceInvoker.cs
@@ -1049,16 +1049,41 @@
             }
         }

-        private async Task InvokeResultFilters()
-        {
-            var next = State.ResultBegin;
-            var scope = Scope.Invoker;
-            var state = (object)null;
-            var isCompleted = false;
-
-            while (!isCompleted)
-            {
-                await ResultNext<IResultFilter, IAsyncResultFilter>(ref next, ref scope, ref state, ref isCompleted);
+        private Task InvokeResultFilters()
+        {
+            try
+            {
+                var next = State.ResultBegin;
+                var scope = Scope.Invoker;
+                var state = (object)null;
+                var isCompleted = false;
+
+                while (!isCompleted)
+                {
+                    var lastTask = ResultNext<IResultFilter, IAsyncResultFilter>(ref next, ref scope, ref state, ref isCompleted);
+                    if (!lastTask.IsCompletedSuccessfully)
+                    {
+                        return Awaited(this, lastTask, next, scope, state, isCompleted);
+                    }
+                }
+
+                return Task.CompletedTask;
+            }
+            catch (Exception ex)
+            {
+                // Wrap non task-wrapped exceptions in a Task,
+                // as this isn't done automatically since the method is not async.
+                return Task.FromException(ex);
+            }
+
+            static async Task Awaited(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted)
+            {
+                await lastTask;
+
+                while (!isCompleted)
+                {
+                    await invoker.ResultNext<IResultFilter, IAsyncResultFilter>(ref next, ref scope, ref state, ref isCompleted);
+                }
             }
         }


Add logging info for RegisterAssemblyTask

--- src/NAppUpdate.Framework/Tasks/RegisterAssemblyTask.cs
+++ src/NAppUpdate.Framework/Tasks/RegisterAssemblyTask.cs
@@ -1,90 +1,104 @@
-using System;
-using System.Diagnostics;
-using System.IO;
-using System.Runtime.InteropServices;
-using NAppUpdate.Framework.Common;
-using NAppUpdate.Framework.Sources;
-
-namespace NAppUpdate.Framework.Tasks
-{
-    [Serializable]
-    [UpdateTaskAlias("RegisterAssembly")]
-    public class RegisterAssemblyTask : UpdateTaskBase
-    {
-        private string _regasmPath;
-        private string _appPath;
-
-        [NauField("localPath", "The local path of the file to update", true)]
-        public string LocalPath { get; set; }
-
-        [NauField("Force32BitRegistration", "Force 32 bit registration of the assembly on 64 bit system.", false)]
-        public bool Force32BitRegistration { get; set; }
-
-        public RegisterAssemblyTask()
-        {
-        }
-
-        public override void Prepare(IUpdateSource source)
-        {
-            var runtimePath = RuntimeEnvironment.GetRuntimeDirectory();
-
-            if (Force32BitRegistration)
-            {
-                runtimePath = runtimePath.Replace("Framework64", "Framework");
-            }
-
-            _regasmPath = Path.Combine(runtimePath,"regasm.exe");
-
-            _appPath = Path.GetDirectoryName(UpdateManager.Instance.ApplicationPath);
-
-            Description = string.Format("Registing assembly: {0}", LocalPath);
-        }
-
-        public override TaskExecutionStatus Execute(bool coldRun)
-        {
-            if (!coldRun)
-            {
-                return TaskExecutionStatus.RequiresPrivilegedAppRestart;
-            }
-
-            try
-            {
-                var assemblyPath = Path.Combine(_appPath, LocalPath);
-                var arguments = string.Format("/codebase \"{0}\"", assemblyPath);
-
-                var info = new ProcessStartInfo(_regasmPath, arguments)
-                                {
-                                    WindowStyle = ProcessWindowStyle.Hidden
-                                };
-
-                var p = Process.Start(info);
-
-                p.WaitForExit(30000);
-
-                if (p.ExitCode != 0)
-                {
-                    ExecutionStatus = TaskExecutionStatus.Failed;
-                    throw new UpdateProcessFailedException("Could not register the assembly");
-                }
-
-                return ExecutionStatus = TaskExecutionStatus.Successful;
-            }
-
-            catch (Exception ex)
-            {
-                ExecutionStatus = TaskExecutionStatus.Failed;
-                throw new UpdateProcessFailedException("Could not register the assembly", ex);
-            }
-        }
-
-        public override bool Rollback()
-        {
-            var assemblyPath = Path.Combine(_appPath, LocalPath);
-            var arguments = string.Format("/unregister \"{0}\"", assemblyPath);
-
-            Process.Start(_regasmPath, arguments);
-
-            return true;
-        }
-    }
+using System;
+using System.Diagnostics;
+using System.IO;
+using System.Runtime.InteropServices;
+using NAppUpdate.Framework.Common;
+using NAppUpdate.Framework.Sources;
+
+namespace NAppUpdate.Framework.Tasks
+{
+    [Serializable]
+    [UpdateTaskAlias("RegisterAssembly")]
+    public class RegisterAssemblyTask : UpdateTaskBase
+    {
+        private string _regasmPath;
+        private string _appPath;
+
+        [NauField("localPath", "The local path of the file to update", true)]
+        public string LocalPath { get; set; }
+
+        [NauField("Force32BitRegistration", "Force 32 bit registration of the assembly on 64 bit system.", false)]
+        public bool Force32BitRegistration { get; set; }
+
+        public RegisterAssemblyTask()
+        {
+        }
+
+        public override void Prepare(IUpdateSource source)
+        {
+            var runtimePath = RuntimeEnvironment.GetRuntimeDirectory();
+
+            if (Force32BitRegistration)
+            {
+                runtimePath = runtimePath.Replace("Framework64", "Framework");
+            }
+
+            _regasmPath = Path.Combine(runtimePath,"regasm.exe");
+
+            _appPath = Path.GetDirectoryName(UpdateManager.Instance.ApplicationPath);
+
+            Description = string.Format("Registing assembly: {0}", LocalPath);
+        }
+
+        public override TaskExecutionStatus Execute(bool coldRun)
+        {
+            if (!coldRun)
+            {
+                return TaskExecutionStatus.RequiresPrivilegedAppRestart;
+            }
+
+            try
+            {
+                var assemblyPath = Path.Combine(_appPath, LocalPath);
+                var arguments = string.Format("/codebase \"{0}\"", assemblyPath);
+
+                var info = new ProcessStartInfo(_regasmPath, arguments)
+                                {
+                                    WindowStyle = ProcessWindowStyle.Hidden
+                                };
+
+                var p = Process.Start(info);
+
+                p.WaitForExit(30000);
+
+                if (p.ExitCode != 0)
+                {
+                    ExecutionStatus = TaskExecutionStatus.Failed;
+
+                    UpdateManager.Instance.Logger.Log(Logger.SeverityLevel.Error,
+                        string.Format("Could not register the assembly: {0}.", LocalPath));
+
+                    throw new UpdateProcessFailedException("Could not register the assembly");
+                }
+
+                UpdateManager.Instance.Logger.Log(
+                    string.Format("Assembly registred successfuly: {0}.", LocalPath));
+
+                return ExecutionStatus = TaskExecutionStatus.Successful;
+            }
+
+            catch (Exception ex)
+            {
+                ExecutionStatus = TaskExecutionStatus.Failed;
+
+                UpdateManager.Instance.Logger.Log(ex,
+                    string.Format("Could not register the assembly: {0}.", LocalPath));
+
+                throw new UpdateProcessFailedException("Could not register the assembly", ex);
+            }
+        }
+
+        public override bool Rollback()
+        {
+            var assemblyPath = Path.Combine(_appPath, LocalPath);
+            var arguments = string.Format("/unregister \"{0}\"", assemblyPath);
+
+            Process.Start(_regasmPath, arguments);
+
+            UpdateManager.Instance.Logger.Log(
+                   string.Format("Rollback - assembly unregistred: {0}.", LocalPath));
+
+            return true;
+        }
+    }
 }


Use the GetTypeInfo() extension method.

Use the GetTypeInfo() extension method.

--- src/NUnitFramework/framework/Constraints/Constraint.cs
+++ src/NUnitFramework/framework/Constraints/Constraint.cs
@@ -22,8 +22,10 @@
 // ***********************************************************************

 using NUnit.Framework.Internal;
+using NUnit.Compatibility;
 using System.Collections;
 using System;
+using System.Reflection;

 namespace NUnit.Framework.Constraints
 {
@@ -56,7 +58,7 @@
             {
                 var type = this.GetType();
                 var displayName = type.Name;
-                if (type.IsGenericType)
+                if (type.GetTypeInfo().IsGenericType)
                     displayName = displayName.Substring(0, displayName.Length - 2);
                 if (displayName.EndsWith("Constraint", StringComparison.Ordinal))
                     displayName = displayName.Substring(0, displayName.Length - 10);


some fixes and cleanup

some fixes and cleanup

remove all the unnecessary left out texts and added underline to info

--- src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs
+++ src/NadekoBot/Modules/Utility/Commands/InfoCommands.cs
@@ -1,4 +1,4 @@
-using Discord;
+using Discord;
 using Discord.Commands;
 using NadekoBot.Attributes;
 using NadekoBot.Extensions;
@@ -46,21 +46,21 @@
             var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(server.Id >> 22);
             var sb = new StringBuilder();
             var users = await server.GetUsersAsync();
-            sb.AppendLine($@"`Name:` **{server.Name}**
-`Owner:` **{await server.GetUserAsync(server.OwnerId)}**
-`Id:` **{server.Id}**
-`Icon Url:` **{ server.IconUrl}**
-`TextChannels:` **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}**
-`Members:` **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}:green_heart: {users.Count(u => u.Status == UserStatus.Idle)}:yellow_heart: {users.Count(u => u.Status == UserStatus.DoNotDisturb)}:heart: {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}:black_heart:
-`Roles:` **{server.Roles.Count()}**
-`Created At:` **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
+            sb.AppendLine($@"__`Name:`__ **{server.Name}**
+__`Owner:`__ **{await server.GetUserAsync(server.OwnerId)}**
+__`ID:`__ **{server.Id}**
+__`Icon URL:`__ { server.IconUrl}
+__`TextChannels:`__ **{(await server.GetTextChannelsAsync()).Count()}** `VoiceChannels:` **{(await server.GetVoiceChannelsAsync()).Count()}**
+__`Members:`__ **{users.Count}** `-` {users.Count(u => u.Status == UserStatus.Online)}:green_heart: {users.Count(u => u.Status == UserStatus.Idle)}:yellow_heart: {users.Count(u => u.Status == UserStatus.DoNotDisturb)}:heart: {users.Count(u=> u.Status == UserStatus.Offline || u.Status == UserStatus.Unknown)}:black_heart:
+__`Roles:`__ **{server.Roles.Count()}**
+__`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
 ");
             if (server.Emojis.Count() > 0)
-                sb.AppendLine($"`Custom Emojis:` **{string.Join(", ", server.Emojis)}**");
+                sb.AppendLine($"__`Custom Emojis:`__ *{string.Join(", ", server.Emojis)}*");
             if (server.Features.Count() > 0)
-                sb.AppendLine($"`Features:` **{string.Join(", ", server.Features)}**");
+                sb.AppendLine($"__`Features:`__ **{string.Join(", ", server.Features)}**");
             if (!string.IsNullOrWhiteSpace(server.SplashUrl))
-                sb.AppendLine($"`Region:` **{server.VoiceRegionId}**");
+                sb.AppendLine($"__`Region:`__ **{server.VoiceRegionId}**");
             await msg.Reply(sb.ToString()).ConfigureAwait(false);
         }

@@ -72,11 +72,11 @@
             if (ch == null)
                 return;
             var createdAt = new DateTime(2015, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).AddMilliseconds(ch.Id >> 22);
-            var toReturn = $@"`Name:` **#{ch.Name}**
-`Id:` **{ch.Id}**
-`Created At:` **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
-`Topic:` **{ch.Topic}**
-`Users:` **{(await ch.GetUsersAsync()).Count()}**";
+            var toReturn = $@"__`Name:`__ **#{ch.Name}**
+__`ID:`__ **{ch.Id}**
+__`Created At:`__ **{createdAt.ToString("dd.MM.yyyy HH:mm")}**
+__`Topic:`__ {ch.Topic}
+__`Users:`__ **{(await ch.GetUsersAsync()).Count()}**";
             await msg.Reply(toReturn).ConfigureAwait(false);
         }

@@ -88,16 +88,16 @@
             var user = usr ?? msg.Author as IGuildUser;
             if (user == null)
                 return;
-            var toReturn = $"`Name#Discrim:` **#{user.Username}#{user.Discriminator}**\n";
+            var toReturn = $"__`Name:`__ **{user.Username}#{user.Discriminator}**\n";
             if (!string.IsNullOrWhiteSpace(user.Nickname))
-                toReturn += $"`Nickname:` **{user.Nickname}**";
-            toReturn += $@"`Id:` **{user.Id}**
-`Current Game:` **{(user.Game?.Name == null ? "-" : user.Game.Name)}**
-`Joined Server:` **{user.JoinedAt?.ToString("dd.MM.yyyy HH:mm")}**
-`Joined Discord:` **{user.CreatedAt.ToString("dd.MM.yyyy HH:mm")}**
-`Roles:` **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}**
-`AvatarUrl:` **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
+                toReturn += $"__`Nickname:`__ **{user.Nickname}** ";
+            toReturn += $@"__`ID:`__ **{user.Id}**
+__`Current Game:`__ **{(user.Game?.Name == null ? "-" : user.Game.Name)}**
+__`Joined Server:`__ **{user.JoinedAt?.ToString("dd.MM.yyyy HH:mm")}**
+__`Joined Discord:`__ **{user.CreatedAt.ToString("dd.MM.yyyy HH:mm")}**
+__`Roles:`__ **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name)).SanitizeMentions()}**
+__`Avatar URL:`__ **{await NadekoBot.Google.ShortenUrl(user.AvatarUrl).ConfigureAwait(false)}**";
             await msg.Reply(toReturn).ConfigureAwait(false);
         }
     }
-}+}


Fix Mono path detection to actually find Mono on the path before calling real_path

--- src/OmniSharp.Abstractions/Utilities/PlatformHelper.cs
+++ src/OmniSharp.Abstractions/Utilities/PlatformHelper.cs
@@ -1,20 +1,42 @@
 using System;
+using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using System.Runtime.InteropServices;

 namespace OmniSharp.Utilities
 {
     public static class PlatformHelper
     {
-        private static Lazy<bool> _isMono = new Lazy<bool>(() => Type.GetType("Mono.Runtime") != null);
-        private static Lazy<string> _monoPath = new Lazy<string>(FindMonoPath);
-        private static Lazy<string> _monoXBuildFrameworksDirPath = new Lazy<string>(FindMonoXBuildFrameworksDirPath);
+        private static Lazy<bool> s_isMono = new Lazy<bool>(() => Type.GetType("Mono.Runtime") != null);
+        private static Lazy<string> s_monoRuntimePath = new Lazy<string>(FindMonoRuntimePath);
+        private static Lazy<string> s_monoXBuildFrameworksDirPath = new Lazy<string>(FindMonoXBuildFrameworksDirPath);

-        public static bool IsMono => _isMono.Value;
-        public static string MonoFilePath => _monoPath.Value;
-        public static string MonoXBuildFrameworksDirPath => _monoXBuildFrameworksDirPath.Value;
+        public static bool IsMono => s_isMono.Value;
+        public static string MonoRuntimePath => s_monoRuntimePath.Value;
+        public static string MonoXBuildFrameworksDirPath => s_monoXBuildFrameworksDirPath.Value;

         public static bool IsWindows => Path.DirectorySeparatorChar == '\\';
+
+        private static IEnumerable<string> s_searchPaths;
+
+        public static IEnumerable<string> GetSearchPaths()
+        {
+            if (s_searchPaths == null)
+            {
+                var path = Environment.GetEnvironmentVariable("PATH");
+                if (path == null)
+                {
+                    return Array.Empty<string>();
+                }
+
+                s_searchPaths = path
+                    .Split(Path.PathSeparator)
+                    .Select(p => p.Trim('"'));
+            }
+
+            return s_searchPaths;
+        }

         // http://man7.org/linux/man-pages/man3/realpath.3.html
         // CharSet.Ansi is UTF8 on Unix
@@ -43,11 +65,23 @@
             return result;
         }

-        private static string FindMonoPath()
+        private static string FindMonoRuntimePath()
         {
-            return !IsWindows
-                ? RealPath("mono")
-                : null;
+            if (IsWindows)
+            {
+                return null;
+            }
+
+            var monoPath = GetSearchPaths()
+                .Select(p => Path.Combine(p, "mono"))
+                .FirstOrDefault(File.Exists);
+
+            if (monoPath == null)
+            {
+                return null;
+            }
+
+            return RealPath(monoPath);
         }

         private static string FindMonoXBuildFrameworksDirPath()
@@ -65,21 +99,21 @@

             // The normal Unix path doesn't exist, so we'll fallback to finding Mono using the
             // runtime location. This is the likely situation on macOS.
-            var monoFilePath = MonoFilePath;
-            if (string.IsNullOrEmpty(monoFilePath))
+            var monoRuntimePath = MonoRuntimePath;
+            if (string.IsNullOrEmpty(monoRuntimePath))
             {
                 return null;
             }

             // mono should be located within a directory that is a sibling to the lib directory.
-            var monoDirPath = Path.GetDirectoryName(monoFilePath);
+            var monoDirPath = Path.GetDirectoryName(monoRuntimePath);

             // The base directory is one folder up
             var monoBaseDirPath = Path.Combine(monoDirPath, "..");
             monoBaseDirPath = Path.GetFullPath(monoBaseDirPath);

             // We expect the xbuild-frameworks to be in /Versions/Current/lib/mono/xbuild-frameworks.
-            var monoXBuildFrameworksDirPath = Path.Combine(monoBaseDirPath, "lib/mono/xbuild-frameworks");
+            var monoXBuildFrameworksDirPath = Path.Combine(monoBaseDirPath, "lib", "mono", "xbuild-frameworks");
             monoXBuildFrameworksDirPath = Path.GetFullPath(monoXBuildFrameworksDirPath);

             return Directory.Exists(monoXBuildFrameworksDirPath)


adding comments

adding comments

--- src/SFA.DAS.EmployerFinance/Services/PaymentService.cs
+++ src/SFA.DAS.EmployerFinance/Services/PaymentService.cs
@@ -75,6 +75,10 @@
                 var apprenticeshipIdList = paymentDetails.Select(pd => pd.ApprenticeshipId).Distinct();

                 var getProviderDetailsTask = GetProviderDetailsDict(ukprnList);
+
+                /// This is getting the list of all apprneticeships in one go, they need to be staggered
+                /// otherwise commitment api struggles to keep up with the requests.
+                /// Similar to this https://github.com/SkillsFundingAgency/das-commitments/blob/a1f6cfd34fd1546c559f7bc50bb9fb8627300320/src/SFA.DAS.Commitments.Notification.WebJob/EmailServices/ProviderAlertSummaryEmailService.cs#L58
                 var getApprenticeDetailsTask = GetApprenticeshipDetailsDict(employerAccountId, apprenticeshipIdList);

                 await Task.WhenAll(getProviderDetailsTask, getApprenticeDetailsTask);
@@ -229,6 +233,12 @@
             }
         }

+        /// <summary>
+        /// Done for spike, this is calling
+        /// </summary>
+        /// <param name="employerAccountId"></param>
+        /// <param name="apprenticeshipId"></param>
+        /// <returns></returns>
         private async Task<ApprenticeshipCache> GetApprenticeship(long employerAccountId, long apprenticeshipId)
         {
             try


Added bindable properties for header and text

--- src/plug-ins/motoi.platform.ui/shells/IMessageDialogWindow.cs
+++ src/plug-ins/motoi.platform.ui/shells/IMessageDialogWindow.cs
@@ -1,4 +1,6 @@
-namespace motoi.platform.ui.shells {
+using motoi.platform.ui.bindings;
+
+namespace motoi.platform.ui.shells {
     /// <summary>
     /// Defines a message dialog.
     /// </summary>
@@ -34,6 +36,10 @@
     /// Provides the property meta data of <see cref="IMessageDialogWindow"/> that is used by data binding operations.
     /// </summary>
     public class PMessageDialogWindow : PDialogWindowControl<IMessageDialogWindow> {
-
+        /// <summary> Header property meta data </summary>
+        public static readonly IBindableProperty<string> HeaderProperty = CreatePropertyInfo(_ => _.Header, string.Empty);
+
+        /// <summary> Text property meta data </summary>
+        public static readonly IBindableProperty<string> TextProperty = CreatePropertyInfo(_ => _.Text, string.Empty);
     }
 }


Split the code into more blocks/lines for improved readability

--- src/Skybrud.Social.Spotify/OAuth/SpotifyOAuthClient.cs
+++ src/Skybrud.Social.Spotify/OAuth/SpotifyOAuthClient.cs
@@ -112,18 +112,25 @@
         public string GetAuthorizationUrl(string state, params string[] scope) {

             // Input validation
-            if (String.IsNullOrWhiteSpace(state)) throw new ArgumentNullException("state");
             if (String.IsNullOrWhiteSpace(ClientId)) throw new PropertyNotSetException("ClientId");
             if (String.IsNullOrWhiteSpace(RedirectUri)) throw new PropertyNotSetException("RedirectUri");

-            // Construct the authorization URL
-            return "https://accounts.spotify.com/authorize?" + SocialUtils.Misc.NameValueCollectionToQueryString(new NameValueCollection {
+            // Do we have a valid "state" ?
+            if (String.IsNullOrWhiteSpace(state)) {
+                throw new ArgumentNullException("state", "A valid state should be specified as it is part of the security of OAuth 2.0.");
+            }
+
+            // Construct the query string
+            NameValueCollection query = new NameValueCollection {
                 {"client_id", ClientId},
                 {"response_type", "code"},
                 {"redirect_uri", RedirectUri},
                 {"state", state},
                 {"scope", String.Join(" ", scope ?? new string[0])}
-            });
+            };
+
+            // Construct the authorization URL
+            return "https://accounts.spotify.com/authorize?" + SocialUtils.Misc.NameValueCollectionToQueryString(query);

         }


main form datagrid header push

main form datagrid header push

--- src/lex4allGUI/MainForm.cs
+++ src/lex4allGUI/MainForm.cs
@@ -69,7 +69,7 @@

         private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
         {
-            if (e.ColumnIndex == 2 && e.RowIndex > 0)
+            if (e.ColumnIndex == 2 && e.RowIndex > -1)
             { //button column is third column
                     int row = e.RowIndex;
                     string word = dataGridView1.Rows[row].Cells[0].Value.ToString();
@@ -83,7 +83,7 @@
                     wordInput.Show();

             }
-            if (e.ColumnIndex == 3 && e.RowIndex > 0)
+            if (e.ColumnIndex == 3 && e.RowIndex > -1)
             {
                 int row = e.RowIndex;
                 string word = dataGridView1.Rows[row].Cells[0].Value.ToString();


Add AssemblyLoadContext.LoadUnmanagedDllFromPath to System.Runtime.Loader reference assembly

This patch adds the new API to the System.Runtime.Loader reference assembly. Tests will be added separately, after the new API
is published and can be consumed.

Part of dotnet/coreclr#937 and dotnet/corefx#3054

--- src/System.Runtime.Loader/ref/System.Runtime.Loader.cs
+++ src/System.Runtime.Loader/ref/System.Runtime.Loader.cs
@@ -28,6 +28,7 @@
         protected System.Reflection.Assembly LoadFromNativeImagePath(string nativeImagePath, string assemblyPath) { return default(System.Reflection.Assembly); }
         protected System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly) { return default(System.Reflection.Assembly); }
         protected System.Reflection.Assembly LoadFromStream(System.IO.Stream assembly, System.IO.Stream assemblySymbols) { return default(System.Reflection.Assembly); }
+        protected System.IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath) { return default(System.IntPtr); }
         protected virtual System.IntPtr LoadUnmanagedDll(string unmanagedDllName) { return default(System.IntPtr); }
         public void SetProfileOptimizationRoot(string directoryPath) { }
         public void StartProfileOptimization(string profile) { }


Some more basic unit tests for StringifyMax()

--- test/PaletteInsightAgent.UnitTests/Tableau/TableauRepoTest.cs
+++ test/PaletteInsightAgent.UnitTests/Tableau/TableauRepoTest.cs
@@ -1,4 +1,5 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
 using PaletteInsightAgent.RepoTablesPoller;

 namespace PaletteInsightAgentTests.Tableau
@@ -17,5 +18,58 @@
             var stringified = Tableau9RepoConn.StringifyMax(id);
             Assert.AreEqual(stringified, "123");
         }
+
+        [TestMethod]
+        public void StringifyMax_string()
+        {
+            string babe = "Shaunie";
+            var stringified = Tableau9RepoConn.StringifyMax(babe);
+            Assert.AreEqual(stringified, "Shaunie");
+        }
+
+        [TestMethod]
+        public void StringifyMax_date_en_gb()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-GB");
+            DateTime en_gb = new DateTime(2016, 08, 17, 13, 22, 56);
+            var stringified = Tableau9RepoConn.StringifyMax(en_gb);
+            Assert.AreEqual(stringified, "2016-08-17 13:22:56Z");
+        }
+
+        [TestMethod]
+        public void StringifyMax_date_hu_hu()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("hu-HU");
+            DateTime hu_hu = new DateTime(2016, 08, 17, 13, 22, 56);
+            var stringified = Tableau9RepoConn.StringifyMax(hu_hu);
+            Assert.AreEqual(stringified, "2016-08-17 13:22:56Z");
+        }
+
+        [TestMethod]
+        public void StringifyMax_date_en_us()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
+            DateTime en_us = new DateTime(2016, 08, 17, 13, 22, 56);
+            var stringified = Tableau9RepoConn.StringifyMax(en_us);
+            Assert.AreEqual(stringified, "2016-08-17 13:22:56Z");
+        }
+
+        [TestMethod]
+        public void StringifyMax_date_ko()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("ko");
+            DateTime ko = new DateTime(2016, 08, 17, 13, 22, 56);
+            var stringified = Tableau9RepoConn.StringifyMax(ko);
+            Assert.AreEqual(stringified, "2016-08-17 13:22:56Z");
+        }
+
+        [TestMethod]
+        public void StringifyMax_date_nl_nl()
+        {
+            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("nl-NL");
+            DateTime nl_nl = new DateTime(2016, 08, 17, 13, 22, 56);
+            var stringified = Tableau9RepoConn.StringifyMax(nl_nl);
+            Assert.AreEqual(stringified, "2016-08-17 13:22:56Z");
+        }
     }
 }


#826 Disable connection pool for unit test

--- tests/Titanium.Web.Proxy.IntegrationTests/NestedProxyTests.cs
+++ tests/Titanium.Web.Proxy.IntegrationTests/NestedProxyTests.cs
@@ -93,24 +93,25 @@

             var proxies2 = new List<ProxyServer>();

-            //create a level 2 upstream proxy farm
+            //create a level 2 upstream proxy farm that forwards to server
             for (int i = 0; i < 5; i++)
             {
-                var proxy = testSuite.GetProxy();
-                proxy.ProxyBasicAuthenticateFunc += (_, _, _) =>
+                var proxy2 = testSuite.GetProxy();
+                proxy2.ProxyBasicAuthenticateFunc += (_, _, _) =>
                 {
                     return Task.FromResult(true);
                 };

-                proxies2.Add(proxy);
+                proxies2.Add(proxy2);
             }

             var proxies1 = new List<ProxyServer>();

-            //create a level 1 upstream proxy farm
-            for (int i = 0; i < 5; i++)
+            //create a level 1 upstream proxy farm that forwards to level 2 farm
+            for (int i = 0; i < 10; i++)
             {
                 var proxy1 = testSuite.GetProxy();
+                proxy1.EnableConnectionPool = false;
                 var proxy2 = proxies2[rnd.Next() % proxies2.Count];

                 var explicitEndpoint = proxy1.ProxyEndPoints.OfType<ExplicitProxyEndPoint>().First();
@@ -154,7 +155,7 @@
                  {
                      var proxy = proxies1[rnd.Next() % proxies1.Count];
                      using var client = testSuite.GetClient(proxy);
-                     client.Timeout = TimeSpan.FromMinutes(10);
+                     client.Timeout = TimeSpan.FromSeconds(30);
                      var response = await client.PostAsync(new Uri(server.ListeningHttpsUrl),
                                                  new StringContent("hello server. I am a client."));


StatusSelection = { "Published", "Revoked", "Hidden" } changed #9

--- src/biz.dfch.CS.Appclusive.UI/Models/Core/Catalogue.cs
+++ src/biz.dfch.CS.Appclusive.UI/Models/Core/Catalogue.cs
@@ -14,7 +14,7 @@
             this.CatalogueItems = new List<CatalogueItem>();
         }

-        public static string[] StatusSelection = { "Published", "New" };
+        public static string[] StatusSelection = { "Published", "Revoked", "Hidden" };

         public List<CatalogueItem> CatalogueItems { get; set; }


Added method to get the full type name (including com objects)

--- APE.Communication/APE.Communication/Communication.cs
+++ APE.Communication/APE.Communication/Communication.cs
@@ -14,21 +14,17 @@
 //limitations under the License.
 //
 using System;
-using System.Collections.Generic;
 using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-//
 using System.IO;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
+using System.Runtime.InteropServices.ComTypes;
 using Fasterflect;  //[Un]Install-Package fasterflect
 using System.Threading;
 using System.Windows.Forms;
 using System.Reflection;
 using System.Diagnostics;
 using System.ComponentModel;
-using System.Management;
 using APE.Domain;
 using NM = APE.Native.NativeMethods;
 using Microsoft.Win32;
@@ -4218,18 +4214,44 @@
             }
         }

-        //TODO set the sleep in the remote apeipc thread!
-        //public int Sleep
-        //{
-        //    get
-        //    {
-        //        return m_Sleep;
-        //    }
-        //    set
-        //    {
-        //        m_Sleep = value;
-        //    }
-        //}
+        private string GetObjectFullTypeName(object obj)
+        {
+            if (Marshal.IsComObject(obj))
+            {
+                IDispatch dispatch = (IDispatch)obj;
+                if (dispatch.GetTypeInfoCount() != 1)
+                {
+                    throw new Exception("Failed to get runtime type information");
+                }
+
+                ITypeInfo typeInfo = dispatch.GetTypeInfo(0, 0);
+
+                ITypeLib typeLib;
+                int index;
+                typeInfo.GetContainingTypeLib(out typeLib, out index);
+
+                string typeLibName = Marshal.GetTypeLibName(typeLib);
+                string typeInfoName = Marshal.GetTypeInfoName(typeInfo);
+
+                return typeLibName + "." + typeInfoName;
+            }
+            else
+            {
+                Type typeObject = obj.GetType();
+                return typeObject.Namespace + "." + typeObject.Name;
+            }
+        }
+
+        [ComImport]
+        [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+        [Guid("00020400-0000-0000-C000-000000000046")]
+        private interface IDispatch
+        {
+            int GetTypeInfoCount();
+            [return: MarshalAs(UnmanagedType.Interface)]
+            ITypeInfo GetTypeInfo([In, MarshalAs(UnmanagedType.U4)] int iTInfo, [In, MarshalAs(UnmanagedType.U4)] int lcid);
+            void GetIDsOfNames([In] ref Guid riid, [In, MarshalAs(UnmanagedType.LPArray)] string[] rgszNames, [In, MarshalAs(UnmanagedType.U4)] int cNames, [In, MarshalAs(UnmanagedType.U4)] int lcid, [Out, MarshalAs(UnmanagedType.LPArray)] int[] rgDispId);
+        }
     }
 }


chore: Removed general dynamic model

chore: Removed general dynamic model

--- AdditionalPropertiesTest/AdditionalPropertiesTest.cs
+++ AdditionalPropertiesTest/AdditionalPropertiesTest.cs
@@ -142,7 +142,7 @@
             foreach (string prop in propertyNames)
             {
                 var value = JsonConvert.DeserializeObject<Foo>(item[prop].ToString());
-                x.AdditionalProperties.Add(prop, value);
+                x.Add(prop, value);
             }

             return x;
@@ -174,7 +174,7 @@
     }
     #endregion

-    public class Y : DynamicModel
+    public class Y : DynamicModel<object>
     {
         [JsonProperty("prop1", NullValueHandling = NullValueHandling.Ignore)]
         public string Prop1 { get; set; }
@@ -266,7 +266,7 @@

     public class DynamicModel<T>
     {
-        public Dictionary<string, T> AdditionalProperties { get; set; } = new Dictionary<string, T>();
+        public Dictionary<string, T> AdditionalProperties { get; } = new Dictionary<string, T>();

         public void Add(string key, T value)
         {
@@ -284,25 +284,4 @@
             return value;
         }
     }
-
-    public class DynamicModel
-    {
-        public Dictionary<string, object> AdditionalProperties { get; set; } = new Dictionary<string, object>();
-
-        public void Add(string key, object value)
-        {
-            AdditionalProperties.Add(key, value);
-        }
-
-        public void Remove(string key)
-        {
-            AdditionalProperties.Remove(key);
-        }
-
-        public object Get(string key)
-        {
-            AdditionalProperties.TryGetValue(key, out object value);
-            return value;
-        }
-    }
 }


Minor changes in the tooltip texts.

Minor changes in the tooltip texts.

--- Assets/HoloToolkit/Utilities/Editor/ConfigureMenu.cs
+++ Assets/HoloToolkit/Utilities/Editor/ConfigureMenu.cs
@@ -191,52 +191,62 @@
             }
         }

-        [MenuItem("HoloToolkit/Configure/HoloLens Recommended Capabilities ", priority = 1)]
-        static void HoloLensRecommendedCapabilities()
-        {
-            AutoConfigureMenu window = (AutoConfigureMenu)EditorWindow.GetWindow(typeof(AutoConfigureMenu), true, "HoloLens Recommended Capabilities");
+        [MenuItem("HoloToolkit/Configure/Apply HoloLens Capability Settings", priority = 1)]
+        static void ApplyHoloLensCapabilitySettings()
+        {
+            AutoConfigureMenu window = (AutoConfigureMenu)EditorWindow.GetWindow(typeof(AutoConfigureMenu), true, "Apply HoloLens Capability Settings");
             window.Show();
         }

         void OnGUI()
         {
-            capability(PlayerSettings.WSACapability.Microphone, @"  Microphone
-Required for access to the HoloLens microphone.
+            capabilityToggle(PlayerSettings.WSACapability.Microphone, @"Microphone
+
+Required for access to the HoloLens microphone.
 This includes behaviors like DictationRecognizer,
-GrammarRecognizer, and KeywordRecognizer.
-This capability is NOT required for the 'Select'
-keyword.Recommendation: Only enable if your
-application needs access to the microphone
-beyond the 'Select' keyword.The microphone is
-considered a privacy sensitive resource.");
-
-            capability(PlayerSettings.WSACapability.SpatialPerception, @"   SpatialPerception
+GrammarRecognizer, and KeywordRecognizer.
+This capability is NOT required for the 'Select' keyword.
+
+Recommendation: Only enable if your application
+needs access to the microphone beyond the
+'Select' keyword. The microphone is considered a
+privacy sensitive resource.");
+
+            capabilityToggle(PlayerSettings.WSACapability.SpatialPerception, @"SpatialPerception
+
 Required for access to the HoloLens world mapping
-capabilities. These include behaviors like
+capabilities. These include behaviors like
 SurfaceObserver, SpatialMappingManager and
-SpatialAnchor. Recommendation: Enabled unless
-your application doesn't use spatial mapping or
-spatial collisions in any way.");
-
-            capability(PlayerSettings.WSACapability.WebCam, @"  WebCam
+SpatialAnchor.
+
+Recommendation: Enabled, unless your application
+doesn't use spatial mapping or spatial collisions
+in any way. ");
+
+            capabilityToggle(PlayerSettings.WSACapability.WebCam, @"WebCam
+
 Required for access to the HoloLens RGB camera
 (also known as the locatable camera). This
 includes APIs like PhotoCapture and VideoCapture.
-This capability is NOT required for mixed reality
-streaming or for capture photos or videos from the
-start menu. Recommendation: Only enable if your
-application needs access to capture raw photos or
-videos from the RGB camera. The RGB camera is
+This capability is NOT required for mixed reality
+streaming or for capturing photos or videos using
+the start menu.
+
+Recommendation: Only enable if your application
+needs to programmatically capture photos or
+videos from the RGB camera. The RGB camera is
 considered a privacy sensitive resource.");

-            capability(PlayerSettings.WSACapability.InternetClient, @"  InternetClient
-Required if your application needs to access the
-Internet. Recommendation: Leave unchecked
-unless your application needs to access online
-services.");
-        }
-
-        void capability(PlayerSettings.WSACapability mCap,string tooltip)
+            capabilityToggle(PlayerSettings.WSACapability.InternetClient, @"Internet Client
+
+Required if your application needs to access
+the Internet.
+
+Recommendation: Leave unchecked unless your
+application uses online services.");
+        }
+
+        void capabilityToggle(PlayerSettings.WSACapability mCap,string tooltip)
         {
             PlayerSettings.WSA.SetCapability(mCap, GUILayout.Toggle(PlayerSettings.WSA.GetCapability(mCap), new GUIContent(" " + mCap.ToString(), tooltip)));
         }


Refactoring.

Refactoring.

--- AudioWorks/src/AudioWorks.Extensions/SampleBuffer.cs
+++ AudioWorks/src/AudioWorks.Extensions/SampleBuffer.cs
@@ -54,24 +54,7 @@
             _buffers = new IMemoryOwner<float>[1];
             _buffers[0] = MemoryPool<float>.Shared.Rent(Frames);

-            var multiplier = 1 / (float) Math.Pow(2, bitsPerSample - 1);
-            var buffer = _buffers[0].Memory.Span.Slice(0, Frames);
-
-            // Vectorized code is 40-50% faster with AVX2
-            if (Vector.IsHardwareAccelerated)
-            {
-                var bufferVectors = MemoryMarshal.Cast<float, Vector<float>>(buffer);
-                var sampleVectors = MemoryMarshal.Cast<int, Vector<int>>(monoSamples);
-
-                for (var vectorIndex = 0; vectorIndex < sampleVectors.Length; vectorIndex++)
-                    bufferVectors[vectorIndex] = Vector.ConvertToSingle(sampleVectors[vectorIndex]) * multiplier;
-
-                for (var frameIndex = bufferVectors.Length * Vector<int>.Count; frameIndex < Frames; frameIndex++)
-                    buffer[frameIndex] = monoSamples[frameIndex] * multiplier;
-            }
-            else
-                for (var frameIndex = 0; frameIndex < Frames; frameIndex++)
-                    buffer[frameIndex] = monoSamples[frameIndex] * multiplier;
+            ConvertToFloat(monoSamples, _buffers[0].Memory.Span.Slice(0, Frames), bitsPerSample);
         }

         /// <summary>
@@ -98,36 +81,8 @@
             _buffers[0] = MemoryPool<float>.Shared.Rent(Frames);
             _buffers[1] = MemoryPool<float>.Shared.Rent(Frames);

-            var multiplier = 1 / (float) Math.Pow(2, bitsPerSample - 1);
-            var leftBuffer = _buffers[0].Memory.Span.Slice(0, Frames);
-            var rightBuffer = _buffers[1].Memory.Span.Slice(0, Frames);
-
-            // Vectorized code is 40-50% faster with AVX2
-            if (Vector.IsHardwareAccelerated)
-            {
-                var leftBufferVectors = MemoryMarshal.Cast<float, Vector<float>>(leftBuffer);
-                var rightBufferVectors = MemoryMarshal.Cast<float, Vector<float>>(rightBuffer);
-                var leftSampleVectors = MemoryMarshal.Cast<int, Vector<int>>(leftSamples);
-                var rightSampleVectors = MemoryMarshal.Cast<int, Vector<int>>(rightSamples);
-
-                for (var vectorIndex = 0; vectorIndex < leftSampleVectors.Length; vectorIndex++)
-                {
-                    leftBufferVectors[vectorIndex] = Vector.ConvertToSingle(leftSampleVectors[vectorIndex]) * multiplier;
-                    rightBufferVectors[vectorIndex] = Vector.ConvertToSingle(rightSampleVectors[vectorIndex]) * multiplier;
-                }
-
-                for (var frameIndex = leftBufferVectors.Length * Vector<int>.Count; frameIndex < Frames; frameIndex++)
-                {
-                    leftBuffer[frameIndex] = leftSamples[frameIndex] * multiplier;
-                    rightBuffer[frameIndex] = rightSamples[frameIndex] * multiplier;
-                }
-            }
-            else
-                for (var frameIndex = 0; frameIndex < Frames; frameIndex++)
-                {
-                    leftBuffer[frameIndex] = leftSamples[frameIndex] * multiplier;
-                    rightBuffer[frameIndex] = rightSamples[frameIndex] * multiplier;
-                }
+            ConvertToFloat(leftSamples, _buffers[0].Memory.Span.Slice(0, Frames), bitsPerSample);
+            ConvertToFloat(rightSamples, _buffers[1].Memory.Span.Slice(0, Frames), bitsPerSample);
         }

         /// <summary>
@@ -233,7 +188,7 @@
                         for (int frameIndex = 0, offset = channelIndex;
                             frameIndex < channelBuffer.Length;
                             frameIndex++, offset += Channels)
-                            channelBuffer[frameIndex] = int24Samples[offset].AsInt32() * multiplier;
+                            channelBuffer[frameIndex] = int24Samples[offset] * multiplier;
                     }
                     break;
                 case 4:
@@ -418,6 +373,27 @@
                 buffer.Dispose();
         }

+        static void ConvertToFloat(ReadOnlySpan<int> source, Span<float> destination, int bitDepth)
+        {
+            var multiplier = 1 / (float)Math.Pow(2, bitDepth - 1);
+
+            // Vectorized code is 40-50% faster with AVX2
+            if (Vector.IsHardwareAccelerated)
+            {
+                var sourceVectors = MemoryMarshal.Cast<int, Vector<int>>(source);
+                var destinationVectors = MemoryMarshal.Cast<float, Vector<float>>(destination);
+
+                for (var vectorIndex = 0; vectorIndex < sourceVectors.Length; vectorIndex++)
+                    destinationVectors[vectorIndex] = Vector.ConvertToSingle(sourceVectors[vectorIndex]) * multiplier;
+
+                for (var frameIndex = sourceVectors.Length * Vector<int>.Count; frameIndex < source.Length; frameIndex++)
+                    destination[frameIndex] = source[frameIndex] * multiplier;
+            }
+            else
+                for (var frameIndex = 0; frameIndex < source.Length; frameIndex++)
+                    destination[frameIndex] = source[frameIndex] * multiplier;
+        }
+
         [StructLayout(LayoutKind.Sequential)]
         struct Int24
         {
@@ -432,7 +408,8 @@
                 _byte3 = (byte) (((uint) value >> 16) & 0xFF);
             }

-            internal int AsInt32() => _byte1 | _byte2 << 8 | ((sbyte) _byte3 << 16);
+            public static implicit operator int(Int24 int24) =>
+                int24._byte1 | int24._byte2 << 8 | ((sbyte) int24._byte3 << 16);
         }
     }
 }


Failing build fixed.

Failing build fixed.

--- BetterCms.Demo.Web/Models/Migrations/InitialSetup.cs
+++ BetterCms.Demo.Web/Models/Migrations/InitialSetup.cs
@@ -50,15 +50,15 @@
             InsertPage("Blog", "Two Columns", "/blog/", "Blog landing page.");
             InsertPage("News", "Two Columns", "/news/", "News page.");

-            InsertBlog("Example Blog Post", "Two Columns", "/blog/post1/", "Blog", "Author Name",
+            InsertBlog("Example Blog Post 1", "Two Columns", "/blog/post1/", "Blog", "Author Name",
                 intro: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.",
                 html: "

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Consectetuer adipiscing

doming id quod mazim placerat facer possim assum.

This is an Example of a Sub Head

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.

Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

");

-            InsertBlog("Example Blog Post", "Two Columns", "/blog/post2/", "Blog", "Author Name",
+            InsertBlog("Example Blog Post 2", "Two Columns", "/blog/post2/", "Blog", "Author Name",
                 intro: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.",
                 html: "

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Consectetuer adipiscing

doming id quod mazim placerat facer possim assum.

This is an Example of a Sub Head

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.

Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

");

-            InsertBlog("Example Blog Post", "Two Columns", "/blog/post3/", "Blog", "Author Name",
+            InsertBlog("Example Blog Post 3", "Two Columns", "/blog/post3/", "Blog", "Author Name",
                 intro: "Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.",
                 html: "

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diamnonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, nos trud exe rci tation ullamc orper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel feugait nulla facilisi.

Consectetuer adipiscing

doming id quod mazim placerat facer possim assum.

This is an Example of a Sub Head

Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.

Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming id quod mazim placerat facer possim assum.

Typi non habent claritatem insitam; est usus legentis in iis qui facit eorum claritatem. Investigationes demonstraverunt lectores legere me lius quod ii legunt saepius. Claritas est etiam processus dynamicus, qui sequitur mutationem consuetudium lectorum. Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. Eodem modo typi, qui nunc nobis videntur parum clari, fiant sollemnes in futurum.

");
         }


Added some helper methods for ModTileEntity

--- patches/tModLoader/Terraria.ModLoader/ModTileEntity.cs
+++ patches/tModLoader/Terraria.ModLoader/ModTileEntity.cs
@@ -137,6 +137,35 @@
 			return newEntity.ID;
 		}

+		public void Kill(int i, int j)
+		{
+			Point16 pos = new Point16(i, j);
+			if (ByPosition.ContainsKey(pos))
+			{
+				TileEntity tileEntity = ByPosition[pos];
+				if (tileEntity.type == Type)
+				{
+					((ModTileEntity)tileEntity).OnKill();
+					ByID.Remove(tileEntity.ID);
+					ByPosition.Remove(pos);
+				}
+			}
+		}
+
+		public int Find(int i, int j)
+		{
+			Point16 pos = new Point16(i, j);
+			if (ByPosition.ContainsKey(pos))
+			{
+				TileEntity tileEntity = ByPosition[pos];
+				if (tileEntity.type == Type)
+				{
+					return tileEntity.ID;
+				}
+			}
+			return -1;
+		}
+
 		public override sealed void WriteExtraData(BinaryWriter writer, bool networkSend)
 		{
 			if (networkSend)
@@ -186,6 +215,10 @@
 		}

 		public virtual void PostGlobalUpdate()
+		{
+		}
+
+		public virtual void OnKill()
 		{
 		}
 	}


bring the key combination interpretation from the ScriptProxy to the InteractionManager

git-svn-id: 01af18a6463d82f2dfa8239e3c2aedb49696f51b@287 6efbd2d2-d52f-40b0-b04a-ac586c898535

--- BrailleIO/Renderer/BrailleIOImageToMatrixRenderer.cs
+++ BrailleIO/Renderer/BrailleIOImageToMatrixRenderer.cs
@@ -1,7 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
 using System.Drawing;
 using BrailleIO.Interface;
 using System.Drawing.Imaging;
@@ -87,14 +84,7 @@

                                 g2.DrawImage(_img, new Rectangle(0, 0, rescaled.Width, rescaled.Height), new Rectangle(0, 0, _img.Width, _img.Height), GraphicsUnit.Pixel);
                                 g2.Flush();
-                                //try
-                                //{
-                                //    rescaled.Save("C:\\Users\\Admin\\Desktop\\tmp\\test_" + vr.GetHashCode() + ".bmp"); //FIXME: only for fixing
-                                //}
-                                //catch (System.Exception) { }
                             }
-
-
                         }
                         catch (ArgumentException) { }
                         catch (InvalidOperationException) { if (rescaled != null) rescaled.Dispose(); return renderImage(_img, view, offset, invert, zoom); }
@@ -121,7 +111,7 @@

                     }
                 }
-                catch (ArgumentException){}
+                catch (ArgumentException) { }
             }
             return m;
         }


Rename 'Destroy' to 'Bulldoze All' and fix its position

--- BuildingThemes/GUI/ThemeManager/UIBuildingOptions.cs
+++ BuildingThemes/GUI/ThemeManager/UIBuildingOptions.cs
@@ -144,20 +144,25 @@
                 Show(m_item);
             };

-            m_plop = UIUtils.CreateButton(this);
+            var constructionPanel = AddUIComponent<UIPanel>();
+            constructionPanel.height = 30;
+            constructionPanel.isVisible = true;
+
+
+            m_plop = UIUtils.CreateButton(constructionPanel);
             m_plop.width = 60;
             m_plop.text = "Plop";
-            m_plop.relativePosition = new Vector3(width - 70, 0); ;
+            m_plop.relativePosition = new Vector3(0, 0); ;

             m_plop.eventClick += (c, p) =>
             {
                 UIThemeManager.instance.Plop(m_item);
             };

-            m_destroy = UIUtils.CreateButton(this);
+            m_destroy = UIUtils.CreateButton(constructionPanel);
             m_destroy.width = 120;
-            m_destroy.text = "Destroy";
-            m_destroy.relativePosition = new Vector3(m_plop.relativePosition.x + m_plop.width + 10f, m_plop.relativePosition.y);
+            m_destroy.text = "Bulldoze ll";
+            m_destroy.relativePosition = new Vector3(m_plop.width + 10f, 0);
             m_destroy.eventClick += (c, p) =>
             {
                 UIThemeManager.instance.DestroyAll(m_item);
@@ -237,6 +242,7 @@
             m_upgradeName.parent.isVisible = false;
             m_baseName.parent.isVisible = false;
             m_plop.isVisible = false;
+            m_destroy.isVisible = false;

             if (m_item == null)
             {
@@ -275,6 +281,7 @@
             if (m_item.prefab != null)
             {
                 m_plop.isVisible = true;
+                m_destroy.isVisible = true;
             }
         }


util func for retrieving device

util func for retrieving device

MMDevice has no attribute, variable, property or member that identifies
its direction of travel

--- PurpleElectron/Utility.cs
+++ PurpleElectron/Utility.cs
@@ -2,6 +2,8 @@
 using System.Runtime.InteropServices;
 using System.IO;
 using System.Text;
+
+using CSCore.CoreAudioAPI;

 namespace PurpleElectron {
 	internal class Utility {
@@ -87,5 +89,18 @@

 			return shortPath.ToString();
 		}
+
+		public static DataFlow GetDataFlow(MMDevice device) {
+
+			using (var enumerator = new MMDeviceEnumerator())
+			using (var devices = enumerator.EnumAudioEndpoints(DataFlow.Capture, DeviceState.Active)) {
+				foreach (var dev in devices) {
+					if (dev.DeviceID == device.DeviceID)
+						return DataFlow.Capture;
+				}
+			}
+
+			return DataFlow.Render;
+		}
 	}
 }


Performance improvement, creating thread static instances of Bitmap and Graphics objects to

enable maximum reuse while still being thread safe

Saves ~30% performance on AdjustToContents

--- ClosedXML/ClosedXML/ClosedXML/Utils/GraphicsUtils.cs
+++ ClosedXML/ClosedXML/ClosedXML/Utils/GraphicsUtils.cs
@@ -5,17 +5,24 @@
 {
     internal static class GraphicsUtils
     {
+        [ThreadStatic]
+        private static Graphics threadLocalGraphics;
+        private static Graphics g
+        {
+            get
+            {
+                if (threadLocalGraphics == null)
+                {
+                    var image = new Bitmap(1, 1);
+                    threadLocalGraphics = Graphics.FromImage(image);
+                }
+                return threadLocalGraphics;
+            }
+        }
+
         public static SizeF MeasureString(string s, Font font)
         {
-            SizeF result;
-            using (var image = new Bitmap(1, 1))
-            {
-                using (var g = Graphics.FromImage(image))
-                {
-                    result = g.MeasureString(s, font, Int32.MaxValue, StringFormat.GenericTypographic);
-                }
-            }
-
+            SizeF result = g.MeasureString(s, font, Int32.MaxValue, StringFormat.GenericTypographic);
             return result;
         }
     }


Reduce seeker target-lock time and maximum target tracking ability.

--- ethernet/server/scripts/weapons/disc/disc.seeker.cs
+++ ethernet/server/scripts/weapons/disc/disc.seeker.cs
@@ -27,9 +27,9 @@

 	sound = DiscProjectileSound;

-	targetLockTimeMS = 50;
+	targetLockTimeMS = 0;

-	maxTrackingAbility = 150;
+	maxTrackingAbility = 40;
 	trackingAgility = 2;

 	explodesNearEnemies = false;


file validator fix

file validator fix

--- Coolector.Services.Remarks/Services/FileValidator.cs
+++ Coolector.Services.Remarks/Services/FileValidator.cs
@@ -1,27 +1,29 @@
 using System;
 using System.IO;
+using NLog;
+using Structure.Sketching;
 using File = Coolector.Services.Remarks.Domain.File;

 namespace Coolector.Services.Remarks.Services
 {
     public class FileValidator : IFileValidator
     {
-        //TODO: Fix this
+        private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
+
         public bool IsImage(File file)
         {
             try
             {
                 using (var stream = new MemoryStream(file.Bytes))
                 {
-                    //var image = Image.FromStream(stream);
+                    var image = new Image(stream);

-                    //return image.Width > 0 && image.Height > 0;
-
-                    return true;
+                    return image.Width > 0 && image.Height > 0;
                 }
             }
             catch (Exception exception)
             {
+                Logger.Error(exception, "Error while reading image from stream");
                 return false;
             }
         }


Added unit test for RiakClient.Delete

Added unit test for RiakClient.Delete

Former-commit-id: 99b37b68d8f00887d067276f6253800fa75f9dc3

--- CorrugatedIron.Tests.Live/GeneralIntegrationTests.cs
+++ CorrugatedIron.Tests.Live/GeneralIntegrationTests.cs
@@ -274,5 +274,20 @@
             lm2.ShouldNotEqual(lm3);
             lmu2.ShouldNotEqual(lmu3);
         }
+
+        [Test]
+        public void DeletingAnObjectDeletesAnObject()
+        {
+            var doc = new RiakObject(TestBucket, TestKey, TestJson, Constants.ContentTypes.ApplicationJson);
+            Client.Put(doc).IsSuccess.ShouldBeTrue();
+
+            var deleteResult = Client.Delete(doc.Bucket, doc.Key);
+            deleteResult.IsSuccess.ShouldBeTrue();
+
+            var getResult = Client.Get(doc.Bucket, doc.Key);
+            getResult.IsSuccess.ShouldBeFalse();
+            getResult.Value.ShouldBeNull();
+            getResult.ResultCode.ShouldEqual(ResultCode.NotFound);
+        }
     }
 }


Added more descriptive summary

Added more descriptive summary

--- DSA/DSA/Algorithms/Strings/StringSearch.RabinKarp.cs
+++ DSA/DSA/Algorithms/Strings/StringSearch.RabinKarp.cs
@@ -3,10 +3,13 @@

 namespace DSA.Algorithms.Strings
 {
+    /// <summary>
+    /// A static class containing methods for string pattern searching.
+    /// </summary>
     public static partial class StringSearch
     {
         /// <summary>
-        /// Searches for the first occurrence of a pattern in a target <see cref="string"/>.
+        /// Searches for the first occurrence of a pattern in a target <see cref="string"/> using Rabin-Karp's algorithm.
         /// </summary>
         /// <param name="target">The <see cref="string"/> to search in.</param>
         /// <param name="pattern">The <see cref="string"/> to search for.</param>
@@ -65,7 +68,7 @@
         }

         /// <summary>
-        /// Searches for all occurences of a pattern in a target <see cref="string"/>.
+        /// Searches for all occurences of a pattern in a target <see cref="string"/> using Rabin-Karp's algorithm.
         /// </summary>
         /// <param name="target">The <see cref="string"/> to search in.</param>
         /// <param name="pattern">The <see cref="string"/> to search for.</param>
@@ -127,7 +130,7 @@
         }

         /// <summary>
-        /// Searches for the first occurrence of multiple patterns in a target <see cref="string"/>.
+        /// Searches for the first occurrence of multiple patterns in a target <see cref="string"/> using Rabin-Karp's algorithm.
         /// </summary>
         /// <param name="target">The <see cref="string"/> to search in.</param>
         /// <param name="patterns">A <see cref="IList{T}"/> of <see cref="string"/> patterns.</param>
@@ -233,7 +236,7 @@
         }

         /// <summary>
-        /// Searches for all occurrences of multiple patterns in a target <see cref="string"/>.
+        /// Searches for all occurrences of multiple patterns in a target <see cref="string"/> using Rabin-Karp's algorithm.
         /// </summary>
         /// <param name="target">The <see cref="string"/> to search in.</param>
         /// <param name="patterns">A <see cref="IList{T}"/> of <see cref="string"/> patterns.</param>


roxObject

roxObject

--- Rox/Rox/Core/RoxObject.cs
+++ Rox/Rox/Core/RoxObject.cs
@@ -16,8 +16,10 @@
         [Flags]
         private enum DirtyFlag : byte {
             None = 0,
-            Rotation = 1,
-            Translation = 2
+            RotationAngles = 1,
+            Rotation = 2,
+            RotationLookAt = 4,
+            Translation = 8
         }

         /// <summary>
@@ -28,12 +30,17 @@
         /// <summary>
         /// Transform Matrix
         /// </summary>
-        private Matrix4 _transform = Matrix4.Identity;
+        protected Matrix4 _transform = Matrix4.Identity;
+
+        /// <summary>
+        /// Rotation quaternion
+        /// </summary>
+        protected Quaternion _rotation = Quaternion.Zero;

         /// <summary>
         /// Rotation Matrix
         /// </summary>
-        private Matrix4 _rotationMatrix = Matrix4.Identity;
+        protected Matrix4 _rotationMatrix = Matrix4.Identity;

         /// <summary>
         /// axis rotations
@@ -42,6 +49,8 @@
         private float _yRotation = 0.0f;
         private float _zRotation = 0.0f;

+        protected Vector3 _target = Vector3.Zero;
+
         /// <summary>
         /// Dirty flag for rotation and translation
         /// </summary>
@@ -51,7 +60,19 @@
         /// Returns <c>true</c> if the rotation is dirty.
         /// </summary>
         private bool IsRotationDirty {
+            get { return IsDirtyRotation || IsDirtyRotationAngles || IsDirtyLookAt; }
+        }
+
+        private bool IsDirtyRotationAngles {
+            get { return (_dirty & DirtyFlag.RotationAngles) == DirtyFlag.RotationAngles; }
+        }
+
+        private bool IsDirtyRotation {
             get { return (_dirty & DirtyFlag.Rotation) == DirtyFlag.Rotation; }
+        }
+
+        private bool IsDirtyLookAt {
+            get { return (_dirty & DirtyFlag.RotationLookAt) == DirtyFlag.RotationLookAt; }
         }

         /// <summary>
@@ -74,15 +95,24 @@
         /// <summary>
         /// Rotation of the current object, represented as a Quaternion.
         /// </summary>
-        public Quaternion Rotation { get; protected set; }
+        public Quaternion Rotation {
+            get {
+                return _rotation;
+            }
+            set {
+                _rotation = value;
+
+                _dirty |= DirtyFlag.Rotation;
+                _dirty &= ~(DirtyFlag.RotationAngles | DirtyFlag.RotationLookAt);
+            }
+        }

         /// <summary>
         /// The current transform matrix (translation and rotation) for the object.
         /// </summary>
         public Matrix4 Transform {
             get {
-                var isRotationUpdate = UpdateRotation();
-                UpdateTransform(isRotationUpdate);
+                UpdateTransform();

                 return _transform;
             }
@@ -93,6 +123,10 @@
         /// </summary>
         public Vector3 Forward {
             get {
+                if (IsDirtyLookAt) {
+                    return (_target - Position).Normalize();
+                }
+
                 UpdateRotation();

                 return (_rotationMatrix * Vector3.UnitZ).Normalize();
@@ -153,9 +187,8 @@
             Position = position;
             Rotation = rotation;

-            _dirty = DirtyFlag.Rotation | DirtyFlag.Translation;
-
-            UpdateRotation();
+            _dirty = DirtyFlag.None;
+
             UpdateTransform(true);
         }

@@ -166,7 +199,8 @@
         public void RotateX(float x) {
             _xRotation = x;

-            _dirty |= DirtyFlag.Rotation;
+            _dirty |= DirtyFlag.RotationAngles;
+            _dirty &= ~(DirtyFlag.Rotation | DirtyFlag.RotationLookAt);
         }

         /// <summary>
@@ -176,7 +210,8 @@
         public void RotateY(float y) {
             _yRotation = y;

-            _dirty |= DirtyFlag.Rotation;
+            _dirty |= DirtyFlag.RotationAngles;
+            _dirty &= ~(DirtyFlag.Rotation | DirtyFlag.RotationLookAt);
         }

         /// <summary>
@@ -186,7 +221,8 @@
         public void RotateZ(float z) {
             _zRotation = z;

-            _dirty |= DirtyFlag.Rotation;
+            _dirty |= DirtyFlag.RotationAngles;
+            _dirty &= ~(DirtyFlag.Rotation | DirtyFlag.RotationLookAt);
         }

         /// <summary>
@@ -238,9 +274,9 @@
         /// <param name="target"></param>
         /// <param name="up"></param>
         public virtual void LookAt(Vector3 target, Vector3 up) {
-            _transform = Matrix4.LookAt(Position, target, up);
-
-            Vector3 z = (target - Position).Normalize();
+            _target = target;
+
+            Vector3 z = (Position - target).Normalize();
             Vector3 x = Vector3.Cross(up, z).Normalize();
             Vector3 y = Vector3.Cross(z, x).Normalize();

@@ -250,9 +286,10 @@
                 new Vector4(x.Z, y.Z, z.Z, 0.0f),
                 Vector4.UnitW);

-            Rotation = Quaternion.FromRotationMatrix(_rotationMatrix);
-
-            _dirty &= ~(DirtyFlag.Rotation | DirtyFlag.Translation);
+            _rotation = Quaternion.FromRotationMatrix(_rotationMatrix);
+
+            _dirty |= DirtyFlag.RotationLookAt;
+            _dirty &= ~(DirtyFlag.Rotation | DirtyFlag.RotationAngles);
         }

         /// <summary>
@@ -265,24 +302,31 @@
         }

         /// <summary>
-        /// Updates the rotation, if dirty, for the current object and returns
-        /// a status.
+        /// Updates the local rotation
         /// </summary>
         /// <returns></returns>
         protected virtual bool UpdateRotation() {
-            if (!IsRotationDirty) {
+            if (IsDirtyLookAt) {
+                return true;
+            }
+
+            if (!IsRotationDirty) {
                 return false;
             }

-            Rotation = RoxMath.Euler(_xRotation, 0.0f, 0.0f)
-                * RoxMath.Euler(0.0f, _yRotation, 0.0f)
-                * RoxMath.Euler(0.0f, 0.0f, _zRotation);
-
-            _rotationMatrix = Rotation.Matrix4;
-            _dirty &= ~DirtyFlag.Rotation;
-
+            // Only use dirty euler angles if the Rotation was not set directly
+            if (!IsDirtyRotation && IsDirtyRotationAngles) {
+                _rotation = RoxMath.Euler(_xRotation, 0.0f, 0.0f)
+                    * RoxMath.Euler(0.0f, _yRotation, 0.0f)
+                    * RoxMath.Euler(0.0f, 0.0f, _zRotation);
+            }
+
+            _dirty &= ~(DirtyFlag.RotationAngles | DirtyFlag.Rotation);
             return true;
         }
+
+
+        private float _rot = 0.0f;

         /// <summary>
         /// Updates the transform for the current object.
@@ -290,11 +334,18 @@
         /// <param name="force"></param>
         /// <returns></returns>
         protected virtual bool UpdateTransform(bool force = false) {
-            if (!force && !IsTranslationDirty) {
+            if (!force && !IsTranslationDirty && !IsRotationDirty) {
                 return false;
             }
-
-            LookAt(Position + Forward, Up);
+
+            UpdateRotation();
+
+            if (Name == "MainCamera") {
+                _rot += 0.001f;
+            }
+
+            var position = IsDirtyLookAt ? -Position : Position;
+            _transform = Matrix4.CreateTranslation(position) * _rotationMatrix;

             _dirty &= ~DirtyFlag.Translation;
             return true;


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Net/WebSockets/TcpListenerWebSocketContext.cs
+++ websocket-sharp/Net/WebSockets/TcpListenerWebSocketContext.cs
@@ -45,8 +45,8 @@
 namespace WebSocketSharp.Net.WebSockets
 {
   /// <summary>
-  /// Provides the access to the information in a WebSocket handshake request to
-  /// a <see cref="TcpListener"/> instance.
+  /// Provides the access to the information in a WebSocket handshake request
+  /// to a <see cref="TcpListener"/> instance.
   /// </summary>
   internal class TcpListenerWebSocketContext : WebSocketContext
   {


.net core port fix

.net core port fix

--- DbShell.Driver.Common/DmlFramework/DmlfExpression.cs
+++ DbShell.Driver.Common/DmlFramework/DmlfExpression.cs
@@ -1,5 +1,8 @@
 using System.Xml;
 using DbShell.Driver.Common.Utility;
+#if !NETCOREAPP1_1
+using System.Web.Script.Serialization;
+#endif

 namespace DbShell.Driver.Common.DmlFramework
 {
@@ -49,10 +52,15 @@
             return literal != null && literal.Value == null;
         }

-
-#if NETCOREAPP1_1
         public virtual string JavaScriptExpression => "null";

+#if !NETCOREAPP1_1
+        public static string SerializeJson(object o)
+        {
+            var ser = new JavaScriptSerializer();
+            return ser.Serialize(o);
+        }
+#else
         public static string SerializeJson(object o)
         {
             return Newtonsoft.Json.JsonConvert.SerializeObject(o);