Update ProjectEditorViewModel.Shape.cs

Update ProjectEditorViewModel.Shape.cs

--- src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Shape.cs
+++ src/Core2D/ViewModels/Editor/ProjectEditorViewModel.Shape.cs
@@ -58,10 +58,10 @@
                 return;
             }

-            var group = Group(project?.SelectedShapes, ProjectEditorConfiguration.DefaulGroupName);
+            var group = Group(project.SelectedShapes, ProjectEditorConfiguration.DefaulGroupName);
             if (group is { })
             {
-                ServiceProvider.GetService<ISelectionService>()?.Select(project?.CurrentContainer?.CurrentLayer, group);
+                ServiceProvider.GetService<ISelectionService>()?.Select(project.CurrentContainer?.CurrentLayer, group);
             }
         }

@@ -73,13 +73,10 @@
                 return;
             }

-            var result = Ungroup(project?.SelectedShapes);
+            var result = Ungroup(project.SelectedShapes);
             if (result)
             {
-                if (project is { })
-                {
-                    project.SelectedShapes = null;
-                }
+                project.SelectedShapes = null;
                 ServiceProvider.GetService<ISelectionService>()?.OnHideDecorator();
             }
         }
@@ -97,10 +94,10 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
-                BoxLayout.Rotate(sources, (decimal)value, project?.History);
+                BoxLayout.Rotate(sources, (decimal)value, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -113,10 +110,10 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
-                BoxLayout.Flip(sources, FlipMode.Horizontal, project?.History);
+                BoxLayout.Flip(sources, FlipMode.Horizontal, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -129,10 +126,10 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
-                BoxLayout.Flip(sources, FlipMode.Vertical, project?.History);
+                BoxLayout.Flip(sources, FlipMode.Vertical, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -145,7 +142,7 @@
                 return;
             }

-            if (project?.Options is null)
+            if (project.Options is null)
             {
                 return;
             }
@@ -163,7 +160,7 @@
                 return;
             }

-            if (project?.Options is null)
+            if (project.Options is null)
             {
                 return;
             }
@@ -181,7 +178,7 @@
                 return;
             }

-            if (project?.Options is null)
+            if (project.Options is null)
             {
                 return;
             }
@@ -199,7 +196,7 @@
                 return;
             }

-            if (project?.Options is null)
+            if (project.Options is null)
             {
                 return;
             }
@@ -217,11 +214,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Stack(items, StackMode.Horizontal, project?.History);
+                BoxLayout.Stack(items, StackMode.Horizontal, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -234,11 +231,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Stack(items, StackMode.Vertical, project?.History);
+                BoxLayout.Stack(items, StackMode.Vertical, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -251,11 +248,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Distribute(items, DistributeMode.Horizontal, project?.History);
+                BoxLayout.Distribute(items, DistributeMode.Horizontal, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -268,11 +265,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Distribute(items, DistributeMode.Vertical, project?.History);
+                BoxLayout.Distribute(items, DistributeMode.Vertical, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -285,11 +282,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Left, project?.History);
+                BoxLayout.Align(items, AlignMode.Left, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -302,11 +299,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Centered, project?.History);
+                BoxLayout.Align(items, AlignMode.Centered, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -319,11 +316,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Right, project?.History);
+                BoxLayout.Align(items, AlignMode.Right, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -336,11 +333,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Top, project?.History);
+                BoxLayout.Align(items, AlignMode.Top, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -353,11 +350,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Center, project?.History);
+                BoxLayout.Align(items, AlignMode.Center, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -370,11 +367,11 @@
                 return;
             }

-            var shapes = project?.SelectedShapes;
+            var shapes = project.SelectedShapes;
             if (shapes is { })
             {
                 var items = shapes.Where(s => !s.State.HasFlag(ShapeStateFlags.Locked));
-                BoxLayout.Align(items, AlignMode.Bottom, project?.History);
+                BoxLayout.Align(items, AlignMode.Bottom, project.History);
                 ServiceProvider.GetService<ISelectionService>()?.OnUpdateDecorator();
             }
         }
@@ -387,7 +384,7 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
                 foreach (var s in sources)
@@ -405,7 +402,7 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
                 foreach (var s in sources)
@@ -423,7 +420,7 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
                 foreach (var s in sources.Reverse())
@@ -441,7 +438,7 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is { })
             {
                 foreach (var s in sources.Reverse())
@@ -465,14 +462,14 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
-            var source = project?.SelectedShapes?.FirstOrDefault();
+            var sources = project.SelectedShapes;
+            var source = project.SelectedShapes?.FirstOrDefault();

             if (sources is { Count: 1 } && source is not null)
             {
@@ -506,7 +503,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -537,7 +534,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -557,14 +554,14 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
-            var source = project?.SelectedShapes?.FirstOrDefault();
+            var sources = project.SelectedShapes;
+            var source = project.SelectedShapes?.FirstOrDefault();

             if (sources is { Count: 1 } && source is not null)
             {
@@ -601,7 +598,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -648,7 +645,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -668,14 +665,14 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
-            var source = project?.SelectedShapes?.FirstOrDefault();
+            var sources = project.SelectedShapes;
+            var source = project.SelectedShapes?.FirstOrDefault();

             if (sources is { Count: 1 } && source is not null)
             {
@@ -712,7 +709,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -759,7 +756,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -779,14 +776,14 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
-            var source = project?.SelectedShapes?.FirstOrDefault();
+            var sources = project.SelectedShapes;
+            var source = project.SelectedShapes?.FirstOrDefault();

             if (sources is { Count: 1 } && source is not null)
             {
@@ -823,7 +820,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -870,7 +867,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -890,14 +887,14 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
-            var source = project?.SelectedShapes?.FirstOrDefault();
+            var sources = project.SelectedShapes;
+            var source = project.SelectedShapes?.FirstOrDefault();

             if (sources is { Count: 1 } && source is not null)
             {
@@ -931,7 +928,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -975,7 +972,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(paths));
@@ -995,13 +992,13 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;

             if (sources is not { Count: >= 1 })
             {
@@ -1035,7 +1032,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, new HashSet<BaseShapeViewModel>(result));
@@ -1060,13 +1057,13 @@
                 return;
             }

-            var sources = project?.SelectedShapes;
+            var sources = project.SelectedShapes;
             if (sources is null)
             {
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
@@ -1087,7 +1084,7 @@

             var previous = layer.Shapes;
             var next = shapesBuilder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             ServiceProvider.GetService<ISelectionService>()?.Select(layer, path);
@@ -1111,7 +1108,7 @@

             var previous = layer.Shapes;
             var next = source.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;

             return group;
@@ -1142,7 +1139,7 @@

             var previous = layer.Shapes;
             var next = source.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
+            project.History?.Snapshot(previous, next, (p) => layer.Shapes = p);
             layer.Shapes = next;
         }

@@ -1154,7 +1151,7 @@
                 return null;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             return layer is { } ? Group(layer, shapes, name) : null;
         }

@@ -1166,7 +1163,7 @@
                 return false;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null || shapes is null)
             {
                 return false;
@@ -1184,7 +1181,7 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer?.Shapes is null)
             {
                 return;
@@ -1210,7 +1207,7 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
@@ -1232,7 +1229,7 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
@@ -1254,7 +1251,7 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
@@ -1276,7 +1273,7 @@
                 return;
             }

-            var layer = project?.CurrentContainer?.CurrentLayer;
+            var layer = project.CurrentContainer?.CurrentLayer;
             if (layer is null)
             {
                 return;
@@ -1319,7 +1316,7 @@

             var previous = new { DeltaX = -dx, DeltaY = -dy, Shapes = shapes };
             var next = new { DeltaX = dx, DeltaY = dy, Shapes = shapes };
-            project?.History?.Snapshot(previous, next, (s) =>
+            project.History?.Snapshot(previous, next, (s) =>
             {
                 if (s is null)
                 {
@@ -1342,7 +1339,7 @@
                 return;
             }

-            switch (project?.Options?.MoveMode)
+            switch (project.Options?.MoveMode)
             {
                 case MoveMode.Point:
                 {
@@ -1386,7 +1383,7 @@

                 var previous = libraryViewModel.Items;
                 var next = builder.ToImmutable();
-                project?.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+                project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
                 libraryViewModel.Items = next;
             }
             else
@@ -1401,7 +1398,7 @@

                     var previous = libraryViewModel.Items;
                     var next = builder.ToImmutable();
-                    project?.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+                    project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
                     libraryViewModel.Items = next;
                 }
             }
@@ -1423,7 +1420,7 @@

             var previous = libraryViewModel.Items;
             var next = builder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+            project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
             libraryViewModel.Items = next;
         }

@@ -1440,7 +1437,7 @@

             var previous = libraryViewModel.Items;
             var next = builder.ToImmutable();
-            project?.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
+            project.History?.Snapshot(previous, next, (p) => libraryViewModel.Items = p);
             libraryViewModel.Items = next;
         }
     }


Add type mapping support for "timestamp with time zone".

Fixes issue 155: http://code.google.com/p/dblinq2007/issues/detail?id=155

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@1300 33146b6e-df29-0410-a1ca-39be37fb9416

--- src/DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs
+++ src/DbLinq/Vendor/Implementation/SchemaLoader.TypeMapping.cs
@@ -192,6 +192,7 @@
             case "ingresdate":
             case "timestamp":
             case "timestamp without time zone":
+            case "timestamp with time zone":
             case "time":
             case "time without time zone": //reported by twain_bu...@msn.com,
             case "time with time zone":


Use platform spesific temp folders

Use platform spesific temp folders

--- src/Dotnet.Script.DependencyModel/ProjectSystem/FileUtils.cs
+++ src/Dotnet.Script.DependencyModel/ProjectSystem/FileUtils.cs
@@ -1,7 +1,9 @@
 using Dotnet.Script.DependencyModel.Environment;
+
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Runtime.InteropServices;
 using System.Text;

 namespace Dotnet.Script.DependencyModel.ProjectSystem
@@ -27,7 +29,7 @@
                 throw new ArgumentOutOfRangeException(nameof(targetDirectory), "Must be a root path");
             }

-            var tempDirectory = Path.GetTempPath();
+            var tempDirectory = GetTempPath();
             var pathRoot = Path.GetPathRoot(targetDirectory);
             var targetDirectoryWithoutRoot = targetDirectory.Substring(pathRoot.Length);
             if (pathRoot.Length > 0 && ScriptEnvironment.Default.IsWindows)
@@ -41,8 +43,25 @@

                 targetDirectoryWithoutRoot = Path.Combine(driveLetter, targetDirectoryWithoutRoot);
             }
-            var pathToProjectDirectory = Path.Combine(tempDirectory, "scripts", targetDirectoryWithoutRoot);
+            var pathToProjectDirectory = Path.Combine(tempDirectory, "dotnet-script", targetDirectoryWithoutRoot);
             return pathToProjectDirectory;
+        }
+
+        private static string GetTempPath()
+        {
+            var userFolder = System.Environment.GetFolderPath(System.Environment.SpecialFolder.UserProfile);
+
+            if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+            {
+                return Path.Combine(userFolder, ".cache");
+            }
+            else
+            if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+            {
+                return Path.Combine(userFolder, "Library/Caches/");
+            }
+
+            return Path.GetTempPath();
         }
     }
 }


Adding 10 seconds soft cache

Adding 10 seconds soft cache

--- src/Eurofurence.App.Server.Web/Controllers/SyncController.cs
+++ src/Eurofurence.App.Server.Web/Controllers/SyncController.cs
@@ -60,6 +60,7 @@
         /// </summary>
         /// <returns></returns>
         [HttpGet]
+        [ResponseCache(Duration = 10, Location=ResponseCacheLocation.Any)]
         public async Task<AggregatedDeltaResponse> GetDeltaAsync([FromQuery] DateTime? since = null)
         {
             _logger.LogInformation("Execute=Sync, Since={since}", since);


Fix issue where exceptions in IEventHandlers would still mark a BrokeredMessage as complete, leaving the system in a potentially invalid state. Add in 100ms delay between message failures to buffer the system against rapid failures. This also helps message processing where events are dependent on data that is not yet available and needs to wait before reprocessing.

--- src/HighIronRanch.Azure.ServiceBus/ServiceBusWithHandlers.cs
+++ src/HighIronRanch.Azure.ServiceBus/ServiceBusWithHandlers.cs
@@ -279,7 +279,7 @@
 			}
 		}

-		private Task HandleEventForMultipleDeployments(BrokeredMessage eventToHandle)
+		private async Task HandleEventForMultipleDeployments(BrokeredMessage eventToHandle)
 		{
 			try
 			{
@@ -301,13 +301,12 @@
 			catch (Exception ex)
 			{
 				Console.WriteLine(" Abandoning {0}: {1}", eventToHandle.MessageId, ex.Message);
+			    await Task.Delay(100);
 				eventToHandle.Abandon();
 			}
-
-			return Task.FromResult(0);
-		}
-
-		private Task HandleEvent(BrokeredMessage eventToHandle)
+		}
+
+		private async Task HandleEvent(BrokeredMessage eventToHandle)
 		{
 			try
 			{
@@ -333,7 +332,7 @@
 				{
 					var handler = _handlerActivator.GetInstance(handlerType);
 					var handleMethodInfo = handlerType.GetMethod("HandleAsync", new[] { eventType });
-					handleMethodInfo.Invoke(handler, new[] { message });
+					await (Task)handleMethodInfo.Invoke(handler, new[] { message });
 				}

 				eventToHandle.Complete();
@@ -341,13 +340,12 @@
 			catch (Exception ex)
 			{
 				Console.WriteLine(" Abandoning {0}: {1}", eventToHandle.MessageId, ex.Message);
+			    await Task.Delay(100);
 				eventToHandle.Abandon();
 			}
-
-			return Task.FromResult(0);
-		}
-
-		private Task HandleMessage(BrokeredMessage messageToHandle)
+		}
+
+		private async Task HandleMessage(BrokeredMessage messageToHandle)
 		{
 			try
 			{
@@ -373,7 +371,7 @@
 					{
 						var handler = _handlerActivator.GetInstance(handlerType);
 						var handleMethodInfo = handlerType.GetMethod("HandleAsync", new[] { messageType });
-						handleMethodInfo.Invoke(handler, new[] { message });
+						await (Task)handleMethodInfo.Invoke(handler, new[] { message });
 					}
 				}
 				else
@@ -382,8 +380,7 @@
 					var handler = _handlerActivator.GetInstance(handlerType);

 					var handleMethodInfo = handlerType.GetMethod("HandleAsync", new[] { messageType, typeof(ICommandActions) });
-					var task = (Task)handleMethodInfo.Invoke(handler, new[] { message, new CommandActions(messageToHandle) });
-					task.Wait();
+					await (Task)handleMethodInfo.Invoke(handler, new[] { message, new CommandActions(messageToHandle) });
 				}

 				messageToHandle.Complete();
@@ -391,10 +388,9 @@
 			catch (Exception ex)
 			{
                 _logger.Warning(LoggerContext, ex, " Abandoning {0}: {1}", messageToHandle.MessageId, ex.Message);
+			    await Task.Delay(100);
 				messageToHandle.Abandon();
 			}
-
-			return Task.FromResult(0);
 		}

 		internal async Task<MessageSession> AcceptMessageSession(QueueClient client)


Fix debug.assert

Fix debug.assert

--- src/Integration.Vsix.UnitTests/CFamily/CFamilyHelperTests.cs
+++ src/Integration.Vsix.UnitTests/CFamily/CFamilyHelperTests.cs
@@ -338,6 +338,8 @@
         private Mock<ProjectItem> CreateProjectItemWithProject(string projectName)
         {
             var vcProjectMock = new Mock<VCProject>();
+            vcProjectMock.Setup(x => x.ProjectFile).Returns(projectName);
+
             var vcConfig = CreateVCConfigurationWithProperties(ValidPlatformName, MandatoryProjectConfigProperties);
             vcProjectMock.SetupGet(x => x.ActiveConfiguration).Returns(vcConfig);


added debug output for all events in Toggl.cs (win)

--- src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
+++ src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
@@ -1229,47 +1229,64 @@
     {
         toggl_on_show_app(ctx, delegate(bool open)
         {
+            Console.WriteLine("Calling OnApp");
             OnApp(open);
         });

         toggl_on_error(ctx, delegate(string errmsg, bool user_error)
         {
+            Console.WriteLine("Calling OnError, user_error: {1}, message: {0}", errmsg, user_error);
             OnError(errmsg, user_error);
         });

         toggl_on_online_state(ctx, delegate(Int64 state)
         {
+            Console.WriteLine("Calling OnOnlineState, state: {0}", state);
             OnOnlineState(state);
         });

         toggl_on_login(ctx, delegate(bool open, UInt64 user_id)
         {
+            Console.WriteLine("Calling OnLogin");
             OnLogin(open, user_id);
         });

         toggl_on_reminder(ctx, delegate(string title, string informative_text)
         {
+            Console.WriteLine("Calling OnReminder, title: {0}", title);
             OnReminder(title, informative_text);
         });

         toggl_on_time_entry_list(ctx, delegate(bool open, IntPtr first)
         {
-            OnTimeEntryList(open, ConvertToTimeEntryList(first));
+            Console.Write("Calling OnTimeEntryList");
+            var list = ConvertToTimeEntryList(first);
+            Console.WriteLine(", number of time entries: {0}", list.Count);
+            OnTimeEntryList(open, list);
         });

         toggl_on_time_entry_autocomplete(ctx, delegate(IntPtr first)
         {
-            OnTimeEntryAutocomplete(ConvertToAutocompleteList(first));
+            Console.Write("Calling OnTimeEntryAutocomplete");
+            var list = ConvertToAutocompleteList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
+            OnTimeEntryAutocomplete(list);
         });

         toggl_on_mini_timer_autocomplete(ctx, delegate(IntPtr first)
         {
-            OnMinitimerAutocomplete(ConvertToAutocompleteList(first));
+            Console.Write("Calling OnMinitimerAutocomplete");
+            var list = ConvertToAutocompleteList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
+            OnMinitimerAutocomplete(list);
         });

         toggl_on_project_autocomplete(ctx, delegate(IntPtr first)
         {
-            OnProjectAutocomplete(ConvertToAutocompleteList(first));
+            Console.Write("Calling OnProjectAutocomplete");
+            var list = ConvertToAutocompleteList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
+            OnProjectAutocomplete(list);
         });

         toggl_on_time_entry_editor(ctx, delegate(
@@ -1277,26 +1294,37 @@
             ref TimeEntry te,
             string focused_field_name)
         {
+            Console.WriteLine("Calling OnTimeEntryEditor, focused field: {0}", focused_field_name);
             OnTimeEntryEditor(open, te, focused_field_name);
         });

         toggl_on_workspace_select(ctx, delegate(IntPtr first)
         {
-            OnWorkspaceSelect(ConvertToViewItemList(first));
+            Console.Write("Calling OnWorkspaceSelect");
+            var list = ConvertToViewItemList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
+            OnWorkspaceSelect(list);
         });

         toggl_on_client_select(ctx, delegate(IntPtr first)
         {
-            OnClientSelect(ConvertToViewItemList(first));
+            Console.Write("Calling OnClientSelect");
+            var list = ConvertToViewItemList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
+            OnClientSelect(list);
         });

         toggl_on_tags(ctx, delegate(IntPtr first)
         {
+            Console.Write("Calling OnTags");
+            var list = ConvertToViewItemList(first);
+            Console.WriteLine(", number of entries: {0}", list.Count);
             OnTags(ConvertToViewItemList(first));
         });

         toggl_on_settings(ctx, delegate(bool open, ref Settings settings)
         {
+            Console.Write("Calling OnSettings");
             OnSettings(open, settings);
         });

@@ -1304,17 +1332,20 @@
         {
             if (te == IntPtr.Zero)
             {
+                Console.Write("Calling OnStoppedTimerState");
                 OnStoppedTimerState();
                 return;
             }
             TimeEntry view =
                 (TimeEntry)Marshal.PtrToStructure(
                     te, typeof(TimeEntry));
+            Console.Write("Calling OnRunningTimerState");
             OnRunningTimerState(view);
         });

         toggl_on_url(ctx, delegate(string url)
         {
+            Console.Write("Calling OnURL");
             OnURL(url);
         });

@@ -1325,6 +1356,7 @@
             UInt64 started,
             string description)
         {
+            Console.Write("Calling OnIdleNotification");
             OnIdleNotification(guid, since, duration, started, description);
         });
     }


Set env sooner (win)

Set env sooner (win)

--- src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
+++ src/ui/windows/TogglDesktop/TogglDesktop/Toggl.cs
@@ -1071,6 +1071,8 @@
         {
             ctx = toggl_context_init("windows_native_app", version);

+			toggl_set_environment(ctx, Properties.Settings.Default.Environment);
+
             string cacert_path = Path.Combine(
                 AppDomain.CurrentDomain.BaseDirectory,
                 "cacert.pem");
@@ -1187,8 +1189,6 @@
                 OnIdleNotification(guid, since, duration, started, description);
             });

-            toggl_set_environment(ctx, Properties.Settings.Default.Environment);
-
             if (IsUpdateCheckDisabled())
             {
                 toggl_disable_update_check(ctx);


tuned comment;

tuned comment;

--- examples/TCP/TCP.cs
+++ examples/TCP/TCP.cs
@@ -43,6 +43,9 @@
     uint max_InQ_size;
     uint max_timers;

+    // By design we minimise the scope of logic as much as possible, trying to
+    // limit it to making small changes to data, and moving information between
+    // queues between such specialised data processors.
     ConcurrentQueue<Tuple<TcpPacket,TCB>> in_q = new ConcurrentQueue<Tuple<TcpPacket,TCB>>();
     ConcurrentQueue<Tuple<Packet,TCB>> out_q = new ConcurrentQueue<Tuple<Packet,TCB>>();
     ConcurrentQueue<Tuple<Packet,TimerCB>> timer_q = new ConcurrentQueue<Tuple<Packet,TimerCB>>();
@@ -350,8 +353,6 @@
       Tuple<Packet,TimerCB> p;
       while (running) {
         while (running && timer_q.TryDequeue (out p)) {
-          // We minimise the scope of logic, and limit it to making small
-          // changes, and moving information between queues.
           // FIXME fill in the logic. Retransmission will involve putting the
           //       packet on the out_q.
           out_q.Enqueue(new Tuple <Packet, TCB>(p.Item1, null/*FIXME lookup TCB*/));


fix unable to resolve uid imported in template by xref service. (#2867)

--- src/Microsoft.DocAsCode.Build.Engine/DocumentBuildContext.cs
+++ src/Microsoft.DocAsCode.Build.Engine/DocumentBuildContext.cs
@@ -559,6 +559,12 @@
                 {
                     return ExternalXRefSpec.AddOrUpdate(uid, xref, (_, old) => old + xref);
                 }
+            }
+
+            var uidList = ResolveByXRefServiceAsync(new List<string> { uid }, ExternalXRefSpec).Result;
+            if (uidList.Count == 0)
+            {
+                return ExternalXRefSpec[uid];
             }

             UnknownUids.TryAdd(uid, null);


if running noninteractively then do not break into debugger on ctrl + break

Signed-off-by: Matt Wrock <1fa2ef4755a9226cb9a0a4840bd89b158ac71391@mattwrock.com>

--- src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
+++ src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs
@@ -304,11 +304,19 @@
             switch (args.SpecialKey)
             {
                 case ConsoleSpecialKey.ControlC:
-                    SpinUpBreakHandlerThread(false);
+                    SpinUpBreakHandlerThread(shouldEndSession: false);
                     return;
                 case ConsoleSpecialKey.ControlBreak:
-                    // Break into script debugger.
-                    BreakIntoDebugger();
+                    if (s_cpp.NonInteractive)
+                    {
+                        //ControlBreak mimics ControlC in Noninteractive shells
+                        SpinUpBreakHandlerThread(shouldEndSession: true);
+                    }
+                    else
+                    {
+                        // Break into script debugger.
+                        BreakIntoDebugger();
+                    }
                     return;
             }
         }
@@ -325,13 +333,21 @@
             switch (signal)
             {
                 case ConsoleControl.ConsoleBreakSignal.CtrlBreak:
-                    // Break into script debugger.
-                    BreakIntoDebugger();
+                    if (s_cpp.NonInteractive)
+                    {
+                        //ControlBreak mimics ControlC in Noninteractive shells
+                        SpinUpBreakHandlerThread(shouldEndSession: true);
+                    }
+                    else
+                    {
+                        // Break into script debugger.
+                        BreakIntoDebugger();
+                    }
                     return true;

                 // Run the break handler...
                 case ConsoleControl.ConsoleBreakSignal.CtrlC:
-                    SpinUpBreakHandlerThread(false);
+                    SpinUpBreakHandlerThread(shouldEndSession: false);
                     return true;

                 case ConsoleControl.ConsoleBreakSignal.Logoff:
@@ -343,12 +359,12 @@

                 case ConsoleControl.ConsoleBreakSignal.Close:
                 case ConsoleControl.ConsoleBreakSignal.Shutdown:
-                    SpinUpBreakHandlerThread(true);
+                    SpinUpBreakHandlerThread(shouldEndSession: true);
                     return false;

                 default:
                     // Log as much sqm data as possible before we exit.
-                    SpinUpBreakHandlerThread(true);
+                    SpinUpBreakHandlerThread(shouldEndSession: true);
                     return false;
             }
         }


Rename builtin “lst” function to “quote”

--- squirrel/Evaluator.cs
+++ squirrel/Evaluator.cs
@@ -11,7 +11,7 @@
         private readonly INode _root;

         private static readonly Dictionary<string, BuiltinFunctionDelegate> BuiltinFunctions =
-            new Dictionary<string, BuiltinFunctionDelegate>()
+            new Dictionary<string, BuiltinFunctionDelegate>
             {
                 {"block", BuiltinBlock},
                 {"def", BuiltinDef},
@@ -22,7 +22,7 @@
                 {"div", BuiltinDiv},
                 {"mod", BuiltinMod},
                 {"eval", BuiltinEval},
-                {"lst", BuiltinLst},
+                {"quote", BuiltinQuote},
                 {"lambda", BuiltinLambda},
                 {"eq", BuiltinEq},
                 {"lt", BuiltinLt},
@@ -198,7 +198,7 @@
                 env.Put(key, value);
             }

-            return BuiltinEval(new List<INode>() {head.Body}, env);
+            return BuiltinEval(new List<INode> {head.Body}, env);
         }

         private static INode BuiltinBlock(List<INode> args, Environment env) => args[args.Count - 1];
@@ -346,7 +346,7 @@
             }
         }

-        private static INode BuiltinLst(List<INode> args, Environment env)
+        private static INode BuiltinQuote(List<INode> args, Environment env)
         {
             return new QuotedExpressionNode(args);
         }


Optimized the number of Wait and Set (and the allocations) required to synchronize the workflow

--- src/NEventStore/AsyncEnumerable/ConcurrentAsyncEnumerator.cs
+++ src/NEventStore/AsyncEnumerable/ConcurrentAsyncEnumerator.cs
@@ -75,39 +75,32 @@

         private async Task Yield(T value)
         {
-            // Wait for the consumer to call MoveNext() the first time.
-            // Not that after the first time, this will be always signalled.
-            // This is only necessary to synchronize the enumerator when the
-            // producer is started.
             if (!_disposed)
             {
-                await _moveNextSignal.Wait().ConfigureAwait(false);
                 _current = value;
                 _producerResult.Set(true);
-                // Now, wait for the consumer to call the next MoveNext().
+
+                // Now, wait for the consumer to call MoveNext().
                 // This will guarantee that _current instance is valid until
                 // the consumer(s) are done.
                 await _moveNextSignal.Wait().ConfigureAwait(false);
-                _moveNextSignal.Set();
             }
-
         }

-        private async Task EndOfStream()
+        private void EndOfStream()
         {
             if (!_disposed)
             {
-                // Wait for the consumer to pull (call MoveNext()).
-                await _moveNextSignal.Wait().ConfigureAwait(false);
                 _producerResult.Set();
-                // There no need here to weird stuff with _moveNextSignal :)
             }
         }

         public void Dispose()
         {
             _disposed = true;
+            // Wake up the producer if it was stuck in Yield.
             _moveNextSignal.Set();
+            // Signal the EndOfStream
             _producerResult.Set();
         }

@@ -119,11 +112,16 @@

                 try
                 {
+                    // Wait for the consumer to call MoveNext() the first time.
+                    // Note that after the first time, this will be always signalled.
+                    // This is only necessary to synchronize the enumerator when the
+                    // producer is started.
+                    await _moveNextSignal.Wait().ConfigureAwait(false);
                     await producerFunc(producer);
                 }
                 finally
                 {
-                    await enumerator.EndOfStream();
+                    enumerator.EndOfStream();
                 }
             };
         }


Use a specific bootstrapper instead of using the locator.

--- src/Nancy.Hosting.Wcf.Tests/NancyWcfGenericServiceFixture.cs
+++ src/Nancy.Hosting.Wcf.Tests/NancyWcfGenericServiceFixture.cs
@@ -57,7 +57,7 @@
         private static WebServiceHost CreateAndOpenWebServiceHost()
         {
             var host = new WebServiceHost(
-                new NancyWcfGenericService(),
+                new NancyWcfGenericService(new DefaultNancyBootStrapper()),
                 new Uri("http://localhost:1234/base/"));

             host.AddServiceEndpoint(typeof (NancyWcfGenericService), new WebHttpBinding(), "");


Added support for language on LowercaseTokenFilter

--- src/Nest/Domain/Analysis/TokenFilter/LowercaseTokenFilter.cs
+++ src/Nest/Domain/Analysis/TokenFilter/LowercaseTokenFilter.cs
@@ -12,7 +12,9 @@
             : base("lowercase")
         {

-        }
-
+        }
+
+        [JsonProperty("language")]
+        public string Language { get; set; }
     }
 }


Исправлено предупреждение о потере точности

--- src/ScriptEngine.HostedScript/Library/SystemGlobalContext.cs
+++ src/ScriptEngine.HostedScript/Library/SystemGlobalContext.cs
@@ -369,7 +369,7 @@
         [ContextMethod("ТекущаяУниверсальнаяДатаВМиллисекундах", "CurrentUniversalDateInMilliseconds")]
         public decimal CurrentUniversalDateInMilliseconds()
         {
-            return DateTime.UtcNow.Ticks / TimeSpan.TicksPerMillisecond;
+            return (decimal)DateTime.UtcNow.Ticks / TimeSpan.TicksPerMillisecond;
         }

         /// <summary>


Exception message verbiage.

Exception message verbiage.

--- src/StraightSql/Conversion/TypeConverterNotFoundException.cs
+++ src/StraightSql/Conversion/TypeConverterNotFoundException.cs
@@ -22,7 +22,7 @@

 		public override String Message
 		{
-			get { return $"Could not convert type from {fromType.Name} to {toType.Name}."; }
+			get { return $"No type converter found (from type {fromType.Name} to type {toType.Name})."; }
 		}
 	}
 }


Add tests for thread interrupt in finally blocks (#15187)

Add tests for thread interrupt in finally blocks

Related to dotnet/coreclr#8953

--- src/System.Threading.Thread/tests/ThreadTests.netstandard.cs
+++ src/System.Threading.Thread/tests/ThreadTests.netstandard.cs
@@ -620,7 +620,7 @@
         public static void InterruptTest()
         {
             // Interrupting a thread that is not blocked does not do anything, but once the thread starts blocking, it gets
-            // interrupted
+            // interrupted and does not auto-reset the signaled event
             var threadReady = new AutoResetEvent(false);
             var continueThread = new AutoResetEvent(false);
             bool continueThreadBool = false;
@@ -636,10 +636,12 @@
             t.IsBackground = true;
             t.Start();
             threadReady.CheckedWait();
+            continueThread.Set();
             t.Interrupt();
             Assert.False(threadReady.WaitOne(ExpectedTimeoutMilliseconds));
             Volatile.Write(ref continueThreadBool, true);
             waitForThread();
+            Assert.True(continueThread.WaitOne(0));

             // Interrupting a dead thread does nothing
             t.Interrupt();
@@ -659,6 +661,32 @@
             t.IsBackground = true;
             t.Start();
             ThreadTestHelpers.WaitForCondition(() => (t.ThreadState & ThreadState.WaitSleepJoin) != 0);
+            t.Interrupt();
+            waitForThread();
+        }
+
+        [Fact]
+        [SkipOnTargetFramework(TargetFrameworkMonikers.NetFramework)]
+        public static void InterruptInFinallyBlockTest_SkipOnDesktopFramework()
+        {
+            // A wait in a finally block can be interrupted. The desktop framework applies the same rules as thread abort, and
+            // does not allow thread interrupt in a finally block. There is nothing special about thread interrupt that requires
+            // not allowing it in finally blocks, so this behavior has changed in .NET Core.
+            var continueThread = new AutoResetEvent(false);
+            Action waitForThread;
+            Thread t =
+                ThreadTestHelpers.CreateGuardedThread(out waitForThread, () =>
+                {
+                    try
+                    {
+                    }
+                    finally
+                    {
+                        Assert.Throws<ThreadInterruptedException>(() => continueThread.CheckedWait());
+                    }
+                });
+            t.IsBackground = true;
+            t.Start();
             t.Interrupt();
             waitForThread();
         }


Added comment.

Added comment.

--- src/Threax.AspNetCore.Halcyon.Client/JsonSchema4Converter.cs
+++ src/Threax.AspNetCore.Halcyon.Client/JsonSchema4Converter.cs
@@ -8,6 +8,10 @@

 namespace Threax.AspNetCore.Halcyon.Client
 {
+    /// <summary>
+    /// For whatever reason this class is needed to deserialize and allow null values, there is probablay another
+    /// way to do this, but this also does the trick.
+    /// </summary>
     class JsonSchema4Converter : JsonConverter
     {
         private static readonly TypeInfo JsonSchema4TypeInfo = typeof(JsonSchema4).GetTypeInfo();


Fix bug: $project variable is null for WebSite projects when invoking install.ps1
Work items: 680

--HG--
extra : rebase_source : 3cecd79819a8ac873337165f31052e72d4587fa2

--- src/VsConsole/PowerShellCmdlets/ProcessPackageBaseCommand.cs
+++ src/VsConsole/PowerShellCmdlets/ProcessPackageBaseCommand.cs
@@ -17,6 +17,7 @@
         // If this command is executed by getting the project from the pipeline, then we need we keep track of all of the
         // project managers since the same cmdlet instance can be used across invocations.
         private readonly Dictionary<string, IProjectManager> _projectManagers = new Dictionary<string, IProjectManager>();
+        private readonly Dictionary<IProjectManager, Project> _projectManagerToProject = new Dictionary<IProjectManager, Project>();

         protected ProcessPackageBaseCommand(ISolutionManager solutionManager, IVsPackageManagerFactory packageManagerFactory)
             : base(solutionManager, packageManagerFactory) {
@@ -31,16 +32,18 @@

         protected IProjectManager ProjectManager {
             get {
-                // We take a snapshot of the default project, the first time it is accessed so if it changs during
+                // We take a snapshot of the default project, the first time it is accessed so if it changes during
                 // the executing of this cmdlet we won't take it into consideration. (which is really an edge case anyway)
                 string name = ProjectName ?? String.Empty;

                 IProjectManager projectManager;
                 if (!_projectManagers.TryGetValue(name, out projectManager)) {
-                    projectManager = GetProjectManager();
+                    Tuple<IProjectManager, Project> tuple = GetProjectManager();
+                    projectManager = tuple.Item1;

                     if (projectManager != null) {
                         _projectManagers.Add(name, projectManager);
+                        _projectManagerToProject[projectManager] = tuple.Item2;
                     }
                 }

@@ -73,7 +76,7 @@
             WriteLine();
         }

-        private IProjectManager GetProjectManager() {
+        private Tuple<IProjectManager, Project> GetProjectManager() {
             if (PackageManager == null) {
                 return null;
             }
@@ -105,7 +108,7 @@
             projectManager.PackageReferenceAdded += OnPackageReferenceAdded;
             projectManager.PackageReferenceRemoving += OnPackageReferenceRemoving;

-            return projectManager;
+            return Tuple.Create(projectManager, project);
         }

         private void OnPackageInstalling(object sender, PackageOperationEventArgs e) {
@@ -133,7 +136,9 @@

         private void OnPackageReferenceAdded(object sender, PackageOperationEventArgs e) {
             var projectManager = (ProjectManager)sender;
-            EnvDTE.Project project = SolutionManager.GetProject(projectManager.Project.ProjectName);
+
+            EnvDTE.Project project = _projectManagerToProject[projectManager];
+            Debug.Assert(project != null);

             ExecuteScript(e.InstallPath, "install.ps1", e.Package, project);
         }


Fix broken Swagger

Fix broken Swagger

--- src/Augurk/Startup.cs
+++ src/Augurk/Startup.cs
@@ -85,14 +85,14 @@
             });

             // Add Swagger support at the appropriate endpoints
-            app.UseSwagger(options => options.RouteTemplate = "doc/api/{documentName}");
+            app.UseSwagger(options => options.RouteTemplate = "doc/api/{documentName}.json");
             app.UseSwaggerUI(options =>
             {
                 options.RoutePrefix = "doc/ui";

                 foreach (var description in provider.ApiVersionDescriptions)
                 {
-                    options.SwaggerEndpoint($"/doc/api/{description.GroupName}", description.GroupName.ToUpperInvariant());
+                    options.SwaggerEndpoint($"/doc/api/{description.GroupName}.json", description.GroupName.ToUpperInvariant());
                 }
             });
         }


fixed translucent border

fixed translucent border

--- src/com/codename1/impl/WindowsGraphics.cs
+++ src/com/codename1/impl/WindowsGraphics.cs
@@ -182,7 +182,8 @@

         internal virtual void drawImage(CanvasBitmap canvasBitmap, int x, int y)
         {
-            graphics.DrawImage(image2Premultiply(canvasBitmap), x, y);
+            //graphics.DrawImage(image2Premultiply(canvasBitmap), x, y);
+            graphics.DrawImage(canvasBitmap, x, y);
         }

         private ICanvasImage image2Premultiply(ICanvasImage aImage)
@@ -205,7 +206,8 @@
                     Y = ((float)h) / canvasBitmap.SizeInPixels.Height
                 }
             };
-            graphics.DrawImage(image2Premultiply(scale), x, y);
+            //graphics.DrawImage(image2Premultiply(scale), x, y);
+            graphics.DrawImage(scale, x, y);
         }

         internal virtual void tileImage(CanvasBitmap canvasBitmap, int x, int y, int w, int h)


[ios10] fix barcode sample rotation bug

[ios10] fix barcode sample rotation bug

--- ios10/AVCamBarcode/AVCamBarcode/CameraViewController.cs
+++ ios10/AVCamBarcode/AVCamBarcode/CameraViewController.cs
@@ -311,7 +311,7 @@
 			case UIDeviceOrientation.LandscapeLeft:
 				return LandscapeLeft;
 			case UIDeviceOrientation.LandscapeRight:
-				return LandscapeLeft;
+				return LandscapeRight;
 			default:
 				throw new InvalidProgramException ();
 			}


fixed a bug in test case

fixed a bug in test case

git-svn-id: 264d93eb9283b6a3bfed80dd266caeb8f93e7ca3@63053 81fbe566-5dc4-48c1-bdea-7421811ca204

--- mainline/SuperWebSocketTest/SubProtocolWebSocketTest.cs
+++ mainline/SuperWebSocketTest/SubProtocolWebSocketTest.cs
@@ -102,20 +102,23 @@
             for (int i = 0; i < 10; i++)
             {
                 int startPos = rd.Next(0, messageSource.Length - 2);
-                int endPos = rd.Next(startPos + 1, messageSource.Length - 1);
+                int endPos = rd.Next(startPos + 1, Math.Min(messageSource.Length - 1, startPos + 1 + 100));

                 string currentCommand = messageSource.Substring(startPos, endPos - startPos);

                 Console.WriteLine("Client:" + currentCommand);

                 stream.Write(new byte[] { WebSocketConstant.StartByte }, 0, 1);
-                byte[] data = Encoding.UTF8.GetBytes("ECHO:" + currentCommand);
+                byte[] data = Encoding.UTF8.GetBytes("ECHO " + currentCommand);
                 stream.Write(data, 0, data.Length);
                 stream.Write(new byte[] { WebSocketConstant.EndByte }, 0, 1);
                 stream.Flush();

-                ReceiveMessage(stream, receivedBuffer, data.Length + 2);
-                Assert.AreEqual(data.Length + 2, receivedBuffer.Count);
+                int requredCount = Encoding.UTF8.GetByteCount(currentCommand) + 2;
+                Console.WriteLine("Require:" + requredCount);
+
+                ReceiveMessage(stream, receivedBuffer, requredCount);
+                Assert.AreEqual(requredCount, receivedBuffer.Count);
                 Assert.AreEqual(WebSocketConstant.StartByte, receivedBuffer[0]);
                 Assert.AreEqual(WebSocketConstant.EndByte, receivedBuffer[receivedBuffer.Count - 1]);
                 Assert.AreEqual(currentCommand, Encoding.UTF8.GetString(receivedBuffer.ToArrayData(1, receivedBuffer.Count - 2)));


make Station.AllocatedRoles public so configuration can access it

--- models/SelfOrganizingPillProduction/Modeling/Station.cs
+++ models/SelfOrganizingPillProduction/Modeling/Station.cs
@@ -28,7 +28,7 @@
         /// <summary>
         /// The roles the station must apply to containers.
         /// </summary>
-        protected List<Role> AllocatedRoles { get; } = new List<Role>(); // TODO: initial capacity
+        public List<Role> AllocatedRoles { get; } = new List<Role>(); // TODO: initial capacity

         /// <summary>
         /// The capabilities the station has.


Fix ActionEase tests to not use the Director of the Node instead of MainWindowDirector.

--- tests/tests/classes/tests/ActionsEaseTest/EaseActionsTest.cs
+++ tests/tests/classes/tests/ActionsEaseTest/EaseActionsTest.cs
@@ -28,7 +28,7 @@
             AddChild(m_kathia, 2);
             AddChild(m_tamara, 1);

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             m_grossini.Position = new CCPoint(60, 50);
             m_kathia.Position = new CCPoint(60, 150);
@@ -55,22 +55,22 @@
         {
             CCScene s = new EaseActionsTestScene();
             s.AddChild(EaseTest.restartEaseAction());
-            CCApplication.SharedApplication.MainWindowDirector.ReplaceScene(s);
+            Director.ReplaceScene(s);
         }

         public void nextCallback(object pSender)
         {
             CCScene s = new EaseActionsTestScene();
             s.AddChild(EaseTest.nextEaseAction());
-            CCApplication.SharedApplication.MainWindowDirector.ReplaceScene(s);
-            ;
+            Director.ReplaceScene(s);
+
         }

         public void backCallback(object pSender)
         {
             CCScene s = new EaseActionsTestScene();
             s.AddChild(EaseTest.backEaseAction());
-            CCApplication.SharedApplication.MainWindowDirector.ReplaceScene(s);
+            Director.ReplaceScene(s);
         }

         public void positionForTwo()
@@ -87,7 +87,7 @@
         {
             base.OnEnter();

-            var size = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var size = Director.WindowSizeInPoints;

             var move = new CCMoveBy(3, new CCPoint(size.Width - 130, 0));
             var move_back = (CCActionInterval) move.Reverse();
@@ -137,7 +137,7 @@
         {
             base.OnEnter();

-            var size = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var size = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(size.Width - 130, 0));

@@ -175,7 +175,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -211,7 +211,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -242,7 +242,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -277,7 +277,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -308,7 +308,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -343,7 +343,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));

@@ -381,7 +381,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -416,7 +416,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -447,7 +447,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -482,7 +482,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             var move = new CCMoveBy (3, new CCPoint(s.Width - 130, 0));
             var move_back = move.Reverse();
@@ -515,7 +515,7 @@
         {
             base.OnEnter();

-            var s = CCApplication.SharedApplication.MainWindowDirector.WindowSizeInPoints;
+            var s = Director.WindowSizeInPoints;

             // rotate and jump
             var jump1 = new CCJumpBy (4, new CCPoint(-s.Width + 80, 0), 100, 4);
@@ -558,7 +558,7 @@
             var pLayer = EaseTest.nextEaseAction();
             AddChild(pLayer);

-            CCApplication.SharedApplication.MainWindowDirector.ReplaceScene(this);
+            Director.ReplaceScene(this);
         }
     }


TSI-3220 : Fixed issue with quotes

TSI-3220 : Fixed issue with quotes

--- webapp-net/Search/Controllers/TridionDocsSearchController.cs
+++ webapp-net/Search/Controllers/TridionDocsSearchController.cs
@@ -9,11 +9,14 @@
 using Sdl.Web.Delivery.IQQuery.Model.Result;
 using Sdl.Web.Modules.Search.Data;
 using Sdl.Web.Mvc.Controllers;
+using System.Text.RegularExpressions;

 namespace Sdl.Web.Modules.Search.Controllers
 {
     public class TridionDocsSearchController : BaseController
     {
+        private static readonly Regex RegexpDoubleQuotes = new Regex("^\"(.*)\"$", RegexOptions.Compiled);
+
         [Route("~/api/search")]
         [HttpPost]
         public virtual ActionResult Search()
@@ -41,7 +44,15 @@
             fields.Add("dynamic.FISHDITADLVRREMOTESTATUS.lng.element");
             fields.Add($"content.{CultureInfo.GetCultureInfo(searchParams.Language).EnglishName.ToLower()}");
             values.Add(new DefaultTermValue("VDITADLVRREMOTESTATUSONLINE"));
-            values.Add(new DefaultTermValue(searchParams.SearchQuery, TermTypes.Exact));
+
+            string searchQuery = searchParams.SearchQuery;
+            Match match = RegexpDoubleQuotes.Match(searchQuery);
+            if (match.Success)
+            {
+                searchQuery = match.Groups[1].Value;
+            }
+
+            values.Add(new DefaultTermValue(searchQuery, TermTypes.Exact));
             var results = search.WithResultFilter(new SearchResultFilter
             {
                 StartOfRange = searchParams.StartIndex,


Fixed Block()

Fixed Block()

--- src/Discord.Net/DiscordClient.cs
+++ src/Discord.Net/DiscordClient.cs
@@ -23,7 +23,7 @@
 		private readonly JsonSerializer _serializer;
 		private readonly Regex _userRegex, _channelRegex;
 		private readonly MatchEvaluator _userRegexEvaluator, _channelRegexEvaluator;
-		private readonly object _disconnectEvent;
+		private readonly ManualResetEvent _disconnectEvent;
 		private readonly Random _rand;
 		private readonly ConcurrentQueue<Message> _pendingMessages;
 		private readonly DiscordClientConfig _config;
@@ -56,7 +56,7 @@
 		/// <summary> Initializes a new instance of the DiscordClient class. </summary>
 		public DiscordClient(DiscordClientConfig config = null)
 		{
-			_disconnectEvent = new object();
+			_disconnectEvent = new ManualResetEvent(true);
 			_config = config ?? new DiscordClientConfig();
 			_isDebugMode = _config.EnableDebug;
 			_rand = new Random();
@@ -545,6 +545,7 @@

 		private async Task Run()
 		{
+			_disconnectEvent.Reset();
 			_disconnectToken = new CancellationTokenSource();

 			//Run Loops
@@ -562,7 +563,7 @@
 		//TODO: What happens if a reconnect occurs and caches havent been cleared yet? Compare to DiscordWebSocket.Cleanup()
 		private async Task Cleanup()
 		{
-			_isDisconnecting = true;
+			_disconnectEvent.Set();

 			await _webSocket.DisconnectAsync().ConfigureAwait(false);
 #if !DNXCORE50
@@ -582,7 +583,6 @@
 			_runTask = null;
 			_isConnected = false;
 			_isDisconnecting = false;
-            Monitor.Pulse(_disconnectEvent);
 		}

 		//Voice
@@ -685,8 +685,8 @@
 		/// <summary> Blocking call that will not return until client has been stopped. This is mainly intended for use in console applications. </summary>
 		public void Block()
 		{
-			while (_isConnected)
-				Monitor.Wait(_disconnectEvent, TimeSpan.FromSeconds(3));
-		}
+			if (_isConnected)
+				_disconnectEvent.WaitOne();
+        }
 	}
 }


Define a macro to lower finalizer declarations

--- src/EcscMacros/RequiredMacros.cs
+++ src/EcscMacros/RequiredMacros.cs
@@ -334,6 +334,32 @@
             // { temp = lhs; #result([lhs = ] temp == null ? rhs : temp) }
             return F.Braces(storeTemp, F.Result(ternary));
         }
+
+        [LexicalMacro(
+            "#fn(@``, ~ClassName, #(), ...)",
+            "lowers a finalizer declaration to an override of `void Finalize()`",
+            "#fn",
+            Mode = MacroMode.Passive | MacroMode.Normal)]
+        public static LNode LowerFinalizerDeclaration(LNode Node, IMacroContext Sink)
+        {
+            if (!Node.CallsMin(CodeSymbols.Fn, 3))
+            {
+                return Reject(Sink, Node, "#fn' takes at least three arguments.");
+            }
+
+            if (!Node.Args[0].IsIdNamed(GSymbol.Empty)
+                || !Node.Args[1].Calls(CodeSymbols.NotBits, 1))
+            {
+                return null;
+            }
+
+            // Turn `[...] #fn(@``, ~ClassName, #(), ...)` into
+            // `[#protected, #override, ...] #fn(#void, Finalize, #(), ...)`
+
+            return Node.WithArgChanged(0, F.Void)
+                .WithArgChanged(1, F.Id("Finalize"))
+                .PlusAttrs(F.Id(CodeSymbols.Protected), F.Id(CodeSymbols.Override));
+        }
     }
 }


git-svn-id: https://svn.apache.org/repos/asf/incubator/lucene.net/trunk@883506 13f79535-47bb-0310-9956-ffa450edef68

--- C#/src/Test/Search/TestSort.cs
+++ C#/src/Test/Search/TestSort.cs
@@ -1110,7 +1110,7 @@
 					{
 						TopDocsCollector tdc = TopFieldCollector.create(sort[i], 10, tfcOptions[j][0], tfcOptions[j][1], tfcOptions[j][2], false);

-						Assert.IsTrue(tdc.GetType().FullName.EndsWith("$" + actualTFCClasses[j]));
+						Assert.IsTrue(tdc.GetType().FullName.EndsWith("+" + actualTFCClasses[j]));

 						full.Search(bq, tdc);


Add examples for annotations use cases

Add examples for annotations use cases

--- src/Fhir.Metrics/Utils/Parser.cs
+++ src/Fhir.Metrics/Utils/Parser.cs
@@ -70,16 +70,16 @@
             var annotations = new Regex(@"{[^{}]*}", RegexOptions.Compiled);
             foreach(Match match in annotations.Matches(expression))
             {
-                if (match.Index == 0) // Expressions contains just an annotation
+                if (match.Index == 0) // Expressions contains just an annotation, e.g. "{rbc}"
                 {
                     expression = Metrics.Unity;
                 }
-                else if (expression[match.Index - 1].Equals('/') || expression[match.Index - 1].Equals('.')) // Annotation is part of a multiplication or division
+                else if (expression[match.Index - 1].Equals('/') || expression[match.Index - 1].Equals('.')) // Annotation is part of a multiplication or division, e.g. "/{count}" or "10*3.{RBC}"
                 {
                     expression = expression.Remove(match.Index, match.Length);
                     expression = expression.Insert(match.Index, Metrics.Unity);
                 }
-                else // e.g. // Annotation is directly combined with another unit
+                else // e.g. // Annotation is directly combined with another unit, e.g. "ml{total}"
                 {
                     expression = expression.Remove(match.Index, match.Length);
                 }


(build) Fix syntax error

(build) Fix syntax error

--- Cake.Recipe/Content/build.cake
+++ Cake.Recipe/Content/build.cake
@@ -28,7 +28,7 @@
         );
     });

-    Information(string.Format("Cake Version: {0}", BuildParameters.Version.CakeVersion);
+    Information(string.Format("Cake Version: {0}", BuildParameters.Version.CakeVersion));

     if(BuildParameters.Version.CakeVersion != currentSupportedCakeVersionNumber)
     {


don't know if ture, but prefer env vars over appsettings

--- src/FilterLists.Agent/Program.cs
+++ src/FilterLists.Agent/Program.cs
@@ -51,8 +51,8 @@
         {
             return new ConfigurationBuilder()
                 .SetBasePath(Directory.GetCurrentDirectory())
+                .AddEnvironmentVariables()
                 .AddJsonFile("appsettings.json", true, false)
-                .AddEnvironmentVariables()
                 .Build();
         }
     }


Fixed comment

Fixed comment

--- src/FlaUI.Core/Input/Keyboard.cs
+++ src/FlaUI.Core/Input/Keyboard.cs
@@ -259,8 +259,8 @@
         }

         /// <summary>
-        /// Disposable class which presses the key on creation
-        /// and disposes it on destruction.
+        /// Disposable class which presses the keys on creation
+        /// and disposes them on destruction.
         /// </summary>
         private class KeyPressingActivation : IDisposable
         {


modify encoding test file path

modify encoding test file path


Fixed constructor parameter.

Fixed constructor parameter.

--- DataGenerator/ObjectContext.cs
+++ DataGenerator/ObjectContext.cs
@@ -290,7 +290,7 @@
                             throw new InvalidOperationException($"Attempt to create more than {this.ObjectLimit} objects.");
                         }

-                        var result = constructorDelegate(ctorParameters.Select(ca => ca(localSources)));
+                        var result = constructorDelegate(ctorParameters.Select(ca => ca(localSources)).ToArray());

                         localSources.Add(result);

@@ -315,6 +315,11 @@
             return constructor(sources);
         }

+        /// <summary>
+        /// Gets a value creator for the given type.
+        /// </summary>
+        /// <param name="t">The type to get the value creator for.</param>
+        /// <returns>A value creator, or null if no value creator could be found.</returns>
         private Func<string, object> ValueCreator(Type t)
         {
             if (this.structure.CustomConstructors.TryGetValue(t, out Func<object> creator))
@@ -325,6 +330,12 @@
             return this.SimpleValueGenerator.ValueCreator(t);
         }

+        /// <summary>
+        /// Gets an existing object of the given type from the sources list.
+        /// </summary>
+        /// <param name="sources">The list of existing object.</param>
+        /// <param name="sourceType"The source type.></param>
+        /// <returns>An exisiting object or null.</returns>
         private object GetSource(IList<object> sources, Type sourceType)
         {
             for (var i = sources.Count - 2; i >= 0; --i)
@@ -338,6 +349,13 @@
             return null;
         }

+        /// <summary>
+        /// Sets properties for the given input object, with the specified type.
+        /// </summary>
+        /// <param name="inputObject">The input object.</param>
+        /// <param name="inputType">The type of the input object.</param>
+        /// <param name="inputSources">The input object sources.</param>
+        /// <param name="inputSingleton">Determines if the input object is a singleton.</param>
         private void SetProperties(object inputObject, Type inputType, IList<object> inputSources, bool inputSingleton)
         {
             if (!this.methodPropertyCache.TryGetValue(inputType, out var methods))
@@ -413,7 +431,7 @@

                                 var elementType = propertyType.GetGenericArguments()[0];
                                 var collectionType = typeof(HashSet<>).MakeGenericType(elementType);
-                                var hashSetAdder = collectionType.DelegateForCallMethod("Add", elementType);
+                                var hashSetAdder = collectionType.DelegateForCallMethod(nameof(HashSet<int>.Add), elementType);
                                 var hashSetCreator = collectionType.DelegateForCreateInstance();
                                 var collectionSetter = inputType.DelegateForSetPropertyValue(property.Name);
                                 var collectionGetter = inputType.DelegateForGetPropertyValue(property.Name);


Small fix

Small fix

--- src/MyraPad/Studio.cs
+++ src/MyraPad/Studio.cs
@@ -882,6 +882,9 @@
 					}

 					Desktop.ShowContextMenu(_autoCompleteMenu, screen);
+					// Keep focus at text field
+					Desktop.FocusedKeyboardWidget = _ui._textSource;
+
 					_refreshInitiated = null;
 				}
 			}


Add list of exception assemblies for deployment checking (#242)

--- source/VisualStudio.Extension/DeployProvider/DeployProvider.cs
+++ source/VisualStudio.Extension/DeployProvider/DeployProvider.cs
@@ -314,6 +314,24 @@
                             continue;
                         }
                     }
+                    else
+                    {
+                        // there are assemblies that don't have any native counterpart
+                        // list those bellow so they aren't considered as not existing
+
+                        List<CLRCapabilities.NativeAssemblyProperties> exceptionAssemblies = new List<CLRCapabilities.NativeAssemblyProperties>();
+
+                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+                        // assemblies not having native implementation
+                        exceptionAssemblies.Add(new CLRCapabilities.NativeAssemblyProperties("Windows.Storage.Streams", 0, new Version()));
+                        //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+                        if (exceptionAssemblies.Exists(a => a.Name == Path.GetFileNameWithoutExtension(peItem.path)))
+                        {
+                            // we are good with this one
+                            continue;
+                        }
+                    }

                     if(string.IsNullOrEmpty(errorMessage))
                     {


Created the concept of a query.

Created the concept of a query.

--- src/platform/toolkit/restQL/Query.cs
+++ src/platform/toolkit/restQL/Query.cs
@@ -7,23 +7,49 @@
 namespace Nohros.Toolkit.RestQL
 {
   /// <summary>
-  /// A class that contains informations about a particular query.
+  /// Represents a string data contains data to be passed to a query processor
+  /// in order to obtain data from a data source.
   /// </summary>
+  /// <remarks>
+  /// A query is composed by a plain text having or not parameters within it.
+  /// A parameter is a sequence of characters with no spaces delimited by
+  /// anohther string. The default parameter delimiter is the string "$".
+  /// <para>
+  /// Each query has a type that should be set by the user. The default query
+  /// type is <see cref="QeuryType.AdHoc"/>.
+  /// </para>
+  /// </remarks>
   public class Query : ParameterizedString
   {
-    ParameterizedString query_;
     IDictionary<string, string> parms_;
+    QueryType query_type_;

     /// <summary>
-    /// Initializes a new instance of the <see cref="QueryProcessor"/> class
-    /// by using the specified query string.
+    /// Initializes a new instance of the <see cref="Query"/> class by using
+    /// the specified query string.
     /// </summary>
-    /// <param name="query_key">A string that uniquely identifies a query
-    /// within the main data store.</param>
-    /// <param name="parms">A <see cref="IDictionary<TKey, TValue>"/> object
-    /// containing the parameters that should be bound to the query.</param>
-    public Query(): base() {
-      query_ = query;
+    /// <param name="query">A string that represents the query.
+    /// </param>
+    public Query(string query): base(query) { }
+
+    /// <summary>
+    /// Initializes a new instance of the <see cref="Query"/> class by using
+    /// the specified query string and paraemter delimiter..
+    /// </summary>
+    /// <param name="query">A string that represents the query.</param>
+    /// <param name="delimiter">A string that is used to delimit the query
+    /// parameters.</param>
+    /// <remarks>
+    /// A parameter is a sequence of characters without spaces
+    /// enclosed by the <paramref name="delimiter"/>.
+    /// </remarks>
+    public Query(string query, string delimiter) : base(query, delimiter) { }
+
+    /// <summary>
+    /// Gets or sets the type of the query.
+    /// </summary>
+    public QueryType Type {
+      get { return query_type_; }
     }
   }
 }


moved verify task log output to before parsing

--- src/AsimovDeploy.WinAgent/Framework/Tasks/VerifyCommandTask.cs
+++ src/AsimovDeploy.WinAgent/Framework/Tasks/VerifyCommandTask.cs
@@ -125,12 +125,12 @@

         private void ParseVerifyCommandOutput(string line)
         {
+			Log.Debug(line);
+
 			if (line.StartsWith("##asimov-deploy"))
 			{
 				HandleAssimovMessage(line);
 			}
-
-	        Log.Debug(line);
         }

 		private void HandleAssimovMessage(string line)


Update FindByColumnHeaderStrategy.Find method to throw more detailed exception

--- src/Atata/ScopeSearch/Strategies/FindByColumnHeaderStrategy.cs
+++ src/Atata/ScopeSearch/Strategies/FindByColumnHeaderStrategy.cs
@@ -46,9 +46,19 @@
             if (columnIndex == null)
             {
                 if (searchOptions.IsSafely)
+                {
                     return new MissingComponentScopeLocateResult();
+                }
                 else
-                    throw ExceptionFactory.CreateForNoSuchElement(options.GetTermsAsString(), searchContext: scope);
+                {
+                    throw ExceptionFactory.CreateForNoSuchElement(
+                        new SearchFailureData
+                        {
+                            ElementName = $"\"{options.GetTermsAsString()}\" column header",
+                            SearchOptions = searchOptions,
+                            SearchContext = scope
+                        });
+                }
             }

             IComponentScopeLocateStrategy nextStrategy = CreateColumnIndexStrategy(columnIndex.Value);


Fixed yet another invalidation case

Fixed yet another invalidation case

--- src/Avalonia.Base/Rendering/Composition/Server/ServerVisual.cs
+++ src/Avalonia.Base/Rendering/Composition/Server/ServerVisual.cs
@@ -120,11 +120,12 @@
             var oldTransformedContentBounds = TransformedOwnContentBounds;
             var oldCombinedTransformedClipBounds = _combinedTransformedClipBounds;

-
+            var dirtyOldBounds = false;
             if (_parent?.IsDirtyComposition == true)
             {
                 IsDirtyComposition = true;
                 _isDirtyForUpdate = true;
+                dirtyOldBounds = true;
             }

             GlobalTransformMatrix = newTransform;
@@ -161,8 +162,7 @@

             if (wasVisible != IsVisibleInFrame)
                 _isDirtyForUpdate = true;
-
-            var dirtyOldBounds = false;
+
             // Invalidate previous rect and queue new rect based on visibility
             if (positionChanged)
             {


Fixed a bug with proxies and Expect100Continue in Recaptcha.Net library.

--- src/AzureCloudOCR/Recaptcha.Web/RecaptchaVerificationHelper.cs
+++ src/AzureCloudOCR/Recaptcha.Web/RecaptchaVerificationHelper.cs
@@ -85,68 +85,9 @@
         /// <returns>Returns the result as a value of the <see cref="RecaptchaVerificationResult"/> enum.</returns>
         public RecaptchaVerificationResult VerifyRecaptchaResponse()
         {
-            string privateKey = RecaptchaKeyHelper.ParseKey(PrivateKey);
-
-            string postData = String.Format("privatekey={0}&remoteip={1}&challenge={2}&response={3}", privateKey, this.UserHostAddress, this._Challenge, this.Response);
-
-            byte[] postDataBuffer = System.Text.Encoding.ASCII.GetBytes(postData);
-
-            Uri verifyUri = new Uri("http://api-verify.recaptcha.net/verify", UriKind.Absolute);
-
-            try
-            {
-                HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(verifyUri);
-                webRequest.ContentType = "application/x-www-form-urlencoded";
-                webRequest.ContentLength = postDataBuffer.Length;
-                webRequest.Method = "POST";
-
-                IWebProxy proxy = WebRequest.GetSystemWebProxy();
-                proxy.Credentials = CredentialCache.DefaultCredentials;
-
-                webRequest.Proxy = proxy;
-
-                Stream requestStream = webRequest.GetRequestStream();
-                requestStream.Write(postDataBuffer, 0, postDataBuffer.Length);
-
-                HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
-
-                string[] responseTokens = null;
-                using (StreamReader sr = new StreamReader(webResponse.GetResponseStream()))
-                {
-                    responseTokens = sr.ReadToEnd().Split('\n');
-                }
-
-                if (responseTokens.Length == 2)
-                {
-                    Boolean success = responseTokens[0].Equals("true", StringComparison.CurrentCulture);
-
-                    if (success)
-                    {
-                        return RecaptchaVerificationResult.Success;
-                    }
-                    else
-                    {
-                        if (responseTokens[1].Equals("incorrect-captcha-sol", StringComparison.CurrentCulture))
-                        {
-                            return RecaptchaVerificationResult.IncorrectCaptchaSolution;
-                        }
-                        else if (responseTokens[1].Equals("invalid-site-private-key", StringComparison.CurrentCulture))
-                        {
-                            return RecaptchaVerificationResult.InvalidPrivateKey;
-                        }
-                        else if (responseTokens[1].Equals("invalid-request-cookie", StringComparison.CurrentCulture))
-                        {
-                            return RecaptchaVerificationResult.InvalidCookieParameters;
-                        }
-                    }
-                }
-
-                return RecaptchaVerificationResult.UnknownError;
-            }
-            catch (Exception ex)
-            {
-                throw ex;
-            }
+            var webRequest = CreateVerificationWebRequest();
+            HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
+            return GetVerificationResultFromWebResponse(webResponse);
         }

         /// <summary>
@@ -155,73 +96,76 @@
         /// <returns>Returns the result as a value of the <see cref="RecaptchaVerificationResult"/> enum.</returns>
         public Task<RecaptchaVerificationResult> VerifyRecaptchaResponseTaskAsync()
         {
-            Task<RecaptchaVerificationResult> result = Task<RecaptchaVerificationResult>.Factory.StartNew(() =>
+            Task<RecaptchaVerificationResult> result = Task<RecaptchaVerificationResult>.Factory.StartNew(VerifyRecaptchaResponse);
+            return result;
+        }
+
+        private HttpWebRequest CreateVerificationWebRequest()
+        {
+            string privateKey = RecaptchaKeyHelper.ParseKey(PrivateKey);
+
+            Uri verifyUri = new Uri("http://api-verify.recaptcha.net/verify", UriKind.Absolute);
+
+            string postData = String.Format("privatekey={0}&remoteip={1}&challenge={2}&response={3}", privateKey, this.UserHostAddress, this._Challenge, this.Response);
+            byte[] postDataBuffer = System.Text.Encoding.ASCII.GetBytes(postData);
+
+            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(verifyUri);
+            webRequest.ContentType = "application/x-www-form-urlencoded";
+            webRequest.ContentLength = postDataBuffer.Length;
+            webRequest.Method = "POST";
+
+            // With a proxy server, it works only if set twice, before and after assigning the proxy.
+            webRequest.ServicePoint.Expect100Continue = false;
+
+            IWebProxy proxy = WebRequest.GetSystemWebProxy();
+            proxy.Credentials = CredentialCache.DefaultCredentials;
+            webRequest.Proxy = proxy;
+
+            // See above, it works only if done twice.
+            webRequest.ServicePoint.Expect100Continue = false;
+
+            using (Stream requestStream = webRequest.GetRequestStream())
             {
-                string privateKey = RecaptchaKeyHelper.ParseKey(PrivateKey);
+                requestStream.Write(postDataBuffer, 0, postDataBuffer.Length);
+            }

-                string postData = String.Format("privatekey={0}&remoteip={1}&challenge={2}&response={3}", privateKey, this.UserHostAddress, this._Challenge, this.Response);
+            return webRequest;
+        }

-                byte[] postDataBuffer = System.Text.Encoding.ASCII.GetBytes(postData);
+        private static RecaptchaVerificationResult GetVerificationResultFromWebResponse(HttpWebResponse webResponse)
+        {
+            string[] responseTokens = null;
+            using (StreamReader sr = new StreamReader(webResponse.GetResponseStream()))
+            {
+                responseTokens = sr.ReadToEnd().Split('\n');
+            }

-                Uri verifyUri = new Uri("http://api-verify.recaptcha.net/verify", UriKind.Absolute);
+            if (responseTokens.Length == 2)
+            {
+                Boolean success = responseTokens[0].Equals("true", StringComparison.CurrentCulture);

-                try
+                if (success)
                 {
-                    HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(verifyUri);
-                    webRequest.ContentType = "application/x-www-form-urlencoded";
-                    webRequest.ContentLength = postDataBuffer.Length;
-                    webRequest.Method = "POST";
+                    return RecaptchaVerificationResult.Success;
+                }
+                else
+                {
+                    if (responseTokens[1].Equals("incorrect-captcha-sol", StringComparison.CurrentCulture))
+                    {
+                        return RecaptchaVerificationResult.IncorrectCaptchaSolution;
+                    }
+                    else if (responseTokens[1].Equals("invalid-site-private-key", StringComparison.CurrentCulture))
+                    {
+                        return RecaptchaVerificationResult.InvalidPrivateKey;
+                    }
+                    else if (responseTokens[1].Equals("invalid-request-cookie", StringComparison.CurrentCulture))
+                    {
+                        return RecaptchaVerificationResult.InvalidCookieParameters;
+                    }
+                }
+            }

-                    IWebProxy proxy = WebRequest.GetSystemWebProxy();
-                    proxy.Credentials = CredentialCache.DefaultCredentials;
-
-                    webRequest.Proxy = proxy;
-
-                    Stream requestStream = webRequest.GetRequestStream();
-                    requestStream.Write(postDataBuffer, 0, postDataBuffer.Length);
-
-                    HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
-
-                    string[] responseTokens = null;
-                    using (StreamReader sr = new StreamReader(webResponse.GetResponseStream()))
-                    {
-                        responseTokens = sr.ReadToEnd().Split('\n');
-                    }
-
-                    if (responseTokens.Length == 2)
-                    {
-                        Boolean success = responseTokens[0].Equals("true", StringComparison.CurrentCulture);
-
-                        if (success)
-                        {
-                            return RecaptchaVerificationResult.Success;
-                        }
-                        else
-                        {
-                            if (responseTokens[1].Equals("incorrect-captcha-sol", StringComparison.CurrentCulture))
-                            {
-                                return RecaptchaVerificationResult.IncorrectCaptchaSolution;
-                            }
-                            else if (responseTokens[1].Equals("invalid-site-private-key", StringComparison.CurrentCulture))
-                            {
-                                return RecaptchaVerificationResult.InvalidPrivateKey;
-                            }
-                            else if (responseTokens[1].Equals("invalid-request-cookie", StringComparison.CurrentCulture))
-                            {
-                                return RecaptchaVerificationResult.InvalidCookieParameters;
-                            }
-                        }
-                    }
-
-                    return RecaptchaVerificationResult.UnknownError;
-                }
-                catch (Exception ex)
-                {
-                    throw ex;
-                }
-            });
-
-            return result;
+            return RecaptchaVerificationResult.UnknownError;
         }
     }
 }