Support additional default referenced assembly locations

--- src/RoslynPad.Roslyn/RoslynHost.cs
+++ src/RoslynPad.Roslyn/RoslynHost.cs
@@ -72,7 +72,9 @@

         #region Constructors

-        public RoslynHost(NuGetConfiguration nuGetConfiguration = null, IEnumerable<Assembly> additionalAssemblies = null)
+        public RoslynHost(NuGetConfiguration nuGetConfiguration = null,
+            IEnumerable<Assembly> additionalAssemblies = null,
+            IEnumerable<string> additionalReferencedAssemblyLocations = null)
         {
             _nuGetConfiguration = nuGetConfiguration;

@@ -110,17 +112,19 @@
             (_referenceAssembliesPath, _documentationPath) = GetReferenceAssembliesPath();
             _documentationProviderService = new DocumentationProviderServiceFactory.DocumentationProviderService();

-            DefaultReferences = GetMetadataReferences();
+            DefaultReferences = GetMetadataReferences(additionalReferencedAssemblyLocations);

             DefaultImports = _defaultReferenceAssemblyTypes.Select(x => x.Namespace).Distinct().ToImmutableArray();

             GetService<IDiagnosticService>().DiagnosticsUpdated += OnDiagnosticsUpdated;
         }

-        private ImmutableArray<MetadataReference> GetMetadataReferences()
+        private ImmutableArray<MetadataReference> GetMetadataReferences(IEnumerable<string> additionalReferencedAssemblyLocations = null)
         {
             // allow facade assemblies to take precedence
-            var dictionary = _defaultReferenceAssemblies.Select(x => x.Location)
+            var dictionary = _defaultReferenceAssemblies
+                .Select(x => x.Location)
+                .Concat(additionalReferencedAssemblyLocations ?? Enumerable.Empty<string>())
                 .ToImmutableDictionary(Path.GetFileNameWithoutExtension)
                 .SetItems(TryGetFacadeAssemblies()
                     .ToImmutableDictionary(Path.GetFileNameWithoutExtension));


Fixed case statement generation

Fixed case statement generation

--- src/SME.VHDL/RenderStateProcess.cs
+++ src/SME.VHDL/RenderStateProcess.cs
@@ -397,7 +397,7 @@
 				}
 				else
 				{
-					yield return indent2 + string.Join(" | ", c.Item1.Select(x => RenderExpression(x)));
+					yield return indent2 + "when " + string.Join(" | ", c.Item1.Select(x => RenderExpression(x))) + " =>";
 				}

 				foreach (var ss in c.Item2.SelectMany(x => RenderStatement(method, x, indentation)))


Fixed Google Authenticator on UWP fixes #49

--- src/SimpleAuth/Providers/Google.cs
+++ src/SimpleAuth/Providers/Google.cs
@@ -11,6 +11,8 @@
 using Android.Runtime;
 #elif __IOS__
 using Foundation;
+#elif WINDOWS_UWP
+using Windows.Security.Authentication.Web;
 #endif
 namespace SimpleAuth.Providers
 {
@@ -52,7 +54,27 @@
 			}

 #endif
-			if (GoogleShowAuthenticator != null)
+#if WINDOWS_UWP
+            GoogleShowAuthenticator = async (authenticator) =>
+            {
+                var url = await authenticator.GetInitialUrl();
+                var endURI = WebAuthenticationBroker.GetCurrentApplicationCallbackUri();
+                var result = await WebAuthenticationBroker.AuthenticateAsync(WebAuthenticationOptions.UseTitle, url, new Uri("https://accounts.google.com/o/oauth2/approval"));
+
+                if (result.ResponseStatus == WebAuthenticationStatus.UserCancel)
+                {
+                    authenticator.OnCancelled();
+                    return;
+                }
+                if (result.ResponseStatus == WebAuthenticationStatus.ErrorHttp)
+                    throw new Exception(result.ResponseErrorDetail.ToString());
+                //Cleanse the response data
+                var startIndex = result.ResponseData.IndexOf("code");
+                var codeString = $"http://localhost/?{result.ResponseData.Substring(startIndex)}";
+                authenticator.CheckUrl(new Uri(codeString), new System.Net.Cookie[0]);
+            };
+#endif
+            if (GoogleShowAuthenticator != null)
 				CurrentShowAuthenticator = GoogleShowAuthenticator;
 			CheckNative ();
 		}
@@ -84,7 +106,7 @@

 		protected override WebAuthenticator CreateAuthenticator ()
 		{
-			return new GoogleAuthenticator {
+			var authenticator = new GoogleAuthenticator {
 				Scope = Scopes.ToList (),
 				ClientId = ClientId,
 				ClientSecret = ClientSecret,
@@ -93,6 +115,8 @@
 				IsUsingNative = IsUsingNative,
 				ServerClientId = ServerClientId,
 			};
+            authenticator.RedirectUrl = new Uri(authenticator.GetRedirectUrl());
+            return authenticator;
 		}
 		public static Action<string, string> OnLogOut { get; set; }
 		protected override Task<OAuthAccount> GetAccountFromAuthCode (WebAuthenticator authenticator, string identifier)
@@ -150,11 +174,7 @@
 			get;
 			set;
 		} = "https://accounts.google.com/o/oauth2/auth";
-
-		public override Uri RedirectUrl {
-			get;
-			set;
-		}
+

 		public override async Task<Dictionary<string, string>> GetTokenPostData (string clientSecret)
 		{


logging

logging

--- src/Sir.Store/IO/PostingsReader.cs
+++ src/Sir.Store/IO/PostingsReader.cs
@@ -30,9 +30,11 @@

                 while (cursor != null)
                 {
+                    var readTimer = Stopwatch.StartNew();
+
                     var subResult = Read(cursor.PostingsOffsets, cursor.Score);

-                    this.Log($"term {cursor.Term} exists in {subResult.Count} documents");
+                    this.Log($"found {subResult.Count} documents for term {cursor.Term} in {readTimer.Elapsed}");

                     if (cursor.And)
                     {


LuaSvr: private->protected so we can extend custom LuaSvr for Sync Load

--- Assets/Plugins/Slua_Managed/LuaSvr.cs
+++ Assets/Plugins/Slua_Managed/LuaSvr.cs
@@ -46,7 +46,7 @@
 	{
 		public LuaState luaState;
 		#if !SLUA_STANDALONE
-		static LuaSvrGameObject lgo;
+		protected static LuaSvrGameObject lgo;
 		#endif
 		int errorReported = 0;
 		public bool inited = false;
@@ -116,7 +116,7 @@
 		}

-		private void doBind(IntPtr L)
+		protected void doBind(IntPtr L)
 		{
 			var list = collectBindInfo ();

@@ -167,7 +167,7 @@
 			return new Action<IntPtr>[0];
 		}

-		void doinit(IntPtr L,LuaSvrFlag flag)
+        protected void doinit(IntPtr L,LuaSvrFlag flag)
 		{
 			#if !SLUA_STANDALONE
 			LuaTimer.reg(L);
@@ -201,7 +201,7 @@
 			inited = true;
 		}

-		void checkTop(IntPtr L)
+        protected void checkTop(IntPtr L)
 		{
 			if (LuaDLL.lua_gettop(luaState.L) != errorReported)
 			{


Log faked head nods. Fix #36

Log faked head nods. Fix #36

--- Assets/Scripts/PubSub/PubSubClient.cs
+++ Assets/Scripts/PubSub/PubSubClient.cs
@@ -5,6 +5,7 @@
 {
     private Animator animator;
     private PubSub pubSub;
+    private PlayerLogger logger;

     // Use this for initialization
@@ -15,6 +16,11 @@
         if (isServer)
         {
             pubSub = GameObject.FindGameObjectWithTag("PubSub").GetComponent<PubSub>();
+        }
+
+        if (isLocalPlayer)
+        {
+            logger = GetComponent<PlayerLogger>();
         }
     }

@@ -43,6 +49,10 @@
     [ClientRpc]
     public void RpcNod()
     {
+        if (isLocalPlayer)
+        {
+            logger.Event("Faking nodding");
+        }
         animator.SetTrigger("nodding");
     }
 }


Prefab2Tile upgrade 1

Prefab2Tile upgrade 1

--- Assets/Tilemaps/Editor/Prefab2Tile.cs
+++ Assets/Tilemaps/Editor/Prefab2Tile.cs
@@ -26,67 +26,173 @@
 public class Prefab2Tile : EditorWindow
 {
     [MenuItem("Tools/Prefab2Tile")]
-    public static void Apply()
-    {
-        //Moving old tiles
-//      FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Tilemaps/Tiles/Objects_Backup");
-//      FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Tilemaps/Tiles/Objects");
-        string path = Application.dataPath + "/Resources/Prefabs/Objects/";
-        int counter = 0;
-        string[] scan = Directory.GetFiles(path, "*.prefab", SearchOption.AllDirectories);
-        foreach (String file in scan)
-        {
-            counter++;
-            int t = scan.Length;
-			EditorUtility.DisplayProgressBar(counter.ToString() + "/" + scan.Length + " Generating Tiles", "Tile: " + counter, (float) counter / (float) scan.Length);
-//			Debug.Log ("Longpath data: " + file);
+    public static void Apply()    {
+		string[] watched = { "Objects" };
+		foreach (string subject in watched){
+			Prefab2Tile.CheckTiles (subject);
+			Prefab2Tile.GenerateTiles (subject);
+			Prefab2Tile.CleanSprites(subject);
+			}
+    }
+

-            //Get the filename without extention and path
-            string name = Path.GetFileNameWithoutExtension(file);
-//			Debug.Log ("Creating tile for prefab: " + name);
+	public static void GenerateTiles(string subject){
+		//Moving old tiles
+		//      FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Tilemaps/Tiles/Objects_Backup");
+		//      FileUtil.DeleteFileOrDirectory(Application.dataPath + "/Tilemaps/Tiles/Objects");
+			string basePath = Application.dataPath + "/Resources/Prefabs/";
+			string basePath2 = basePath + subject + "/";
+			Debug.Log (basePath2);
+			int counter = 0;
+			string[] scan = Directory.GetFiles (basePath2, "*.prefab", SearchOption.AllDirectories);
+			foreach (String file in scan) {
+				counter++;
+				int t = scan.Length;
+			EditorUtility.DisplayProgressBar (counter.ToString () + "/" + scan.Length + " Generating Tiles for " + subject, "Tile: " + counter, (float)counter / (float)scan.Length);
+				//			Debug.Log ("Longpath data: " + file);

-            //Generating the path needed to hook onto for selecting the game object
-            string smallPath = file.Substring(file.IndexOf("Assets") + 0);
-//			Debug.Log ("smallpath data: " + smallPath);
+				//Get the filename without extention and path
+				string name = Path.GetFileNameWithoutExtension (file);
+				//			Debug.Log ("Creating tile for prefab: " + name);
+
+				//Generating the path needed to hook onto for selecting the game object
+				string smallPath = file.Substring (file.IndexOf ("Assets") + 0);
+				//			Debug.Log ("smallpath data: " + smallPath);

-            //Generating the path needed to chose the right tile output sub-folder
-            string subPath = smallPath.Substring(smallPath.IndexOf("Objects") + 7);
-//			Debug.Log ("subPath data: " + subPath);
-            string barePath = subPath.Substring(0, subPath.LastIndexOf(Path.DirectorySeparatorChar));
-//			Debug.Log ("barePath data: " + barePath);
+				//Generating the path needed to chose the right tile output sub-folder
+				string subPath = smallPath.Substring (smallPath.IndexOf (subject) + 7);
+				//			Debug.Log ("subPath data: " + subPath);
+				string barePath = subPath.Substring (0, subPath.LastIndexOf (Path.DirectorySeparatorChar));
+				//			Debug.Log ("barePath data: " + barePath);
+
+				//Check if tile already exists
+				if (System.IO.File.Exists (Application.dataPath + "/Tilemaps/Tiles/" + subject + "/" + barePath + "/" + name + ".asset")) {
+					//		Debug.Log ("A tile for " + name + " already exists... Skipping...");
+				} else {
+
+
+					//setup building the tile//
+					if (subject == "Objects") {
+						var tile = TileBuilder.CreateTile<ObjectTile> (LayerType.Objects);
+
+						//Cast the gameobject
+						var cast = AssetDatabase.LoadAssetAtPath (smallPath, (typeof(GameObject))) as GameObject;
+						if (barePath == "/WallMounts") {
+							tile.Rotatable = true;
+							tile.Offset = true;
+						} else {
+							tile.Rotatable = false;
+							tile.Offset = false;
+						}
+						tile.Object = cast;
+						//Create the tile
+						TileBuilder.CreateAsset (tile, name, "/Tilemaps/Tiles/" + subject + "/" + barePath);
+						PreviewSpriteBuilder.Create (cast);
+
+					}
+					if (subject == "Items") {
+						Debug.Log ("This has to be an item");
+					}
+
+				}
+			}
+			EditorUtility.ClearProgressBar ();
+			if (counter == 0)
+				Debug.Log ("No prefabs processed");
+			else
+				Debug.Log (counter + " tiles created for prefabs");
+		}
+
+
+	public static void CleanSprites(string subject){
+		//Moving old tiles
+		string basePath = Application.dataPath + "/textures/TilePreviews/Resources/Prefabs/";
+		string basePath2 = basePath + subject + "/";
+		int counter = 0;
+		int exist = 0;
+		int cleaned = 0;
+		string[] scan = Directory.GetFiles(basePath2, "*.png", SearchOption.AllDirectories);
+		foreach (String file in scan)
+		{
+			counter++;
+			int t = scan.Length;
+			EditorUtility.DisplayProgressBar(counter.ToString() + "/" + scan.Length + " Removing abundant preview sprites for "  + subject, "Sprite: " + counter, (float) counter / (float) scan.Length);
+			//			Debug.Log ("Longpath data: " + file);
+
+			//Get the filename without extention and path
+			string name = Path.GetFileNameWithoutExtension(file);
+			//			Debug.Log ("Creating tile for prefab: " + name);
+
+			//Generating the path needed to chose the right tile output sub-folder
+			string subPath = file.Substring(file.IndexOf(subject) + 7);
+			//			Debug.Log ("subPath data: " + subPath);
+			string barePath = subPath.Substring(0, subPath.LastIndexOf(Path.DirectorySeparatorChar));
+			//			Debug.Log ("barePath data: " + barePath);

 			//Check if tile already exists
-			if (System.IO.File.Exists (Application.dataPath +  "/Tilemaps/Tiles/Objects" + barePath + "/" + name + ".asset")) {
-				Debug.Log ("A tile for " + name + " already exists... Skipping...");
+			if (System.IO.File.Exists (Application.dataPath +  "/Resources/Prefabs/" + subject + barePath + "/" + name + ".prefab")) {
+				//				Debug.Log ("A prefab for " + name + " exists... Skipping...");
+				exist++;
 			}
 			else {
+				FileUtil.DeleteFileOrDirectory(file);
+				FileUtil.DeleteFileOrDirectory(file + ".meta");
+				//				Debug.Log("DESTROY");
+				cleaned++;
+				UnityEditor.AssetDatabase.Refresh ();
+			}
+		}
+		EditorUtility.ClearProgressBar();
+		Debug.Log (counter + " Preview Sprites Processed");
+		Debug.Log (exist + " Previes Sprites skipped, Prefab exists");
+		Debug.Log(cleaned + " Preview Sprites deleted, prefab does not exist");
+	}
+
+	public static void CheckTiles(string subject){
+		//Moving old tiles
+		string basePath = Application.dataPath + "/Tilemaps/Tiles/";
+		string basePath2 = basePath + subject + "/";
+		int counter = 0;
+		int exist = 0;
+		int cleaned = 0;
+		string[] scan = Directory.GetFiles(basePath2, "*.asset", SearchOption.AllDirectories);
+		foreach (String file in scan)
+		{
+			counter++;
+			int t = scan.Length;
+			EditorUtility.DisplayProgressBar(counter.ToString() + "/" + scan.Length + " Removing abundant tiles for "  + subject, "Tile: " + counter, (float) counter / (float) scan.Length);
+			//			Debug.Log ("Longpath data: " + file);
+
+			//Get the filename without extention and path
+			string name = Path.GetFileNameWithoutExtension(file);
+			//			Debug.Log ("Creating tile for prefab: " + name);
+
+			//Generating the path needed to chose the right tile output sub-folder
+			string subPath = file.Substring(file.IndexOf(subject) + 7);
+			//			Debug.Log ("subPath data: " + subPath);
+			string barePath = subPath.Substring(0, subPath.LastIndexOf(Path.DirectorySeparatorChar));
+			//			Debug.Log ("barePath data: " + barePath);
+
+			//Check if tile already exists
+			if (System.IO.File.Exists (Application.dataPath +  "/Resources/Prefabs/" + subject + "/" + barePath + "/" + name + ".prefab")) {
+				//				Debug.Log ("A prefab for " + name + " exists... Skipping...");
+				exist++;
+			}
+			else {
+				FileUtil.DeleteFileOrDirectory(file);
+				FileUtil.DeleteFileOrDirectory(file + ".meta");
+				//				Debug.Log("DESTROY");
+				cleaned++;
+				UnityEditor.AssetDatabase.Refresh ();
+			}
+		}
+		EditorUtility.ClearProgressBar();
+		Debug.Log (counter + " Tiles Processed");
+		Debug.Log (exist + " Tiles skipped, Prefab exists");
+		Debug.Log(cleaned + " Tiles deleted, prefab does not exist");

-				//setup building the tile//
-				var tile = TileBuilder.CreateTile<ObjectTile> (LayerType.Objects);
+	}

-				//Cast the gameobject
-				var cast = AssetDatabase.LoadAssetAtPath (smallPath, (typeof(GameObject))) as GameObject;
-				if (barePath == "/WallMounts") {
-					tile.Rotatable = true;
-					tile.Offset = true;
-				} else {
-					tile.Rotatable = false;
-					tile.Offset = false;
-				}
-				tile.Object = cast;
-				//Create the tile
-				TileBuilder.CreateAsset (tile, name, "Assets/Tilemaps/Tiles/Objects" + barePath);
-				PreviewSpriteBuilder.Create (cast);
-
-
-			}
-        }
-        EditorUtility.ClearProgressBar();
-        if (counter == 0)
-            Debug.Log("No prefabs processed");
-        else
-            Debug.Log(counter + " tiles created for prefabs");
-    }
 }


report errors in read test

report errors in read test

--- Bend/LayerManager/LayerManagerTest.cs
+++ Bend/LayerManager/LayerManagerTest.cs
@@ -402,6 +402,7 @@
             SortedDictionary<string, string> testdata;
             SortedDictionary<RecordKey, RecordUpdate> testrows;
             internal int records_read = 0;
+            internal bool had_errors = false;

             internal ReadThreadsTest(int rec_count, int rec_per_segment) {
                 this.TEST_RECORD_COUNT = rec_count;
@@ -445,7 +446,8 @@
                     RecordData rdata;
                     RecordKey rkey = kvp.Key;
                     if (db.getRecord(rkey, out rdata) == GetStatus.MISSING) {
-                        Assert.Fail("failed to read: " + kvp.Key.ToString());
+                        had_errors = true;
+                        Assert.Fail("failed to read: " + kvp.Key.ToString());
                     }
                     Interlocked.Increment(ref records_read);

@@ -481,6 +483,8 @@

                 System.Console.WriteLine("ReadThreads ({0} records) in elapsed time: {1} -- {2} rec/sec",
                     this.records_read, duration, records_per_second);
+
+                Assert.AreEqual(false, had_errors, "should have no read errors");
             }
         }


removes old code for runner

removes old code for runner

Commit removes the old code for the runner and replaces it with code for
the processor. Time to test :+1:

--- CCExtractorTester/Analyzers/Tester.cs
+++ CCExtractorTester/Analyzers/Tester.cs
@@ -409,14 +409,14 @@
             LoadComparer();

             int i = 1;
-            SetUpTestEntryProcessing(cce, location, sourceFolder, Entries.Count, LoadedFileName);
+            SetUpTestEntryProcessing(LoadedFileName);
             ManualResetEvent[] mres = new ManualResetEvent[Entries.Count];
             DateTime start = DateTime.Now;

             foreach (TestEntry te in Entries)
             {
                 mres[i - 1] = new ManualResetEvent(false);
-                TestEntryProcessing tep = new TestEntryProcessing(te, i);
+                TestEntryProcessing tep = new TestEntryProcessing(te, i, Entries.Count);
                 tep.eventX = mres[i - 1];

                 if (useThreading)
@@ -453,22 +453,13 @@
         /// <summary>
         /// Sets up test entry processing.
         /// </summary>
-        /// <param name="cce">The CCExtractor executable location.</param>
-        /// <param name="location">The folder from where this program is executed.</param>
-        /// <param name="sourceFolder">The folder with the samples in.</param>
-        /// <param name="total">The number of test entries to process.</param>
         /// <param name="testName">The name of the test file we're running.</param>
-        void SetUpTestEntryProcessing(string cce, string location, string sourceFolder, int total, string testName)
-        {
-            TestEntryProcessing.location = location;
-            TestEntryProcessing.sourceFolder = sourceFolder;
-            TestEntryProcessing.total = total;
+        void SetUpTestEntryProcessing(string testName)
+        {
             TestEntryProcessing.comparer = Comparer;
-            TestEntryProcessing.config = Config;
-            TestEntryProcessing.logger = Logger;
             TestEntryProcessing.progressReporter = ProgressReporter;
             TestEntryProcessing.testName = testName;
-            TestEntryProcessing.runner = new Runner(cce, Logger, PerformanceLogger);
+            TestEntryProcessing.processor = new Processor(Logger, PerformanceLogger, Config);
         }

         /// <summary>
@@ -485,30 +476,28 @@
         /// </summary>
         class TestEntryProcessing
         {
-            public static Runner runner;
-            public static string sourceFolder;
-            public static string location;
-            public static int total;
-            public static ILogger logger;
+            public static Processor processor;
             public static IFileComparable comparer;
             public static IProgressReportable progressReporter;
-            public static ConfigManager config;
             public static string testName;

-            private TestEntry te;
+            private TestEntry testEntry;
             private int current;
+            private int total;

             public ManualResetEvent eventX;

             /// <summary>
             /// Initializes a new instance of the <see cref="CCExtractorTester.Tester+TestEntryProcessing"/> class.
             /// </summary>
-            /// <param name="testingEntry">Testing entry.</param>
-            /// <param name="curr">Curr.</param>
-            public TestEntryProcessing(TestEntry testingEntry, int curr)
-            {
-                te = testingEntry;
-                current = curr;
+            /// <param name="current_entry">Testing entry.</param>
+            /// <param name="current_nr">The current entry number.</param>
+            /// <param name="test_nr">The amount of tests for the test file.</param>
+            public TestEntryProcessing(TestEntry current_entry, int current_nr, int test_nr)
+            {
+                testEntry = current_entry;
+                current = current_nr;
+                total = test_nr;
             }

             /// <summary>
@@ -519,94 +508,38 @@
             {
                 progressReporter.showProgressMessage(String.Format("Starting with entry {0} of {1}", current, total));

-                string sampleFile = Path.Combine(sourceFolder, te.InputFile);
-                string producedFileName = te.CompareFiles[0].Substring(te.CompareFiles[0].LastIndexOf(Path.DirectorySeparatorChar) + 1);
-                string producedFile = Path.Combine(config.TemporaryFolder, producedFileName);
-                string expectedResultFile = Path.Combine(config.ResultFolder, te.CompareFiles[0]);
-
-                if(te.InputFormat == InputType.Stdin)
-                {
-
-                }
-
-                string command = te.Command + String.Format(@" --no_progress_bar -o ""{0}"" ""{1}""  ", producedFile, sampleFile);
-
-
-
-                RunData rd = runner.Run(command, processError, processOutput, config.TimeOut);
-
-                try
-                {
-                    comparer.CompareAndAddToResult(
-                        new CompareData()
+                RunData rd = processor.CallCCExtractor(testEntry, testName + "_" + current);
+
+                // Process each result file
+                foreach (KeyValuePair<string,string> kvp in rd.ResultFiles)
+                {
+                    try
+                    {
+                        comparer.CompareAndAddToResult(new CompareData()
                         {
-                            ProducedFile = producedFile,
-                            CorrectFile = expectedResultFile,
-                            SampleFile = sampleFile,
-                            Command = te.Command,
+                            ProducedFile = kvp.Value,
+                            CorrectFile = kvp.Key,
+                            Command = testEntry.Command,
                             RunTime = rd.Runtime,
-                            ExitCode = rd.ExitCode
+                            ExitCode = rd.ExitCode,
+                            SampleFile = testEntry.InputFile
                         });
-                }
-                catch (Exception e)
-                {
-                    logger.Error(e);
-                }
-
-                // Move produced file to another location (so it still can be inspected later, but won't affect next runs
-                string storeDirectory = Path.Combine(config.TemporaryFolder, testName);
-                if (!Directory.Exists(storeDirectory))
-                {
-                    Directory.CreateDirectory(storeDirectory);
-                }
-                string storeFile = Path.Combine(storeDirectory, producedFileName);
-                if (File.Exists(storeFile))
-                {
-                    File.Delete(storeFile);
-                }
-                if (File.Exists(producedFile))
-                {
-                    File.Move(producedFile, storeFile);
+                    }
+                    catch (Exception e)
+                    {
+                        processor.Logger.Error(e);
+                    }
+                }
+                // If server processing, send runtime & status code too; compare and add to result won't work
+                if(processor.Config.Comparer == CompareType.Server)
+                {
+                    ((ServerComparer)comparer).SendExitCodeAndRuntime(rd, testEntry.InputFile);
                 }

                 // Report back that we finished an entry
                 progressReporter.showProgressMessage(String.Format("Finished entry {0} with exit code: {1}", current, rd.ExitCode));
                 eventX.Set();
             }
-
-            /// <summary>
-            /// Processes the output received from CCExtractor.
-            /// </summary>
-            /// <param name="sender">Sender.</param>
-            /// <param name="e">E.</param>
-            void processOutput(object sender, DataReceivedEventArgs e)
-            {
-                if (te.OutputFormat == OutputType.Stdout)
-                {
-                    // Capture output and save in a file.
-                    using(StreamWriter sw = new StreamWriter(File.Open(Path.Combine(config.TemporaryFolder,"stdout.file"), FileMode.OpenOrCreate)))
-                    {
-                        sw.WriteLine(e.Data);
-                    }
-                }
-                else
-                {
-                    logger.Debug(e.Data);
-                }
-            }
-
-            /// <summary>
-            /// Processes the errors received from CCExtractor.
-            /// </summary>
-            /// <param name="sender">Sender.</param>
-            /// <param name="e">E.</param>
-            void processError(object sender, DataReceivedEventArgs e)
-            {
-                if (!String.IsNullOrEmpty(e.Data))
-                {
-                    logger.Error(e.Data);
-                }
-            }
         }
     }
 }


feat: let firstof accept a condition

feat: let firstof accept a condition

--- src/Yaapii.Atoms/Scalar/FirstOf.cs
+++ src/Yaapii.Atoms/Scalar/FirstOf.cs
@@ -36,18 +36,24 @@
     public sealed class FirstOf<T> : IScalar<T>
     {
         private readonly IEnumerable<T> src;
-        private readonly IBiFunc<Exception, IEnumerable<T>, T> fbk;
+        private readonly Func<IEnumerable<T>, T> fallBack;
+        private readonly Func<T, bool> condition;

         /// <summary>
-        /// First element in <see cref="IEnumerable{T}"/> with given Exception thrown on fallback
+        /// Element from position in a <see cref="IEnumerable{T}"/>.
         /// </summary>
-        /// <param name="source"></param>
-        /// <param name="ex"></param>
+        /// <param name="source">source enum</param>
         public FirstOf(IEnumerable<T> source, Exception ex) : this(
+            (enm) => true,
             source,
-            new FuncOf<IEnumerable<T>, T>(
-                (itr) => throw ex
-            )
+            (enm) => throw ex
+        )
+        { }
+
+        public FirstOf(IEnumerable<T> source) : this(
+            (enm) => true,
+            source,
+            new NoSuchElementException("Cannot get first element - no match.")
         )
         { }

@@ -55,18 +61,14 @@
         /// Element from position in a <see cref="IEnumerable{T}"/>.
         /// </summary>
         /// <param name="source">source enum</param>
-        public FirstOf(IEnumerable<T> source) : this(
-                source,
-                new BiFuncOf<Exception, IEnumerable<T>, T>((ex, itr) =>
-                {
-                    throw
-                        new NoSuchElementException(
-                            new FormattedText(
-                                "Cannot get first element: {0}",
-                                ex.Message
-                            ).AsString()
-                    );
-                }))
+        public FirstOf(Func<T, bool> condition, IEnumerable<T> source, Exception ex) : this(
+            condition,
+            source,
+            (enm) =>
+            {
+                throw ex;
+            }
+        )
         { }

         /// <summary>
@@ -75,19 +77,21 @@
         /// <param name="source">source enum</param>
         /// <param name="fallback">fallback func</param>
         public FirstOf(IEnumerable<T> source, T fallback) : this(
+            enm => true,
             source,
-            new FuncOf<IEnumerable<T>, T>(b => fallback)
+            (b) => fallback
         )
         { }

         /// <summary>
-        /// First element in a <see cref="IEnumerable{T}"/> fallback function <see cref="IFunc{In, Out}"/>.
+        /// First element in a <see cref="IEnumerable{T}"/> with a fallback value.
         /// </summary>
         /// <param name="source">source enum</param>
         /// <param name="fallback">fallback func</param>
-        public FirstOf(IEnumerable<T> source, IFunc<IEnumerable<T>, T> fallback) : this(
+        public FirstOf(Func<T, bool> condition, IEnumerable<T> source, T fallback) : this(
+            condition,
             source,
-            (ex, enumerable) => fallback.Invoke(enumerable)
+            (b) => fallback
         )
         { }

@@ -96,27 +100,41 @@
         /// </summary>
         /// <param name="source">source enum</param>
         /// <param name="fallback">fallback func</param>
-        public FirstOf(IEnumerable<T> source, Func<Exception, IEnumerable<T>, T> fallback) : this(
+        public FirstOf(IEnumerable<T> source, IScalar<T> fallback) : this(
+            enm => true,
             source,
-            new BiFuncOf<Exception, IEnumerable<T>, T>((ex, enumerable) => fallback.Invoke(ex, enumerable)
-            )
+            (enm) => fallback.Value()
         )
         { }

         /// <summary>
         /// First element in a <see cref="IEnumerable{T}"/> fallback function <see cref="IBiFunc{X, Y, Z}"/>
         /// </summary>
-        /// <param name="src"></param>
-        /// <param name="fallback"></param>
-        public FirstOf(IEnumerable<T> src, IBiFunc<Exception, IEnumerable<T>, T> fallback)
+        /// <param name="src">source enumerable</param>
+        /// <param name="fallback">fallback if no match</param>
+        public FirstOf(IEnumerable<T> src, Func<IEnumerable<T>, T> fallback) : this(item => true, src, fallback)
+        { }
+
+        /// <summary>
+        /// First element in a <see cref="IEnumerable{T}"/> fallback function <see cref="IBiFunc{X, Y, Z}"/>
+        /// </summary>
+        /// <param name="src">source enumerable</param>
+        /// <param name="fallback">fallback if no match</param>
+        /// <param name="condition">condition to match</param>
+        public FirstOf(Func<T, bool> condition, IEnumerable<T> src, Func<IEnumerable<T>, T> fallback)
         {
             this.src = src;
-            this.fbk = fallback;
+            this.fallBack = fallback;
+            this.condition = condition;
         }

         public T Value()
         {
-            return new ItemAt<T>(this.src, this.fbk).Value();
+            return
+                new ItemAt<T>(
+                    new HeadOf<T>(this.src, 1),
+                    this.fallBack
+                ).Value();
         }
     }
 }


XML-comment formatting

XML-comment formatting

--- src/Autofac.Multitenant/MultitenantContainer.cs
+++ src/Autofac.Multitenant/MultitenantContainer.cs
@@ -53,14 +53,14 @@
     /// that is passed into the container during construction.
     /// </para>
     /// <para>
-    /// The ability to remove (<see cref="RemoveTenant(object)">) or reconfigure
+    /// The ability to remove (<see cref="RemoveTenant(object)"/>) or reconfigure
     /// (<see cref="ReconfigureTenant(object, Action{ContainerBuilder})"/> an
     /// active tenant has been added.  However, it must still be noted that
     /// tenant lifetime scopes are immutable: once they are retrieved,
     /// configured, or an item is resolved, that tenant lifetime scope
     /// cannot be updated or otherwise changed. This is important since
     /// it means you need to configure your defaults and tenant overrides
-    /// early, in application startup.
+    /// early, in application startup.
     /// </para>
     /// <para>
     /// Even when using ReconfigureTenant, the


Check if review is null before editing approval status

--- CVGS/Controllers/ReviewsController.cs
+++ CVGS/Controllers/ReviewsController.cs
@@ -42,6 +42,12 @@
             }

             REVIEW review = db.REVIEWs.Find(memberId, gameId);
+
+            if(review == null)
+            {
+                return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
+            }
+
             review.Approved = true;
             db.Entry(review).State = EntityState.Modified;
             db.SaveChanges();


(GH-552) Use earlier version of GitVersion

After this version, 5.0.1, GitVersion started shipping as a single
contained executable, which means it no longer supports running with
Mono, and as a result, Cake.Recipe won't work on Unix systems.  To
enable support on these platforms, need to pin to this specific version.

--- Cake.Recipe/Content/toolsettings.cake
+++ Cake.Recipe/Content/toolsettings.cake
@@ -43,7 +43,7 @@
         string codecovTool = "#tool nuget:?package=codecov&version=1.12.0",
         string coverallsTool = "#tool nuget:?package=coveralls.net&version=1.0.0",
         string gitReleaseManagerTool = "#tool nuget:?package=GitReleaseManager&version=0.11.0",
-        string gitVersionTool = "#tool nuget:?package=GitVersion.CommandLine&version=5.3.4",
+        string gitVersionTool = "#tool nuget:?package=GitVersion.CommandLine&version=5.0.1",
         string reSharperTools = "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2019.3.4",
         string reSharperReportsTool = "#tool nuget:?package=ReSharperReports&version=0.4.0",
         string kuduSyncTool = "#tool nuget:?package=KuduSync.NET&version=1.5.3",


Fix publish to mp3 creating 3gp instead (BL-10991, BL-10992)

--- src/BloomExe/Publish/Video/RecordVideoWindow.cs
+++ src/BloomExe/Publish/Video/RecordVideoWindow.cs
@@ -525,7 +525,7 @@
 					// review: what size video do we want to play? Won't actually be used.
 					desiredHeight = landscape ? 720 : 1280;
 					desiredWidth = landscape ? 1280 : 720;
-					codec = Codec.H263;
+					codec = Codec.MP3;
 					break;
 			}


Add back method needed by CoreRT

Add back method needed by CoreRT

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>
Signed-off-by: dotnet-bot-corefx-mirror <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/Number.Parsing.cs
+++ src/Common/src/CoreLib/System/Number.Parsing.cs
@@ -956,6 +956,9 @@

             public static unsafe ulong Mantissa(double d) =>
                 *((ulong*)&d) & 0x000fffffffffffff;
+
+            public static unsafe bool Sign(double d) =>
+                (*((uint*)&d + 1) >> 31) != 0;
         }
     }
 }


Remove per-call ContextCallback delegate allocation

Pass the 'this' reference via the state object rather than via the delegate.

--- src/Common/src/System/Net/ContextAwareResult.cs
+++ src/Common/src/System/Net/ContextAwareResult.cs
@@ -484,10 +484,10 @@
                 return;
             }

-            ExecutionContext.Run(context, new ContextCallback(CompleteCallback), null);
-        }
-
-        private void CompleteCallback(object state)
+            ExecutionContext.Run(context, s => ((ContextAwareResult)s).CompleteCallback(), this);
+        }
+
+        private void CompleteCallback()
         {
             if (GlobalLog.IsEnabled)
             {


fix async calls

fix async calls

--- src/Equalizer.Middleware.Core/RegistryClient.cs
+++ src/Equalizer.Middleware.Core/RegistryClient.cs
@@ -55,7 +55,7 @@

         public async Task<IList<RegistryInformation>> FindServiceInstancesAsync(Uri uri)
         {
-            var instances = await FindServiceInstancesAsync();
+            var instances = await FindServiceInstancesAsync().ConfigureAwait(false);
             return FindServiceInstances(uri, instances);
         }


Check the environment variable for the license key

--- CertiPay.Services.PDF/Bootstrapper.cs
+++ CertiPay.Services.PDF/Bootstrapper.cs
@@ -10,7 +10,19 @@
     {
         private static String ABCPdfLicense
         {
-            get { return ConfigurationManager.AppSettings["ABCPDF-License"]; }
+            get
+            {
+                // Check the environment variables for the license key
+
+                String key = "ABCPDF-License";
+
+                if (!String.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(key, EnvironmentVariableTarget.User)))
+                {
+                    return Environment.GetEnvironmentVariable(key, EnvironmentVariableTarget.User);
+                }
+
+                return ConfigurationManager.AppSettings[key];
+            }
         }

         protected override void ConfigureApplicationContainer(TinyIoCContainer container)


fix: Categories list activator click event should not propagate #147

--- src/Fan.Web/Areas/Admin/Pages/Categories.cshtml
+++ src/Fan.Web/Areas/Admin/Pages/Categories.cshtml
@@ -13,7 +13,7 @@
         </v-tabs>
         <v-list class="elevation-1">
             <template v-for="(cat, index) in categories">
-                <v-list-tile avatar @@click="">
+                <v-list-tile avatar @@click="editCat(cat)">
                     <v-list-tile-avatar>
                         <v-icon>folder</v-icon>
                     </v-list-tile-avatar>
@@ -30,7 +30,7 @@
                         <v-chip small>{{ cat.count }}</v-chip>
                     </v-list-tile-action>
                     <v-list-tile-action>
-                        <v-menu bottom left>
+                        <v-menu bottom left @@click.native.stop>
                             <v-btn slot="activator"
                                    icon>
                                 <v-icon>more_vert</v-icon>
@@ -107,6 +107,7 @@
                color="pink"
                dark
                fixed
+               v-once
                @@click="addCat">
             <v-icon>add</v-icon>
         </v-btn>


GenericArgumentResolverTests includes coverage for the behavior for methods with no generic type parameters to resolve.

--- src/Fixie.Tests/GenericArgumentResolverTests.cs
+++ src/Fixie.Tests/GenericArgumentResolverTests.cs
@@ -2,9 +2,25 @@
 {
     using System;
     using System.Collections.Generic;
+    using System.Linq;
+    using Assertions;

     public class GenericArgumentResolverTests
     {
+        static readonly Type[] Empty = { };
+
+        public void ShouldResolveNothingWhenThereAreNoInputParameters()
+        {
+            Resolve("NoParameters", new object[] { })
+                .ShouldEqual(Empty);
+        }
+
+        public void ShouldResolveNothingWhenThereAreNoGenericParameters()
+        {
+            Resolve("NoGenericArguments", new object[] {0, ""})
+                .ShouldEqual(Empty);
+        }
+
         public void ShouldResolveToObjectWhenGenericTypeHasNoMatchingParameters()
         {
             Resolve("NoMatchingParameters", new object[] { 0, "" })
@@ -117,6 +133,8 @@

         class Generic
         {
+            public void NoParameters() { }
+            public void NoGenericArguments(int i, string s) { }
             public void NoMatchingParameters<T>(int i, string s) { }
             public void OneMatchingParameter<T>(T match) { }
             public void MultipleMatchingParameter<T>(T firstMatch, T secondMatch, T thirdMatch) { }


Fixed HashMessageHandler.

Fixed HashMessageHandler.

--- src/Kephas.Core.Endpoints/HashMessageHandler.cs
+++ src/Kephas.Core.Endpoints/HashMessageHandler.cs
@@ -7,6 +7,8 @@
 //   Implements the hash message handler class.
 // </summary>
 // --------------------------------------------------------------------------------------------------------------------
+
+using Kephas.Diagnostics.Contracts;

 namespace Kephas.Core.Endpoints
 {
@@ -46,12 +48,14 @@
         /// <returns>The response promise.</returns>
         public override async Task<HashResponseMessage> ProcessAsync(HashMessage message, IMessagingContext context, CancellationToken token)
         {
+            Requires.NotNullOrEmpty(message.Value, nameof(message.Value));
+
             await Task.Yield();

             var salt = string.IsNullOrEmpty(message.Salt)
                         ? null
                         : Encoding.UTF8.GetBytes(message.Salt);
-            var hash = this.hashingService.Hash(message.Value, ctx => ctx.Salt(salt).UseDefaultSalt(message.UseDefaultSalt));
+            var hash = this.hashingService.Hash(message.Value, ctx => (salt == null ? ctx : ctx.Salt(salt)).UseDefaultSalt(message.UseDefaultSalt));

             var response = new HashResponseMessage
             {


Lucene.Net.Store.CompoundFileWriter refactor: renamed private/internal fields camelCase

--- src/Lucene.Net.Core/Store/CompoundFileWriter.cs
+++ src/Lucene.Net.Core/Store/CompoundFileWriter.cs
@@ -353,23 +353,23 @@

         private sealed class DirectCFSIndexOutput : IndexOutput
         {
-            private readonly CompoundFileWriter OuterInstance;
+            private readonly CompoundFileWriter outerInstance;

             private readonly IndexOutput @delegate;
-            private readonly long Offset;
-            private bool Closed;
-            private FileEntry Entry;
-            private long WrittenBytes;
-            private readonly bool IsSeparate;
+            private readonly long offset;
+            private bool closed;
+            private FileEntry entry;
+            private long writtenBytes;
+            private readonly bool isSeparate;

             internal DirectCFSIndexOutput(CompoundFileWriter outerInstance, IndexOutput @delegate, FileEntry entry, bool isSeparate)
                 : base()
             {
-                this.OuterInstance = outerInstance;
+                this.outerInstance = outerInstance;
                 this.@delegate = @delegate;
-                this.Entry = entry;
-                entry.Offset = Offset = @delegate.FilePointer;
-                this.IsSeparate = isSeparate;
+                this.entry = entry;
+                entry.Offset = offset = @delegate.FilePointer;
+                this.isSeparate = isSeparate;
             }

             public override void Flush()
@@ -379,23 +379,23 @@

             public override void Dispose()
             {
-                if (!Closed)
-                {
-                    Closed = true;
-                    Entry.Length = WrittenBytes;
-                    if (IsSeparate)
+                if (!closed)
+                {
+                    closed = true;
+                    entry.Length = writtenBytes;
+                    if (isSeparate)
                     {
                         @delegate.Dispose();
                         // we are a separate file - push into the pending entries
-                        OuterInstance.pendingEntries.AddLast(Entry);
+                        outerInstance.pendingEntries.AddLast(entry);
                     }
                     else
                     {
                         // we have been written into the CFS directly - release the lock
-                        OuterInstance.ReleaseOutputLock();
+                        outerInstance.ReleaseOutputLock();
                     }
                     // now prune all pending entries and push them into the CFS
-                    OuterInstance.PrunePendingEntries();
+                    outerInstance.PrunePendingEntries();
                 }
             }

@@ -403,36 +403,36 @@
             {
                 get
                 {
-                    return @delegate.FilePointer - Offset;
+                    return @delegate.FilePointer - offset;
                 }
             }

             public override void Seek(long pos)
             {
-                Debug.Assert(!Closed);
-                @delegate.Seek(Offset + pos);
+                Debug.Assert(!closed);
+                @delegate.Seek(offset + pos);
             }

             public override long Length
             {
                 get
                 {
-                    Debug.Assert(!Closed);
-                    return @delegate.Length - Offset;
+                    Debug.Assert(!closed);
+                    return @delegate.Length - offset;
                 }
             }

             public override void WriteByte(byte b)
             {
-                Debug.Assert(!Closed);
-                WrittenBytes++;
+                Debug.Assert(!closed);
+                writtenBytes++;
                 @delegate.WriteByte(b);
             }

             public override void WriteBytes(byte[] b, int offset, int length)
             {
-                Debug.Assert(!Closed);
-                WrittenBytes += length;
+                Debug.Assert(!closed);
+                writtenBytes += length;
                 @delegate.WriteBytes(b, offset, length);
             }


Add enum member into LuryExceptionType

Add enum member into LuryExceptionType

--- src/Lury/Runtime/Exception/LuryExceptionType.cs
+++ src/Lury/Runtime/Exception/LuryExceptionType.cs
@@ -27,10 +27,20 @@
 // THE SOFTWARE.
 using System;

-namespace Lury
+namespace Lury.Runtime
 {
     public enum LuryExceptionType
     {
+        Unknown = -1,
+
+        NilReference,
+        DivideByZero,
+        NotSupportedOperation,
+        NotEnoughFunctionArgumentNumber,
+        WrongBreak,
+        ConditionValueIsNotBoolean,
+        AttributeIsNotFound,
+        WrongLValue,
     }
 }


Added more test data to the SerializedJsonPacket_WithValidData_IsValid test.

--- SharpRaven.UnitTests/SerializationTests.cs
+++ SharpRaven.UnitTests/SerializationTests.cs
@@ -27,6 +27,16 @@
                     { "key1", "value1" },
                     { "key2", "value2" },
                 },
+                Request = new SentryRequest
+                {
+                    QueryString = "?a=b&c=d",
+                    Data = new
+                    {
+                        A = true,
+                        B = 1,
+                        C = "Hello"
+                    }
+                }
             };

             JObject jPacket = JObject.Parse(packet.ToString());


dfdf

dfdf

(TFS CS 2884)

--- Signum.Web/Controllers/SignumController.cs
+++ Signum.Web/Controllers/SignumController.cs
@@ -86,8 +86,8 @@

             this.ModelState.FromDictionary(errors, Request.Form);

-            if (entity is IdentifiableEntity && (errors == null || errors.Count == 0))
-                Database.Save((IdentifiableEntity)entity);
+            //if (entity is IdentifiableEntity && (errors == null || errors.Count == 0))
+            //    Database.Save((IdentifiableEntity)entity);

             return Content("{\"ModelState\":" + this.ModelState.ToJsonData() + ",\"" + TypeContext.Separator + EntityBaseKeys.ToStr + "\":" + entity.ToString().Quote() + "}");
         }


(TFS CS 5185)

(TFS CS 5185)

--- Signum.Web/Controllers/SignumController.cs
+++ Signum.Web/Controllers/SignumController.cs
@@ -330,10 +330,11 @@
             Type type = Navigator.ResolveType(sfRuntimeType);
             IdentifiableEntity entity = null;

-            if (Request.Form.AllKeys.Contains(ViewDataKeys.TabId))
-            {
-                IdentifiableEntity parent = (IdentifiableEntity)Session[Request.Form[ViewDataKeys.TabId]];
-                entity = (IdentifiableEntity)MappingContext.FindSubentity(parent, prefix);
+            if (this.IsReactive())
+            {
+                IdentifiableEntity parent = (IdentifiableEntity)Session[this.TabID()];
+                if (prefix.HasText() && !prefix.StartsWith("New"))
+                    entity = (IdentifiableEntity)MappingContext.FindSubentity(entity, prefix);
             }
             else
             {


(TFS CS 6724)

(TFS CS 6724)

--- Signum.Web/HtmlHelpers/ScriptHtmlHelper.cs
+++ Signum.Web/HtmlHelpers/ScriptHtmlHelper.cs
@@ -152,7 +152,7 @@

         public HtmlCallbackString(Func<string, string> render)
         {
-            this.render =render;
+            this.render = render;
         }

         public string ToHtmlString()


remove IsByAll autocomplete protection, necessary for ExcelAttachment and EmailReport

--- Signum.Web/LineHelpers/EntityLineHelper.cs
+++ Signum.Web/LineHelpers/EntityLineHelper.cs
@@ -120,9 +120,6 @@
             if (!entityLine.Autocomplete)
                 return helper.FormControlStatic(entityLine, entityLine.Compose(EntityBaseKeys.ToStr), null, null);

-            if (entityLine.Implementations.Value.IsByAll)
-                throw new InvalidOperationException("Autocomplete is not possible with ImplementedByAll");
-
             var htmlAttr = new Dictionary<string, object>
             {
                 {"class", "form-control sf-entity-autocomplete"},


More comments on the reports controller

More comments on the reports controller

--- src/Merchello.Web/Reporting/ReportController.cs
+++ src/Merchello.Web/Reporting/ReportController.cs
@@ -61,9 +61,10 @@
         /// The route name.
         /// </param>
         /// <typeparam name="T">
+        /// The controller type
         /// </typeparam>
         /// <returns>
-        /// The <see cref="KeyValuePair"/>.
+        /// The key value pair
         /// </returns>
         protected static KeyValuePair<string, object> GetBaseUrl<T>(string routeName) where T : ReportController
         {


Fix race condition.

Fix race condition.

--- src/MsgPack.Rpc/Rpc/Protocols/MessageContext.cs
+++ src/MsgPack.Rpc/Rpc/Protocols/MessageContext.cs
@@ -19,8 +19,7 @@
 #endregion -- License Terms --

 using System;
-using System.Collections.Generic;
-using System.Diagnostics.Contracts;
+using System.Globalization;
 using System.Net.Sockets;
 using System.Threading;

@@ -102,20 +101,16 @@
 			get { return this._boundTransport; }
 		}

-		private EventHandler<SocketAsyncEventArgs> _boundEventHandler;
-
 		internal virtual void SetTransport( IContextBoundableTransport transport )
 		{
 			this.AcceptSocket = transport.BoundSocket;
-			Contract.Assert( this._boundEventHandler == null, "Bounded: " + this._boundEventHandler );
-			if ( this._boundEventHandler != null )
+			var oldBoundTransport = Interlocked.CompareExchange( ref this._boundTransport, transport, null );
+			if ( oldBoundTransport != null )
 			{
-				this.Completed -= this._boundEventHandler;
+				throw new InvalidOperationException( String.Format( CultureInfo.CurrentCulture, "This context is already bounded to '{0}'(Socket: 0x{1:X}).", transport.GetType(), transport.BoundSocket == null ? IntPtr.Zero : transport.BoundSocket.Handle ) );
 			}

-			this._boundEventHandler = transport.OnSocketOperationCompleted;
-			this.Completed += this._boundEventHandler;
-			this._boundTransport = transport;
+			this.Completed += transport.OnSocketOperationCompleted;
 		}

 		protected MessageContext() { }
@@ -131,18 +126,18 @@
 			try { }
 			finally
 			{
-				if ( this._boundEventHandler != null )
+				var boundTransport = Interlocked.Exchange( ref this._boundTransport, null );
+				if ( boundTransport != null )
 				{
-					this.Completed -= this._boundEventHandler;
-					this._boundTransport = null;
+					this.Completed -= boundTransport.OnSocketOperationCompleted;
 				}

 				this._completedSynchronously = false;

-				if ( this._asLease != null )
+				var asLease = Interlocked.Exchange( ref this._asLease, null );
+				if ( asLease != null )
 				{
-					this._asLease.Dispose();
-					this._asLease = null;
+					asLease.Dispose();
 				}
 			}
 		}


Fixed SettingsFile creating two entries for lines that contained both equal signs and colons.

--- ChargedMinersLauncher/SettingsFile.cs
+++ ChargedMinersLauncher/SettingsFile.cs
@@ -21,6 +21,7 @@
                 var match = SettingLiteralRegex.Match( line );
                 if( match.Success ) {
                     settings.Add( match.Groups[1].Value, match.Groups[2].Value );
+                    continue;
                 }
                 match = SettingRegex.Match( line );
                 if( match.Success ) {


Fixed fullscreen mode, thanks to Lošťa (⌐■_■)

--- SnakeTheResurrection/Utilities/Renderer.cs
+++ SnakeTheResurrection/Utilities/Renderer.cs
@@ -21,6 +21,9 @@

                 DllImports.SetFont("Lucida Console", 1, 1);
                 DllImports.ConsoleFullscreenMode = true;
+
+                // Make it a real fullscreen :D
+                Console.SetWindowSize(Console.LargestWindowWidth, Console.LargestWindowHeight);

                 short windowHeight  = (short)Console.WindowHeight;
                 short windowWidth   = (short)Console.WindowWidth;


Fixed issue where the checkin print window wasn't redirecting

--- CheckinSuite/Views/Print/Index.cshtml
+++ CheckinSuite/Views/Print/Index.cshtml
@@ -92,7 +92,7 @@
         window.print();
         $(".print-area").hide();

-        IdleListener.add(function () {
+        setInterval(function () { // setTimeout for some strange reason isn't working
             window.location = '@ViewBag.redirectUrl';
         }, 1000);
     });


syncing kt share range with radar (#2142)

--- Source/ACE.Server/Managers/QuestManager.cs
+++ Source/ACE.Server/Managers/QuestManager.cs
@@ -448,7 +448,7 @@
                     // ensure within shareable distance
                     var shareable = landblockRange ?
                         Player.CurrentLandblock == fellow.CurrentLandblock || Player.Location.DistanceTo(fellow.Location) <= 192.0f :
-                        Player.Location.DistanceTo(fellow.Location) <= shareableRange;      // 2d or 3d distance here?
+                        Player.Location.Distance2D(fellow.Location) <= shareableRange && Player.ObjMaint.VisibleObjects.ContainsKey(fellow.Guid.Full);      // 2d visible distance / radar range?

                     if (shareable)
                         fellow.QuestManager.HandleKillTask(_questName, obj, 0.0f);


React to HttpAbstractions

React to HttpAbstractions

--- test/MusicStore.Test/ManageControllerTest.cs
+++ test/MusicStore.Test/ManageControllerTest.cs
@@ -92,7 +92,7 @@
         {
             public Task<AuthenticateResult> AuthenticateAsync(HttpContext context, string scheme)
             {
-                return Task.FromResult(AuthenticateResult.None());
+                return Task.FromResult(AuthenticateResult.NoResult());
             }

             public Task ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties)


Fixes #10

Fixes #10

--- Source/Chargify.NET/Interfaces/IPayment.cs
+++ Source/Chargify.NET/Interfaces/IPayment.cs
@@ -46,7 +46,7 @@
         int AmountInCents { get; }

         /// <summary>
-        /// The amount of the payment
+        /// The amount of the payment (in dollars and cents)
         /// </summary>
         decimal Amount { get; }


Switchig to IsolationLevel.ReadUncommitted for Sqlite

--- src/Orchard.Data/ServiceCollectionExtensions.cs
+++ src/Orchard.Data/ServiceCollectionExtensions.cs
@@ -44,7 +44,7 @@
                     //    var databaseFile = Path.Combine(databaseFolder, "yessql.db");
                     //    Directory.CreateDirectory(databaseFolder);
                     //    connectionFactory = new DbConnectionFactory<SqliteConnection>($"Data Source={databaseFile};Cache=Shared", false);
-                    //    isolationLevel = IsolationLevel.Serializable;
+                    //    isolationLevel = IsolationLevel.ReadUncommitted;
                     //    break;
                     default:
                         throw new ArgumentException("Unknown database provider: " + shellSettings.DatabaseProvider);


updated assembly

updated assembly

--- src/app/Properties/AssemblyInfo.cs
+++ src/app/Properties/AssemblyInfo.cs
@@ -11,9 +11,6 @@
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
-[assembly: ThemeInfo(
-    ResourceDictionaryLocation.None,
-    ResourceDictionaryLocation.SourceAssembly
-)]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: Guid("D55998FC-5472-4419-A226-48FF75EDFADC")]
+[assembly: AssemblyVersion("1.0.6.0")]
+[assembly: AssemblyFileVersion("1.0.6.0")]


fixed commas as decimal separator using invariant culture

--- src/IxMilia.Stl/StlWriter.cs
+++ src/IxMilia.Stl/StlWriter.cs
@@ -1,5 +1,6 @@
 // Copyright (c) IxMilia.  All Rights Reserved.  Licensed under the Apache License, Version 2.0.  See License.txt in the project root for license information.

+using System.Globalization;
 using System.IO;

 namespace IxMilia.Stl
@@ -73,12 +74,16 @@

         private static string NormalToString(StlNormal normal)
         {
-            return string.Format("{0} {1} {2}", normal.X.ToString(FloatFormat), normal.Y.ToString(FloatFormat), normal.Z.ToString(FloatFormat));
+            return string.Format("{0} {1} {2}", normal.X.ToString(FloatFormat, CultureInfo.InvariantCulture)
+                , normal.Y.ToString(FloatFormat, CultureInfo.InvariantCulture)
+                , normal.Z.ToString(FloatFormat, CultureInfo.InvariantCulture));
         }

         private static string VertexToString(StlVertex vertex)
         {
-            return string.Format("{0} {1} {2}", vertex.X.ToString(FloatFormat), vertex.Y.ToString(FloatFormat), vertex.Z.ToString(FloatFormat));
+            return string.Format("{0} {1} {2}", vertex.X.ToString(FloatFormat, CultureInfo.InvariantCulture)
+                , vertex.Y.ToString(FloatFormat, CultureInfo.InvariantCulture)
+                , vertex.Z.ToString(FloatFormat, CultureInfo.InvariantCulture));
         }
     }
 }


Sort usings

Sort usings

--- src/TeamFoundationServer/TfsWorkspaceWrapper.cs
+++ src/TeamFoundationServer/TfsWorkspaceWrapper.cs
@@ -2,8 +2,8 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using Microsoft.TeamFoundation.VersionControl.Client;
 using TFS = Microsoft.TeamFoundation.VersionControl.Client;
-using Microsoft.TeamFoundation.VersionControl.Client;

 namespace NuGet.TeamFoundationServer {
     public class TfsWorkspaceWrapper : ITfsWorkspace {