Updated the test to be a simple integration test

--- Rhino.Mocks.Tests/FieldsProblem/FieldProblem_JPBoodhoo.cs
+++ Rhino.Mocks.Tests/FieldsProblem/FieldProblem_JPBoodhoo.cs
@@ -1,5 +1,4 @@
 using System;
-using System.Collections.Generic;
 using MbUnit.Framework;

 namespace Rhino.Mocks.Tests.FieldsProblem


Fix name

Fix name

--- ServiceFabric.PubSubActors.Tests/GivenServiceReference.cs
+++ ServiceFabric.PubSubActors.Tests/GivenServiceReference.cs
@@ -25,7 +25,7 @@
         }

         [TestMethod]
-        public void WhenDeterminingShouldDeliverMessageToServiceWithUnmatchingPayload_ThenReturnsTrue()
+        public void WhenDeterminingShouldDeliverMessageToServiceWithUnmatchingPayload_ThenReturnsFalse()
         {
             var serviceRef = new ServiceReferenceWrapper(new ServiceReference(), "Customer.Name=Customer1");
             var messageWrapper = new
@@ -41,7 +41,7 @@
         }

         [TestMethod]
-        public void WhenDeterminingShouldDeliverMessageToActorWithUnmatchingPayload_ThenReturnsTrue()
+        public void WhenDeterminingShouldDeliverMessageToActorWithUnmatchingPayload_ThenReturnsFalse()
         {
             var actorRef = new ActorReferenceWrapper(new ActorReference { ActorId = ActorId.CreateRandom() }, "Customer.Name=Customer1");
             var messageWrapper = new


Increased the height of the message well on the device status page.

--- Source/Applications/openMIC/openMIC/wwwroot/Status.cshtml
+++ Source/Applications/openMIC/openMIC/wwwroot/Status.cshtml
@@ -361,7 +361,7 @@

-

+

0%


Refactoring

Refactoring

--- Spines.Tools/Spines.Hana.Clay/ViewModels/TileViewModel.cs
+++ Spines.Tools/Spines.Hana.Clay/ViewModels/TileViewModel.cs
@@ -28,74 +28,30 @@
     {
       var c = SuitCharacters[tile.Suit];
       var tileNumber = tile.Aka ? "e" : (tile.Index + 1).ToString();
-      var location = tile.Location;
-      if (playerPosition == 0)
+      switch (tile.Location)
       {
-        switch (location)
-        {
-          case TileLocation.Concealed:
-            return Path.Combine(PerspectivePath, $"0{c}{tileNumber}.png");
-          case TileLocation.Discarded:
-          case TileLocation.Melded:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}{c}{tileNumber}.png");
-          case TileLocation.Added:
-          case TileLocation.Called:
-          case TileLocation.Riichi:
-            return Path.Combine(PerspectivePath, $"{1 + (playerPosition + 1) % 4}{c}{tileNumber}.png");
-          case TileLocation.FaceDown:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}j9.png");
-        }
-      }
-      else if (playerPosition == 1)
-      {
-        switch (location)
-        {
-          case TileLocation.Concealed:
-            return Path.Combine(PerspectivePath, "vertr.png");
-          case TileLocation.Discarded:
-          case TileLocation.Melded:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}{c}{tileNumber}.png");
-          case TileLocation.Added:
-          case TileLocation.Called:
-          case TileLocation.Riichi:
-            return Path.Combine(PerspectivePath, $"{1 + (playerPosition + 1) % 4}{c}{tileNumber}.png");
-          case TileLocation.FaceDown:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}j9.png");
-        }
-      }
-      else if (playerPosition == 2)
-      {
-        switch (location)
-        {
-          case TileLocation.Concealed:
-            return Path.Combine(PerspectivePath, "0j9.png");
-          case TileLocation.Discarded:
-          case TileLocation.Melded:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}{c}{tileNumber}.png");
-          case TileLocation.Added:
-          case TileLocation.Called:
-          case TileLocation.Riichi:
-            return Path.Combine(PerspectivePath, $"{1 + (playerPosition + 1) % 4}{c}{tileNumber}.png");
-          case TileLocation.FaceDown:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}j9.png");
-        }
-      }
-      else if (playerPosition == 3)
-      {
-        switch (location)
-        {
-          case TileLocation.Concealed:
-            return Path.Combine(PerspectivePath, "vertl.png");
-          case TileLocation.Discarded:
-          case TileLocation.Melded:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}{c}{tileNumber}.png");
-          case TileLocation.Added:
-          case TileLocation.Called:
-          case TileLocation.Riichi:
-            return Path.Combine(PerspectivePath, $"{1 + (playerPosition + 1) % 4}{c}{tileNumber}.png");
-          case TileLocation.FaceDown:
-            return Path.Combine(PerspectivePath, $"{1 + playerPosition}j9.png");
-        }
+        case TileLocation.Concealed:
+          switch (playerPosition)
+          {
+            case 0:
+              return Path.Combine(PerspectivePath, $"0{c}{tileNumber}.png");
+            case 1:
+              return Path.Combine(PerspectivePath, "vertr.png");
+            case 2:
+              return Path.Combine(PerspectivePath, "0j9.png");
+            case 3:
+              return Path.Combine(PerspectivePath, "vertl.png");
+          }
+          break;
+        case TileLocation.Discarded:
+        case TileLocation.Melded:
+          return Path.Combine(PerspectivePath, $"{1 + playerPosition}{c}{tileNumber}.png");
+        case TileLocation.Added:
+        case TileLocation.Called:
+        case TileLocation.Riichi:
+          return Path.Combine(PerspectivePath, $"{1 + (playerPosition + 1) % 4}{c}{tileNumber}.png");
+        case TileLocation.FaceDown:
+          return Path.Combine(PerspectivePath, $"{1 + playerPosition}j9.png");
       }
       return Path.Combine(FlatPath, $"{c}{tileNumber}.png");
     }


check for null dc

check for null dc

--- TCC.Core/Controls/ChatControls/ChatMessageControl.xaml.cs
+++ TCC.Core/Controls/ChatControls/ChatMessageControl.xaml.cs
@@ -26,12 +26,14 @@
         private void OnLoaded(object sender, RoutedEventArgs e)
         {
             //Console.WriteLine(_dc.RawMessage + " LOADED");
+            if (_dc == null) return;
             _dc.IsVisible = true;
         }

         private void OnUnloaded(object sender, RoutedEventArgs e)
         {
             //Console.WriteLine(_dc.RawMessage + " UNLOADED");
+            if(_dc == null) return;
             _dc.IsVisible = false;
             _dc = null;
         }


fixed a race condition in PopFailed

fixed a race condition in PopFailed

--- swag-sync/swag-sync/Database.cs
+++ swag-sync/swag-sync/Database.cs
@@ -47,10 +47,13 @@
         {
             files = new List<string>();

-            m_Command.CommandText = string.Format("SELECT path FROM failed LIMIT {0}", count);
-            using (IDataReader reader = m_Command.ExecuteReader())
+            lock (this)
             {
-                while(reader.Read()) files.Add(reader.GetString(0));
+                m_Command.CommandText = string.Format("SELECT path FROM failed LIMIT {0}", count);
+                using (IDataReader reader = m_Command.ExecuteReader())
+                {
+                    while (reader.Read()) files.Add(reader.GetString(0));
+                }
             }
         }


Changing from a simple var to a List<cases>

--- eFormCore/Persistance/SqlController.cs
+++ eFormCore/Persistance/SqlController.cs
@@ -781,7 +781,7 @@
             {
                 using (var db = GetContext())
                 {
-                    var matches = db.cases.Where(x => x.microting_uid == microtingUId && x.workflow_state != Constants.WorkflowStates.Removed && x.workflow_state != Constants.WorkflowStates.Retracted);
+                    List<cases> matches = db.cases.Where(x => x.microting_uid == microtingUId && x.workflow_state != Constants.WorkflowStates.Removed && x.workflow_state != Constants.WorkflowStates.Retracted).ToList();
                     if (matches.Count() > 1)
                     {
                         return false;


Corrected api call of New Game button

Corrected api call of New Game button

--- Source/Server/NetBotsHostProject/Views/Battle/Index.cshtml
+++ Source/Server/NetBotsHostProject/Views/Battle/Index.cshtml
@@ -26,5 +26,5 @@
 <script type="text/javascript" src="~/signalr/hubs"></script>
 <script type="text/javascript" src="~/Scripts/WarViewer.js"></script>
 <script type="text/javascript">
-        $("#new-game").on('click', function () { $.post("Home/NewGame"); });
+        $("#new-game").on('click', function () { $.post("Battle/NewGame"); });
 </script>


Only show Space Center for rockets/spaceplanes

--- ATC/MyClass.cs
+++ ATC/MyClass.cs
@@ -586,7 +586,7 @@
 						}
 				    } else if (section.type==ATCclass.Ground) {
 						if (!planning) {
-							if (station.tower != null) {
+							if (station.tower != null && ((plan.type != FlightPlanType.Orbital && plan.type != FlightPlanType.Suborbital) || FlightGlobals.ActiveVessel.situation != Vessel.Situations.PRELAUNCH)) {
 								if (GUILayout.Button("Tune "+station.tower.name+" on "+station.tower.frequency.ToString())) {
 									section = station.tower;
 									stationContacted = true;
@@ -601,7 +601,7 @@
 									}
 								}
 							}
-							if (station.space_center != null) {
+							if (station.space_center != null && plan.type != FlightPlanType.HighAltitude && plan.type != FlightPlanType.LowAltitude) {
 								if (GUILayout.Button("Tune "+station.space_center.name+" on "+station.space_center.frequency.ToString())) {
 									section = station.space_center;
 									stationContacted = true;


Revert "... And adding AbstractTag"

Revert "... And adding AbstractTag"

This reverts commit c5dfc077e35fb2f0b54eaa3516cf3a911cfbdbec.

--- AbstractTag.cs
+++ AbstractTag.cs
@@ -1,54 +0,0 @@
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-//
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-// Authors:
-//       Jan Rüegg <rggjan@gmail.com>
-//       Gabriel Walch <walchg@student.ethz.ch>
-//       Gerd Zellweger <mail@gerdzellweger.com>
-//
-
-using System;
-using Tomboy;
-
-namespace Tomboy.TaskManager
-{
-	public abstract class AbstractTag : DynamicNoteTag
-	{
-		public abstract void bind(AttributedTask task);
-
-		public AttributedTask AttachedTask{
-			get;
-			set;
-		}
-
-		public void bindDefault(AttributedTask task){
-			AttachedTask = task;
-
-			if (!Attributes.ContainsKey("Duedate"))
-				Attributes.Add ("Duedate", AttachedTask.DueDate.ToString ());
-			else
-				Attributes["Duedate"] = AttachedTask.DueDate.ToString();
-
-			if (!Attributes.ContainsKey("Priority"))
-				Attributes.Add ("Priority", AttachedTask.Priority.ToString ());
-			else
-				Attributes["Priority"] = AttachedTask.Priority.ToString ();
-		}
-	}
-}


Resolved #6

Resolved #6

--- src/Abp/Framework/Abp.Web/Web/Models/AbpErrorInfo.cs
+++ src/Abp/Framework/Abp.Web/Web/Models/AbpErrorInfo.cs
@@ -56,6 +56,17 @@
         /// <returns>Created <see cref="AbpErrorInfo"/> object</returns>
         public static AbpErrorInfo ForException(Exception exception)
         {
+            //TODO@Halil: I can find a better way...
+
+            if (exception is AggregateException && exception.InnerException != null)
+            {
+                var aggException = exception as AggregateException;
+                if (aggException.InnerException is UserFriendlyException || aggException.InnerException is AbpValidationException)
+                {
+                    exception = aggException.InnerException;
+                }
+            }
+
             if (exception is UserFriendlyException)
             {
                 var userFriendlyException = exception as UserFriendlyException;


Added listName to Uri path in List method.

--- LoveSeat/CouchDatabase.cs
+++ LoveSeat/CouchDatabase.cs
@@ -201,8 +201,8 @@
             return req.GetResponse().GetResponseString();
         }
         public IListResult List(string listName, string viewName, ViewOptions options,  string designDoc)
-        {
-            var uri = databaseBaseUri + "/_design/" + designDoc + "/_list/" + viewName + options.ToString();
+        {
+			var uri = databaseBaseUri + "/_design/" + designDoc + "/_list/" + listName + "/" + viewName + options.ToString();
             var req = GetRequest(uri);
             return new ListResult(req.GetRequest(), req.GetResponse());
         }
@@ -210,7 +210,7 @@
         public IListResult List(string listName, string viewName, ViewOptions options)
         {
             ThrowDesignDocException();
-            return List(listName, viewName,options, defaultDesignDoc);
+            return List(listName, viewName, options, defaultDesignDoc);
         }

         public void SetDefaultDesignDoc(string designDoc)


Fix for JsonHelper bug with converting to string.

--- Source/Sugar.Web/Json/JsonHelper.cs
+++ Source/Sugar.Web/Json/JsonHelper.cs
@@ -51,7 +51,7 @@
         /// <returns></returns>
         public static string ConvertJsonToString(dynamic json)
         {
-            return (string)json ?? string.Empty;
+            return json == null ? string.Empty : json.ToString();
         }

         /// <summary>


Enable all test kernels.

Enable all test kernels.

--- Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs
+++ Tests/Cosmos.TestRunner.Core/DefaultEngineConfiguration.cs
@@ -31,10 +31,10 @@
             //engine.StartBochsDebugGui = true;

             // Select kernels to be tested by adding them to the engine
-            //foreach (var xType in TestKernelSets.GetStableKernelTypes())
-            //{
-            //    engine.AddKernel(xType.Assembly.Location);
-            //}
+            foreach (var xType in TestKernelSets.GetStableKernelTypes())
+            {
+                engine.AddKernel(xType.Assembly.Location);
+            }

             //engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location);
             //engine.AddKernel(typeof(Cosmos.Compiler.Tests.Bcl.Kernel).Assembly.Location);


Convert RunSimulatedPrint to extension method

--- Tests/MatterControl.Tests/MatterControl/ToolChangeTests.cs
+++ Tests/MatterControl.Tests/MatterControl/ToolChangeTests.cs
@@ -46,7 +46,7 @@
 using MatterHackers.VectorMath;
 using NUnit.Framework;

-namespace MatterControl.Tests.MatterControl
+namespace MatterControl.Tests.MatterControl.ToolChanges
 {
 	public class ToolChangeTests
 	{
@@ -103,7 +103,7 @@
 				}
 			};

-			var sentLines = await RunSimulatedPrint(printer, inputLines);
+			var sentLines = await printer.RunSimulatedPrint(inputLines);
 			Assert.AreEqual(expected, sentLines);
 		}

@@ -134,7 +134,7 @@
 			// create a printer for dual extrusion printing
 			PrinterConfig printer = SetupToolChangeSettings();

-			var sentLines = await RunSimulatedPrint(printer, inputLines);
+			var sentLines = await printer.RunSimulatedPrint(inputLines);
 			Assert.AreEqual(expected, sentLines);
 		}

@@ -171,7 +171,7 @@
 			// create a printer for dual extrusion printing
 			PrinterConfig printer = SetupToolChangeSettings();

-			var sentLines = await RunSimulatedPrint(printer, inputLines);
+			var sentLines = await printer.RunSimulatedPrint(inputLines);
 			Assert.AreEqual(expected, sentLines);
 		}

@@ -219,7 +219,7 @@
 			// create a printer for dual extrusion printing
 			PrinterConfig printer = SetupToolChangeSettings();

-			var sentLines = await RunSimulatedPrint(printer, inputLines);
+			var sentLines = await printer.RunSimulatedPrint(inputLines);
 			Assert.AreEqual(expected, sentLines);
 		}

@@ -279,7 +279,7 @@

 			PrinterConfig printer = SetupToolChangeSettings();

-			var sentLines = await RunSimulatedPrint(printer, inputLines);
+			var sentLines = await printer.RunSimulatedPrint(inputLines);
 			Assert.AreEqual(expected, sentLines);
 		}

@@ -311,7 +311,7 @@
 				Assert.AreEqual(0, printer.Connection.GetTargetHotendTemperature(1));
 			};

-			await RunSimulatedPrint(printer, inputLines);
+			await printer.RunSimulatedPrint(inputLines);
 		}

 		[Test, Category("GCodeStream")]
@@ -341,7 +341,7 @@
 				Assert.AreEqual(0, printer.Connection.GetTargetHotendTemperature(0));
 			};

-			await RunSimulatedPrint(printer, inputLines);
+			await printer.RunSimulatedPrint(inputLines);
 		}

 		private static PrinterConfig SetupToolChangeSettings()
@@ -365,10 +365,14 @@

 			// set some data for T1
 			printer.Settings.Helpers.SetExtruderOffset(1, new Vector3(1, 2, 3));
+
 			return printer;
 		}
-
-		private static async Task<List<string>> RunSimulatedPrint(PrinterConfig printer, string[] inputGCode)
+	}
+
+	public static class ExtensionMethods
+	{
+		public static async Task<List<string>> RunSimulatedPrint(this PrinterConfig printer, string[] inputGCode)
 		{
 			// set up our serial port finding
 			FrostedSerialPortFactory.GetPlatformSerialPort = (_) =>


Added property callback factory method.

Added property callback factory method.

--- Utilities.Controls/Behaviors/AvalonEdit/BindableOptions.cs
+++ Utilities.Controls/Behaviors/AvalonEdit/BindableOptions.cs
@@ -61,13 +61,8 @@
 				typeof(bool),
 				typeof(BindableOptions),
 				new FrameworkPropertyMetadata(default(bool),
-					FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
-					OnEnableVirtualSpaceChanged));
-
-		private static void OnEnableVirtualSpaceChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
-		{
-			((BindableOptions)dependencyObject).AssociatedObject.Options.EnableVirtualSpace = (bool)e.NewValue;
-		}
+					FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
+					CreateCallback<bool>((options, value) => options.EnableVirtualSpace = value)));

 		/// <summary>
 		/// Gets/Sets whether copying without a selection copies the whole current line.
@@ -87,13 +82,8 @@
 				typeof(bool),
 				typeof(BindableOptions),
 				new FrameworkPropertyMetadata(default(bool),
-					FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
-					OnCutCopyWholeLineChanged));
-
-		private static void OnCutCopyWholeLineChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
-		{
-			((BindableOptions)dependencyObject).AssociatedObject.Options.CutCopyWholeLine = (bool)e.NewValue;
-		}
+					FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
+					CreateCallback<bool>((options, value) => options.CutCopyWholeLine = value)));

 		/// <summary>
 		/// Gets/Sets whether the user can scroll below the bottom of the document.
@@ -115,11 +105,11 @@
 				typeof(BindableOptions),
 				new FrameworkPropertyMetadata(default(bool),
 					FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault,
-					OnAllowScrollBelowDocumentChanged));
+					CreateCallback<bool>((options, value) => options.AllowScrollBelowDocument = value)));

-		private static void OnAllowScrollBelowDocumentChanged(DependencyObject dependencyObject, DependencyPropertyChangedEventArgs e)
+		private static PropertyChangedCallback CreateCallback<TValue>(Action<TextEditorOptions, TValue> update)
 		{
-			((BindableOptions)dependencyObject).AssociatedObject.Options.AllowScrollBelowDocument = (bool)e.NewValue;
+			return (dependencyObject, e) => update(((BindableOptions)dependencyObject).AssociatedObject.Options, (TValue)e.NewValue);
 		}

 		void TextEditor_OptionChanged(object sender, PropertyChangedEventArgs e)


Update LoadWalletViewModel.cs

Update LoadWalletViewModel.cs

--- WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
+++ WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -219,7 +219,7 @@

 			if (IsWalletOpened)
 			{
-				SetWarningMessage("There is already an open wallet. Restart the application to open another one.");
+				SetWarningMessage("There is already an open wallet. Restart the application in order to open a different one.");
 			}
 		}


Add PROTOTYPE comment

Add PROTOTYPE comment

--- src/Compilers/CSharp/Test/Emit/Emit/EndToEndTests.cs
+++ src/Compilers/CSharp/Test/Emit/Emit/EndToEndTests.cs
@@ -221,7 +221,7 @@
             }
         }

-        [ConditionalFact(typeof(WindowsOnly))]
+        [ConditionalFact(typeof(WindowsOnly), AlwaysSkip = "PROTOTYPE(local-function-attributes)")]
         public void NestedIfStatements()
         {
             int nestingLevel = (ExecutionConditionUtil.Architecture, ExecutionConditionUtil.Configuration) switch


[CBSE-5791] Fix socket collection thread safety

Regular .NET dictionary is not thread safe, and cannot safely be accessed by multiple threads.  Occasionally it will get accessed in an inconsistent (invalid) state.

--- src/Couchbase.Lite.Shared/Sync/WebSocketTransport.cs
+++ src/Couchbase.Lite.Shared/Sync/WebSocketTransport.cs
@@ -25,6 +25,7 @@
 using JetBrains.Annotations;

 using LiteCore.Interop;
+using System.Collections.Concurrent;

 namespace Couchbase.Lite.Sync
 {
@@ -35,7 +36,7 @@
         private const string Tag = nameof(WebSocketTransport);

         [NotNull]
-        private static readonly Dictionary<int, WebSocketWrapper> Sockets = new Dictionary<int, WebSocketWrapper>();
+        private static readonly ConcurrentDictionary<int, WebSocketWrapper> Sockets = new ConcurrentDictionary<int, WebSocketWrapper>();

         #endregion

@@ -81,7 +82,7 @@
         private static void DoDispose(C4Socket* socket)
         {
             var id = (int) socket->nativeHandle;
-            Sockets.Remove(id);
+            Sockets.TryRemove(id, out var tmp);
         }

         private static void DoError(C4Socket* socket, Exception e)
@@ -119,7 +120,7 @@
             var id = Interlocked.Increment(ref _NextID);
             socket->nativeHandle = (void*)id;
             var socketWrapper = new WebSocketWrapper(uri, socket, replicationOptions);
-            Sockets[id] = socketWrapper;
+            Sockets.AddOrUpdate(id, socketWrapper, (k, v) => socketWrapper);
             socketWrapper.Start();
         }


Rename trasnaction tests

Rename trasnaction tests

--- src/CypherTwo.Tests/TransactionalIntegrationTests.cs
+++ src/CypherTwo.Tests/TransactionalIntegrationTests.cs
@@ -8,7 +8,7 @@
 {
     [TestFixture]
     public class TransactionalIntegrationTests
-    {
+    {
         private static Random random = new Random((int)DateTime.Now.Ticks);

         private INeoClient neoClient;


IPrivateChannel should extend IChannel

IPrivateChannel should extend IChannel

--- src/Discord.Net/Entities/Channels/IPrivateChannel.cs
+++ src/Discord.Net/Entities/Channels/IPrivateChannel.cs
@@ -2,7 +2,7 @@

 namespace Discord
 {
-    public interface IPrivateChannel
+    public interface IPrivateChannel : IChannel
     {
         IReadOnlyCollection<IUser> Recipients { get; }
     }


Added additional logic for handling transactions with errors

--- src/EthereumJobs/Job/MonitoringCoinTransactionJob.cs
+++ src/EthereumJobs/Job/MonitoringCoinTransactionJob.cs
@@ -96,17 +96,36 @@
             {
                 if (coinTransaction != null && coinTransaction.ConfirmationLevel != 0)
                 {
-                    bool sentToRabbit = await SendCompletedCoinEvent(transaction.TransactionHash, transaction.OperationId, true, context, transaction);
-
-                    if (sentToRabbit)
+                    if (!coinTransaction.Error)
                     {
-                        await _log.WriteInfoAsync("CoinTransactionService", "Execute", "",
-                                   $"Put coin transaction {transaction.TransactionHash} to rabbit queue with confimation level {coinTransaction?.ConfirmationLevel ?? 0}");
+                        bool sentToRabbit = await SendCompletedCoinEvent(transaction.TransactionHash, transaction.OperationId, true, context, transaction);
+
+                        if (sentToRabbit)
+                        {
+                            await _log.WriteInfoAsync("CoinTransactionService", "Execute", "",
+                                       $"Put coin transaction {transaction.TransactionHash} to rabbit queue with confimation level {coinTransaction?.ConfirmationLevel ?? 0}");
+                        }
+                        else
+                        {
+                            await _log.WriteInfoAsync("CoinTransactionService", "Execute", "",
+                                $"Put coin transaction {transaction.TransactionHash} to monitoring queue with confimation level {coinTransaction?.ConfirmationLevel ?? 0}");
+                        }
                     }
                     else
                     {
-                        await _log.WriteInfoAsync("CoinTransactionService", "Execute", "",
-                            $"Put coin transaction {transaction.TransactionHash} to monitoring queue with confimation level {coinTransaction?.ConfirmationLevel ?? 0}");
+                        ICoinEvent coinEvent = await GetCoinEvent(transaction.TransactionHash, transaction.OperationId, true);
+                        await _slackNotifier.ErrorAsync($"EthereumCoreService: Transaction with hash {transaction.TransactionHash} has an Error!({coinEvent.CoinEventType})");
+                        if (coinEvent.CoinEventType == CoinEventType.CashoutStarted ||
+                            coinEvent.CoinEventType == CoinEventType.CashoutCompleted)
+                        {
+                            //Drop cashout operation;
+                            return;
+                        }
+                        else
+                        {
+                            await RepeatOperationTillWin(transaction);
+                            await _slackNotifier.ErrorAsync($"EthereumCoreService: Transaction with hash {transaction.TransactionHash} has an Error. RETRY!({coinEvent.CoinEventType})");
+                        }
                     }
                 }
                 else
@@ -136,7 +155,7 @@
             switch (coinEvent.CoinEventType)
             {
                 case CoinEventType.CashinStarted:
-                case CoinEventType.CashoutCompleted:
+                case CoinEventType.CashinCompleted:
                     await UpdateUserTransferWallet(coinEvent.FromAddress, coinEvent.ToAddress);

                     return;


Edited about page.

Edited about page.

--- src/EventCloud.Web/App/Main/views/about/about.cshtml
+++ src/EventCloud.Web/App/Main/views/about/about.cshtml
@@ -1,5 +1,12 @@

-
@string.Format(L("AboutFormat"), "ASP.NET Boilerplate")

-
@Html.Raw(L("About_AspNetBoilerplateDescription"))

-
@L("ForMoreInformation"): aspnetboilerplate.com.

+
About the Cloud Event

+

+        This is an example multi-tenant application built using ASP.NET Boilerplate framework.
+

+
Links:

+

+
Source code of this application: github.com/aspnetboilerplate/sample-eventcloud

+
ASP.NET Boilerplate official web site: aspnetboilerplate.com

+
Official forum: forum.aspnetboilerplate.com

+


git-svn-id: http://subversion.assembla.com/svn/gablarski/trunk@932 080cfd25-d5d9-4c59-82ea-70d02a200d8b

--- src/Gablarski.CoreAudio/CoreAudioPlaybackProvider.cs
+++ src/Gablarski.CoreAudio/CoreAudioPlaybackProvider.cs
@@ -44,7 +44,7 @@
 namespace Gablarski.CoreAudio
 {
 	public class CoreAudioPlaybackProvider
-		: IPlaybackProvider
+		: IAudioPlaybackProvider
 	{
 		public event EventHandler<SourceFinishedEventArgs> SourceFinished;


Basic body type processing

Basic body type processing

--- src/ITCC.HTTP.API.Documentation/Core/DocGenerator.cs
+++ src/ITCC.HTTP.API.Documentation/Core/DocGenerator.cs
@@ -9,6 +9,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using ITCC.HTTP.API.Attributes;
+using ITCC.HTTP.API.Documentation.Enums;
 using ITCC.HTTP.API.Documentation.Utils;
 using ITCC.HTTP.API.Enums;
 using ITCC.HTTP.API.Interfaces;
@@ -350,9 +351,43 @@
             _builder.AppendLine();
         }

+        private string GetCountDescription(BodyTypeInfo bodyTypeInfo)
+        {
+            switch (bodyTypeInfo.CountType)
+            {
+                case ObjectCountType.Single:
+                    return SingleObjectPattern;
+                case ObjectCountType.List:
+                    return ObjectListPattern;
+                case ObjectCountType.SingleOrList:
+                    return SingleObjectOrListPattern;
+                default:
+                    throw new ArgumentOutOfRangeException();
+            }
+        }
+
+        private void WriteBodyTypeInfo(BodyTypeInfo bodyTypeInfo)
+        {
+            var type = bodyTypeInfo.Type;
+            if (type == typeof(Empty))
+            {
+                _builder.AppendLine(EmptyBodyPattern);
+                return;
+            }
+
+            var countDescription = GetCountDescription(bodyTypeInfo);
+            _builder.AppendLine($"{countDescription} `{type.FullName}`");
+        }
+
         private void WriteTypeAttributeDescription(ITypeAttribute attribute)
         {
-
+            var bodyTypeInfos = attribute.GetTypes();
+
+            foreach (var bodyTypeInfo in bodyTypeInfos)
+            {
+                WriteBodyTypeInfo(bodyTypeInfo);
+                _builder.AppendLine();
+            }
         }

         private void WriteRequestProcessorRequestDescription(PropertyInfo info)


Use ArrayPool<T>

Use ArrayPool<T>

Use ArrayPool<T> to generate the access token instead of allocating an array.

--- src/LondonTravel.Site/Controllers/AlexaController.cs
+++ src/LondonTravel.Site/Controllers/AlexaController.cs
@@ -4,6 +4,7 @@
 namespace MartinCostello.LondonTravel.Site.Controllers
 {
     using System;
+    using System.Buffers;
     using System.Linq;
     using System.Security.Cryptography;
     using System.Threading.Tasks;
@@ -68,14 +69,21 @@
         /// </returns>
         public static string GenerateAccessToken()
         {
-            byte[] entropy = new byte[64];
-
-            using (var random = RandomNumberGenerator.Create())
-            {
+            const int TokenLength = 64;
+
+            byte[] entropy = ArrayPool<byte>.Shared.Rent(TokenLength);
+
+            try
+            {
+                using var random = RandomNumberGenerator.Create();
                 random.GetBytes(entropy);
-            }
-
-            return Convert.ToBase64String(entropy);
+
+                return Convert.ToBase64String(entropy, 0, TokenLength);
+            }
+            finally
+            {
+                ArrayPool<byte>.Shared.Return(entropy, clearArray: true);
+            }
         }

         /// <summary>


modified:   src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs

--- src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs
+++ src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs
@@ -72,10 +72,12 @@

 		private UploadedFile uploaded_file;
 		private List<byte> form_data = new List<byte> ();
+
+		private char[] quotation_mark = {'\"'};

 		public HttpMultiPartFormDataHandler (string boundary, Encoding encoding, IUploadedFileCreator file_creator)
 		{
-			this.boundary = "--" + boundary.TrimStart("\"".ToCharArray()).TrimEnd("\"".ToCharArray());
+			this.boundary = "--" + boundary.TrimStart(quotation_mark).TrimEnd(quotation_mark);
 			this.encoding = encoding;
 			this.file_creator = file_creator;


Edit key size checks

Edit key size checks

--- Src/Report.cs
+++ Src/Report.cs
@@ -684,6 +684,12 @@
 		}
         w.WriteLine();
 		w.WriteLine("=========================================");
+        if(minDHSize < 2048 && minDHSize > 0)
+        {
+            w.WriteLine("DH size is {0}", minDHSize);
+            w.WriteLine("DH should be 2048 or above.");
+
+        }
 		if (ssl2Chain != null) {
             if (checkKeySize(ssl2Chain,0))
             {
@@ -719,7 +725,11 @@

         if (xc == null)
             return true;
-        if (xc.KeySize < 2048)
+        else if (xc.KeySize < 2048 && xc.KeyType.Contains("RSA"))
+            return true;
+        else if (xc.KeySize < 1024 && xc.KeyType.Contains("DSA"))
+            return true;
+        else if (xc.KeySize < 256)
             return true;

         return false;
@@ -736,9 +746,25 @@
 		} else {
             if (xc.KeySize < 2048)
             {
-                w.WriteLine("thumprint:  {0}", xchain.ThumbprintsRev[num]);
-                w.WriteLine("key size is Invalid:   {0}", xc.KeySize);
-                w.WriteLine("Key size should be 2048 or larger");
+                if(xc.KeyType.Contains("EC") && xc.KeySize < 256)
+                {
+                    w.WriteLine("Key size should be 256 or larger for {0}", xc.KeyType);
+                }
+                else if(xc.KeyType.Contains("DSA") && xc.KeySize < 1024)
+                {
+                    w.WriteLine("Key size should be 1024 or larger for {0}", xc.KeyType);
+                }
+                else if (xc.KeyType.Contains("RSA"))
+                {
+                    w.WriteLine("Key size should be 2048 or larger for {0}", xc.KeyType);
+                }
+                else
+                {
+                    return;
+                }
+
+                w.WriteLine(" thumprint:  {0}", xchain.ThumbprintsRev[num]);
+                w.WriteLine("Current key size:   {0}", xc.KeySize);
             }
 		}
 	}


NonNullable primitive types from XSD

NonNullable primitive types from XSD

--- Src/Main/MetaDslx.Soal/XsdReader.cs
+++ Src/Main/MetaDslx.Soal/XsdReader.cs
@@ -474,16 +474,22 @@
                     nullable.InnerType = type;
                     type = nullable;
                 }
-            }
-            else
-            {
-                if (!nillable)
+                else if (!nillable && (type == SoalInstance.Object || type == SoalInstance.String))
                 {
                     NonNullableType nonNull = SoalFactory.Instance.CreateNonNullableType();
                     nonNull.InnerType = type;
                     type = nonNull;
                 }
             }
+            else
+            {
+                if (!nillable)
+                {
+                    NonNullableType nonNull = SoalFactory.Instance.CreateNonNullableType();
+                    nonNull.InnerType = type;
+                    type = nonNull;
+                }
+            }
             prop.Type = type;
             prop.Parent = st;
             return prop;


Fix item removal.

Fix item removal.

--- SteamTrade/TradeOffer/TradeOffer.cs
+++ SteamTrade/TradeOffer/TradeOffer.cs
@@ -312,7 +312,7 @@
             {
                 var asset = new TradeStatusUser.TradeAsset();
                 asset.CreateItemAsset(appId, contextId, assetId, amount);
-                return ShouldUpdate(MyOfferedItems.RemoveItem(asset));
+                return ShouldUpdate(TheirOfferedItems.RemoveItem(asset));
             }

             public bool RemoveMyCurrencyItem(int appId, long contextId, long currencyId, long amount)


fix contact person bug

fix contact person bug

--- TESS/Views/Appointment/Index.cshtml
+++ TESS/Views/Appointment/Index.cshtml
@@ -172,7 +172,6 @@
     }

     var updateContactPersons = function (customer) {
-        console.log("gogo");
         $.ajax({
             "url": "/Appointment/GetContacts/",
             "type": "POST",
@@ -193,6 +192,8 @@
                     $contact.val(json[0].Contact_person);
                 else
                     $contact.val("null");
+                if (selectedApptContact != null)
+                    $contact.val(selectedApptContact);
                 $contact.selectpicker("refresh");
             }
         });
@@ -256,6 +257,7 @@


Missing client_id in client cert validator

--- source/Core/Validation/X509CertificateClientValidator.cs
+++ source/Core/Validation/X509CertificateClientValidator.cs
@@ -71,6 +71,7 @@
             {
                 credential.IsPresent = true;
                 credential.Credential = cert;
+                credential.ClientId = id;

                 return credential;
             }


Fix for issue #52

Fix for issue #52

Issue #52: "Saving with title as name overwrites files when multiple images have same title".

When a file is already present in the directory, we add now a counter so that the new file name is unique.

--- source/FloydPink.Flickr.Downloadr.Logic/DownloadLogic.cs
+++ source/FloydPink.Flickr.Downloadr.Logic/DownloadLogic.cs
@@ -49,8 +49,10 @@

       var imageDirectory = CreateDownloadFolder(preferences.DownloadLocation, photoset);

+      var curCount = 0;
       foreach (var photo in photosList)
       {
+        curCount++;
         var photoUrl = photo.OriginalUrl;
         var photoExtension = "jpg";
         switch (preferences.DownloadSize)
@@ -77,6 +79,12 @@
         var photoName = preferences.TitleAsFilename ? GetSafeFilename(photo.Title) : photo.Id;
         var targetFileName = Path.Combine(imageDirectory.FullName,
           string.Format("{0}.{1}", photoName, photoExtension));
+
+        if (File.Exists(targetFileName)) {
+          targetFileName = Path.Combine(imageDirectory.FullName,
+          string.Format("{0}-{2}.{1}", photoName, photoExtension, curCount));
+        }
+
         WriteMetaDataFile(photoWithPreferredTags, targetFileName, preferences);

         var request = WebRequest.Create(photoUrl);


Coins is never used

Coins is never used

--- Skylight/In.cs
+++ Skylight/In.cs
@@ -937,8 +937,7 @@
                 verticalSpeed = m.GetDouble(4);

             int id = m.GetInteger(0),
-                coins = m.GetInteger(9),
-                // never used.
+
                 horizontalModifier = m.GetInteger(5),
                 verticalModifier = m.GetInteger(6),
                 horizontalDirection = m.GetInteger(7),


propagate request to response

propagate request to response

--- src/ModernHttpClient/Android/OkHttpNetworkHandler.cs
+++ src/ModernHttpClient/Android/OkHttpNetworkHandler.cs
@@ -115,6 +115,7 @@
             cancellationToken.ThrowIfCancellationRequested();

             var ret = new HttpResponseMessage((HttpStatusCode)resp.Code());
+            ret.RequestMessage = request;
             ret.ReasonPhrase = resp.Message();
             if (respBody != null) {
                 var content = new ProgressStreamContent(respBody.ByteStream(), cancellationToken);


Mark a property getter as readonly.

Mark a property getter as readonly.

--- src/MySqlConnector/MySql.Data.Types/MySqlDateTime.cs
+++ src/MySqlConnector/MySql.Data.Types/MySqlDateTime.cs
@@ -43,7 +43,7 @@

 		public int Millisecond
 		{
-			get => Microsecond / 1000;
+			readonly get => Microsecond / 1000;
 			set => Microsecond = value * 1000;
 		}


:sparkles: switch to naming & reflection for mvc matchers to implicitly support webapi too

--- src/NExpect.Matchers.AspNetMvc/ControllerMatchers.cs
+++ src/NExpect.Matchers.AspNetMvc/ControllerMatchers.cs
@@ -1,7 +1,10 @@
 using System;
+using System.Collections.Generic;
 using System.Linq;
 using System.Net.Http;
+using System.Web;
 using System.Web.Mvc;
+using Imported.PeanutButter.Utils;
 using NExpect.Implementations;
 using NExpect.Interfaces;
 using NExpect.MatcherLogic;
@@ -85,8 +88,13 @@
                         );
                     }

-                    var attribs = method.GetCustomAttributes(false).OfType<RouteAttribute>();
-                    var passed = attribs.Any(a => a.Template == expected);
+                    // cater for RouteAttribute from System.Web.Mvc and System.Web.Http (WebApi core)
+                    var attribs = method.GetCustomAttributes(false)
+                        .Where(a => a.GetType().Name == nameof(RouteAttribute))
+                        .ToArray();
+                    var passed = attribs.Any(
+                        a => a.GetOrDefault<string>(nameof(RouteAttribute.Template), null) == expected
+                    );
                     return new MatcherResult(
                         passed,
                         () => $"Expected {actual}.{method} {passed.AsNot()}to have route '{expected}'"
@@ -103,6 +111,18 @@
             internal string Member { get; set; }
             internal IHave<Type> Continuation { get; set; }

+            private static readonly HashSet<string> HttpVerbAttributeNames = new(
+                new[]
+                {
+                    nameof(HttpGetAttribute),
+                    nameof(HttpPutAttribute),
+                    nameof(HttpPostAttribute),
+                    nameof(HttpDeleteAttribute),
+                    nameof(HttpHeadAttribute),
+                    nameof(HttpOptionsAttribute)
+                }
+            );
+
             /// <summary>
             /// Asserts that the controller method being operated on supports
             /// the desired HttpMethod
@@ -114,20 +134,21 @@
                 Continuation.AddMatcher(
                     controllerType =>
                     {
+                        // support MVC and WebApi attributes via name & reflection
                         var supportedMethods = controllerType.GetMethod(Member)
                             ?.GetCustomAttributes(false)
-                            .Select(attrib => attrib as ActionMethodSelectorAttribute)
-                            .Where(a => a != null)
+                            .Where(a => HttpVerbAttributeNames.Contains(a.GetType().Name))
                             .Select(a =>
                             {
-                                return a switch
+                                var typeName = a.GetType().Name;
+                                return typeName switch
                                 {
-                                    HttpGetAttribute => HttpMethod.Get,
-                                    HttpPutAttribute => HttpMethod.Put,
-                                    HttpPostAttribute => HttpMethod.Post,
-                                    HttpDeleteAttribute => HttpMethod.Delete,
-                                    HttpHeadAttribute => HttpMethod.Head,
-                                    HttpOptionsAttribute => HttpMethod.Options,
+                                    nameof(HttpGetAttribute) => HttpMethod.Get,
+                                    nameof(HttpPutAttribute) => HttpMethod.Put,
+                                    nameof(HttpPostAttribute) => HttpMethod.Post,
+                                    nameof(HttpDeleteAttribute) => HttpMethod.Delete,
+                                    nameof(HttpHeadAttribute) => HttpMethod.Head,
+                                    nameof(HttpOptionsAttribute) => HttpMethod.Options,
                                     _ => null
                                 };
                             })


Better handling of auto disconnection on the UI side.

--- src/Neptunium/Core/Media/NepAppMediaPlayerManager.cs
+++ src/Neptunium/Core/Media/NepAppMediaPlayerManager.cs
@@ -221,29 +221,15 @@
         {
             var stream = CurrentStream;
             ShutdownPreviousPlaybackSession();
-            if (!NepApp.Network.IsConnected)
-            {
-                if (!await App.GetIfPrimaryWindowVisibleAsync())
-                {
-                    NepApp.UI.Notifier.ShowErrorToastNotification(stream, "Uh-Oh!", "Network connection lost!");
-                }
-                else
-                {
-                    await NepApp.UI.ShowErrorDialogAsync("Uh-Oh!", "Network connection lost!");
-                }
-            }
-            else
-            {
-                if (!await App.GetIfPrimaryWindowVisibleAsync())
-                {
-                    NepApp.UI.Notifier.ShowErrorToastNotification(stream, "Uh-Oh!", "An unknown error occurred.");
-                }
-                else
-                {
-                    await NepApp.UI.ShowErrorDialogAsync("Uh-Oh!", "An unknown error occurred.");
-                }
-            }
-        }
+
+            await NepApp.UI.ShowErrorDialogAsync("Uh-Oh!", !NepApp.Network.IsConnected ? "Network connection lost!" : "An unknown error occurred.");
+
+            if (!await App.GetIfPrimaryWindowVisibleAsync())
+            {
+                NepApp.UI.Notifier.ShowErrorToastNotification(stream, "Uh-Oh!", !NepApp.Network.IsConnected ? "Network connection lost!" : "An unknown error occurred.");
+            }
+        }
+

         private void PlaybackSession_PlaybackStateChanged(MediaPlaybackSession sender, object args)
         {


Extend the test.

Extend the test.

--- src/ObjectLayoutInspector.Tests/ExcessivePaddings.cs
+++ src/ObjectLayoutInspector.Tests/ExcessivePaddings.cs
@@ -9,10 +9,7 @@
 #if UseAlias
     using ByteWrapper = System.Byte;
 #else
-    internal struct ByteWrapper
-    {
-        public byte b;
-    }
+
 #endif

     [TestFixture]
@@ -33,7 +30,12 @@
             Assert.That(TypeLayout.GetLayout<StructMultipleByteWrappers>().Size, Is.EqualTo(3));
         }

-        [StructLayout(LayoutKind.Auto)]
+        internal struct ByteWrapper
+        {
+            public byte b;
+        }
+
+        [StructLayout(LayoutKind.Sequential)]
         internal class StructWithAutomaticLayout
         {
             public ByteWrapper bw1;
@@ -41,12 +43,19 @@
             public ByteWrapper bw3;
         }

+        internal struct Slot<T>
+        {
+            internal int hashCode;      // Lower 31 bits of hash code, -1 if unused
+            internal T value;
+            internal int next;          // Index of next entry, -1 if last
+        }
+
         [Test]
         public void PrintClassMultipleByteWrappersLayout()
         {
             // In this case every field aligned on the pointer boundaries
-            TypeLayout.PrintLayout<StructWithAutomaticLayout>();
-            Assert.That(TypeLayout.GetLayout<StructWithAutomaticLayout>().Size, Is.EqualTo(24));
+            TypeLayout.PrintLayout<Slot<long>>();
+            //Assert.That(TypeLayout.GetLayout<Slot>().Size, Is.EqualTo(24));
         }
     }
 }


Update WorkContextImplementation.cs

Update WorkContextImplementation.cs

--- src/Orchard/Environment/WorkContextImplementation.cs
+++ src/Orchard/Environment/WorkContextImplementation.cs
@@ -8,11 +8,11 @@
     class WorkContextImplementation : WorkContext {
         readonly IComponentContext _componentContext;
         readonly ConcurrentDictionary<string, Func<object>> _stateResolvers = new ConcurrentDictionary<string, Func<object>>();
-        readonly IEnumerable<IWorkContextStateProvider> _workContextStateProviders;
+        readonly IEnumerable<Lazy<IWorkContextStateProvider>> _workContextStateProviders;

         public WorkContextImplementation(IComponentContext componentContext) {
             _componentContext = componentContext;
-            _workContextStateProviders = componentContext.Resolve<IEnumerable<IWorkContextStateProvider>>();
+            _workContextStateProviders = componentContext.Resolve<IEnumerable<Lazy<IWorkContextStateProvider>>>();
         }

         public override T Resolve<T>() {
@@ -29,7 +29,7 @@
         }

         Func<object> FindResolverForState<T>(string name) {
-            var resolver = _workContextStateProviders.Select(wcsp => wcsp.Get<T>(name)).FirstOrDefault(value => !Equals(value, default(T)));
+            var resolver = _workContextStateProviders.Select(wcsp => wcsp.Value.Get<T>(name)).FirstOrDefault(value => !Equals(value, default(T)));

             if (resolver == null) {
                 return () => default(T);
@@ -42,4 +42,4 @@
             _stateResolvers[name] = () => value;
         }
     }
-}+}


adding some exception handling around consolidating tables

--- TeslaSQL/Agents/ShardCoordinator.cs
+++ TeslaSQL/Agents/ShardCoordinator.cs
@@ -110,7 +110,16 @@
                 PublishSchemaChanges(batch);
                 sourceDataUtils.WriteBitWise(config.relayDB, batch.CTID, Convert.ToInt32(SyncBitWise.PublishSchemaChanges), AgentType.ShardCoordinator);
             }
-            ConsolidateTables(batch);
+            try {
+                ConsolidateTables(batch);
+            } catch (AggregateException e) {
+                string message = "Caught " + e.InnerExceptions.Count + " exceptions merging tables.";
+                foreach (var s in e.InnerExceptions) {
+                    message += s.Message + '\n';
+                    message += s.StackTrace;
+                }
+                logger.Log(message, LogLevel.Error);
+            }
             ConsolidateInfoTables(batch);
         }


Delete Program.cs

Delete Program.cs

--- Program.cs
+++ Program.cs
@@ -1,276 +0,0 @@
-using System;
-using System.IO;
-using System.Text;
-using System.Diagnostics;
-
-namespace Test
-{
-    class Heem
-    {
-        static void Main(string[] args)
-        {
-            Mods.getArgs(args);
-        }
-    }
-    class interpMoon
-    {
-        public static void readFiles(string dirr)
-        {
-            string[] filse = Mods.getFiles(dirr);
-            foreach (string cfils in filse)
-            {
-                if (cfils.EndsWith(".moon"))
-                {
-                    using (Stream strrR = File.OpenRead(cfils))
-                    {
-                        using (StreamReader strRe = new StreamReader(strrR))
-                        {
-                            string wholeFil = strRe.ReadToEnd();
-                            int indxx = wholeFil.IndexOf("--&!") + 4;
-                            int indxxx = wholeFil.IndexOf("--!&");
-                            int posi = indxxx - indxx;
-                            string csmode = wholeFil.Substring(indxx, posi);
-                            csmode = csmode.Replace("--", "");
-                            wholeFil.Remove(indxx, posi);
-                            using (Stream prjcs = File.Create(dirr + "/" + "output.cs"))
-                            {
-                                using (StreamWriter strRetwo = new StreamWriter(prjcs))
-                                {
-                                    strRetwo.Write(csmode);
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-    }
-    class Mods
-    {
-        public static bool ifExists(string[] filserch, string loktype)
-        {
-            foreach (string fillo in filserch)
-            {
-                if (fillo.EndsWith(loktype))
-                {
-                    return true;
-                }
-            }
-            return false;
-        }
-        public static string getCrntDir()
-        {
-            return Directory.GetCurrentDirectory();
-        }
-        public static string[] getFiles(string strr)
-        {
-            return Directory.GetFiles(strr);
-        }
-        public static string[] getProject(string[] filess)
-        {
-            int count = 0;
-            string[] strB = new string[filess.Length];
-            foreach (string fll in filess)
-            {
-                if (fll.EndsWith(".moon"))
-                {
-                    strB[count] = fll + " |MN";
-                    count++;
-                }
-                else if (fll.EndsWith(".cs"))
-                {
-                    strB[count] = fll + " |C#";
-                    count++;
-                }
-                else if (fll.EndsWith(".c"))
-                {
-                    strB[count] = fll + " |C";
-                    count++;
-                }
-                else if (fll.EndsWith(".csproj"))
-                {
-                    strB[count] = fll + " |C#P";
-                    count++;
-                }
-                else if (fll.EndsWith(".lua"))
-                {
-                    strB[count] = fll + " |L";
-                    count++;
-                }
-            }
-            return strB;
-        }
-        public static void getArgs(string[] argos)
-        {
-            foreach (string argg in argos)
-            {
-                string cdirr = getCrntDir();
-                string[] dfils = getFiles(cdirr);
-                string[] pfils = getProject(dfils);
-                if (argg == "-b=moon")
-                {
-                    buildFiles(dfils, false, false, false);
-                }
-                if (argg == "-b")
-                {
-                    makeMnxxProj(dfils);
-                    buildFiles(dfils, false, false, true);
-                }
-                if (argg == "-b=msbuild")
-                {
-                    makeMnxxProj(dfils);
-                    buildFiles(dfils, true, false, true);
-                }
-                if (argg == "-c=moon")
-                {
-                    interpMoon.readFiles(cdirr);
-                }
-                if (argg == "-c")
-                {
-                    buildFiles(dfils, false, true, false);
-                }
-                if (argg == "-h")
-                {
-                    string[] helpme = new string[10];
-                    helpme[0] = "-b | builds moonscript, and dotnet files found in directory. Does not include binaries from moonscript/lua. For this use, -c";
-                    helpme[1] = "-b=msbuild | builds moonscript, and dotnet files (WITH MSBUILD) found in directory. Does not include binaries from moonscript/lua. For this use, -c";
-                    helpme[2] = "-c=moon | diffrent from -c, this pre-parses moonscript files to build arbitrary C# code to be used with moonscript. See examples in docs. Does not do any thing else.";
-                    helpme[3] = "-c | finds all built moonsript files and turns them into standalone executables in C. To build moonscript files, use -b=moon(only .moon are built) or -b(all files are built)";
-                    helpme[4] = "-b=moon | only builds moonscript files in directory.";
-                    helpme[5] = "-n <name> | creates a new c#project for moonscript++ to use for arbitrary C# code inside .moon files. Essential for this function to work.";
-                    foreach (string stringo in helpme)
-                    {
-                        Console.WriteLine(stringo);
-                    }
-                }
-                try
-                {
-                    if (argg == "-n")
-                    {
-                        dotnett.newConsl(argos[1]);
-                    }
-                }
-                catch (System.IndexOutOfRangeException)
-                {
-                    Console.WriteLine("Error, no name entered.");
-                }
-            }
-        }
-        public static void buildFiles(string[] filos, bool builddType, bool tocee, bool buildnet)
-        {
-            foreach (string filo in filos)
-            {
-                if (filo.EndsWith(".moon"))
-                {
-                    if (tocee)
-                    {
-                        moonscr.buildMoonn(filo, true);
-                    }
-                    else
-                    {
-                        moonscr.buildMoonn(filo, false);
-                    }
-
-                }
-                if (filo.EndsWith(".csproj") && buildnet)
-                {
-                    dotnett.restoree(filo);
-                    if (builddType)
-                    {
-                        dotnett.msbuildd(filo);
-                    }
-                    else
-                    {
-                        dotnett.dnetbuildd(filo);
-                    }
-                }
-            }
-        }
-        public static void dueProcess(string namee, string argsss)
-        {
-            ProcessStartInfo psi = new ProcessStartInfo() { FileName = namee, Arguments = argsss, };
-            Process procy = Process.Start(psi);
-            procy.WaitForExit();
-        }
-        public static void makeMnxxProj(string[] filus)
-        {
-            string cdirr = getCrntDir();
-            string[] pfils = getProject(filus);
-            Stream fss = File.OpenWrite(cdirr + "/proj.moonxx");
-            using (StreamWriter srw = new StreamWriter(fss))
-            {
-                foreach (string cstr in pfils)
-                {
-                    srw.WriteLine(cstr);
-                }
-            }
-        }
-    }
-    class dotnett
-    {
-        public static void newConsl(string namee)
-        {
-            Mods.dueProcess("dotnet", "new console -n " + namee + " -o " + Mods.getCrntDir());
-        }
-        public static void restoree(string filooo)
-        {
-            Mods.dueProcess("dotnet", "restore " + filooo);
-        }
-        public static void msbuildd(string filooo)
-        {
-            Console.WriteLine("Building " + filooo + " with msbuild | .net version");
-            Mods.dueProcess("dotnet", "--version");
-            Mods.dueProcess("dotnet", "msbuild " + filooo);
-        }
-        public static void dnetbuildd(string filooo)
-        {
-            Console.WriteLine("Building " + filooo + " with standard build | .net version");
-            Mods.dueProcess("dotnet", "--version");
-            Mods.dueProcess("dotnet", "build " + filooo);
-        }
-    }
-    class moonscr
-    {
-        public static void buildMoonn(string filooo, bool tocee)
-        {
-            Console.WriteLine("Building " + filooo + " with moonc version ");
-            Mods.dueProcess("moonc", "-v");
-            Mods.dueProcess("moonc", filooo);
-            if (tocee)
-            {
-                if (Mods.ifExists(Mods.getFiles(Mods.getCrntDir()), ".lua"))
-                {
-                    foreach (string nfs in Mods.getFiles(Mods.getCrntDir()))
-                    {
-                        if (nfs.EndsWith(".lua"))
-                        {
-                            moonscr.luaaStatic(nfs, Mods.getFiles(Mods.getCrntDir()), "/home/lynxishdevelop/ll_53/liblua.a", "-I/home/lynxishdevelop/ll_53");
-                        }
-                    }
-                }
-            }
-        }
-        public static void luaaStatic(string filoo, string[] ppfils, string wliblua, string wluadir)
-        {
-            //TODO: MAKE INSTALLER FOR LUA5.3 SO THAT IT HAS GENERAL LOCATION FOR LIBS ON ALL MACHINES
-            string libdirr = wliblua;
-            string luadirr = wluadir;
-            Mods.dueProcess("luastatic", filoo + " " + libdirr + " " + luadirr);
-        }
-        public static string[] readPfils(string[] pfils, string cdirrr)
-        {
-            string[] retStrArr = new string[pfils.Length];
-            int count = 0;
-            Stream strM = File.OpenRead(cdirrr + "/proj.moonxx");
-            using (StreamReader strR = new StreamReader(strM))
-            {
-                while (strR.Peek() >= 0)
-                {
-                    retStrArr[count] = strR.ReadLine();
-                    count++;
-                }
-            }
-            return retStrArr;
-        }
-    }
-}


Null error thought to be sending the sending the same tweet multiple times. Fixed.

--- Program.cs
+++ Program.cs
@@ -29,7 +29,7 @@
         private static void MeasureSpeed()
         {
             const string tempfile = "tempfile.tmp";
-            const double threshold = 200;
+            const double threshold = 100;

             Console.WriteLine("Downloading file...");
             Console.WriteLine();
@@ -88,13 +88,11 @@

             Auth.SetUserCredentials(consumerKey, consumerSecretKey, accessToken, accessSecretToken);

-            //var tweetMessage = $"@virginmedia My current download speed is {speed}Mbps but I'm paying for 200Mbps!";
-
-            var tweetMessage = "Test tweet";
+            var tweetMessage = $"@virginmedia My current download speed is {speed}Mbps but I'm paying for 200Mbps!";

             ExceptionHandler.SwallowWebExceptions = false;

-            var tweet = Tweet.PublishTweet(tweetMessage)
+            var tweet = Tweet.PublishTweet(tweetMessage);

             return tweet.IsTweetPublished;
         }


fix a mistake

fix a mistake

--- Program.cs
+++ Program.cs
@@ -163,6 +163,7 @@
                         break;
                     case "dc":
                     case "disconnect":
+                        var isRemoved = false;
                         foreach (var item in liveRoomList)
                         {
                             if (item.URLID == result[1])
@@ -171,10 +172,12 @@
                                 liveRoomList.Remove(item);
                                 dmRecord.Record("Remove [" + result[1] + "] from list");
                                 ConsoleAssistance.WriteLine("已移除直播间", ConsoleColor.Magenta);
+                                isRemoved = true;
                                 break;
                             }
                         }
-                        ConsoleAssistance.WriteLine("没有匹配的直播间可以移除", ConsoleColor.Magenta);
+                        if (!isRemoved)
+                            ConsoleAssistance.WriteLine("没有匹配的直播间可以移除", ConsoleColor.Magenta);
                         break;
                     case "exit":
                         foreach (var item in liveRoomList)


Fix directory check, closes #1

Fix directory check, closes #1

Thanks to Mark Sheppard for reporting the issue!

--- Program.cs
+++ Program.cs
@@ -20,7 +20,7 @@
 			if (!File.Exists (DllFile)) {
 				Error ("Assembly file not found: " + DllFile);
 			}
-			if (!Directory.Exists (OutPath)) {
+			if (Directory.Exists (OutPath)) {
 				Console.Out.WriteLine ("WARNING: Output path already exists and will be overwritten: " + OutPath);
 			} else {
 				Directory.CreateDirectory (OutPath);


Improve benchmark display.

Improve benchmark display.

--- ThriftSharp.Benchmarking/Program.cs
+++ ThriftSharp.Benchmarking/Program.cs
@@ -11,10 +11,12 @@
     {
         public static void Main( string[] args )
         {
-            foreach ( var type in Assembly.GetExecutingAssembly().GetTypes().Where( t => t.Namespace == "ThriftSharp.Benchmarking.Models" ) )
+            foreach ( var type in Assembly.GetExecutingAssembly()
+                                          .GetTypes()
+                                          .Where( t => t.Namespace == "ThriftSharp.Benchmarking.Models" && t.IsPublic )
+                                          .OrderBy( t => t.Name ) )
             {
-                var result = Benchmarker.Benchmark( type, 10000, 10 );
-                Console.WriteLine( result );
+                Console.WriteLine( Benchmarker.Benchmark( type, 10000, 10 ) );
             }
         }
     }


rev. 9276b7f09995 was missing something

rev. 9276b7f09995 was missing something

--- MarkdownSharp/Markdown.cs
+++ MarkdownSharp/Markdown.cs
@@ -319,7 +319,7 @@

             string backslashPattern = "";

-            foreach (char c in @"\`*_{}[]()>#+-.!")
+            foreach (char c in @"\`*_{}[]()>#+-.!/")
             {
                 string key = c.ToString();
                 string hash = GetHashKey(key, isHtmlBlock: false);


[CHANGED] add gizmos in editor to see the path

--- TowerDefense/Assets/Scripts/Node.cs
+++ TowerDefense/Assets/Scripts/Node.cs
@@ -225,4 +225,13 @@
     {
         rend.material.color = baseColor;
     }
+
+    private void OnDrawGizmos()
+    {
+        if(!isActive)
+        {
+            Vector3 pos = new Vector3(transform.position.x, transform.position.y + 1.5f, transform.position.z);
+            Gizmos.DrawSphere(pos, 1);
+        }
+    }
 }


add a function to give sampling a power relationship to edge detection

- increases sampling at edges for better quality images

--- Trigrad/DataTypes/FrequencyTable.cs
+++ Trigrad/DataTypes/FrequencyTable.cs
@@ -13,6 +13,14 @@
         public FrequencyTable(PixelMap pixelmap)
         {
             Table = sobelFilter(pixelmap);
+
+            for (int x = 0; x < Table.GetLength(0); x++)
+            {
+                for (int y = 0; y < Table.GetLength(1); y++)
+                {
+                    Table[x, y] = Math.Pow(Table[x,y],1.7);
+                }
+            }
         }

         /// <summary> The sum of the FrequencyTable. </summary>


– updated the AssemblyInfo

– updated the AssemblyInfo

--- TruckApp/Properties/AssemblyInfo.cs
+++ TruckApp/Properties/AssemblyInfo.cs
@@ -5,11 +5,11 @@
 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyTitle("TruckersMP App")]
+[assembly: AssemblyTitle("TruckApp – TruckersMP Info")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("TruckersMP App")]
+[assembly: AssemblyProduct("")]
 [assembly: AssemblyCopyright("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
@@ -24,6 +24,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.10.*")]
+[assembly: AssemblyFileVersion("0.10.*")]
 [assembly: ComVisible(false)]


-added more target restrictions

-added more target restrictions

--- SpellParser.cs
+++ SpellParser.cs
@@ -349,6 +349,16 @@
         At_Least_8_Pets_On_Hatelist = 228,
         At_Least_9_Pets_On_Hatelist = 229,
         At_Least_10_Pets_On_Hatelist = 230,
+        At_Least_11_Pets_On_Hatelist = 231,
+        At_Least_12_Pets_On_Hatelist = 232,
+        At_Least_13_Pets_On_Hatelist = 233,
+        At_Least_14_Pets_On_Hatelist = 234,
+        At_Least_15_Pets_On_Hatelist = 235,
+        At_Least_16_Pets_On_Hatelist = 236,
+        At_Least_17_Pets_On_Hatelist = 237,
+        At_Least_18_Pets_On_Hatelist = 238,
+        At_Least_19_Pets_On_Hatelist = 239,
+        At_Least_20_Pets_On_Hatelist = 240,
         HP_Less_Than_35_Percent = 250, // duple of 507
         Chain_Plate_Classes = 304,
         HP_Between_15_and_25_Percent = 399,


Bug fix for missing recursion

Bug fix for missing recursion

--- src/AD.OpenXml/Elements/ChangeUnderlineToTableCaption.cs
+++ src/AD.OpenXml/Elements/ChangeUnderlineToTableCaption.cs
@@ -26,7 +26,26 @@
         /// <exception cref="System.ArgumentNullException"/>
         [NotNull]
         public static XElement ChangeUnderlineToTableCaption([NotNull] this XElement element)
-            => new XElement(element.Name, element.Attributes(), element.Nodes().Select(Triage));
+        {
+            XElement[] paragraphs =
+                element.Descendants(W + "u")
+                       .Select(x => x.Parent)
+                       .Where(x => x?.Name == W + "rPr")
+                       .Select(x => x.Parent)
+                       .Where(x => x?.Name == W + "r")
+                       .Select(x => x.Parent)
+                       .Where(x => x?.Name == W + "p")
+                       .Where(x => x.Next()?.Name == W + "tbl" || (x.Next()?.Value.Contains('{') ?? false))
+                       .Distinct()
+                       .ToArray();
+
+            foreach (XElement item in paragraphs)
+            {
+                item.ReplaceWith(item.AddTableCaption());
+            }
+
+            return element;
+        }

         [NotNull]
         static XNode Triage(XNode node)


Bug fixing: Flickr Data Source using AND for comma separated tags, it should use OR

--- src/AppStudio.DataProviders/Flickr/FlickrDataProvider.cs
+++ src/AppStudio.DataProviders/Flickr/FlickrDataProvider.cs
@@ -31,7 +31,7 @@
             ContinuationToken = "1";
             var settings = new HttpRequestSettings()
             {
-                RequestedUri = new Uri($"{BaseUrl}/photos_public.gne?{config.QueryType.ToString().ToLower()}={WebUtility.UrlEncode(config.Query)}")
+                RequestedUri = new Uri(GetUrl(config))
             };

             HttpRequestResult result = await HttpRequest.DownloadAsync(settings);
@@ -83,6 +83,16 @@
             return token;
         }

+        private string GetUrl(FlickrDataConfig config)
+        {
+            var result = $"{BaseUrl}/photos_public.gne?{config.QueryType.ToString().ToLower()}={WebUtility.UrlEncode(config.Query)}";
+            if (config.QueryType == FlickrQueryType.Tags)
+            {
+                result += "&tagmode=any";
+            }
+            return result;
+        }
+
         private IEnumerable<TSchema> GetMoreData<TSchema>(int pageSize, int page)
         {
             if (_totalItems == null)
@@ -93,6 +103,8 @@
             var resultToReturn = total.Skip(pageSize * (page - 1)).Take(pageSize).ToList();
             return resultToReturn;
         }
+
+
     }
 }


Better logging when agent starts and stop

--- src/AsimovDeploy.WinAgent/Service/AsimovDeployService.cs
+++ src/AsimovDeploy.WinAgent/Service/AsimovDeployService.cs
@@ -16,7 +16,6 @@

 using System;
 using AsimovDeploy.WinAgent.Framework.Common;
-using AsimovDeploy.WinAgent.Framework.Configuration;
 using AsimovDeploy.WinAgent.Framework.Models;
 using StructureMap;
 using log4net;
@@ -35,10 +34,11 @@
                 ComponentRegistration.RegisterComponents();
                 ComponentRegistration.ReadAndRegisterConfiguration();
                 AddNodeFrontAppender();
+                Log.Info("WinAgent starting...");
                 ComponentRegistration.StartStartableComponents();

                 var config = ObjectFactory.GetInstance<IAsimovConfig>();
-                Log.InfoFormat("WinAgent Started, Version={0}, ConfigVersion={1}", VersionUtil.GetAgentVersion(), config.ConfigVersion);
+                Log.Info($"WinAgent started, Version={VersionUtil.GetAgentVersion()}, ConfigVersion={config.ConfigVersion}");
             }
             catch (Exception e)
             {
@@ -57,8 +57,9 @@

         public void Stop()
         {
-            Log.Info("WinAgent Stopping");
+            Log.Info("WinAgent stopping...");
             ComponentRegistration.StopAll();
+            Log.Info("WinAgent stopped");
         }
     }
 }


Clean up enum path parameter serializer

Clean up enum path parameter serializer

 * Fixed duplicated code.
 * Fix omission of DisplayName attribute in documentation.

--- src/RestEase/StringEnumRequestPathParamSerializer.cs
+++ src/RestEase/StringEnumRequestPathParamSerializer.cs
@@ -14,7 +14,7 @@
     /// <inheritdoc />
     /// <summary>
     /// A serializer that handles enum values specially, serializing them into their display value
-    /// as defined by a Display or EnumMember attribute.
+    /// as defined by a EnumMember, DisplayName, or Display attribute (in that order).
     /// </summary>
     public class StringEnumRequestPathParamSerializer : RequestPathParamSerializer
     {
@@ -29,17 +29,10 @@
         /// <param name="info">Extra info which may be useful to the serializer</param>
         /// <returns>A string value to use as path parameter</returns>
         /// <remarks>
-        /// If the value is an enum value, the serializer will check if it has an EnumMember or Display
-        /// attribute, and if so return the value of that instead.
+        /// If the value is an enum value, the serializer will check if it has an EnumMember, DisplayName or Display
+        /// attribute, and if so return the value of that instead (in that order of preference).
         /// </remarks>
         public override string SerializePathParam<T>(T value, RequestPathParamSerializerInfo info)
-        {
-            var type = typeof(T);
-
-            return IsEnum(type) ? GetEnumDisplayName(value) : value.ToString();
-        }
-
-        private static string GetEnumDisplayName<T>(T value)
         {
             var type = typeof(T);


Whitespace change for re-build

Whitespace change for re-build

--- src/SFA.DAS.EAS.LevyAccountUpdater.WebJob/Program.cs
+++ src/SFA.DAS.EAS.LevyAccountUpdater.WebJob/Program.cs
@@ -17,4 +17,5 @@
             updater.RunUpdate().Wait();
         }
     }
+
 }


gaminglive connection

gaminglive connection

--- Ubiquitous2/Model/GamingLiveChat.cs
+++ Ubiquitous2/Model/GamingLiveChat.cs
@@ -580,28 +580,16 @@
     {

         private WebSocketBase webSocket;
+        private WebSocketBase secondWebSocket;
         private IChat _chat;
         bool isAnonymous = false;
         object lockConnect = new object();
-        private Timer disconnectTimer;
         public GamingLiveChannel(IChat chat)
         {
             _chat = chat;
         }
         public void Join(Action<GamingLiveChannel> callback, string nickName, string channel, string authToken)
         {
-            disconnectTimer = new Timer((sender) =>
-            {
-                _chat.Status.IsStarting = false;
-
-                if (_chat.Status.IsConnected)
-                    return;
-
-                if (LeaveCallback != null)
-                    LeaveCallback(this);
-
-            }, null, Timeout.Infinite, Timeout.Infinite);
-
             JoinCallback = callback;

             isAnonymous = nickName == null || nickName.Equals("__$anonymous",StringComparison.InvariantCultureIgnoreCase)
@@ -614,6 +602,7 @@
                 authToken = "__$anonymous";
             }
             ChannelName = "#" + channel.Replace("#", "");
+
             webSocket = new WebSocketBase();
             webSocket.Host = "54.76.144.150";
             //webSocket.PingInterval = 0;
@@ -621,7 +610,7 @@
             webSocket.Path = String.Format("/chat/{0}?nick={1}&authToken={2}", ChannelName.Replace("#",""), nickName, authToken );
             webSocket.ConnectHandler = () =>
             {
-                  disconnectTimer.Change(1000, Timeout.Infinite);
+                secondWebSocket.Send("{}");
             };

             webSocket.DisconnectHandler = () =>
@@ -630,7 +619,18 @@
                     LeaveCallback(this);
             };
             webSocket.ReceiveMessageHandler = ReadRawMessage;
+
+            secondWebSocket = new WebSocketBase();
+            secondWebSocket.Host = webSocket.Host;
+            secondWebSocket.Origin = webSocket.Origin;
+            secondWebSocket.Path = webSocket.Path;
+
+            secondWebSocket.Connect();
             webSocket.Connect();
+
+            secondWebSocket.Connect();
+
+
         }
         private void ReadRawMessage(string rawMessage)
         {
@@ -639,7 +639,6 @@
                 _chat.Status.IsStarting = false;
                 if( JoinCallback!= null )
                     JoinCallback(this);
-                //_chat.Status.IsConnected = true;
             }
             Log.WriteInfo("gaminglive raw message: {0}", rawMessage);
             if( !String.IsNullOrWhiteSpace(rawMessage))


Static flow correctly ignores empty lines

--- VS/CSHARP/asm-sim-lib/StaticFlow.cs
+++ VS/CSHARP/asm-sim-lib/StaticFlow.cs
@@ -121,7 +121,17 @@

         public int NLines { get { return this.Current.Count; } }

-        public int FirstLineNumber { get { return 0; } }
+        public int FirstLineNumber {
+            get {
+                int lineNumber = 0;
+                var current = this.Current;
+                while (current[lineNumber].Mnemonic == Mnemonic.NONE)
+                {
+                    lineNumber++;
+                }
+                return lineNumber;
+            }
+        }
         public int LastLineNumber { get { return this.Current.Count; } }

         public bool HasLine(int lineNumber)
@@ -129,20 +139,22 @@
             return (lineNumber >= 0) && (lineNumber < this.Current.Count);
         }

-        public (string Label, Mnemonic Mnemonic, string[] Args) Get_Line(int lineNumber)
+        public (Mnemonic Mnemonic, string[] Args) Get_Line(int lineNumber)
         {
             Debug.Assert(lineNumber >= 0);
             if (lineNumber >= this.Current.Count)
             {
                 Console.WriteLine("WARING: CFlow:geLine: lineNumber " + lineNumber + " does not exist");
-                return ("", Mnemonic.NONE, null);
-            }
-            return this.Current[lineNumber];
+                return (Mnemonic.NONE, null);
+            }
+            var v = this.Current[lineNumber];
+
+            return (v.Mnemonic, v.Args);
         }

         public string Get_Line_Str(int lineNumber)
         {
-            return (this.HasLine(lineNumber)) ? StaticFlow.ToString(this.Get_Line(lineNumber)) : "";
+            return (this.HasLine(lineNumber)) ? StaticFlow.ToString(this.Current[lineNumber]) : "";
         }

         public bool Has_Prev_LineNumber(int lineNumber)
@@ -280,7 +292,7 @@

         #region Setters
         /// Update this CFlow with the provided programStr: return true if this CFlow has changed.
-        public bool Update(string programStr, bool removeEmptyLines = false)
+        public bool Update(string programStr, bool removeEmptyLines = true)
         {
             //Console.WriteLine("INFO: CFlow:Update_Lines");
             this._use_Parsed_Code_A = !this._use_Parsed_Code_A;
@@ -374,13 +386,15 @@
             #endregion
         }

+        /// Compress this static flow by removing empty lines
         private void Compress()
         {
             var current = this.Current;
             for (int lineNumber = 0; lineNumber < current.Count; ++lineNumber)
             {
                 var c = current[lineNumber];
-                if (c.Mnemonic == Mnemonic.NONE)
+
+                if (c.Mnemonic == Mnemonic.NONE) // found an empty line
                 {
                     int outDegree = this._graph.OutDegree(lineNumber);
                     if (outDegree == 0)
@@ -389,7 +403,9 @@
                     }
                     else if (outDegree == 1)
                     {
-                        int next = this._graph.OutEdge(lineNumber, 0).Target;
+                        var outEdge = this._graph.OutEdge(lineNumber, 0);
+                        this._graph.RemoveEdge(outEdge);
+                        int next = outEdge.Target;

                         //Remove this empty line
                         var inEdges = new List<TaggedEdge<int, bool>>(this._graph.InEdges(lineNumber));
@@ -401,7 +417,7 @@
                     }
                     else
                     {
-                        // error
+                        // error: it is not possible for an empty line to be an branching point
                     }
                 }
             }


local instead of global

local instead of global

--- VisualLinter/VisualLinterOptions.cs
+++ VisualLinter/VisualLinterOptions.cs
@@ -1,7 +1,7 @@
-using System;
-using Microsoft.VisualStudio.Settings;
+using Microsoft.VisualStudio.Settings;
 using Microsoft.VisualStudio.Shell;
 using Microsoft.VisualStudio.Shell.Settings;
+using System;
 using System.ComponentModel.Composition;
 using System.Diagnostics.CodeAnalysis;

@@ -9,17 +9,17 @@
 {
     internal interface IVisualLinterOptions
     {
-        bool UseLocalConfig { get; set; }
+        bool UseGlobalConfig { get; set; }
     }

     [Export(typeof(IVisualLinterOptions))]
     [PartCreationPolicy(CreationPolicy.Shared)]
     internal class VisualLinterOptions : IVisualLinterOptions
     {
-        public bool UseLocalConfig
+        public bool UseGlobalConfig
         {
-            get => _writableSettingsStore.GetBoolean(CollectionPath, nameof(UseLocalConfig), false);
-            set => _writableSettingsStore.SetBoolean(CollectionPath, nameof(UseLocalConfig), value);
+            get => _writableSettingsStore.GetBoolean(CollectionPath, nameof(UseGlobalConfig), false);
+            set => _writableSettingsStore.SetBoolean(CollectionPath, nameof(UseGlobalConfig), value);
         }

         private const string CollectionPath = "jwldnr.VisualLinter";


use DurationParser

use DurationParser

--- Vostok.Hosting/VostokHostBuilder.cs
+++ Vostok.Hosting/VostokHostBuilder.cs
@@ -159,7 +159,7 @@
             var metricsSection = configuration.GetSection(VostokConfigurationDefaults.MetricsSection);
             metricConfiguration.ContextFieldsWhitelist.UnionWith((metricsSection[nameof(metricConfiguration.ContextFieldsWhitelist)] ?? "").Split(new[] {' ', ';', ','}, StringSplitOptions.RemoveEmptyEntries));
             var defaultMetricIntervalStr = metricsSection[VostokConfigurationDefaults.DefaultMetricInterval];
-            if (!string.IsNullOrEmpty(defaultMetricIntervalStr) && TimeSpan.TryParse(defaultMetricIntervalStr, out var defaultMetricInterval))
+            if (!string.IsNullOrEmpty(defaultMetricIntervalStr) && DurationParser.TryParse(defaultMetricIntervalStr, out var defaultMetricInterval))
                 metricConfiguration.DefaultInterval = defaultMetricInterval;
         }


Add missing context.Transform = Transform in EllipseNode

--- src/Avalonia.Visuals/Rendering/SceneGraph/EllipseNode.cs
+++ src/Avalonia.Visuals/Rendering/SceneGraph/EllipseNode.cs
@@ -59,6 +59,7 @@

         public override void Render(IDrawingContextImpl context)
         {
+            context.Transform = Transform;
             context.DrawEllipse(Brush, Pen, Rect);
         }


minor change for better handling of the default expiration mode flag in redis keys with old keys #183

--- src/CacheManager.StackExchange.Redis/RedisCacheHandle.cs
+++ src/CacheManager.StackExchange.Redis/RedisCacheHandle.cs
@@ -474,7 +474,9 @@
             var createdItem = values[3];
             var valueTypeItem = values[4];
             version = (int)values[5];
-            var usesDefaultExpiration = values[6].HasValue ? (bool)values[6] : true;
+            var usesDefaultExpiration = values[6].HasValue ? (bool)values[6]        // if flag is set, all good...
+                : (expirationModeItem.HasValue && timeoutItem.HasValue) ? false     // if not, but expiration flags have values, use those
+                : true;                                                             // otherwise fall back to use default expiration from config

             if (!item.HasValue || !valueTypeItem.HasValue /* partially removed? */
                 || item.IsNullOrEmpty || item.IsNull)
@@ -554,7 +556,9 @@
                 var timeoutItem = values[2];
                 var createdItem = values[3];
                 var valueTypeItem = values[4];
-                var usesDefaultExpiration = values[5].HasValue ? (bool)values[5] : true;
+                var usesDefaultExpiration = values[5].HasValue ? (bool)values[5]        // if flag is set, all good...
+                    : (expirationModeItem.HasValue && timeoutItem.HasValue) ? false     // if not, but expiration flags have values, use those
+                    : true;                                                             // otherwise fall back to use default expiration from config

                 if (!item.HasValue || !valueTypeItem.HasValue /* partially removed? */
                     || item.IsNullOrEmpty || item.IsNull)


small changes to how building batch

small changes to how building batch

--- src/Serilog.Sinks.AwsCloudWatch/CloudWatchLogSink.cs
+++ src/Serilog.Sinks.AwsCloudWatch/CloudWatchLogSink.cs
@@ -182,9 +182,10 @@
                     break;
                 }

-                if (batchSize + System.Text.Encoding.UTF8.GetByteCount(@event.Message) + MessageBufferSize < MaxLogEventBatchSize) // ensure < max batch size
-                {
-                    batchSize += System.Text.Encoding.UTF8.GetByteCount(@event.Message) + MessageBufferSize;
+                var proposedBatchSize = batchSize + System.Text.Encoding.UTF8.GetByteCount(@event.Message) + MessageBufferSize;
+                if (proposedBatchSize < MaxLogEventBatchSize) // ensure < max batch size
+                {
+                    batchSize = proposedBatchSize;
                     batch.Add(@event);
                     logEvents.Dequeue();
                 }


Improve documentation (#416)

Improve documentation (#416)

--- src/Client/Messages/DynamicClientRegistrationDocument.cs
+++ src/Client/Messages/DynamicClientRegistrationDocument.cs
@@ -24,9 +24,18 @@
         /// <summary>
         /// List of the OAuth 2.0 response type strings that the client can use at the authorization endpoint.
         /// </summary>
+        /// <remarks>
+        /// Example: "code" or "token".
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.ResponseTypes)]
         public ICollection<string> ResponseTypes { get; set; } = new HashSet<string>();

+        /// <summary>
+        /// List of OAuth 2.0 grant type strings that the client can use at the token endpoint.
+        /// </summary>
+        /// <remarks>
+        /// Example: "authorization_code", "implicit", "password", "client_credentials", "refresh_token".
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.GrantTypes)]
         public ICollection<string> GrantTypes { get; set; } = new HashSet<string>();

@@ -36,6 +45,9 @@
         /// <summary>
         /// List of strings representing ways to contact people responsible for this client, typically email addresses.
         /// </summary>
+        /// <remarks>
+        /// The authorization server may make these contact addresses available to end-users for support requests for the client.
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.Contacts)]
         public ICollection<string> Contacts { get; set; } = new HashSet<string>();

@@ -45,6 +57,11 @@
         [JsonPropertyName(OidcConstants.ClientMetadata.ClientName)]
         public string ClientName { get; set; }

+        /// <summary>
+        /// Logo for the client.
+        /// <remarks>
+        /// If present, the server should display this image to the end-user during approval.
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.LogoUri)]
         public string LogoUri { get; set; }

@@ -68,6 +85,14 @@
         [JsonPropertyName(OidcConstants.ClientMetadata.TosUri)]
         public string TosUri { get; set; }

+        /// <summary>
+        /// JWK Set document which contains the client's public keys.
+        /// </summary>
+        /// <remarks>
+        /// Use of this parameter is preferred over the "jwks" parameter, as it allows for easier key rotation.
+        /// The <paramref name="JwksUri"/> and <paramref name="Jwks"/> parameters MUST NOT both be present in
+        /// the same request or response.
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.JwksUri)]
         public string JwksUri { get; set; }

@@ -83,6 +108,9 @@
         /// <summary>
         /// String containing a space-separated list of scope values that the client can use when requesting access tokens.
         /// </summary>
+        /// <remarks>
+        /// If omitted, an authorization server may register a client with a default set of scopes.
+        /// </remarks>
         [JsonPropertyName(OidcConstants.ClientMetadata.Scope)]
         public string Scope { get; set; }


Remove unnecessary loop (#14054)

Remove unnecessary loop (#14054)

--- src/Compilers/Core/Portable/CodeGen/SequencePointList.cs
+++ src/Compilers/Core/Portable/CodeGen/SequencePointList.cs
@@ -118,15 +118,6 @@
             string lastPath = null;
             Cci.DebugSourceDocument lastDebugDocument = null;

-            // First, count the number of sequence points.
-            int count = 0;
-            SequencePointList current = this;
-            while (current != null)
-            {
-                count += current._points.Length;
-                current = current._next;
-            }
-
             FileLinePositionSpan? firstReal = FindFirstRealSequencePoint();
             if (!firstReal.HasValue)
             {
@@ -136,7 +127,7 @@
             lastPathIsMapped = firstReal.Value.HasMappedPath;
             lastDebugDocument = documentProvider(lastPath, basePath: lastPathIsMapped ? this._tree.FilePath : null);

-            current = this;
+            SequencePointList current = this;
             while (current != null)
             {
                 SyntaxTree currentTree = current._tree;


If the message collection is empty, there is nothing to append and there is nothing to do.

--- src/SqlStreamStore/Infrastructure/StreamStoreBase.cs
+++ src/SqlStreamStore/Infrastructure/StreamStoreBase.cs
@@ -26,6 +26,12 @@
             CancellationToken cancellationToken = default(CancellationToken))
         {
             Ensure.That(streamId, nameof(streamId)).IsNotNullOrWhiteSpace().DoesNotStartWith("$");
+            Ensure.That(messages, nameof(messages)).IsNotNull();
+
+            if(messages.Length == 0)
+            {
+                return TaskHelpers.CompletedTask;
+            }

             return AppendToStreamInternal(streamId, expectedVersion, messages, cancellationToken);
         }


Use full assembly name

Use full assembly name

--- src/Swashbuckle.AspNetCore.Cli/HostingApplication.cs
+++ src/Swashbuckle.AspNetCore.Cli/HostingApplication.cs
@@ -65,7 +65,7 @@
             try
             {
                 // Get the IServiceProvider from the host
-                var assemblyName = assembly.GetName()?.Name ?? string.Empty;
+                var assemblyName = assembly.GetName()?.FullName ?? string.Empty;
                 // We set the application name in the hosting environment to the startup assembly
                 // to avoid falling back to the entry assembly (dotnet-swagger) when configuring our
                 // application.


fix DateTime overflow on ARM32 (#21902)

fix DateTime overflow on ARM32 (#21902)

--- src/System.Private.CoreLib/shared/System/DateTime.cs
+++ src/System.Private.CoreLib/shared/System/DateTime.cs
@@ -455,10 +455,12 @@
         // time units to this DateTime.
         private DateTime Add(double value, int scale)
         {
-            long millis = (long)(value * scale + (value >= 0 ? 0.5 : -0.5));
-            if (millis <= -MaxMillis || millis >= MaxMillis)
-                throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_AddValue);
-            return AddTicks(millis * TicksPerMillisecond);
+            double millis_double = value * (double)scale + (value >= 0 ? 0.5 : -0.5);
+
+            if (millis_double <= (double)-MaxMillis || millis_double >= (double)MaxMillis)
+                 throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_AddValue);
+
+            return AddTicks((long)millis_double * TicksPerMillisecond);
         }

         // Returns the DateTime resulting from adding a fractional number of


Registration of InputVariableProvider

Registration of InputVariableProvider

--- src/Take.Blip.Builder/Hosting/ContainerExtensions.cs
+++ src/Take.Blip.Builder/Hosting/ContainerExtensions.cs
@@ -54,6 +54,7 @@
                     typeof(ContextVariableProvider),
                     typeof(RandomVariableProvider),
                     typeof(FlowVariableProvider),
+                    typeof(InputVariableProvider),
                 });

             return container;


add lock for Log4NetHelper.LogInit

add lock for Log4NetHelper.LogInit

--- src/WeihanLi.Common.Logging.Log4Net/Log4NetHelper.cs
+++ src/WeihanLi.Common.Logging.Log4Net/Log4NetHelper.cs
@@ -16,6 +16,8 @@
         /// <returns>1 config success,0 config has existed</returns>
         public static int LogInit() => LogInit(ApplicationHelper.MapPath("log4net.config"));

+        private static readonly object configInitLock = new object();
+
         /// <summary>
         /// log4net init
         /// </summary>
@@ -25,11 +27,18 @@
         {
             if (null == LogManager.GetAllRepositories()?.FirstOrDefault(_ => _.Name == ApplicationHelper.ApplicationName))
             {
-                XmlConfigurator.ConfigureAndWatch(LogManager.CreateRepository(ApplicationHelper.ApplicationName), new FileInfo(configFilePath));
+                lock (configInitLock)
+                {
+                    if (null == LogManager.GetAllRepositories()
+                            ?.FirstOrDefault(_ => _.Name == ApplicationHelper.ApplicationName))
+                    {
+                        XmlConfigurator.ConfigureAndWatch(LogManager.CreateRepository(ApplicationHelper.ApplicationName), new FileInfo(configFilePath));
 #if NET45
-                XmlConfigurator.ConfigureAndWatch(new FileInfo(configFilePath));
+                        XmlConfigurator.ConfigureAndWatch(new FileInfo(configFilePath));
 #endif
-                return 1;
+                        return 1;
+                    }
+                }
             }
             return 0;
         }


fix ThrowOn properties

fix ThrowOn properties

--- Mono.Cecil/PInvokeInfo.cs
+++ Mono.Cecil/PInvokeInfo.cs
@@ -117,13 +117,13 @@
 		}

 		public bool IsThrowOnUnmappableCharEnabled {
-			get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharEnabled); }
-			set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharEnabled, value); }
+			get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.ThrowOnUnmappableCharMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharEnabled); }
+			set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.ThrowOnUnmappableCharMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharEnabled, value); }
 		}

 		public bool IsThrowOnUnmappableCharDisabled {
-			get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharDisabled); }
-			set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.BestFitMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharDisabled, value); }
+			get { return attributes.GetMaskedAttributes ((ushort) PInvokeAttributes.ThrowOnUnmappableCharMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharDisabled); }
+			set { attributes = attributes.SetMaskedAttributes ((ushort) PInvokeAttributes.ThrowOnUnmappableCharMask, (ushort) PInvokeAttributes.ThrowOnUnmappableCharDisabled, value); }
 		}

 		#endregion


Line endings

Line endings

--- MoreLinq.Test/ScanTest.cs
+++ MoreLinq.Test/ScanTest.cs
@@ -21,7 +21,7 @@

 namespace MoreLinq.Test
 {
-    [TestFixture]
+    [TestFixture]
     public class ScanTest
     {
         [Test]


Work on recovery.

Work on recovery.

--- N2.Visualizer/Recovery.cs
+++ N2.Visualizer/Recovery.cs
@@ -134,7 +134,7 @@
           AddResult(curTextPos, parser.MaxTextPos, state, recoveryStack, text, startTextPos);
         else
         {
-          if (subruleLevel <= 0 && curTextPos == startTextPos)
+          if (subruleLevel <= 0)
           {
             if (_nestedLevel > 20) // ловим зацикленную рекурсию для целей отладки
               continue;
@@ -160,19 +160,25 @@
     {
       _bestResultsCount++;

-      int stackLength = -1;
+      int stackLength = stack.Length;
+      var skipedCount = startPos - failPos;
+
+      var newResult = new RecoveryResult(startPos, endPos, startState, stackLength, stack, text, failPos);
+
+      if (newResult.SkipedCount > 0)
+      {
+      }

       if (_bestResult == null)                   goto good;
-      var skipedCount = startPos - failPos;
+
+      if (endPos     > _bestResult.EndPos)       goto good;
+      if (endPos     < _bestResult.EndPos)       return;
+
+      if (startPos   < _bestResult.StartPos)     goto good;
+      if (startPos   > _bestResult.StartPos)     return;

       if (skipedCount < _bestResult.SkipedCount) goto good;
       if (skipedCount > _bestResult.SkipedCount) return;
-
-      if (endPos     > _bestResult.EndPos)       goto good;
-      if (endPos     < _bestResult.EndPos)       return;
-
-      if (startPos   < _bestResult.StartPos)     goto good;
-      if (startPos   > _bestResult.StartPos)     return;

       stackLength = stack.Length;
       var bestResultStackLength = this._bestResult.StackLength;
@@ -183,8 +189,6 @@
       if (startState == _bestResult.StartState)  goto good2;
       return;
     good:
-      if (stackLength < 0)
-        stackLength = stack.Length;
       _bestResults.Clear();
       _bestResult = new RecoveryResult(startPos, endPos, startState, stackLength, stack, text, failPos);
       _bestResults.Add(_bestResult);


Check client version.

Check client version.

--- NFireLogger/FireLogger.cs
+++ NFireLogger/FireLogger.cs
@@ -31,6 +31,11 @@
         /// </summary>
         public const string DEFAULT_NAME = "ROOT";

+
+        /// <summary>
+        /// Minimal version of FireLogger client
+        /// </summary>
+        public const string MINIMAL_VERSION = "1.2";

         /// <summary>
         /// Current HttpContext
@@ -104,10 +109,27 @@
             if (HttpContext.Request.Headers["X-Firelogger"] != null)
             {
                 Enabled = true;
-            }
-
-            // TODO add version checker
+
+                CheckVersion();
+            }
+
             // TODO add password protection
+        }
+
+
+        /// <summary>
+        /// Check FireLogger client version number and if it's not sufficient print warning
+        /// </summary>
+        private void CheckVersion()
+        {
+            var version = new Version(HttpContext.Request.Headers["X-Firelogger"]);
+            var requiredVersion = new Version(MINIMAL_VERSION);
+
+            if (version < requiredVersion)
+            {
+                Log(-10, "NFireLogger", Level.Warning,
+                    "Your FireLogger version {0} is older then required {1}!".FormatWith(version, requiredVersion));
+            }
         }

@@ -151,9 +173,10 @@
         {
             var msg = new LogMessage
                           {
-                              Level    = level,
-                              Message  = text,
-                              Name     = name
+                              Level     = level,
+                              Message   = text,
+                              Arguments = parameters,
+                              Name      = name
                           };

             PopulateStackInfo(msg, stackTraceOffset + 1);
@@ -211,6 +234,8 @@
         /// <param name="stackTraceOffset">Offset of caller in stacktrace (to skip record from FireLogger)</param>
         private void PopulateStackInfo(LogMessage msg, int stackTraceOffset)
         {
+            if (stackTraceOffset < 0) return;
+
             var frame = new StackFrame(stackTraceOffset + 1, true);

             // TODO add option to skip this feature