Changed the color defaults to prevent unexpected behavior

--- AnimalCrossingQR/AnimalCrossingQR/MainForm.Designer.cs
+++ AnimalCrossingQR/AnimalCrossingQR/MainForm.Designer.cs
@@ -322,7 +322,7 @@
             this.patternEditor.LeftColor = ((byte)(0));
             this.patternEditor.Location = new System.Drawing.Point(95, 35);
             this.patternEditor.Name = "patternEditor";
-            this.patternEditor.RightColor = ((byte)(1));
+            this.patternEditor.RightColor = ((byte)(0));
             this.patternEditor.ShowGrid = false;
             this.patternEditor.Size = new System.Drawing.Size(294, 300);
             this.patternEditor.TabIndex = 19;
@@ -331,9 +331,9 @@
             //
             this.paletteControl.Location = new System.Drawing.Point(12, 27);
             this.paletteControl.Name = "paletteControl";
-            this.paletteControl.SecondarySelectedIndex = -1;
-            this.paletteControl.SelectedIndex = -1;
-            this.paletteControl.SelectedItem = -1;
+            this.paletteControl.SecondarySelectedIndex = 0;
+            this.paletteControl.SelectedIndex = 0;
+            this.paletteControl.SelectedItem = 31;
             this.paletteControl.Selection = AnimalCrossingQR.PaletteControl.SelectionType.DoubleSelect;
             this.paletteControl.Size = new System.Drawing.Size(77, 308);
             this.paletteControl.TabIndex = 2;


Android circle image renderer fixed.

Android circle image renderer fixed.

--- Anuracode.Forms.Controls.Droid/ManagedImageRenderer.cs
+++ Anuracode.Forms.Controls.Droid/ManagedImageRenderer.cs
@@ -1,56 +0,0 @@
-// <copyright file="ManagedImageRenderer.cs" company="Anura Code">
-// All rights reserved.
-// </copyright>
-// <author>Alberto Puyana</author>
-
-using System;
-using System.ComponentModel;
-using Xamarin.Forms;
-using Xamarin.Forms.Platform.Android;
-
-namespace Anuracode.Forms.Controls.Renderers
-{
-    /// <summary>
-    /// Image renderer managed.
-    /// </summary>
-    public class ManagedImageRenderer : ImageRenderer
-    {
-        /// <summary>
-        /// On element changed.
-        /// </summary>
-        /// <param name="e">Arguments of the event.</param>
-        protected override void OnElementChanged(ElementChangedEventArgs<Image> e)
-        {
-            try
-            {
-                base.OnElementChanged(e);
-            }
-            catch (Exception ex)
-            {
-                AC.TraceError("ManagedImageRenderer problem: {0}", ex);
-            }
-        }
-
-        /// <summary>
-        /// Property changed.
-        /// </summary>
-        /// <param name="sender">Sender of the event.</param>
-        /// <param name="e">Arguments of the event.</param>
-        protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
-        {
-            if (this.Control == null || this.Element == null)
-            {
-                return;
-            }
-
-            try
-            {
-                base.OnElementPropertyChanged(sender, e);
-            }
-            catch (Exception ex)
-            {
-                AC.TraceError("ManagedImageRenderer problem: {0}", ex);
-            }
-        }
-    }
-}


Fix conditions as step should be called with PerformAction

--- environment/Assets/Scripts/AgentBehaviour.cs
+++ environment/Assets/Scripts/AgentBehaviour.cs
@@ -64,10 +64,9 @@
             if(client.HasAction) {
                 string action = client.GetAction();
                 controller.PerformAction(action);
-            } else {
-                if(!client.Calling) {
-                    client.Step(GenerateMessage());
-                }
+            }
+            if(!client.Calling) {
+                client.Step(GenerateMessage());
             }
         }
     }


(#2220) Add convert command to allowed list

In a future version of Chocolatey Licensed, a new convert command is
going to be introduced, which will work with nupkg files. We are
preemptively adding the convert command in the next release of
Chocolatey, so that we don't have to release another version nearer the
time we ship the convert command.

--- src/chocolatey.console/Program.cs
+++ src/chocolatey.console/Program.cs
@@ -176,7 +176,7 @@
         private static void warn_on_nuspec_or_nupkg_usage(string[] args, ChocolateyConfiguration config)
         {
             var commandLine = Environment.CommandLine;
-            if (!(commandLine.contains(" pack ") || commandLine.contains(" push ")) && (commandLine.contains(".nupkg") || commandLine.contains(".nuspec")))
+            if (!(commandLine.contains(" pack ") || commandLine.contains(" push ") || commandLine.contains("convert")) && (commandLine.contains(".nupkg") || commandLine.contains(".nuspec")))
             {
                 if (config.RegularOutput) "chocolatey".Log().Warn("The use of .nupkg or .nuspec in for package name or source is known to cause issues. Please use the package id from the nuspec `<id />` with `-s .` (for local folder where nupkg is found).");
             }


added event hooks for mouse events

added event hooks for mouse events

--- Client/MainWindow.cs
+++ Client/MainWindow.cs
@@ -62,7 +62,7 @@
 	public MainWindow(int m): base(Gtk.WindowType.Toplevel)
 	{
 		Build();
-
+
 		/* Instantiate client states */
 		clientStates = new IClientState[4]
 		{
@@ -84,6 +84,19 @@
 		window = mainDrawingArea.GdkWindow;
 		drawable = (Gdk.Drawable) window;

+		mainDrawingArea.AddEvents(
+			(int) Gdk.EventMask.ButtonPressMask |
+			(int) Gdk.EventMask.ButtonReleaseMask |
+			(int) Gdk.EventMask.PointerMotionMask |
+			(int) Gdk.EventMask.KeyPressMask |
+			(int) Gdk.EventMask.KeyReleaseMask);
+
+		mainDrawingArea.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(OnMainDrawingAreaButtonPressEvent);
+		mainDrawingArea.ButtonReleaseEvent += new global::Gtk.ButtonReleaseEventHandler(OnMainDrawingAreaButtonReleaseEvent);
+		mainDrawingArea.MotionNotifyEvent += new global::Gtk.MotionNotifyEventHandler(OnMainDrawingAreaMotionNotifyEvent);
+		mainDrawingArea.KeyPressEvent += new global::Gtk.KeyPressEventHandler(OnMainDrawingAreaKeyPressEvent);
+		mainDrawingArea.KeyReleaseEvent += new global::Gtk.KeyReleaseEventHandler(OnMainDrawingAreaKeyReleaseEvent);
+
 		gc = new Gdk.GC(drawable);
 		gc.ClipRectangle = new Gdk.Rectangle(0, 0, width, height);

@@ -99,6 +112,40 @@

 		if (config.BroadcasterAutoconnect)
 			OnUserConnect(config.BroadcasterHostname, config.BroadcasterPort);
+	}
+
+	protected void OnMainDrawingAreaButtonPressEvent(object o, Gtk.ButtonPressEventArgs args)
+	{
+		Gdk.EventButton e = args.Event;
+
+		Console.WriteLine("ButtonPressEvent button:{0} ({1},{2}) ({3},{4})",
+			e.Button, e.X, e.Y, e.XRoot, e.YRoot);
+	}
+
+	protected void OnMainDrawingAreaButtonReleaseEvent(object o, Gtk.ButtonReleaseEventArgs args)
+	{
+		Gdk.EventButton e = args.Event;
+
+		Console.WriteLine("ButtonReleaseEvent button:{0} ({1},{2}) ({3},{4})",
+			e.Button, e.X, e.Y, e.XRoot, e.YRoot);
+	}
+
+	protected void OnMainDrawingAreaMotionNotifyEvent(object o, Gtk.MotionNotifyEventArgs args)
+	{
+		Gdk.EventMotion e = args.Event;
+
+		Console.WriteLine("MotionNotifyEvent ({0},{1}) ({2},{3})",
+			e.X, e.Y, e.XRoot, e.YRoot);
+	}
+
+	protected void OnMainDrawingAreaKeyPressEvent(object o, Gtk.KeyPressEventArgs args)
+	{
+		Console.WriteLine("KeyPressEvent key:{0}", args.Event.Key);
+	}
+
+	protected void OnMainDrawingAreaKeyReleaseEvent(object o, Gtk.KeyReleaseEventArgs args)
+	{
+		Console.WriteLine("KeyReleaseEvent key:{0}", args.Event.Key);
 	}

 	/**


Issue #45 and some state comparison refactoring

--- Client/MainWindow.cs
+++ Client/MainWindow.cs
@@ -233,11 +233,11 @@
 	 **/
 	protected void OnDeleteEvent(object sender, DeleteEventArgs a)
 	{
-		if (currentState.ToString().Equals(clientStates[RECEIVER_AUTHENTICATED_STATE].ToString()))
+		if (currentState == clientStates[RECEIVER_AUTHENTICATED_STATE])
 		{
 			sessionClient.SendLeaveReq(username);
 		}
-		else if (currentState.ToString().Equals(clientStates[SENDER_CREATED_STATE].ToString()))
+		else if (currentState == clientStates[SENDER_CREATED_STATE])
 		{
 			sessionClient.SendTermReq(sessionKey.ToCharArray());
 		}
@@ -255,11 +255,13 @@
 	 **/
 	protected void OnQuitActionActivated(object sender, System.EventArgs e)
 	{
-		if (currentState.ToString().Equals(clientStates[RECEIVER_AUTHENTICATED_STATE].ToString()))
+		if (currentState == clientStates[RECEIVER_AUTHENTICATED_STATE])
 		{
 			sessionClient.SendLeaveReq(username);
 		}
-		else if (currentState.ToString().Equals(clientStates[SENDER_CREATED_STATE].ToString()))
+		else if (currentState == clientStates[SENDER_CREATED_STATE] ||
+			currentState == clientStates[SENDER_SENDING_STATE] ||
+			currentState == clientStates[SENDER_SENDING_REMOTE_STATE])
 		{
 			sessionClient.SendTermReq(sessionKey.ToCharArray());
 		}
@@ -695,17 +697,18 @@
 			DisplayStatusText(username + " has " + type + " the session.");
 		}

-		if(type.Equals("control of") && this.username.Equals(username))
-		{
-			controller = username;//set the controller information
-			if(currentState.ToString().Equals(clientStates[RECEIVER_AUTHENTICATED_STATE].ToString()))
+		if (type.Equals("control of") && this.username.Equals(username))
+		{
+			// Save the controller's username
+			controller = username;
+			if (currentState == clientStates[RECEIVER_AUTHENTICATED_STATE])
 			{
 				currentState = clientStates[RECEIVER_IN_CONTROL_STATE];
 				currentState.refresh();
 				DisplayParticipants();
 			}

-			if(currentState.ToString().Equals(clientStates[SENDER_SENDING_REMOTE_STATE].ToString()))
+			if (currentState == clientStates[SENDER_SENDING_REMOTE_STATE])
 			{
 				currentState = clientStates[SENDER_SENDING_STATE];
 				currentState.refresh();
@@ -714,17 +717,18 @@

 		}

-		if(type.Equals("control of") && !this.username.Equals(username))
-		{
-			controller = username;//set the controller information
-			if(currentState.ToString().Equals(clientStates[RECEIVER_IN_CONTROL_STATE].ToString()))
+		if (type.Equals("control of") && !this.username.Equals(username))
+		{
+			// Save controller's username
+			controller = username;
+			if (currentState == clientStates[RECEIVER_IN_CONTROL_STATE])
 			{
 				currentState = clientStates[RECEIVER_AUTHENTICATED_STATE];
 				currentState.refresh();
 				DisplayParticipants();
 			}

-			if(currentState.ToString().Equals(clientStates[SENDER_CREATED_STATE].ToString()) || currentState.ToString().Equals(clientStates[SENDER_SENDING_STATE].ToString()))
+			if (currentState == clientStates[SENDER_CREATED_STATE] || currentState == clientStates[SENDER_SENDING_STATE])
 			{
 				currentState = clientStates[SENDER_SENDING_REMOTE_STATE];
 				currentState.refresh();


TileMapTests: Add test case showcasing handling of tile culling when map is scaled

--- tests/tests/classes/tests/TileMapTest/TileMapTest.cs
+++ tests/tests/classes/tests/TileMapTest/TileMapTest.cs
@@ -1133,7 +1133,7 @@
     public class TileMapTestScene : TestScene
     {
         static int sceneIdx = -1;
-        static int MAX_LAYER = 34;
+        static int MAX_LAYER = 35;

         static CCLayer createTileMapLayer(int nIndex)
         {
@@ -1268,6 +1268,8 @@
                 case 32:
                     return new TMXLargeMapTest();
                 case 33:
+                    return new TMXLargeMapScalingTest();
+                case 34:
                     return new TMXSuperLargeMapTest();
 #endif
             }
@@ -1411,6 +1413,26 @@
             get { return "TMX Large map"; }
         }
     }
+
+    public class TMXLargeMapScalingTest : TileDemo
+    {
+        public TMXLargeMapScalingTest() : base("TileMaps/large_map")
+        {
+            var action = new CCRepeatForever(new CCSequence(new CCScaleTo(2.0f, 0.5f), new CCScaleTo(2.0f, 2f)));
+            tileLayersContainer.RunAction(action);
+        }
+
+        public override string Title
+        {
+            get { return "TMX Large map"; }
+        }
+
+        public override string Subtitle
+        {
+            get { return "Making sure culling handles scaling of map"; }
+        }
+    }
+

     public class TMXSuperLargeMapTest : TileDemo
     {


Issue refs #1484: done tasks for all four projects

--- AGO.Tasks/TestDataService.cs
+++ AGO.Tasks/TestDataService.cs
@@ -287,7 +287,6 @@

 		protected void DoPopulateTasks(dynamic context, dynamic projects, dynamic taskTypes, dynamic propertyTypes)
 		{
-			var seqnum = 0;
 			Func<int, TaskTypeModel, TaskStatus, TaskPriority, string, DateTime?, ProjectModel, dynamic[], TaskModel> createTask =
 				(num, type, status, priority, content, dueDate, proj, users) =>
 			{
@@ -330,10 +329,11 @@
 			};

 			//Software
+			var seqnum = 0;
 			var sp = projects.Software;
 			var stt = taskTypes.Software;
 			var st1 = createTask(seqnum++, stt.Feature, TaskStatus.Completed, TaskPriority.Low,
-				"Workflow configuration", DateTime.Now.AddDays(3), sp, new[] { context.User1 });
+				"Workflow configuration", DateTime.Now.AddDays(3), sp, new[] { context.User1, context.User2 });
 			var st2 = createTask(seqnum++, stt.Bug, TaskStatus.NotStarted, TaskPriority.High,
 				"Ticket subject and text cuting when recieving from E-mail", DateTime.Now.AddDays(1), sp, new[] { context.User1 });
 			var st3 = createTask(seqnum++, stt.Feature, TaskStatus.InWork, TaskPriority.Normal,
@@ -341,9 +341,63 @@
 			var st4 = createTask(seqnum++, stt.Feature, TaskStatus.Closed, TaskPriority.Normal,
 				"Improve usage of label \"button_update\"", DateTime.Now.AddDays(-10), sp, new[] { context.User1 });
 			var st5 = createTask(seqnum++, stt.Support, TaskStatus.Suspended, TaskPriority.Normal,
-				"Plugin rollback migration", DateTime.Now.AddDays(-1), sp, new[] { context.User1 });
+				"Plugin rollback migration", DateTime.Now.AddDays(-1), sp, new[] { context.User3 });
 			var st6 = createTask(seqnum++, stt.Bug, TaskStatus.NotStarted, TaskPriority.High,
-				"Can't move parent ticket between projects", DateTime.Now.AddDays(1), sp, new[] { context.User1 });
+				"Can't move parent ticket between projects", DateTime.Now.AddDays(1), sp,
+				new[] { context.User1, context.User2, context.User3 });
+
+			//CRM
+			seqnum = 0;
+			var crm = projects.CRM;
+			var crmtt = taskTypes.CRM;
+			var ct1 = createTask(seqnum++, crmtt.Upselling, TaskStatus.InWork, TaskPriority.Normal,
+			                     "Launch test compaign", DateTime.Now.AddDays(7), crm, new[] {context.User2});
+			var ct2 = createTask(seqnum++, crmtt.Audit, TaskStatus.Completed, TaskPriority.High,
+								 "Prepare for audit", DateTime.Now.AddDays(-2), crm, new[] { context.User1 });
+			var ct3 = createTask(seqnum++, crmtt.Personal, TaskStatus.Closed, TaskPriority.Normal,
+								 "Call Mr. Cobson for new bills", DateTime.Now.AddDays(-15), crm, new[] { context.User3 });
+			var ct4 = createTask(seqnum++, crmtt.Upselling, TaskStatus.NotStarted, TaskPriority.Low,
+								 "Meeting with CEOs", null, crm, new[] { context.User1, context.User3 });
+			var ct5 = createTask(seqnum++, crmtt.Upselling, TaskStatus.NotStarted, TaskPriority.Normal,
+								 "Email partners (confirm $30,000 deal)", DateTime.Now.AddDays(2), crm, new[] { context.User2 });
+
+			//Personal
+			seqnum = 0;
+			var pp = projects.Personal;
+			var ptt = taskTypes.Personal;
+			var pt1 = createTask(seqnum++, ptt.Home, TaskStatus.NotStarted, TaskPriority.Normal,
+			                     "after test, get book to read", null, pp, new[] {context.User2});
+			var pt2 = createTask(seqnum++, ptt.Bills, TaskStatus.NotStarted, TaskPriority.Normal,
+								 "pay car insurance", DateTime.Now.AddDays(26), pp, new[] { context.User2 });
+			var pt3 = createTask(seqnum++, ptt.Web, TaskStatus.InWork, TaskPriority.Normal,
+								 "stock pictures", null, pp, new[] { context.User2 });
+			var pt4 = createTask(seqnum++, ptt.Work, TaskStatus.Closed, TaskPriority.High,
+								 "call to office for tomorrow meeting issues", DateTime.Now, pp, new[] { context.User2 });
+			var pt5 = createTask(seqnum++, ptt.Home, TaskStatus.Completed, TaskPriority.Normal,
+								 "plan for hispanohablantes", DateTime.Now.AddDays(-5), pp, new[] { context.User2 });
+			var pt6 = createTask(seqnum++, ptt.Web, TaskStatus.NotStarted, TaskPriority.Normal,
+								 "emotion posters", null, pp, new[] { context.User2 });
+
+			//Helpdesk
+			seqnum = 0;
+			var hp = projects.Helpdesk;
+			var htt = taskTypes.Helpdesk;
+			var ht1 = createTask(seqnum++, htt.Consult, TaskStatus.InWork, TaskPriority.Normal,
+			                     "Can't connect to office vpn", DateTime.Now, hp, new[] {context.User2});
+			var ht2 = createTask(seqnum++, htt.Support, TaskStatus.Closed, TaskPriority.Normal,
+								 "Remove paper jam from fax on office 314", DateTime.Now, hp, new[] { context.User1 });
+			var ht3 = createTask(seqnum++, htt.Management, TaskStatus.NotStarted, TaskPriority.High,
+								 "Calculate total work hours at the end of week", DateTime.Now.AddDays(2), hp, new[] { context.Admin });
+			var ht4 = createTask(seqnum++, htt.Test, TaskStatus.NotStarted, TaskPriority.Low,
+								 "Execute memory test on new laptops 23433 and 23434", null, hp, new[] { context.User1 });
+			var ht5 = createTask(seqnum++, htt.Consult, TaskStatus.NotStarted, TaskPriority.Normal,
+								 "Needs help for SAP in accounting department", DateTime.Now.AddDays(1), hp, new[] { context.User3 });
+			var ht6 = createTask(seqnum++, htt.Support, TaskStatus.NotStarted, TaskPriority.High,
+								 "No wifi in meeting room", DateTime.Now, hp, new[] { context.User2 });
+			var ht7 = createTask(seqnum++, htt.Management, TaskStatus.Completed, TaskPriority.Normal,
+								 "Plan vacations for next year", DateTime.Now.AddDays(-2), hp, new[] { context.Admin });
+			var ht8 = createTask(seqnum, htt.Support, TaskStatus.Closed, TaskPriority.Normal,
+								 "Move accounting database backup to NV office", DateTime.Now.AddDays(-6), hp, new[] { context.User3 });

 //			createTask(taskTypes.Inventory, TaskStatus.NotStarted, TaskPriority.Normal, null, null);
 //			createTask(taskTypes.Calculations, TaskStatus.InWork, TaskPriority.High, "Calculate year-ending salary bonuses", DateTime.Now.AddDays(2));


Persist query terms

Persist query terms

Update to allow query to be stored throughout the application process

--- lesson07/RealEstateXamarinAndroidDemo/MainActivity.cs
+++ lesson07/RealEstateXamarinAndroidDemo/MainActivity.cs
@@ -89,10 +89,14 @@
         private int ExecListingsSearch(string q = null, bool countOnly = false)
         {
             // Execute a search using the supplied text and apply the results to a new listings list page
-            string url = _serviceUri + AzureSearchUrl + "*";
-
-            if (q != "")
+            string url = _serviceUri + "*";
+            if (q != null)
+            {
                 url = _serviceUri + AzureSearchUrl + q;
+                StoredSearchQuery = q;
+            }
+            else if (StoredSearchQuery != null)
+                url = _serviceUri + AzureSearchUrl + StoredSearchQuery;

             // Append the count request
             url += "&$count=true";


Fixes for something (long time ago, forgot what they do)

--- source/Nerven.Taskuler.Core/TaskulerWorker.cs
+++ source/Nerven.Taskuler.Core/TaskulerWorker.cs
@@ -313,6 +313,11 @@
                         break;
                     }

+                    if (_schedule.Value._Tasks.IsEmpty)
+                    {
+                        continue;
+                    }
+
                     var _scheduleHandle = _schedule.Value;
                     var _tickResponse = _scheduleHandle.Schedule.Tick(_Resolution, _epoch, _prevDuration, _nextDuration);

@@ -541,19 +546,22 @@

             public void Remove()
             {
-                Must.Assertion
-                    .Assert<InvalidOperationException>(!_Removed);
+                if (_Removed)
+                {
+                    return;
+                }

                 _Removed = true;
                 _TaskHandle _taskHandle;
-                _ScheduleHandle._Tasks.TryRemove(Key, out _taskHandle);
-
-                lock (_Worker._StartStopLock)
-                {
-                    if (!_Worker._Faulted && _Worker._Running)
-                    {
-                        _TaskWorkHandle _taskWorkHandler;
-                        _ScheduleHandle._TaskWorkHandles.TryRemove(Key, out _taskWorkHandler);
+                if (_ScheduleHandle._Tasks.TryRemove(Key, out _taskHandle))
+                {
+                    lock (_Worker._StartStopLock)
+                    {
+                        if (!_Worker._Faulted && _Worker._Running)
+                        {
+                            _TaskWorkHandle _taskWorkHandler;
+                            _ScheduleHandle._TaskWorkHandles.TryRemove(Key, out _taskWorkHandler);
+                        }
                     }
                 }
             }


update

update

--- Bussiness/BusinessService.cs
+++ Bussiness/BusinessService.cs
@@ -124,16 +124,10 @@
         /// 获取最新文章
         /// </summary>
         /// <returns></returns>
-        public List<JsonDataTemplate<Article>> GetLatestAtricles()
-        {
-            var list = new List<JsonDataTemplate<Article>>();
-            var jsonData = new JsonDataTemplate<Article>();
-            var LatestArticleList = dataService.GetLatestAtricles();
-            jsonData.name = "最新文章";
-            jsonData.type = "root";
-            jsonData.children = LatestArticleList;
-            list.Add(jsonData);
-            return list;
+        public List<Article> GetLatestAtricles()
+        {
+            var latestArticleList = dataService.GetLatestAtricles();
+            return latestArticleList;
         }

         /// <summary>
@@ -155,16 +149,10 @@
             return changeTrend;
         }

-        public List<JsonDataTemplate<Article>> GetArticleRankList(string keyWord, DateTime queryDate, string topCount)
-        {
-            var list = new List<JsonDataTemplate<Article>>();
-            var jsonData = new JsonDataTemplate<Article>();
+        public List<Article> GetArticleRankList(string keyWord, DateTime queryDate, string topCount)
+        {
             var articleList = dataService.GetArticleCountRankList(keyWord, topCount, queryDate.ToString("yyyy-MM-dd"));
-            jsonData.name = "报道排名";
-            jsonData.type = "root";
-            jsonData.children = articleList;
-            list.Add(jsonData);
-            return list;
+            return articleList;
         }

         /// <summary>


Bugfix: shipyard event was not sent for some reason?

--- Controller/JournalMonitor.cs
+++ Controller/JournalMonitor.cs
@@ -56,7 +56,9 @@
         {
             if (Path.GetExtension(e.FullPath) == ".log")
                 SendEventsFromJournal(checkOtherFiles: e.FullPath != CurrentFile);
-            else if (Path.GetFileName(e.FullPath) == "Outfitting.json" || Path.GetFileName(e.FullPath) == "Market.json")
+            else if (Path.GetFileNameWithoutExtension(e.FullPath) == "Outfitting"
+                  || Path.GetFileNameWithoutExtension(e.FullPath) == "Market"
+                  || Path.GetFileNameWithoutExtension(e.FullPath) == "Shipyard")
                 SendEventFromFile(e.FullPath);
         }


Fix resetting start time on StreamListener

# Conflicts:
#	SS.Integration.Adapter/StreamListener.cs

--- SS.Integration.Adapter/StreamListener.cs
+++ SS.Integration.Adapter/StreamListener.cs
@@ -125,6 +125,7 @@
             _Stats = StatsManager.Instance[string.Concat("adapter.core.sport.", resource.Sport)].GetHandle();

             SetupListener();
+            _fixtureStartTime = DateTime.Parse(resource.Content.StartTime);
             _logger.DebugFormat("Listener instantiated for {0}", resource);

         }
@@ -616,8 +617,7 @@
                 }
                 else
                 {
-
-                    _fixtureStartTime = fixtureDelta.StartTime;
+                    _fixtureStartTime = fixtureDelta.StartTime.HasValue ? fixtureDelta.StartTime : _fixtureStartTime;

                     if (fixtureDelta.IsMatchStatusChanged && !string.IsNullOrEmpty(fixtureDelta.MatchStatus))
                     {


Fix stupid pi flip timing bug. I had missed a valveToQ out of the pi flip enabling pulse code. This resulted in the pi flip time being relative to the valve pulse and not the q-switch :-(

--- ScanMaster/PulsedRFScanPatternBuilder.cs
+++ ScanMaster/PulsedRFScanPatternBuilder.cs
@@ -125,7 +125,7 @@
 			tempTime = Pulse(startTime + START_PADDING, valveToQ + fmCentreTime - (fmLength/2), fmLength, fmChannel);
 			if (tempTime > time) time = tempTime;
 			// piFlip on
-			AddEdge(piChannel, startTime + piFlipTime + START_PADDING, true);
+            AddEdge(piChannel, startTime + START_PADDING + valveToQ + piFlipTime, true);

 			// Detector trigger
             if (modulated)


Changed docrect to doubles

Changed docrect to doubles

--- ScanMonitorApp/ScanMonitorApp/DocType.cs
+++ ScanMonitorApp/ScanMonitorApp/DocType.cs
@@ -40,11 +40,36 @@
         }
         public DocRectangle(double x, double y, double width, double height)
         {
-            topLeftXPercent = Convert.ToInt32(x);
-            topLeftYPercent = Convert.ToInt32(y);
-            widthPercent = Convert.ToInt32(width);
-            heightPercent = Convert.ToInt32(height);
+            topLeftXPercent = x;
+            topLeftYPercent = y;
+            widthPercent = width;
+            heightPercent = height;
         }
+        public double bottomRightXPercent { get { return topLeftXPercent + widthPercent; } }
+        public double bottomRightYPercent { get { return topLeftYPercent + heightPercent; } }
+
+        public DocRectangle(string rectCoordStr)
+        {
+            topLeftXPercent = 0;
+            topLeftYPercent = 0;
+            widthPercent = 100;
+            heightPercent = 100;
+            try
+            {
+                string[] splitStr = rectCoordStr.Split(',');
+                if (splitStr.Length > 0)
+                    topLeftXPercent = Convert.ToDouble(splitStr[0]);
+                if (splitStr.Length > 1)
+                    topLeftYPercent = Convert.ToDouble(splitStr[1]);
+                if (splitStr.Length > 2)
+                    widthPercent = Convert.ToDouble(splitStr[2]);
+                if (splitStr.Length > 3)
+                    heightPercent = Convert.ToDouble(splitStr[3]);
+            }
+            catch
+            { }
+        }
+
         public void SetVal(int valIdx, double val)
         {
             switch(valIdx)
@@ -56,10 +81,10 @@
             }
         }

-        public int topLeftXPercent;
-        public int topLeftYPercent;
-        public int widthPercent;
-        public int heightPercent;
+        public double topLeftXPercent;
+        public double topLeftYPercent;
+        public double widthPercent;
+        public double heightPercent;

         public bool Contains(DocRectangle rect)
         {


Add some comments

Add some comments

--- Scripts/GameApi/LiteNetLibGameManager.cs
+++ Scripts/GameApi/LiteNetLibGameManager.cs
@@ -510,6 +510,7 @@
             var message = messageHandler.ReadMessage<ServerSpawnSceneObjectMessage>();
             if (!IsServer)
                 Assets.NetworkSpawnScene(message.objectId, message.position, message.rotation); LiteNetLibIdentity identity;
+            // If it is host, it may hidden so show it
             if (IsServer && Assets.TryGetSpawnedObject(message.objectId, out identity))
                 identity.OnServerSubscribingAdded();
         }
@@ -519,10 +520,12 @@
             var message = messageHandler.ReadMessage<ServerSpawnObjectMessage>();
             if (!IsServer)
                 Assets.NetworkSpawn(message.hashAssetId, message.position, message.rotation, message.objectId, 0);
+            // Setup owner client
             LiteNetLibIdentity identity;
             if (Assets.TryGetSpawnedObject(message.objectId, out identity))
             {
                 identity.SetOwnerClient(message.isOwner);
+                // If it is host, it may hidden so show it
                 if (IsServer)
                     identity.OnServerSubscribingAdded();
             }
@@ -533,6 +536,7 @@
             var message = messageHandler.ReadMessage<ServerDestroyObjectMessage>();
             if (!IsServer)
                 Assets.NetworkDestroy(message.objectId, message.reasons);
+            // If this is host and reasons is removed from subscribing so hide it, don't destroy it
             LiteNetLibIdentity identity;
             if (IsServer && message.reasons == DestroyObjectReasons.RemovedFromSubscribing && Assets.TryGetSpawnedObject(message.objectId, out identity))
                 identity.OnServerSubscribingRemoved();


ObjectTranslator: Fix TypeLoadException when calling clr.create()

FindType(): Pass false for 'throwOnError' arg of Type.GetType(), not true

--- SharpLua/Interfacing/ObjectTranslator.cs
+++ SharpLua/Interfacing/ObjectTranslator.cs
@@ -250,7 +250,7 @@

             foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
             {
-                Type klass = assembly.GetType(className, true);
+                Type klass = assembly.GetType(className, false);
                 if (klass != null)
                 {
                     if (desiredType == null || desiredType.IsAssignableFrom(klass))


Add ToStringTable()  -> EnumerableExtensions

--- Signum.Utilities/EnumerableExtensions.cs
+++ Signum.Utilities/EnumerableExtensions.cs
@@ -543,6 +543,24 @@
             return result;
         }

+        public static string[,] ToStringTable(this DataTable table)
+        {
+            string[,] result = new string[table.Columns.Count, table.Rows.Count + 1];
+
+            for (int i = 0; i < table.Columns.Count; i++)
+                result[i, 0] = table.Columns[i].ColumnName;
+
+            int j = 1;
+            foreach (DataRow row in table.Rows)
+            {
+                for (int i = 0; i < table.Columns.Count; i++)
+                    result[i, j] = row[i].TryCC(a => a.ToString()) ?? "";
+                j++;
+            }
+
+            return result;
+        }
+
         public static string FormatTable(this string[,] table)
         {
             return FormatTable(table, true);


Minor update

Minor update

--- source/Htc.Vita.Core/Interop/Windows.cs
+++ source/Htc.Vita.Core/Interop/Windows.cs
@@ -914,22 +914,22 @@
         [StructLayout(LayoutKind.Sequential)]
         internal struct HidDeviceCapability
         {
-            internal /* USAGE  */ ushort usage;
-            internal /* USAGE  */ ushort usagePage;
-            internal /* USHORT */ ushort inputReportByteLength;
-            internal /* USHORT */ ushort outputReportByteLength;
-            internal /* USHORT */ ushort featureReportByteLength;
-            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] internal /* USHORT */ ushort[] reserved;
-            internal /* USHORT */ ushort numberLinkCollectionNodes;
-            internal /* USHORT */ ushort numberInputButtonCaps;
-            internal /* USHORT */ ushort numberInputValueCaps;
-            internal /* USHORT */ ushort numberInputDataIndices;
-            internal /* USHORT */ ushort numberOutputButtonCaps;
-            internal /* USHORT */ ushort numberOutputValueCaps;
-            internal /* USHORT */ ushort numberOutputDataIndices;
-            internal /* USHORT */ ushort numberFeatureButtonCaps;
-            internal /* USHORT */ ushort numberFeatureValueCaps;
-            internal /* USHORT */ ushort numberFeatureDataIndices;
+            internal /* USAGE      */ ushort usage;
+            internal /* USAGE      */ ushort usagePage;
+            internal /* USHORT     */ ushort inputReportByteLength;
+            internal /* USHORT     */ ushort outputReportByteLength;
+            internal /* USHORT     */ ushort featureReportByteLength;
+            [MarshalAs(UnmanagedType.ByValArray, SizeConst = 17)] internal /* USHORT[17] */ ushort[] reserved;
+            internal /* USHORT     */ ushort numberLinkCollectionNodes;
+            internal /* USHORT     */ ushort numberInputButtonCaps;
+            internal /* USHORT     */ ushort numberInputValueCaps;
+            internal /* USHORT     */ ushort numberInputDataIndices;
+            internal /* USHORT     */ ushort numberOutputButtonCaps;
+            internal /* USHORT     */ ushort numberOutputValueCaps;
+            internal /* USHORT     */ ushort numberOutputDataIndices;
+            internal /* USHORT     */ ushort numberFeatureButtonCaps;
+            internal /* USHORT     */ ushort numberFeatureValueCaps;
+            internal /* USHORT     */ ushort numberFeatureDataIndices;
         }

         /**
@@ -937,12 +937,12 @@
          * https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/ns-processthreadsapi-process_information
          */
         [StructLayout(LayoutKind.Sequential)]
-        public struct ProcessInformation
-        {
-            public /* HANDLE */ IntPtr hProcess;
-            public /* HANDLE */ IntPtr hThread;
-            public /* DWORD  */ int dwProcessID;
-            public /* DWORD  */ int dwThreadID;
+        internal struct ProcessInformation
+        {
+            internal /* HANDLE */ IntPtr hProcess;
+            internal /* HANDLE */ IntPtr hThread;
+            internal /* DWORD  */ int dwProcessID;
+            internal /* DWORD  */ int dwThreadID;
         }

         /**
@@ -968,11 +968,11 @@
          * https://msdn.microsoft.com/en-us/library/windows/desktop/aa379560.aspx
          */
         [StructLayout(LayoutKind.Sequential)]
-        public struct SecurityAttributes
-        {
-            public /* DWORD  */ int nLength;
-            public /* LPVOID */ IntPtr lpSecurityDescriptor;
-            public /* BOOL   */ bool bInheritHandle;
+        internal struct SecurityAttributes
+        {
+            internal /* DWORD  */ int nLength;
+            internal /* LPVOID */ IntPtr lpSecurityDescriptor;
+            internal /* BOOL   */ bool bInheritHandle;
         }

         /**
@@ -1024,23 +1024,23 @@
         [StructLayout(LayoutKind.Sequential)]
         internal struct StartupInfo
         {
-            public /* DWORD  */ int cb;
-            public /* LPWSTR */ string lpReserved;
-            public /* LPWSTR */ string lpDesktop;
-            public /* LPWSTR */ string lpTitle;
-            public /* DWORD  */ int dwX;
-            public /* DWORD  */ int dwY;
-            public /* DWORD  */ int dwXSize;
-            public /* DWORD  */ int dwXCountChars;
-            public /* DWORD  */ int dwYCountChars;
-            public /* DWORD  */ int dwFillAttribute;
-            public /* DWORD  */ int dwFlags;
-            public /* WORD   */ short wShowWindow;
-            public /* WORD   */ short cbReserved2;
-            public /* LPBYTE */ IntPtr lpReserved2;
-            public /* HANDLE */ IntPtr hStdInput;
-            public /* HANDLE */ IntPtr hStdOutput;
-            public /* HANDLE */ IntPtr hStdError;
+            internal /* DWORD  */ int cb;
+            internal /* LPWSTR */ string lpReserved;
+            internal /* LPWSTR */ string lpDesktop;
+            internal /* LPWSTR */ string lpTitle;
+            internal /* DWORD  */ int dwX;
+            internal /* DWORD  */ int dwY;
+            internal /* DWORD  */ int dwXSize;
+            internal /* DWORD  */ int dwXCountChars;
+            internal /* DWORD  */ int dwYCountChars;
+            internal /* DWORD  */ int dwFillAttribute;
+            internal /* DWORD  */ int dwFlags;
+            internal /* WORD   */ short wShowWindow;
+            internal /* WORD   */ short cbReserved2;
+            internal /* LPBYTE */ IntPtr lpReserved2;
+            internal /* HANDLE */ IntPtr hStdInput;
+            internal /* HANDLE */ IntPtr hStdOutput;
+            internal /* HANDLE */ IntPtr hStdError;
         }

         /**
@@ -1109,11 +1109,11 @@
         [StructLayout(LayoutKind.Explicit)]
         internal struct WinTrustDataUnionChoice
         {
-            [FieldOffset(0)] public /* struct WINTRUST_FILE_INFO_    */ IntPtr pFile;
-            [FieldOffset(0)] public /* struct WINTRUST_CATALOG_INFO_ */ IntPtr pCatalog;
-            [FieldOffset(0)] public /* struct WINTRUST_BLOB_INFO_    */ IntPtr pBlob;
-            [FieldOffset(0)] public /* struct WINTRUST_SGNR_INFO_    */ IntPtr pSgnr;
-            [FieldOffset(0)] public /* struct WINTRUST_CERT_INFO_    */ IntPtr pCert;
+            [FieldOffset(0)] internal /* struct WINTRUST_FILE_INFO_    */ IntPtr pFile;
+            [FieldOffset(0)] internal /* struct WINTRUST_CATALOG_INFO_ */ IntPtr pCatalog;
+            [FieldOffset(0)] internal /* struct WINTRUST_BLOB_INFO_    */ IntPtr pBlob;
+            [FieldOffset(0)] internal /* struct WINTRUST_SGNR_INFO_    */ IntPtr pSgnr;
+            [FieldOffset(0)] internal /* struct WINTRUST_CERT_INFO_    */ IntPtr pCert;
         }

         /**


組み込み関数内でのランタイムエラーの位置情報を修正

組み込み関数内でのランタイムエラーの位置情報を修正

全引数の評価後、C#コードを実行する前に
関数呼び出し演算子(左側: '(')の位置に移動する

--- DollsLang/Runtime.cs
+++ DollsLang/Runtime.cs
@@ -293,6 +293,7 @@
                             {
                                 args.Add(EvalExpression(arg));
                             }
+                            lastRecord = expr;
                             return CallFunction(funcValue, args.ToArray());
                         }
                     case NodeType.ConstructArray:


Add tryremove/add to in memory store

Add tryremove/add to in memory store

--- src/Abp/RealTime/InMemoryOnlineClientStore.cs
+++ src/Abp/RealTime/InMemoryOnlineClientStore.cs
@@ -22,14 +22,19 @@
             Clients.AddOrUpdate(client.ConnectionId, client, (s, o) => client);
         }

-        public ConditionalValue<IOnlineClient> Remove(string connectionId)
+        public bool Remove(string connectionId)
         {
-           return Clients.TryRemove(connectionId, out IOnlineClient removed) ? new ConditionalValue<IOnlineClient>(true, removed) : new ConditionalValue<IOnlineClient>(false, null);
+           return TryRemove(connectionId, out IOnlineClient removed);
+        }
+
+        public bool TryRemove(string connectionId, out IOnlineClient client)
+        {
+           return Clients.TryRemove(connectionId, out client);
         }

-        public ConditionalValue<IOnlineClient> Get(string connectionId)
+        public bool TryGet(string connectionId, out IOnlineClient client)
         {
-            return Clients.TryGetValue(connectionId, out IOnlineClient found) ? new ConditionalValue<IOnlineClient>(true, found) : new ConditionalValue<IOnlineClient>(false, null);
+            return Clients.TryGetValue(connectionId, out client);
         }

         public bool Contains(string connectionId)


UI bug fix

UI bug fix

--- Assets/Plugins/Editor/FMOD/StudioEventEmitterEditor.cs
+++ Assets/Plugins/Editor/FMOD/StudioEventEmitterEditor.cs
@@ -168,7 +168,7 @@
                 matchingSet = matchingValue = true;

                 var emitter = serializedObject.targetObject as StudioEventEmitter;
-                var param = emitter.Params != null && emitter.Params.Length > 0 ? emitter.Params.First((x) => x.Name == name) : null;
+                var param = emitter.Params != null ? emitter.Params.FirstOrDefault((x) => x.Name == name) : null;
                 if (param != null)
                 {
                     set = true;
@@ -195,7 +195,7 @@
         void SetParameterValue(UnityEngine.Object obj, string name, float value)
         {
             var emitter = obj as StudioEventEmitter;
-            var param = emitter.Params != null && emitter.Params.Length > 0 ? emitter.Params.First((x) => x.Name == name) : null;
+            var param = emitter.Params != null ? emitter.Params.FirstOrDefault((x) => x.Name == name) : null;
             if (param != null)
             {
                 param.Value = value;
@@ -221,7 +221,7 @@
         void AddParameterValue(UnityEngine.Object obj, string name, float value)
         {
             var emitter = obj as StudioEventEmitter;
-            var param = emitter.Params != null && emitter.Params.Length > 0 ? emitter.Params.First((x) => x.Name == name) : null;
+            var param = emitter.Params != null ? emitter.Params.FirstOrDefault((x) => x.Name == name) : null;
             if (param == null)
             {
                 int end = emitter.Params.Length;


fix ContinueWith disposing immediately

fix ContinueWith disposing immediately

--- Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs
+++ Assets/Plugins/UniRx/Scripts/Operators/ContinueWith.cs
@@ -66,10 +66,6 @@
 	                {
 		                OnError(error);
 	                }
-	                finally
-	                {
-		                Dispose();
-	                }
                 }
                 else
                 {


:beetle: Fix NullReferenceException

:beetle: Fix NullReferenceException

* `Awake()` で初期化しないようにしているので、アクセサを通す必要がある
* アクセサ側で null なら new って実装にしているので

--- Assets/Scripts/UnityModule/AnimationEventDispatcher.cs
+++ Assets/Scripts/UnityModule/AnimationEventDispatcher.cs
@@ -31,7 +31,7 @@
         /// </summary>
         /// <param name="animationEvent">Inspector で設定する情報を含んだ AnimationEvent</param>
         public void DispatchAnimationEvent(AnimationEvent animationEvent) {
-            this.streamAnimationEvent.OnNext(animationEvent);
+            this.StreamAnimationEvent.OnNext(animationEvent);
         }

         /// <summary>
@@ -39,7 +39,7 @@
         /// </summary>
         /// <returns>AnimationEvent のストリーム</returns>
         public IObservable<AnimationEvent> OnDispatchAsObservable() {
-            return this.streamAnimationEvent.AsObservable();
+            return this.StreamAnimationEvent.AsObservable();
         }

         /// <summary>


Update to "~0.8" runtime

Update to "~0.8" runtime

--- AzureFunctions/Controllers/AzureFunctionsController.cs
+++ AzureFunctions/Controllers/AzureFunctionsController.cs
@@ -57,7 +57,7 @@
         [HttpGet]
         public HttpResponseMessage GetLatestRuntime()
         {
-            return Request.CreateResponse(HttpStatusCode.OK, "~0.7");
+            return Request.CreateResponse(HttpStatusCode.OK, "~0.8");
         }

         [HttpGet]


Prevent concurrent upload jobs of the same project

--- src/Bibliotheca.Server.Gateway.Api/Startup.cs
+++ src/Bibliotheca.Server.Gateway.Api/Startup.cs
@@ -181,7 +181,7 @@

             if (UseServiceDiscovery)
             {
-                app.UseHangfireServer();
+                app.UseHangfireServer(new BackgroundJobServerOptions { WorkerCount = 1});
                 RecurringJob.AddOrUpdate<IServiceDiscoveryRegistrationJob>("register-service", x => x.RegisterServiceAsync(null), Cron.Minutely);
             }


Cleaned up DTO autogenerated properties

Cleaned up DTO autogenerated properties

--- src/Bix/Mixers/CecilMixer/EncapsulateMixer.cs
+++ src/Bix/Mixers/CecilMixer/EncapsulateMixer.cs
@@ -38,6 +38,7 @@
             var iMixesTypeReference = typeModule.Import(typeof(IMixes));
             var iSerializableTypeReference = typeModule.Import(typeof(ISerializable));
             var objectTypeReference = typeModule.Import(typeof(object));
+            var compilerGeneratedAttributeConstructorReference = typeModule.Import(typeof(CompilerGeneratedAttribute).GetConstructor(new Type[0]));

             // add interface to type
             type.Interfaces.Add(iEncapsulatesTypeReference);
@@ -53,7 +54,6 @@
             getObjectDataMethod.Parameters.Add(new ParameterDefinition("context", ParameterAttributes.None, typeModule.Import(typeof(StreamingContext))));
             getObjectDataMethod.Overrides.Add(typeModule.Import(typeof(ISerializable).GetMethod("GetObjectData", new Type[] { typeof(SerializationInfo), typeof(StreamingContext) })));
             var ilProcessor = getObjectDataMethod.Body.GetILProcessor();
-            ilProcessor.Append(Instruction.Create(OpCodes.Nop));
             ilProcessor.Append(Instruction.Create(OpCodes.Ret));
             getObjectDataMethod.DeclaringType = type;
             type.Methods.Add(getObjectDataMethod);
@@ -67,9 +67,6 @@
             ilProcessor = serializationConstructor.Body.GetILProcessor();
             ilProcessor.Append(Instruction.Create(OpCodes.Ldarg_0));
             ilProcessor.Append(Instruction.Create(OpCodes.Call, typeModule.Import(typeof(object).GetConstructor(new Type[0]))));
-            ilProcessor.Append(Instruction.Create(OpCodes.Nop));
-            ilProcessor.Append(Instruction.Create(OpCodes.Nop));
-            ilProcessor.Append(Instruction.Create(OpCodes.Nop));
             ilProcessor.Append(Instruction.Create(OpCodes.Ret));
             serializationConstructor.DeclaringType = type;
             type.Methods.Add(serializationConstructor);
@@ -83,9 +80,10 @@
                 if (property.CustomAttributes.Any(attribute => attribute.AttributeType.Resolve() == encapsulatedAttributeType))
                 {
                     var dtoField = new FieldDefinition(
-                        string.Format("k__{0}_{1}", property.Name, Guid.NewGuid().ToString("N")),
-                        FieldAttributes.Private | FieldAttributes.SpecialName,
+                        string.Format("<{0}>k__BackingField", property.Name),
+                        FieldAttributes.Private,
                         property.PropertyType);
+                    dtoField.CustomAttributes.Add(new CustomAttribute(compilerGeneratedAttributeConstructorReference));
                     dtoField.DeclaringType = dtoType;
                     dtoType.Fields.Add(dtoField);
                     var dtoProperty = new PropertyDefinition(property.Name, PropertyAttributes.None, property.PropertyType);


Remove migration from Andika to Andika New Basic (BL-7868)

--- src/BloomExe/Collection/CollectionSettings.cs
+++ src/BloomExe/Collection/CollectionSettings.cs
@@ -683,66 +683,11 @@

 		private void DoOneTimeCheck()
 		{
-			// If we ever have to do another one of these besides our minimal Andika New Basic migration
-			// we should refactor this so it calls a method based on the OneTimeCheckVersionNumber
-			do
-			{
-				if(!MigrateSettingsToAndikaNewBasicFont())
-					break; // in case of failed migration
-				OneTimeCheckVersionNumber++;
-
-			} while (OneTimeCheckVersionNumber < kCurrentOneTimeCheckVersionNumber);
+			// We had a migration from Andika to Andika New Basic for a long time, but it's no longer useful.
+			// (See https://issues.bloomlibrary.org/youtrack/issue/BL-7868.)
+			// If we ever have to do another one of these, we should call a method based on OneTimeCheckVersionNumber.
+			OneTimeCheckVersionNumber = kCurrentOneTimeCheckVersionNumber;
 			Save(); // save updated settings
-		}
-
-		private bool MigrateSettingsToAndikaNewBasicFont()
-		{
-			const string newFont = "Andika New Basic";
-			if (GetDefaultFontName() != newFont) // sanity check to make sure Andika New Basic is installed
-				return false;
-
-			const string id = "CollectionSettingsDialog.AndikaNewBasicUpdate";
-			var basicMessage = LocalizationManager.GetDynamicString("Bloom", id + "1",
-				"Bloom is switching the default font for \"{0}\" to the new \"Andika New Basic\".");
-			var secondaryMessage = LocalizationManager.GetDynamicString("Bloom", id + "2",
-				"This will improve the printed output for most languages. If your language is one of the few that need \"Andika\", you can switch it back in Settings:Book Making.");
-			const string oldFont = "Andika";
-			var safeLanguages = new[] {"en", "es", "fr", "id", "tpi"};
-			string msg = string.Empty;
-			if(DefaultLanguage1FontName == oldFont)
-			{
-				DefaultLanguage1FontName = newFont;
-				if (!safeLanguages.Contains(Language1Iso639Code))
-				{
-					msg += String.Format(basicMessage, Language1Name) + Environment.NewLine;
-				}
-			}
-			if (DefaultLanguage2FontName == oldFont)
-			{
-				DefaultLanguage2FontName = newFont;
-				if (!String.IsNullOrEmpty(Language2Iso639Code) && !safeLanguages.Contains(Language2Iso639Code))
-				{
-					msg += String.Format(basicMessage, GetLanguage2Name(Language2Iso639Code)) + Environment.NewLine;
-				}
-			}
-			if (DefaultLanguage3FontName == oldFont)
-			{
-				DefaultLanguage3FontName = newFont;
-				if (!String.IsNullOrEmpty(Language3Iso639Code) && !safeLanguages.Contains(Language3Iso639Code))
-				{
-					msg += String.Format(basicMessage, GetLanguage3Name(Language2Iso639Code)) + Environment.NewLine;
-				}
-			}
-			// Only notify the user if the change involves a language that is not known to be okay with
-			// the new font.
-			if (!String.IsNullOrEmpty(msg) && ErrorReport.IsOkToInteractWithUser)
-			{
-				msg += Environment.NewLine + secondaryMessage;
-				// NB: this MessageBoxOptions.DefaultDesktopOnly option is more than the name implies. It changes the message to a "service message" which is the only
-				// way I've found to get the box into the taskbar.
-				MessageBox.Show(msg, "Bloom", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1, MessageBoxOptions.DefaultDesktopOnly);
-			}
-			return true;
 		}

 		private bool GetBoolValue(XElement library, string id, bool defaultValue)


Reset the default image license when creating a new book

This addresses BL-2472 "Change Credits Page default license to CC-BY".
The default license is already CC-BY if no information is available.
But the exemplar is set to the most recent license entered if any images
have had a license modified by the user at any time in the past, and that
is used for the next image chosen by the user in any program that uses
the palaso image chooser dialog.

--- src/BloomExe/CollectionTab/LibraryBookView.cs
+++ src/BloomExe/CollectionTab/LibraryBookView.cs
@@ -147,6 +147,7 @@

 					_createFromSourceBookCommand.Raise(_bookSelection.CurrentSelection);
 					_sendReceiver.CheckInNow(checkinNotice);
+					Palaso.UI.WindowsForms.ClearShare.Metadata.DeleteStoredExemplar(Palaso.UI.WindowsForms.ClearShare.Metadata.FileCategory.Image);
 				}
 				catch(Exception error)
 				{


Moved the Mutex handling to a dedicated method

--- src/Compilers/Shared/BuildServerConnection.cs
+++ src/Compilers/Shared/BuildServerConnection.cs
@@ -125,65 +125,19 @@
                 return new IncorrectHashBuildResponse();
             }

-            var clientDir = buildPaths.ClientDirectory;
-            var timeoutNewProcess = timeoutOverride ?? TimeOutMsNewProcess;
-            var timeoutExistingProcess = timeoutOverride ?? TimeOutMsExistingProcess;
-            Task<NamedPipeClientStream> pipeTask = null;
-            IServerMutex clientMutex = null;
-            try
-            {
-                var holdsMutex = false;
-                try
-                {
-                    var clientMutexName = GetClientMutexName(pipeName);
-                    clientMutex = OpenOrCreateMutex(clientMutexName, out holdsMutex);
-                }
-                catch
-                {
-                    // The Mutex constructor can throw in certain cases. One specific example is docker containers
-                    // where the /tmp directory is restricted. In those cases there is no reliable way to execute
-                    // the server and we need to fall back to the command line.
-                    //
-                    // Example: https://github.com/dotnet/roslyn/issues/24124
+            var pipeTask = tryConnectToServer(pipeName, buildPaths, timeoutOverride, createServerFunc, cancellationToken);
+            if (pipeTask is null)
+            {
+                return new RejectedBuildResponse();
+            }
+            else
+            {
+                var pipe = await pipeTask.ConfigureAwait(false);
+                if (pipe is null)
+                {
                     return new RejectedBuildResponse();
                 }
-
-                if (!holdsMutex)
-                {
-                    try
-                    {
-                        holdsMutex = clientMutex.TryLock(timeoutNewProcess);
-
-                        if (!holdsMutex)
-                        {
-                            return new RejectedBuildResponse();
-                        }
-                    }
-                    catch (AbandonedMutexException)
-                    {
-                        holdsMutex = true;
-                    }
-                }
-
-                // Check for an already running server
-                var serverMutexName = GetServerMutexName(pipeName);
-                bool wasServerRunning = WasServerMutexOpen(serverMutexName);
-                var timeout = wasServerRunning ? timeoutExistingProcess : timeoutNewProcess;
-
-                if (wasServerRunning || createServerFunc(clientDir, pipeName))
-                {
-                    pipeTask = TryConnectToServerAsync(pipeName, timeout, cancellationToken);
-                }
-            }
-            finally
-            {
-                clientMutex?.Dispose();
-            }
-
-            if (pipeTask != null)
-            {
-                var pipe = await pipeTask.ConfigureAwait(false);
-                if (pipe != null)
+                else
                 {
                     var request = BuildRequest.Create(language,
                                                       buildPaths.WorkingDirectory,
@@ -197,7 +151,73 @@
                 }
             }

-            return new RejectedBuildResponse();
+            // This code uses a Mutex.WaitOne / ReleaseMutex pairing. Both of these calls must occur on the same thread
+            // or an exception will be thrown. This code lives in a separate non-async function to help ensure this
+            // invariant doesn't get invalidated in the future by an `await` being inserted.
+            static Task<NamedPipeClientStream> tryConnectToServer(
+                string pipeName,
+                BuildPathsAlt buildPaths,
+                int? timeoutOverride,
+                CreateServerFunc createServerFunc,
+                CancellationToken cancellationToken)
+            {
+                var clientDir = buildPaths.ClientDirectory;
+                var timeoutNewProcess = timeoutOverride ?? TimeOutMsNewProcess;
+                var timeoutExistingProcess = timeoutOverride ?? TimeOutMsExistingProcess;
+                Task<NamedPipeClientStream> pipeTask = null;
+                IServerMutex clientMutex = null;
+                try
+                {
+                    var holdsMutex = false;
+                    try
+                    {
+                        var clientMutexName = GetClientMutexName(pipeName);
+                        clientMutex = OpenOrCreateMutex(clientMutexName, out holdsMutex);
+                    }
+                    catch
+                    {
+                        // The Mutex constructor can throw in certain cases. One specific example is docker containers
+                        // where the /tmp directory is restricted. In those cases there is no reliable way to execute
+                        // the server and we need to fall back to the command line.
+                        //
+                        // Example: https://github.com/dotnet/roslyn/issues/24124
+                        return null;
+                    }
+
+                    if (!holdsMutex)
+                    {
+                        try
+                        {
+                            holdsMutex = clientMutex.TryLock(timeoutNewProcess);
+
+                            if (!holdsMutex)
+                            {
+                                return null;
+                            }
+                        }
+                        catch (AbandonedMutexException)
+                        {
+                            holdsMutex = true;
+                        }
+                    }
+
+                    // Check for an already running server
+                    var serverMutexName = GetServerMutexName(pipeName);
+                    bool wasServerRunning = WasServerMutexOpen(serverMutexName);
+                    var timeout = wasServerRunning ? timeoutExistingProcess : timeoutNewProcess;
+
+                    if (wasServerRunning || createServerFunc(clientDir, pipeName))
+                    {
+                        pipeTask = TryConnectToServerAsync(pipeName, timeout, cancellationToken);
+                    }
+
+                    return pipeTask;
+                }
+                finally
+                {
+                    clientMutex?.Dispose();
+                }
+            }
         }

         /// <summary>


Fix SMC

Fix SMC

--- Battery-Commander.Web/Models/MilitaryEducationLevel.cs
+++ Battery-Commander.Web/Models/MilitaryEducationLevel.cs
@@ -58,8 +58,10 @@

                 case Rank.E8:
                 case Rank.E8_MSG:
+                    return MilitaryEducationLevel.MLC;
+
                 case Rank.E9:
-                    return MilitaryEducationLevel.MLC;
+                    return MilitaryEducationLevel.SMC;

                 case Rank.CDT:
                     return MilitaryEducationLevel.CST;


Oracle enhancements

Oracle enhancements

Oracle package implementation is added

--- Uni.cs
+++ Uni.cs
@@ -12,6 +12,7 @@
 using System.Reflection;
 using System.IO;
 using System.Linq.Expressions;
+using System.Collections;

 public enum DatabaseType { SQLServer, SqlServerCE, MySQL, Oracle, SQLite, PostgreSQL, OleDB }
 public static class UniExtensions
@@ -94,7 +95,7 @@
     }
     public static string ToColumns(this object obj, string PKField = "")
     {
-        return string.Format("{0}", string.Join(",", obj.ToDictionary().Keys.Where(f => f != PKField).ToArray()));
+        return string.Format("{0}", string.Join(",", obj.ToDictionary().Keys.Where(f => f != PKField)));
     }
     public static string ToColumnParameterString(this object obj, string parameterPrefix, string PKField = "", string parameterSuffix = "", string seperator = ",")
     {
@@ -107,7 +108,7 @@
                 columnParameterList.Add(string.Format("{0}={1}{0}{2}", item, parameterPrefix, parameterSuffix));
         else
             columnParameterList.Add(string.Format("{0}={1}0", PKField, parameterPrefix));
-        return string.Format("{0}", string.Join(seperator, columnParameterList.ToArray()));
+        return string.Format("{0}", string.Join(seperator, columnParameterList));
     }
     public static Dictionary<string, object> ToParameters(this object obj, string parameterPrefix, string PKField = "", string parameterSuffix = "")
     {
@@ -149,7 +150,7 @@
     }
     public static Nullable<DbType> GetDbType(this string type)
     {
-        switch (type)
+        switch (type.ToLower())
         {
             //case "string": return DbType.AnsiString;
             //case "string": return DbType.AnsiStringFixedLength;
@@ -164,6 +165,7 @@
             case "byte": return DbType.Byte;
             case "DateTime": return DbType.DateTime;
             case "decimal": return DbType.Decimal;
+            case "number": return DbType.Decimal;
             case "double": return DbType.Double;
             case "Guid": return DbType.Guid;
             case "short": return DbType.Int16;
@@ -240,7 +242,7 @@

                 }
                 //else if (type == "UNSIGNED INTEGER")
-                    //retValue = typeof(System.Numerics.BigInteger);
+                //retValue = typeof(System.Numerics.BigInteger);
                 break;
             case DatabaseType.SQLite:
                 break;
@@ -401,17 +403,17 @@
             conStrSettings = ConfigurationManager.ConnectionStrings[connectionStringName];
             if (conStrSettings.ProviderName.ToLower().Equals("System.Data.SqlClient".ToLower()))
                 this.dbType = DatabaseType.SQLServer;
-            else if (conStrSettings.ProviderName.ToLower().Equals("MySql.Data.MySqlClient".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("mysql"))
                 this.dbType = DatabaseType.MySQL;
-            else if (conStrSettings.ProviderName.ToLower().Equals("Oracle.DataAccess.Client".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("oracle"))
                 this.dbType = DatabaseType.Oracle;
-            else if (conStrSettings.ProviderName.ToLower().Equals("System.Data.SQLite".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("sqlite"))
                 this.dbType = DatabaseType.SQLite;
-            else if (conStrSettings.ProviderName.ToLower().Equals("Npgsql".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("npgsql"))
                 this.dbType = DatabaseType.PostgreSQL;
-            else if (conStrSettings.ProviderName.ToLower().Contains("SqlServerCe".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("sqlserverce"))
                 this.dbType = DatabaseType.SqlServerCE;
-            else if (conStrSettings.ProviderName.ToLower().Equals("OLEDB".ToLower()))
+            else if (conStrSettings.ProviderName.ToLower().Contains("oledb"))
                 this.dbType = DatabaseType.OleDB;
         }
         if (this.dbType == DatabaseType.SQLServer || this.dbType == DatabaseType.SQLite)
@@ -451,7 +453,7 @@
         con.Open();
         return con;
     }
-    public virtual DbCommand NewCommand(CommandType commandType, string schema, string commandText, DbConnection con, params object[] args)
+    public virtual DbCommand NewCommand(CommandType commandType, string schema, string package, string commandText, DbConnection con, params object[] args)
     {
         var com = _dbProviderFactory.CreateCommand();
         com.Connection = con;
@@ -464,18 +466,18 @@
         {
             var argumentArray = args.Length == 1 && args[0] != null && args[0].GetType().IsArray ? (object[])args[0] : args;
             com.CommandType = commandType;
-            com.CommandText = string.IsNullOrEmpty(schema) ? commandText : string.Format(commandFormat, schema, commandText);
+            com.CommandText = string.Format("{0}{1}{2}", string.IsNullOrEmpty(schema) ? "" : schema + ".", string.IsNullOrEmpty(package) ? "" : package + ".", string.IsNullOrEmpty(commandText) ? "" : commandText);
             if (argumentArray.Length > 0)
             {
                 var parameterList = new List<DbParameter>();
-                var comParameters = GetCommandParameters(commandText, schema);
+                var comParameters = GetCommandParameters(commandText: commandText, schema: schema, package: package);
                 for (int i = 0; i < comParameters.Count(); i++)
                 {
                     if (comParameters.ElementAt(i).PARAMETER_MODE == "IN")
                     {
                         var parameterName = comParameters.ElementAt(i).PARAMETER_NAME;
                         DbParameter dbParameter = com.CreateParameter();
-                        dbParameter.ParameterName = this.dbType == DatabaseType.Oracle || this.dbType == DatabaseType.MySQL ? string.Format("{0}{1}", parameterPrefix, parameterName) : parameterName;
+                        dbParameter.ParameterName = parameterName;
                         dbParameter.Value = typeof(Dictionary<string, object>).IsAssignableFrom(argumentArray[0].GetType()) ? argumentArray[0].ToDictionary().Values.ElementAt(i) : argumentArray[i];
                         parameterList.Add(dbParameter);
                     }
@@ -483,7 +485,6 @@
                     {
                         var parameterName = comParameters.ElementAt(i).PARAMETER_NAME;
                         DbParameter dbParameter = com.CreateParameter();
-                        //dbParameter.ParameterName = this.dbType == DatabaseType.Oracle || this.dbType == DatabaseType.MySQL ? string.Format("{0}{1}", parameterPrefix, parameterName) : parameterName;
                         dbParameter.ParameterName = parameterName;
                         dbParameter.Direction = ParameterDirection.Output;
                         dbParameter.DbType = ((string)comParameters.ElementAt(i).DATA_TYPE).GetDbType().Value;
@@ -532,7 +533,7 @@
         parameter.Value = value == null ? DBNull.Value : value;
         return parameter;
     }
-    public virtual IEnumerable<dynamic> GetCommandParameters(string commandText, string schema = "")
+    public virtual IEnumerable<dynamic> GetCommandParameters(string commandText, string schema = "", string package = "")
     {
         IEnumerable<dynamic> retValue = null;
         using (var con = NewConnection())
@@ -541,16 +542,19 @@
             if (this.dbType == DatabaseType.SQLServer || this.dbType == DatabaseType.MySQL)
             {
                 schema = string.IsNullOrEmpty(schema) ? defaultSchema : schema;
-                sql = string.Format("SELECT PARAMETER_MODE,PARAMETER_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH DATA_LENGTH FROM INFORMATION_SCHEMA.PARAMETERS WHERE {0}", string.IsNullOrEmpty(schema) ? string.Format("SPECIFIC_NAME={0}0", parameterPrefix) : string.Format("SPECIFIC_SCHEMA={0}0 AND SPECIFIC_NAME={0}1", parameterPrefix));
+                sql = string.Format("SELECT PARAMETER_MODE,PARAMETER_NAME, DATA_TYPE, CHARACTER_MAXIMUM_LENGTH DATA_LENGTH FROM INFORMATION_SCHEMA.PARAMETERS WHERE {0}", string.IsNullOrEmpty(schema) ? string.Format("SPECIFIC_NAME={0}0", parameterPrefix) : string.Format("SPECIFIC_NAME={0}0 AND SPECIFIC_SCHEMA={0}1", parameterPrefix));
             }
             else if (this.dbType == DatabaseType.Oracle)
-                sql = string.Format("SELECT ARGUMENT_NAME PARAMETER_NAME, IN_OUT PARAMETER_MODE, DATA_TYPE, DATA_LENGTH FROM SYS.ALL_ARGUMENTS WHERE {0} ORDER BY POSITION", string.IsNullOrEmpty(schema) ? "OBJECT_NAME=:0" : "OWNER=:0 AND OBJECT_NAME=:1");
+            {
+                var criteria = string.IsNullOrEmpty(schema) ? "PROCEDURE_NAME=:0" : "PROCEDURE_NAME=:0 AND OWNER=:1";
+                sql = string.Format("SELECT A.ARGUMENT_NAME PARAMETER_NAME, A.IN_OUT PARAMETER_MODE, A.DATA_TYPE, A.DATA_LENGTH FROM SYS.ALL_ARGUMENTS A, (SELECT * FROM (SELECT * FROM SYS.ALL_PROCEDURES WHERE {0} ORDER BY SUBPROGRAM_ID DESC) WHERE ROWNUM=1) P WHERE P.OBJECT_ID=A.OBJECT_ID AND P.SUBPROGRAM_ID=A.SUBPROGRAM_ID {1}", criteria, string.IsNullOrEmpty(package) ? "" : "AND A.PACKAGE_NAME=:2");
+            }
             //else if (this.dbType == DatabaseType.SQLite)
             //else if (this.dbType == DatabaseType.PostgreSQL)
             if (string.IsNullOrEmpty(schema))
                 retValue = Query(commandText: sql, args: new object[] { commandText }.ToParameters(parameterPrefix));
             else
-                retValue = Query(commandText: sql, args: new object[] { schema, commandText }.ToParameters(parameterPrefix));
+                retValue = Query(commandText: sql, args: new object[] { commandText, schema, package }.ToParameters(parameterPrefix));
         }
         return retValue;
     }
@@ -564,7 +568,7 @@
             else if (this.dbType == DatabaseType.MySQL)
                 retValue = Query(commandText: "SELECT * FROM INFORMATION_SCHEMA.TABLES");
             else if (this.dbType == DatabaseType.Oracle)
-                retValue = Query(commandText: "SELECT * FROM all_tables");
+                retValue = Query(commandText: "SELECT * FROM ALL_TABLES");
             else if (this.dbType == DatabaseType.SQLite)
                 retValue = Query(commandText: "SELECT * FROM sqlite_master WHERE type='table'");
             //else if (this.dbType == DatabaseType.PostgreSQL)
@@ -590,7 +594,7 @@
             }
             else if (this.dbType == DatabaseType.Oracle)
             {
-                sql = string.Format("SELECT * FROM USER_TAB_COLUMNS WHERE TABLE_NAME = {0}0", parameterPrefix);
+                sql = string.Format("SELECT * FROM ALL_TAB_COLUMNS WHERE TABLE_NAME = UPPER({0}0)", parameterPrefix);
                 retValue = Query(commandText: sql, args: new object[] { commandText }.ToParameters(parameterPrefix));

             }
@@ -610,53 +614,53 @@
             ((IDictionary<string, object>)result).Add(column.COLUMN_NAME, null);
         return result;
     }
-    public virtual IEnumerable<dynamic> Query(CommandType commandType = CommandType.Text, string schema = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
+    public virtual IEnumerable<dynamic> Query(CommandType commandType = CommandType.Text, string schema = "", string package = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
     {
         var retValue = new List<dynamic>();
+        int i = 0;
         using (var con = NewConnection())
         {
-            var com = NewCommand(commandType, schema, commandText, con, args);
+            var com = NewCommand(commandType, schema, package, commandText, con, args);
             var reader = com.ExecuteReader();
+            do
+            {
+                //yield return ResultSet(i++, commandType, schema, commandText, args);
+                retValue.Add(ResultSet(i++, commandType, schema, package, commandText, args));
+            } while (reader.NextResult());
             if (callBack != null)
                 callBack.Invoke(new { SqlQuery = commandText, OutputParameters = com.ToCallBack().ToList() });
-            int i = 0;
+        }
+        if (i == 1)
+            return retValue[0];
+        else
+            return retValue;
+    }
+    public virtual IEnumerable<dynamic> Query<T>(CommandType commandType = CommandType.Text, string schema = "", string package = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
+    {
+        var retValue = new List<dynamic>();
+        int i = 0;
+        using (var con = NewConnection())
+        {
+            var com = NewCommand(commandType, schema, package, commandText, con, args);
+            var reader = com.ExecuteReader();
             do
             {
-                //yield return ResultSet(i++, commandType, schema, commandText, args);
-                retValue.Add(ResultSet(i++, commandType, schema, commandText, args));
+                //yield return ResultSet<T>(i++, commandType, schema, commandText, args);
+                retValue.Add(ResultSet<T>(i++, commandType, schema, package, commandText, args));
             } while (reader.NextResult());
-        }
-        if (retValue.Count == 1)
-            return retValue[0];
-        else
-            return retValue;
-    }
-    public virtual IEnumerable<dynamic> Query<T>(CommandType commandType = CommandType.Text, string schema = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
-    {
-        var retValue = new List<dynamic>();
-        using (var con = NewConnection())
-        {
-            var com = NewCommand(commandType, schema, commandText, con, args);
-            var reader = com.ExecuteReader();
             if (callBack != null)
                 callBack.Invoke(new { SqlQuery = commandText, OutputParameters = com.ToCallBack().ToList() });
-            int i = 0;
-            do
-            {
-                //yield return ResultSet(i++, commandType, schema, commandText, args);
-                retValue.Add(ResultSet<T>(i++, commandType, schema, commandText, args));
-            } while (reader.NextResult());
-        }
-        if (retValue.Count == 1)
+        }
+        if (i == 1)
             return retValue[0];
         else
             return retValue;
     }
-    private IEnumerable<dynamic> ResultSet(int index, CommandType commandType = CommandType.Text, string schema = "", string commandText = "", params object[] args)
+    private IEnumerable<dynamic> ResultSet(int index, CommandType commandType = CommandType.Text, string schema = "", string package = "", string commandText = "", params object[] args)
     {
         using (var con = NewConnection())
         {
-            var com = NewCommand(commandType, schema, commandText, con, args);
+            var com = NewCommand(commandType, schema, package, commandText, con, args);
             var reader = com.ExecuteReader();
             int i = 0;
             do
@@ -667,11 +671,11 @@
             } while (reader.NextResult());
         }
     }
-    private IEnumerable<T> ResultSet<T>(int index, CommandType commandType = CommandType.Text, string schema = "", string commandText = "", params object[] args)
+    private IEnumerable<T> ResultSet<T>(int index, CommandType commandType = CommandType.Text, string schema = "", string package = "", string commandText = "", params object[] args)
     {
         using (var con = NewConnection())
         {
-            var com = NewCommand(commandType, schema, commandText, con, args);
+            var com = NewCommand(commandType, schema, package, commandText, con, args);
             var reader = com.ExecuteReader();
             int i = 0;
             var propertyList = typeof(T).GetProperties().ToList();
@@ -767,7 +771,7 @@
                         args.RemoveAt(0);
                         var dic = item as IDictionary<string, object>;
                         sql = string.Format("INSERT INTO {0} ({1}) VALUES ({2}){3}", fullTableName, ll.ToColumns(), ll.ToParameterString("@"), "");
-                        using (var com = NewCommand(CommandType.Text, "", sql, con, ll))
+                        using (var com = NewCommand(CommandType.Text, "", "", sql, con, ll))
                             com.ExecuteNonQuery();
                     }
                     dbTransaction.Commit();
@@ -780,7 +784,7 @@
         var retValue = default(object);
         using (var con = NewConnection())
         {
-            var com = NewCommand(commandType, schema, commandText, con, args);
+            var com = NewCommand(commandType, schema, "", commandText, con, args);
             retValue = com.ExecuteScalar();
             if (callBack != null)
                 callBack.Invoke(new { SqlQuery = com.CommandText, OutputParameters = com.ToCallBack().ToList() });
@@ -823,7 +827,7 @@
         var retValue = 0;
         using (var con = NewConnection())
         {
-            var com = NewCommand(commandType, schema, commandText, con, args);
+            var com = NewCommand(commandType, schema, "", commandText, con, args);
             retValue = ExecuteNonQuery(com);
         }
         return retValue;
@@ -850,11 +854,11 @@
     {
         return ExecuteNonQuery(new DbCommand[] { command });
     }
-    private dynamic CallQueryReflection(Type type, CommandType commandType = CommandType.Text, string schema = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
+    private dynamic CallQueryReflection(Type type, CommandType commandType = CommandType.Text, string schema = "", string package = "", string commandText = "", Action<dynamic> callBack = null, params object[] args)
     {
         var mi = typeof(Uni).GetMethods().Where(f => f.Name == "Query" && f.IsGenericMethod).SingleOrDefault();
         mi = mi.MakeGenericMethod(type);
-        dynamic queryResult = mi.Invoke(this, new object[] { commandType, schema, commandText, callBack, args });
+        dynamic queryResult = mi.Invoke(this, new object[] { commandType, schema, package, commandText, callBack, args });
         return queryResult;
     }
     public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, out object result)
@@ -868,11 +872,20 @@
         var commandArgs = new Dictionary<string, object>();
         var argDict = new Dictionary<string, string>();
         var callBack = (Action<dynamic>)null;
-        string schema = "", table = "", fn = "", sp = "", where = "", orderby = "", groupby = "", having = "", columns = "*", sql = "", fullTableName = "", fullFnName = "", fullSpName = "", PKField = "", rowNumberColumn = "";
+        string schema = "", table = "", fn = "", sp = "", where = "", orderby = "", groupby = "", having = "", columns = "*", sql = "", fullTableName = "", fullFnName = "", fullSpName = "", PKField = "", rowNumberColumn = "", package = "";
         int limit = 0, pageSize = 0, pageNo = 0;
+        var argumentNames = binder.CallInfo.ArgumentNames.ToArray();
+        if (binderName == "execute")
+        {
+            var argumentArray = new Dictionary<string, object>();
+            binderName = args[0].ToExpando().Operation.ToLower();
+            args[0].ToDictionary().Where(f => f.Key != "Operation").ToList().ForEach(f => argumentArray.Add(f.Key, f.Value));
+            argumentNames = argumentArray.Keys.ToArray();
+            args = argumentArray.Values.ToArray();
+        }
         for (int i = 0; i < args.Length; i++)
         {
-            var argumentName = binder.CallInfo.ArgumentNames[i].ToLower();
+            var argumentName = argumentNames[i].ToLower();
             dynamic argumentValue = args[i];
             arguments.Add(argumentName, argumentValue);
             if (argumentName == "schema")
@@ -907,19 +920,24 @@
                 PKField = argumentValue;
             else if (argumentName == "rownumbercolumn")
                 rowNumberColumn = argumentValue;
+            else if (argumentName == "package")
+                package = argumentValue;
             else if (argumentName != "args")
             {
-                commandArgs.Add(binder.CallInfo.ArgumentNames[i], argumentValue);
+                commandArgs.Add(argumentNames[i], argumentValue);
                 if (argumentValue != null && argumentValue.GetType().IsArray)
                 {
                     var sb = new StringBuilder();
                     dynamic argValueArray = argumentValue;
                     for (int y = 0; y < argValueArray.Length; y++)
-                        sb.AppendFormat("{0}{1}{2}", parameterPrefix, binder.CallInfo.ArgumentNames[i] + y.ToString(), y < argValueArray.Length - 1 ? "," : "");
-                    argDict.Add(string.Format("{0}{1}", parameterPrefix, binder.CallInfo.ArgumentNames[i]), sb.ToString());
-                }
-            }
-        }
+                        sb.AppendFormat("{0}{1}{2}", parameterPrefix, argumentNames[i] + y.ToString(), y < argValueArray.Length - 1 ? "," : "");
+                    argDict.Add(string.Format("{0}{1}", parameterPrefix, argumentNames[i]), sb.ToString());
+                }
+            }
+        }
+        Type argsType = null;
+        if (arguments.ContainsKey("args"))
+            argsType = arguments["args"].GetType();
         var columnArray = columns.Split(',');
         if (string.IsNullOrEmpty(sql))
             if (!string.IsNullOrEmpty(table))
@@ -932,11 +950,11 @@
         object queryResult = null;
         if (binderName == "query" || binderName == "exists" || binderName == "count" || binderName == "sum" || binderName == "max" || binderName == "min" || binderName == "avg")
         {
-            if (!string.IsNullOrEmpty(sp))
+            if (!string.IsNullOrEmpty(sp))//Execute Stored Procedure
                 if (typeArgs.Count > 0)
-                    queryResult = CallQueryReflection(typeArgs[0], CommandType.StoredProcedure, schema, sp, (Action<dynamic>)(f => outputs = f), commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
+                    queryResult = CallQueryReflection(typeArgs[0], CommandType.StoredProcedure, schema, package, sp, (Action<dynamic>)(f => outputs = f), commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
                 else
-                    queryResult = Query(commandType: CommandType.StoredProcedure, schema: schema, commandText: sp, callBack: (Action<dynamic>)(f => outputs = f), args: commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
+                    queryResult = Query(commandType: CommandType.StoredProcedure, schema: schema, package: package, commandText: sp, callBack: (Action<dynamic>)(f => outputs = f), args: commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
             else
             {
                 if (limit > 0)
@@ -945,7 +963,10 @@
                     else if (this.dbType == DatabaseType.SQLServer)
                         columns = string.Format("TOP {0} {1}", limit, columns);
                 if (commandArgs.Count > 0)
-                    where = string.Format("{0}{1}", string.IsNullOrEmpty(where) ? "": where + " AND ", string.Join(" AND ", commandArgs.Where(f => f.Value != null && !f.Value.GetType().IsArray).Select(f => string.Format("{0}={1}", f.Key, string.Format("{0}{1}", parameterPrefix, f.Key))).ToArray()));
+                {
+                    var commandArgsArray = commandArgs.Where(f => f.Value != null && !f.Value.GetType().IsArray).Select(f => string.Format("{0}={1}", f.Key, string.Format("{0}{1}", parameterPrefix, f.Key))).Concat((new[] { where }).Where(f => !string.IsNullOrEmpty(f)));
+                    where = string.Join(" AND ", commandArgsArray);
+                }
                 if (binderName == "count" || binderName == "sum" || binderName == "max" || binderName == "min" || binderName == "avg")
                 {
                     var sb = new StringBuilder();
@@ -962,9 +983,7 @@
                 }
                 if (arguments.ContainsKey("args") && arguments["args"] != null)
                 {
-                    var argsVal = arguments["args"].ToDictionary();
-                    var objType = arguments["args"].GetType();
-                    if (string.IsNullOrEmpty(objType.Namespace) || objType.Name == "ExpandoObject")
+                    if (string.IsNullOrEmpty(argsType.Namespace) || argsType.Name == "ExpandoObject")
                     {
                         var dict = arguments["args"].ToDictionary();
                         for (int x = 0; x < dict.Count; x++)
@@ -977,8 +996,8 @@
                                 argDict.Add(string.Format("{0}{1}", parameterPrefix, dict.ElementAt(x).Key), sb.ToString());
                             }
                     }
-                    if (string.IsNullOrEmpty(where))
-                        where = string.Join(" AND ", argsVal.Where(f => f.Value != null && !f.Value.GetType().IsArray).Select(f => string.Format("{0}={1}", f.Key, string.Format("{0}{1}", parameterPrefix, f.Key))).ToArray());
+                    else if (string.IsNullOrEmpty(where) && argsType.IsArray)
+                        where = string.Join(" AND ", arguments["args"].ToDictionary().Where(f => f.Value != null && !f.Value.GetType().IsArray).Select(f => string.Format("{0}={1}", f.Key, string.Format("{0}{1}", parameterPrefix, f.Key))));
                 }
                 if (argDict.Count > 0)
                     foreach (var item in argDict)
@@ -1009,7 +1028,7 @@
                             sql = string.Format("{0} LIMIT {1},{2}", sql, pageStart, pageSize);
                     }
                     if (typeArgs.Count > 0)
-                        queryResult = CallQueryReflection(typeArgs[0], CommandType.Text, "", sql, (Action<dynamic>)(f => outputs = f), commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
+                        queryResult = CallQueryReflection(typeArgs[0], CommandType.Text, "", "", sql, (Action<dynamic>)(f => outputs = f), commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
                     else
                         queryResult = Query(commandType: CommandType.Text, commandText: sql, callBack: (Action<dynamic>)(f => outputs = f), args: commandArgs.Count > 0 ? commandArgs.ToParameters(parameterPrefix) : arguments.ContainsKey("args") ? arguments["args"].ToParameters(parameterPrefix) : null);
                 }
@@ -1024,7 +1043,6 @@
             }
             else
                 result = queryResult;
-
         }
         else if (binderName == "insert")
         {
@@ -1035,13 +1053,13 @@
                 newIDSql = ";SELECT LAST_INSERT_ID()";
             else if (this.dbType == DatabaseType.SQLite)
                 newIDSql = ";SELECT LAST_INSERT_ROWID();";
-            if (arguments.ContainsKey("args") && arguments["args"].GetType().IsArray)
+            if (arguments.ContainsKey("args") && argsType.IsArray)
             {
                 var commandList = new List<DbCommand>();
                 foreach (var item in ((object[])arguments["args"]))
                 {
                     sql = string.Format("INSERT INTO {0} ({1}) VALUES ({2}){3}", fullTableName, item.ToColumns(PKField), item.ToParameterString(parameterPrefix, PKField), newIDSql);
-                    commandList.Add(NewCommand(CommandType.Text, "", sql, null, item.ToParameters(parameterPrefix)));
+                    commandList.Add(NewCommand(CommandType.Text, "", "", sql, null, item.ToParameters(parameterPrefix)));
                 }
                 result = ExecuteScalar(commandList.ToArray());
             }
@@ -1054,7 +1072,7 @@
         }
         else if (binderName == "bulkinsert")
         {
-            if (arguments.ContainsKey("args") && arguments["args"].GetType().IsArray)
+            if (arguments.ContainsKey("args") && argsType.IsArray)
             {
                 var commandList = new List<DbCommand>();
                 var parameterList = new Dictionary<string, object>();
@@ -1067,19 +1085,19 @@
                     var getParameters = item.ToParameters(parameterPrefix: parameterPrefix, parameterSuffix: i.ToString());
                     getParameters.ToList().ForEach(f => parameterList.Add(f.Key, f.Value));
                 }
-                result = ExecuteNonQuery(commandType: CommandType.Text, commandText: string.Join(";", sqlList.ToArray()), args: parameterList);
+                result = ExecuteNonQuery(commandType: CommandType.Text, commandText: string.Join(";", sqlList), args: parameterList);
             }
         }
         else if (binderName == "update")
         {
-            if (arguments.ContainsKey("args") && arguments["args"].GetType().IsArray)
+            if (arguments.ContainsKey("args") && argsType.IsArray)
             {
                 var commandList = new List<DbCommand>();
                 foreach (var item in ((object[])arguments["args"]))
                 {
                     sql = string.Format("UPDATE {0} SET {1} {2}", fullTableName, item.ToColumnParameterString(parameterPrefix, PKField), string.Format("WHERE {0}={1}{0}", PKField, parameterPrefix));
                     var parameterList = item.ToParameters(parameterPrefix);
-                    commandList.Add(NewCommand(CommandType.Text, "", sql, null, parameterList));
+                    commandList.Add(NewCommand(CommandType.Text, "", "", sql, null, parameterList));
                 }
                 result = ExecuteNonQuery(commandList.ToArray());
             }
@@ -1094,7 +1112,7 @@
         }
         else if (binderName == "bulkupdate")
         {
-            if (arguments.ContainsKey("args") && arguments["args"].GetType().IsArray)
+            if (arguments.ContainsKey("args") && argsType.IsArray)
             {
                 var commandList = new List<DbCommand>();
                 var parameterList = new Dictionary<string, object>();
@@ -1107,17 +1125,17 @@
                     var getParameters = item.ToParameters(parameterPrefix: parameterPrefix, parameterSuffix: i.ToString());
                     getParameters.ToList().ForEach(f => parameterList.Add(f.Key, f.Value));
                 }
-                result = ExecuteNonQuery(commandType: CommandType.Text, commandText: string.Join(";", sqlList.ToArray()), args: parameterList);
+                result = ExecuteNonQuery(commandType: CommandType.Text, commandText: string.Join(";", sqlList), args: parameterList);
             }
         }
         else if (binderName == "delete")
         {
-            if (arguments.ContainsKey("args") && arguments["args"].GetType().IsArray)
+            if (arguments.ContainsKey("args") && argsType.IsArray)
             {
                 where = ((object[])arguments["args"]).ToColumnParameterString(parameterPrefix: parameterPrefix, PKField: PKField, seperator: " OR ");
                 sql = string.Format("DELETE FROM {0} WHERE {1}", fullTableName, where);
                 var parameterList = ((object[])arguments["args"]).ToParameters(parameterPrefix: parameterPrefix, PKField: PKField);
-                result = ExecuteNonQuery(NewCommand(CommandType.Text, "", sql, null, parameterList));
+                result = ExecuteNonQuery(NewCommand(CommandType.Text, "", "", sql, null, parameterList));
             }
             else
             {


space removed

space removed

--- CACPPN/CPPNNEAT/CA/Utils/NeighbourhoodInitializor2D.cs
+++ CACPPN/CPPNNEAT/CA/Utils/NeighbourhoodInitializor2D.cs
@@ -147,7 +147,6 @@
 			cell.Neighbourhood = neighbourhood;
 		}

-
 		private static void InitializeCornerCell(TwoDimCell cell, ICell[][] cells, int neighbourhoodWidth, int cellBoardSize, bool upperCell, bool rightCell, bool lowerCell, bool leftCell)
 		{
 			bool URCell = upperCell && rightCell;


+ Generic Version of FacebookAsyncResult with implicit and explicit casting

--- src/FacebookSharp.Core/FacebookAsyncResult.cs
+++ src/FacebookSharp.Core/FacebookAsyncResult.cs
@@ -24,4 +24,49 @@
             get { return Exception == null; }
         }
     }
+
+    public class FacebookAsyncResult<T>
+        where T : class
+    {
+        public FacebookAsyncResult(string result, Exception exception)
+        {
+            Exception = exception;
+            RawResponse = result;
+        }
+
+        public Exception Exception { get; private set; }
+
+        public string RawResponse { get; private set; }
+
+        private T _response;
+        public T Response
+        {
+            get { return _response ?? (_response = GetResponseAs<T>()); }
+        }
+
+        public T GetResponseAs<T>()
+        {
+            return FacebookUtils.DeserializeObject<T>(RawResponse);
+        }
+
+        public bool IsSuccessful
+        {
+            get { return Exception == null; }
+        }
+
+        public static implicit operator FacebookAsyncResult(FacebookAsyncResult<T> TFacebookAsyncResult)
+        {
+            if (TFacebookAsyncResult == null)
+                return null;
+
+            return new FacebookAsyncResult(TFacebookAsyncResult.RawResponse, TFacebookAsyncResult.Exception);
+        }
+
+        public static explicit operator FacebookAsyncResult<T>(FacebookAsyncResult TFacebookAsyncResult)
+        {
+            if (TFacebookAsyncResult == null)
+                return null;
+            return new FacebookAsyncResult<T>(TFacebookAsyncResult.RawResponse, TFacebookAsyncResult.Exception);
+        }
+    }
 }


half batch size

half batch size

ref #344

--- src/FilterLists.Services/Snapshot/Snapshot.cs
+++ src/FilterLists.Services/Snapshot/Snapshot.cs
@@ -18,7 +18,7 @@
 {
     public class Snapshot
     {
-        private const int BatchSize = 500;
+        private const int BatchSize = 250;
         private readonly FilterListsDbContext dbContext;
         public readonly FilterListViewUrlDto List;
         protected readonly Data.Entities.Snapshot SnapEntity;


Support implicit pointer cast inversion

Support implicit pointer cast inversion

--- src/Flame.Ecs/Semantics/EcsConversionRules.cs
+++ src/Flame.Ecs/Semantics/EcsConversionRules.cs
@@ -1081,6 +1081,8 @@
                     return ConversionDescription.EnumToEnumStaticCast;
                 case ConversionKind.ReinterpretCast:
                     return ConversionDescription.DynamicCast;
+                case ConversionKind.ImplicitPointerCast:
+                    return ConversionDescription.ExplicitPointerCast;
                 default:
                     throw new InvalidOperationException("Cannot invert conversion kind '" + Description.Kind + "'");
             }


missed a file

missed a file

--- Snippets/Snippets_3/Callback/Callback.cs
+++ Snippets/Snippets_3/Callback/Callback.cs
@@ -1,5 +1,6 @@
 namespace MyServer.Callback
 {
+    using System;
     using NServiceBus;

     public class Callback
@@ -15,18 +16,18 @@

         public void CallbackSnippet()
         {
-            var placeOrder = new PlaceOrder();
+            PlaceOrder placeOrder = new PlaceOrder();
             IBus bus = null;
             // ReSharper disable once NotAccessedVariable
             PlaceOrderResponse message; // get replied message

             #region CallbackToAccessMessageRegistration

-            var sync = bus.Send(placeOrder)
+            IAsyncResult sync = bus.Send(placeOrder)
                 .Register(ar =>
                 {
-                    var localResult = ar.AsyncState as CompletionResult;
-                    message = localResult.Messages[0] as PlaceOrderResponse;
+                    CompletionResult localResult = (CompletionResult)ar.AsyncState;
+                    message = (PlaceOrderResponse)localResult.Messages[0];
                 }, null);

             sync.AsyncWaitHandle.WaitOne();


fixes a bug where executing dotnet does not executes dotnet

--- src/FlubuCore/Tasks/Process/RunProgramTask.cs
+++ src/FlubuCore/Tasks/Process/RunProgramTask.cs
@@ -7,6 +7,7 @@
 using System.Linq;
 using System.Text;
 using FlubuCore.Context;
+using FlubuCore.Tasks.NetCore;
 using Microsoft.DotNet.Cli.Utils;

 namespace FlubuCore.Tasks.Process
@@ -206,6 +207,12 @@
             string rootDir = context.Properties.Get<string>(PredefinedBuildProperties.ProductRootDir);

             FileInfo info = new FileInfo(_programToExecute);
+
+            if (_programToExecute.Equals("dotnet", StringComparison.OrdinalIgnoreCase) ||
+                _programToExecute.Equals("dotnet.exe", StringComparison.OrdinalIgnoreCase))
+            {
+                _programToExecute = ExecuteDotnetTask.FindDotnetExecutable();
+            }

             string cmd = _programToExecute;


orden de tab. de controles PwDIalog

orden de tab. de controles PwDIalog

--- MCART/WPF/Forms/PasswordDialog.cs
+++ MCART/WPF/Forms/PasswordDialog.cs
@@ -49,11 +49,13 @@
         TextBox TxtUsr = new TextBox
         {
             Height = 23,
+            TabIndex=1,
             Margin = new Thickness(10, 10, 10, 0)
         };
         PasswordBox Txtpw = new PasswordBox
         {
             Height = 23,
+            TabIndex=2,
             PasswordChar = '●'
         };
         StackPanel MoreCtrls = new StackPanel();


letting ConsoleModeCommand vary its behavior by member overload

--- ManyConsole/ConsoleModeCommand.cs
+++ ManyConsole/ConsoleModeCommand.cs
@@ -16,6 +16,17 @@
         public static string FriendlyContinuePrompt = "Enter a command or 'x' to exit or '?' for help";
         private string continuePrompt;

+        public ConsoleModeCommand(
+            TextWriter outputStream = null,
+            TextReader inputStream = null,
+            string friendlyContinueText = null,
+            OptionSet options = null)
+            : this(() => new ConsoleCommand[0], outputStream, inputStream, friendlyContinueText, options)
+        {
+            _commandSource = () => new ConsoleCommand[0];
+        }
+
+        [Obsolete("Its preferred to override ConsoleModeCommand method.")]
         public ConsoleModeCommand(
             Func<IEnumerable<ConsoleCommand>> commandSource,
             TextWriter outputStream = null,
@@ -39,6 +50,11 @@
             continuePrompt = friendlyContinueText ?? FriendlyContinuePrompt;
         }

+        public virtual IEnumerable<ConsoleCommand> PrepareNextCommands()
+        {
+            return _commandSource();
+        }
+
         public override int Run(string[] remainingArguments)
         {
             string[] args;
@@ -55,13 +71,13 @@
             {
                 if (input.Trim().Equals("?"))
                 {
-                    ConsoleCommandDispatcher.DispatchCommand(_commandSource(), new string[] { }, _outputStream);
+                    ConsoleHelp.ShowSummaryOfCommands(PrepareNextCommands(), _outputStream);
                 }
                 else
                 {
                     args = CommandLineParser.Parse(input);

-                    var result = ConsoleCommandDispatcher.DispatchCommand(_commandSource(), args, _outputStream);
+                    var result = ConsoleCommandDispatcher.DispatchCommand(PrepareNextCommands(), args, _outputStream);
                     if (result != 0)
                     {
                         haveError = true;


.Net 2.0 compatability

.Net 2.0 compatability

--- Scripts/Editor/NodeEditor.cs
+++ Scripts/Editor/NodeEditor.cs
@@ -106,7 +106,7 @@
         }

         public void Rename(string newName) {
-            if (string.IsNullOrWhiteSpace(newName)) newName = UnityEditor.ObjectNames.NicifyVariableName(target.GetType().Name);
+            if (newName == null || newName.Trim() == "") newName = UnityEditor.ObjectNames.NicifyVariableName(target.GetType().Name);
             target.name = newName;
             AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(target));
         }