Include release notes.

Include release notes.

--- GitTfsTasks/CreateRelease.cs
+++ GitTfsTasks/CreateRelease.cs
@@ -64,13 +64,11 @@
             }
         }

-        private ReleaseUpdate ReleaseData { get { return new ReleaseUpdate(TagName); } }
-
         public override bool Execute()
         {
             var client = new GitHubClient(new ProductHeaderValue("GitTfsTasks"), CredentialStore).Release;
-            var release = client.CreateRelease(Owner, RepositoryName, ReleaseData).Result;
-            Log.LogMessage("Created Release {0} at {1}", release.Id, release.HtmlUrl);
+            var release = client.CreateRelease(Owner, RepositoryName, BuildReleaseData()).Result;
+            Log.LogMessage("Created Release {0} at {1}", release.TagName, release.HtmlUrl);
             UploadedAssets = UploadAll(client, release, Files);
             foreach (var item in UploadedAssets) Log.LogMessage("Uploaded {0}", item.ItemSpec);
             return true;
@@ -85,6 +83,16 @@
         {
             var uploadedAsset = await client.UploadAsset(release, BuildAssetUpload(sourceItem));
             return TaskItemFor(release, uploadedAsset);
+        }
+
+        private ReleaseUpdate BuildReleaseData()
+        {
+            var release = new ReleaseUpdate(TagName);
+            if (ReleaseNotesFile != null)
+            {
+                release.Description = File.ReadAllText(ReleaseNotesFile.ItemSpec);
+            }
+            return release;
         }

         private ReleaseAssetUpload BuildAssetUpload(ITaskItem item)


Cleanup.

Cleanup.

--- Gu.Roslyn.Asserts/Analyze.cs
+++ Gu.Roslyn.Asserts/Analyze.cs
@@ -4,7 +4,6 @@
     using System.Collections.Generic;
     using System.Collections.Immutable;
     using System.IO;
-    using System.Linq;
     using System.Threading;
     using System.Threading.Tasks;
     using Microsoft.CodeAnalysis;


functions:availableLoad:moar stability

functions:availableLoad:moar stability

seems like i didnt stabilize it before hah

--- kagv/functions.cs
+++ kagv/functions.cs
@@ -158,9 +158,35 @@

         private bool availableLoad(GridPos b)
         {
+
             if (!crossAdjacent && !crossCorners)//since we do not pass through corners ,we got to check only UP,DOWN,LEFT,RIGHT
             {
-                if (b.x == 0)
+                if (b.y == (height-1)) // bottom
+                {
+                    if (m_rectangles[b.x][b.y - 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x - 1][b.y].boxType == BoxType.Normal
+                    || m_rectangles[b.x+1][b.y].boxType == BoxType.Normal)
+                    {
+                        return true;
+                    }
+                    else
+                        return false;
+
+                }
+                if (b.x == (width-1)) // right
+                {
+                    if (m_rectangles[b.x-1][b.y].boxType == BoxType.Normal
+                    || m_rectangles[b.x][b.y-1].boxType == BoxType.Normal
+                    || m_rectangles[b.x][b.y + 1].boxType == BoxType.Normal)
+                    {
+                        return true;
+                    }
+                    else
+                        return false;
+
+                }
+
+                if (b.x == 0) // left
                 {
                     if (m_rectangles[b.x][b.y - 1].boxType == BoxType.Normal
                     || m_rectangles[b.x + 1][b.y].boxType == BoxType.Normal
@@ -172,7 +198,7 @@
                         return false;

                 }
-                if (b.y == 0)
+                if (b.y == 0) // top
                 {
                     if (m_rectangles[b.x - 1][b.y].boxType == BoxType.Normal
                     || m_rectangles[b.x + 1][b.y].boxType == BoxType.Normal
@@ -196,7 +222,35 @@
             }
             else
             {
-                if (b.x == 0)
+                if (b.y == (height-1)) // bottom
+                {
+                    if (m_rectangles[b.x][b.y - 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x - 1][b.y].boxType == BoxType.Normal
+                    || m_rectangles[b.x - 1][b.y-1].boxType == BoxType.Normal
+                    || m_rectangles[b.x + 1][b.y + 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x + 1][b.y].boxType == BoxType.Normal)
+                    {
+                        return true;
+                    }
+                    else
+                        return false;
+
+                }
+                if (b.x == (width-1)) // right
+                {
+                    if (m_rectangles[b.x - 1][b.y].boxType == BoxType.Normal
+                    || m_rectangles[b.x][b.y - 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x-1][b.y - 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x-1][b.y + 1].boxType == BoxType.Normal
+                    || m_rectangles[b.x][b.y + 1].boxType == BoxType.Normal)
+                    {
+                        return true;
+                    }
+                    else
+                        return false;
+
+                }
+                if (b.x == 0) //left
                 {
                     if (m_rectangles[b.x][b.y - 1].boxType == BoxType.Normal
                     || m_rectangles[b.x + 1][b.y].boxType == BoxType.Normal
@@ -210,7 +264,7 @@
                         return false;

                 }
-                if (b.y == 0)
+                if (b.y == 0) //top
                 {
                     if (m_rectangles[b.x - 1][b.y].boxType == BoxType.Normal
                     || m_rectangles[b.x + 1][b.y].boxType == BoxType.Normal


Minor refactorings. Add tags

Minor refactorings. Add tags

--- Hermod/Helpers/InfoStatus.cs
+++ Hermod/Helpers/InfoStatus.cs
@@ -60,6 +60,49 @@

         }

+        public static JToken Switch2(this InfoStatus  Status,
+                                     Func<JToken>     WhenShowIdOnly,
+                                     Func<JToken>     WhenExpand)
+        {
+
+            switch (Status)
+            {
+
+                case InfoStatus.ShowIdOnly:
+                    return WhenShowIdOnly();
+
+                case InfoStatus.Expand:
+                    return WhenExpand();
+
+                default:
+                    return null;
+
+            }
+
+        }
+
+        public static JToken Switch<T>(this InfoStatus  Status,
+                                       T                Element,
+                                       Func<T, JToken>  WhenShowIdOnly,
+                                       Func<T, JToken>  WhenExpand)
+        {
+
+            switch (Status)
+            {
+
+                case InfoStatus.ShowIdOnly:
+                    return WhenShowIdOnly(Element);
+
+                case InfoStatus.Expand:
+                    return WhenExpand(Element);
+
+                default:
+                    return null;
+
+            }
+
+        }
+
     }

 }


added equal width cols ctor

added equal width cols ctor

--- HtmlHelper/Bootstrap/Grid.cs
+++ HtmlHelper/Bootstrap/Grid.cs
@@ -30,6 +30,11 @@

         public int LargeCols { get; set;}

+        public Cell(params BodyElement[] content) : base(content)
+        {
+            AddClass("col");
+        }
+
         public Cell(int smallCols, params BodyElement[] content) : base(content)
         {
             SmallCols = smallCols;
@@ -55,6 +60,11 @@
             return new Row(cells);
         }

+        public static Cell Cell(params BodyElement[] content)
+        {
+            return new Cell(content);
+        }
+
         public static Cell Cell(int smallCols, params BodyElement[] content)
         {
             return new Cell(smallCols, content);


Starting infusion without elevation by default otherwise it starts game client with elevated privileges and UOAutoMap cannot see position unless it is also elevated.

--- Infusion.Launcher/Program.cs
+++ Infusion.Launcher/Program.cs
@@ -1,4 +1,5 @@
-using System.Diagnostics;
+using System;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
 using System.Windows.Forms;
@@ -24,7 +25,7 @@
             }

             var startInfo = new ProcessStartInfo(infusionExe);
-            if (args.All(x => x != "--no-elevation"))
+            if (args.Any(x => x.Trim().Equals("--elevated", StringComparison.OrdinalIgnoreCase)))
             {
                 startInfo.Verb = "runas";
             }


Fix CI test failures

Fix CI test failures

--- Kudu.TestHarness/SitePool.cs
+++ Kudu.TestHarness/SitePool.cs
@@ -87,7 +87,7 @@
                 foreach (var process in (await appManager.ProcessManager.GetProcessesAsync()).Where(p => p.Name.Equals("w3wp", StringComparison.OrdinalIgnoreCase)))
                 {
                     var extendedProcess = await appManager.ProcessManager.GetProcessAsync(process.Id);
-                    if (extendedProcess.OpenFileHandles.Any(h => h.IndexOf("klr.host.dll", StringComparison.OrdinalIgnoreCase) != -1))
+                    if (extendedProcess.OpenFileHandles.Any(h => h.IndexOf("kre.host.dll", StringComparison.OrdinalIgnoreCase) != -1))
                     {
                         await appManager.ProcessManager.KillProcessAsync(extendedProcess.Id, throwOnError:false);
                     }


added Merge method to user

added Merge method to user

--- Kyru/Network/Objects/User.cs
+++ Kyru/Network/Objects/User.cs
@@ -43,6 +43,11 @@
 			{
 				return files.AsReadOnly();
 			}
+		}
+
+		internal void Merge(User user)
+		{
+			throw new NotImplementedException();
 		}

 		internal IList<Tuple<byte[], ulong>> DeletedFiles


fix resolving theme.

fix resolving theme.

--- samples/ControlCatalog/App.xaml.cs
+++ samples/ControlCatalog/App.xaml.cs
@@ -41,7 +41,7 @@
             },
             new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
             {
-                Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Fluent")
+                Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default")
             },
         };

@@ -53,7 +53,7 @@
             },
             new StyleInclude(new Uri("resm:Styles?assembly=ControlCatalog"))
             {
-                Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Fluent")
+                Source = new Uri("resm:Avalonia.Themes.Default.DefaultTheme.xaml?assembly=Avalonia.Themes.Default")
             },
         };


Fix StillMotion sample to keep a reference to the window controller

See bug #8585. If the NSWindowController is not cached on the managed side then the GC will collect it and the app will fault when an event notification comes in. This could be fixed with a framework change instead, but for now this keeps the sample up and running.

--- samples/StillMotion/StillMotion.cs
+++ samples/StillMotion/StillMotion.cs
@@ -12,6 +12,7 @@
 {
 	public partial class StillMotionDocument : NSDocument
 	{
+		NSWindowController windowController;
 		QTMovie movie;
 		QTCaptureSession captureSession;
 		QTCaptureDeviceInput captureInput;
@@ -33,6 +34,11 @@
 		public override void WindowControllerDidLoadNib (NSWindowController windowController)
 		{
 			base.WindowControllerDidLoadNib (windowController);
+
+			// A reference to the window controller must be kept on the managed side
+			// to keep the object from being GC'd so that the delegates below resolve.
+			// Don't remove unless the framework is updated to track the reference.
+			this.windowController = windowController;

 			NSError err;


fixed rhoapprunner mango problem

fixed rhoapprunner mango problem

--- platform/wp7/RhoAppRunner/Program.cs
+++ platform/wp7/RhoAppRunner/Program.cs
@@ -23,9 +23,9 @@
                 useEmulator = false;

             if (useEmulator)
-                WP7Device = WP7SDK.GetDevices().First(d => d.Name.StartsWith("Windows Phone 7 Emulator"));
+                WP7Device = WP7SDK.GetDevices().First(d => d.Name.StartsWith("Windows Phone Emulator"));
             else
-                WP7Device = WP7SDK.GetDevices().First(d => d.Name.StartsWith("Windows Phone 7 Device"));
+                WP7Device = WP7SDK.GetDevices().First(d => d.Name.StartsWith("Windows Phone Device"));

             Console.WriteLine("Connecting to Windows Phone 7 Emulator/Device...");
             WP7Device.Connect();


wp8: crash on tabbar remove fixed

wp8: crash on tabbar remove fixed

--- platform/wp8/rhodes/MainPage.xaml.cs
+++ platform/wp8/rhodes/MainPage.xaml.cs
@@ -434,7 +434,7 @@
             String url = getCurrentURLFunc((sender as WebBrowser).TabIndex);
             CRhoRuntime.getInstance().onWebViewUrlChanged(url);
             int index = (sender as WebBrowser).TabIndex;
-            if (index > -1 && !_tabProps[index]._isInitialized)
+            if (index > -1 && _tabProps.ContainsKey(index) && !_tabProps[index]._isInitialized)
             {
                 _tabProps[index]._isInitialized = true;
                 if (_tabProps.ContainsKey(index) && _tabProps[index]._action != null)


Fix image comparison by comparing the rows one by one.

If we compare the full image data, we might end up comparing padding
bytes, which have no guaranteed value.

For details, see http://stackoverflow.com/q/12205247/73070

--- Test/Program.cs
+++ Test/Program.cs
@@ -102,20 +102,23 @@
             unsafe
             {
                 var rect = new Rectangle(0, 0, bmp.Width, bmp.Height);
-                // no idea why, but we have to specify the pixel format as 32bpp
-                // RGB (even though the images are 24bpp RGB), otherwise theres
-                // sometimes non-matching bitmap data for identical images
                 var resultData = bmp.LockBits(rect, ImageLockMode.ReadOnly,
-                    PixelFormat.Format32bppRgb);
+                    bmp.PixelFormat);
                 var expectedData = expected.LockBits(rect, ImageLockMode.ReadOnly,
-                    PixelFormat.Format32bppRgb);
+                    expected.PixelFormat);

                 try
                 {
-                    if (memcmp(resultData.Scan0, expectedData.Scan0,
-                        resultData.Stride * resultData.Height) != 0)
+                    byte* resultStart = (byte*)resultData.Scan0;
+                    byte* expectedStart = (byte*)expectedData.Scan0;
+                    for (var y = 0; y < resultData.Height; y++)
                     {
-                        return string.Format("{0} bitmap data did not match", type);
+                        var resultRow = (IntPtr)(resultStart + y*resultData.Stride);
+                        var expectedRow = (IntPtr)(expectedStart + y*expectedData.Stride);
+                        if (memcmp(resultRow, expectedRow, resultData.Width*3) != 0)
+                        {
+                            return string.Format("{0} bitmap data did not match", type);
+                        }
                     }
                 }
                 finally


Matrix3 multiplication tests

Matrix3 multiplication tests

--- LibRbxl.Test/Matrix3Tests.cs
+++ LibRbxl.Test/Matrix3Tests.cs
@@ -20,6 +20,30 @@
             var product = m1*m2;

             Assert.AreEqual(m1, product);
+        }
+
+        [Test]
+        public void Multiply()
+        {
+            var m1 = new Matrix3(3, -1, 0, 2, 5, 1, -7, 1, 3);
+            var m2 = new Matrix3(6, -1, 0, 0, 1, -2, 3, -8, 1);
+            var expected = new Matrix3(18, -4, 2, 15, -5, -9, -33, -16, 1);
+
+            var product = m1*m2;
+
+            Assert.AreEqual(expected, product);
+        }
+
+        [Test]
+        public void Multiply2()
+        {
+            var m1 = new Matrix3(1, 4, -1, 6, 1, 8, 2, 5, 1);
+            var m2 = new Matrix3(2, 0, 1, 7, 4, 2, 8, 1, 3);
+            var expected = new Matrix3(22, 15, 6, 83, 12, 32, 47, 21, 15);
+
+            var product = m1 * m2;
+
+            Assert.AreEqual(expected, product);
         }

         [Test]


Resolved issue with Commands being incorrectly written to the config file. xibosignage/xibo#1129

--- Logic/ApplicationSettings.cs
+++ Logic/ApplicationSettings.cs
@@ -187,7 +187,24 @@
                     {
                         if (property.CanRead && !_globalProperties.Contains(property.Name) && property.Name != "HardwareKey")
                         {
-                            writer.WriteElementString(property.Name, "" + property.GetValue(_instance));
+                            if (property.Name == "Commands")
+                            {
+                                writer.WriteStartElement("commands");
+
+                                foreach (Command command in _instance.Commands)
+                                {
+                                    writer.WriteStartElement(command.Code);
+                                    writer.WriteElementString("commandString", command.CommandString);
+                                    writer.WriteElementString("commandValidation", command.Validation);
+                                    writer.WriteEndElement();
+                                }
+
+                                writer.WriteEndElement();
+                            }
+                            else
+                            {
+                                writer.WriteElementString(property.Name, "" + property.GetValue(_instance));
+                            }
                         }
                     }
                     catch
@@ -229,7 +246,7 @@
             foreach (XmlNode node in document.DocumentElement.ChildNodes)
             {
                 // Are we a commands node?
-                if (node.Name == "commands")
+                if (node.Name.ToLower() == "commands")
                 {
                     List<Command> commands = new List<Command>();


#39 Ignored failure to stop MAME when disposing

--- Mamesaver/GamePlayManager.cs
+++ Mamesaver/GamePlayManager.cs
@@ -289,7 +289,14 @@
             if (!disposing || !_initialised) return;

             // Stop MAME and wait for it to terminate
-            if (_mameProcess != null && !_mameProcess.HasExited) _invoker.Stop(_mameProcess);
+            try
+            {
+                if (_mameProcess != null && !_mameProcess.HasExited) _invoker.Stop(_mameProcess);
+            }
+            catch (InvalidOperationException)
+            {
+                // Ignore; MAME may not have fully started when we are exiting.
+            }
         }

         public void Dispose()


Properly set the token of typespecs

Properly set the token of typespecs

--- Mono.Cecil/AssemblyReader.cs
+++ Mono.Cecil/AssemblyReader.cs
@@ -1037,7 +1037,9 @@
 				return null;

 			var reader = ReadSignature (ReadBlobIndex ());
-			return reader.ReadTypeSignature ();
+			var type = reader.ReadTypeSignature ();
+			type.token = new MetadataToken (TokenType.TypeSpec, rid);
+			return type;
 		}

 		SignatureReader ReadSignature (uint signature)


Fix the build

Fix the build

--- MonoTouch.Dialog/Elements.cs
+++ MonoTouch.Dialog/Elements.cs
@@ -2895,7 +2895,7 @@
 			cell.Color = Color;
 			cell.Radius = Radius;
 			cell.HighlightColor = HighlightColor;
-			cell.Shadow = Shadow;
+			cell.ShowShadow = Shadow;
 			cell.SetNeedsLayout ();

 			return cell;


Switch case menus commence la partie correctement

--- BBTA/BBTA/Game1.cs
+++ BBTA/BBTA/Game1.cs
@@ -159,7 +159,7 @@
                         break;
                     case EtatJeu.Jeu:
                         //TransferEtat
-                        if (!this.Components.Contains(acc))
+                        if (!this.Components.Contains(partie))
                         {
                             this.Components.Clear();
                             this.Components.Add(partie);


Made list threadsafe

Made list threadsafe

--- BackEnd/Program.cs
+++ BackEnd/Program.cs
@@ -6,6 +6,7 @@
 using System.Linq;
 using System.Threading;
 using SharedLibraries;
+using System.Collections.Concurrent;

 namespace BackEnd
 {
@@ -29,7 +30,7 @@
         // You can remove any device/program you do not plan on using from this list... It will take care of the rest.
         static List<Pipe> pipelist = new List<Pipe>() { kinect, board, tunnel, gui, fromgui }; //kinect, board, tunnel, gui, fromgui
         static List<Pipe> sensors = pipelist.Except(new List<Pipe>() { gui }).ToList();
-        static List<string> data_list = new List<String>();
+        static ConcurrentBag<string> data_list = new ConcurrentBag<string>();

         //Logging and Data Array
         static bool endConnection = false, isLogging = false;
@@ -74,7 +75,7 @@
                 // Log Applicable Data if Logging was Enabled
                 if (isLogging)
                 {
-                    data_log = new Log(data_list, start_time);
+                    data_log = new Log(data_list.ToList(), start_time);
                     data_log.logdata();
                     data_log.writeCSV(fileName + append);
                     isLogging = false;


Viewer: switch to gitcdn.link for update.xml

--- Mzinga.Viewer/UpdateUtils.cs
+++ Mzinga.Viewer/UpdateUtils.cs
@@ -225,7 +225,7 @@
             }
         }

-        private const string _updateUrl = "http://mzingaupdate.jonthysell.com";
+        private const string _updateUrl = "https://gitcdn.link/repo/jonthysell/Mzinga/master/update.xml";
         private const string _userAgent = "Mozilla/5.0";
     }


Log errors in MakeRequest() as INFO, not ERROR. Some communications problems are benign (e.g., can't send Friend status update to a region that is down), so don't log them as ERROR so soon. We rethrow the exception, so the caller can still decide to log the error as an ERROR.

Resolves http://opensimulator.org/mantis/view.php?id=7077

--- OpenSim/Framework/WebUtil.cs
+++ OpenSim/Framework/WebUtil.cs
@@ -1026,7 +1026,7 @@
                     }
                     catch (Exception e)
                     {
-                        m_log.ErrorFormat("[FORMS]: Error sending request to {0}: {1}. Request: {2}", requestUrl, e.Message,
+                        m_log.InfoFormat("[FORMS]: Error sending request to {0}: {1}. Request: {2}", requestUrl, e.Message,
                             obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
                         throw e;
                     }
@@ -1054,7 +1054,7 @@
                 }
                 catch (Exception e)
                 {
-                    m_log.ErrorFormat("[FORMS]: Error receiving response from {0}: {1}. Request: {2}", requestUrl, e.Message,
+                    m_log.InfoFormat("[FORMS]: Error receiving response from {0}: {1}. Request: {2}", requestUrl, e.Message,
                         obj.Length > WebUtil.MaxRequestDiagLength ? obj.Remove(WebUtil.MaxRequestDiagLength) : obj);
                     throw e;
                 }


disabled useless layman throttling

disabled useless layman throttling

--- OpenSim/Framework/WebUtil.cs
+++ OpenSim/Framework/WebUtil.cs
@@ -398,7 +398,7 @@

         public static OSDMap ServiceFormRequest(string url, NameValueCollection data, int timeout)
         {
-            lock (EndPointLock(url))
+            //lock (EndPointLock(url))
             {
                 return ServiceFormRequestWorker(url,data,timeout);
             }


Support for parameter-less constructors in custom OnlinePlayer classes Additional error handling

--- Oxide.Ext.Rust/RustPlugin.cs
+++ Oxide.Ext.Rust/RustPlugin.cs
@@ -47,6 +47,11 @@
                         Puts("[{0}] The {1} field does not support removing BasePlayer keys! (online players will not be tracked)", Name, field.Name);
                         continue;
                     }
+                    if (plugin_field.GenericArguments[1].GetField("Player") == null)
+                    {
+                        Puts("[{0}] The {1} class does not have a public Player field! (online players will not be tracked)", Name, plugin_field.GenericArguments[1].Name);
+                        continue;
+                    }
                     onlinePlayerFields.Add(plugin_field);
                 }
             }
@@ -72,27 +77,38 @@
             if (onlinePlayerFields.Count > 0)
             {
                 foreach (var player in BasePlayer.activePlayerList)
-                {
-                    foreach (var plugin_field in onlinePlayerFields)
-                        plugin_field.Call("Add", player, Activator.CreateInstance(plugin_field.GenericArguments[1], (object)player));
-                }
+                    AddOnlinePlayer(player);
             }

             base.HandleAddedToManager(manager);
         }

         [HookMethod("OnPlayerInit")]
-        void base_OnPlayerInit(BasePlayer player, Network.Connection connection)
-        {
-            foreach (var plugin_field in onlinePlayerFields)
-                plugin_field.Call("Add", player, Activator.CreateInstance(plugin_field.GenericArguments[1], (object)player));
+        private void base_OnPlayerInit(BasePlayer player, Network.Connection connection)
+        {
+            AddOnlinePlayer(player);
         }

         [HookMethod("OnPlayerDisconnected")]
-        void base_OnPlayerDisconnected(BasePlayer player)
+        private void base_OnPlayerDisconnected(BasePlayer player)
         {
             foreach (var plugin_field in onlinePlayerFields)
                 plugin_field.Call("Remove", player);
+        }
+
+        private void AddOnlinePlayer(BasePlayer player)
+        {
+            foreach (var plugin_field in onlinePlayerFields)
+            {
+                var type = plugin_field.GenericArguments[1];
+                object online_player;
+                if (type.GetConstructor(new Type[] { typeof(BasePlayer) }) == null)
+                    online_player = Activator.CreateInstance(type);
+                else
+                    online_player = Activator.CreateInstance(type, (object)player);
+                type.GetField("Player").SetValue(online_player, player);
+                plugin_field.Call("Add", player, online_player);
+            }
         }

         /// <summary>


Primer test! UB

Primer test! UB

--- BeatItTest/Test.cs
+++ BeatItTest/Test.cs
@@ -1,4 +1,7 @@
-using Microsoft.VisualStudio.TestTools.UnitTesting;
+using BeatIt_.AppCode.Challenges;
+using BeatIt_.AppCode.Classes;
+using BeatIt_.AppCode.Controllers;
+using Microsoft.VisualStudio.TestTools.UnitTesting;

 //ojo

@@ -13,11 +16,18 @@
             Assert.AreEqual(4 ,2+2);

             //IChallengeController ich = ChallengeController.getInstance();
-           // UsainBolt ubBolt = (UsainBolt)ich.getChallenge(BeatIt_.AppCode.Enums.ChallengeType.CHALLENGE_TYPE.USAIN_BOLT);
+            //UsainBolt ubBolt = (UsainBolt)ich.getChallenge(BeatIt_.AppCode.Enums.ChallengeType.CHALLENGE_TYPE.USAIN_BOLT);

-            // ACÁ se tiene que probar la función de puntaje,
-            // el tema es que no está creada la función de almacenar el puntaje
-            //ubBolt.getPuntajeObtenido()
+            var ifc = FacadeController.getInstance();
+            if (!ifc.isLoggedUser())
+            {
+                ifc.loginUser(new User());
+            }
+            var currentChallenge = (ChallengeDetail1)ifc.getChallenge(1);
+            currentChallenge.completeChallenge(false, 45, 42);
+            //Si esta bien debería ser 174 el puntaje de en el desafío (42+45)*2
+            Assert.AreEqual(174, currentChallenge.State.getLastScore());
+
         }
     };
 };


Refactored write into common method

Refactored write into common method

--- Pdoxcl2Sharp/ParadoxSaver.cs
+++ Pdoxcl2Sharp/ParadoxSaver.cs
@@ -200,62 +200,62 @@

         private Action<ParadoxParser, string> wrapUnderlyingAction(Action<ParadoxSaver, string> action)
         {
-            return (ParadoxParser p, string s) =>
+            return (ParadoxParser parser, string token) =>
                 {
                     //If the last token was an equals
                     //Means that an empty list was encountered
-                    if (prevToken == LexerToken.Equals && p.CurrentToken == LexerToken.Equals && prevIndex >= p.CurrentIndex)
+                    if (prevToken == LexerToken.Equals && parser.CurrentToken == LexerToken.Equals && prevIndex >= parser.CurrentIndex)
                         writer.Write("{}" + Environment.NewLine);

                     lastWrite = WriteType.None;
-                    underlyingParser = p;
-
-                    while (prevIndex > p.CurrentIndex && p.CurrentToken != LexerToken.RightCurly)
+                    underlyingParser = parser;
+
+                    while (prevIndex > parser.CurrentIndex && parser.CurrentToken != LexerToken.RightCurly)
                     {
                         if (prevIndex > 1)
                             writer.Write(new string('\t', prevIndex - 1));
                         writer.Write('}' + Environment.NewLine);
                         prevIndex--;
                     }
-                    action(this, s);
+                    action(this, token);

                     switch (lastWrite)
                     {
                         case WriteType.Single:
-                            p.ReadString();
+                            parser.ReadString();
                             break;
                         case WriteType.None:
-                            preprocess(p.CurrentToken);
-
-                            if (p.CurrentToken == LexerToken.Equals)
-                                writer.Write(new string('\t', p.CurrentIndex));
-
-                            if (p.CurrentToken != LexerToken.Quote)
-                                writer.Write(s);
+                            preprocess(parser.CurrentToken);
+
+                            if (parser.CurrentToken == LexerToken.Equals)
+                                writer.Write(new string('\t', parser.CurrentIndex));
+
+                            if (parser.CurrentToken != LexerToken.Quote)
+                                writer.Write(token);
                             else
                             {
                                 writer.Write('"');
-                                writer.Write(s);
+                                writer.Write(token);
                                 writer.Write('"');
                             }

-                            if (prevIndex > p.CurrentIndex)
+                            if (prevIndex > parser.CurrentIndex)
                             {
                                 writer.Write("} ");
                                 prevIndex--;
                             }

-                            if (p.CurrentToken == LexerToken.Equals)
+                            if (parser.CurrentToken == LexerToken.Equals)
                                 writer.Write('=');
-                            else if ((p.CurrentToken == LexerToken.Untyped || p.CurrentToken == LexerToken.Quote)
+                            else if ((parser.CurrentToken == LexerToken.Untyped || parser.CurrentToken == LexerToken.Quote)
                                 && prevToken == LexerToken.Equals
                                 && prevIndex >= underlyingParser.CurrentIndex)
                                 writer.Write(Environment.NewLine);
-                            else if (p.CurrentToken == LexerToken.Untyped)
+                            else if (parser.CurrentToken == LexerToken.Untyped)
                                 writer.Write(' ');
                             break;
                         case WriteType.List:
-                            p.ReadStringList();
+                            parser.ReadStringList();
                             break;
                     }
                     prevIndex = underlyingParser.CurrentIndex;


`PerformanceTester` output fixed (comma separation changed to semicolon separation).

--- PerformanceTester/Program.cs
+++ PerformanceTester/Program.cs
@@ -73,7 +73,7 @@
                         Console.WriteLine("{0,20}: {1}", test.GetType().Name, result);
                         if(options.OutputFile != null)
                         {
-                            File.AppendAllText(options.OutputFile, string.Format("{0}-{1}-{2}-{3},{4},{5}{6}", serializerType, test.GetType().Name, testType, options.Id, result.Average, result.StandardDeviation, Environment.NewLine));
+                            File.AppendAllText(options.OutputFile, string.Format("{0}-{1}-{2}-{3};{4};{5}{6}", serializerType, test.GetType().Name, testType, options.Id, result.Average, result.StandardDeviation, Environment.NewLine));
                         }
                     }
                     Console.WriteLine("");


deleted wrongly placed TighytDBCalls.cs file

--- TightDBCalls.cs
+++ TightDBCalls.cs
@@ -1,278 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-
-namespace tightdb.Tightdbcsharp
-{
-    //mirrors the enum in the C interface
-    /*
-   Note: These must be kept in sync with those in
-   <tightdb/data_type.hpp> of the core library.
-typedef enum {
-    tightdb_Bool   =  1,
-    tightdb_Int    =  0,
-    tightdb_String =  2,
-    tightdb_Binary =  4,
-    tightdb_Date   =  7,
-    tightdb_Table  =  5,
-    tightdb_Mixed  =  6
-}
-TightdbDataType;
-     */
-
-    //Used exclusively in table constructors
-    public enum TDB
-    {
-        Int = 0,
-        Bool = 1,
-        String = 2,
-        Binary = 4,
-        Table = 5,
-        Mixed = 6,
-        Date = 7
-    }
-
-    public enum TightDbDataType
-    {
-        Int = 0,
-        Bool = 1,
-        String = 2,
-        Binary = 4,
-        Table = 5,
-        Mixed = 6,
-        Date = 7
-    }
-
-    //this class contains methods for calling the c++ TightDB system, which has been flattened out as C type calls
-    //The individual methods call the C inteface using types and values suitable for the C interface, but the methods take and give
-    //values that are suitable for C#
-    //all the stuff that is sent to TightDB c++ via P/Invoce is prefixed TDB so a C# spec is called spec while the
-    //value holding the c++ address of the real c++ hosted spec is called TDBspec
-    class TightDBCalls
-    {
-
-        /*** Spec ************************************/
-
-        //c code  :   void        spec_add_column(Spec *spec,  TightdbDataType type, const char *name);
-        public static void spec_add_column(Spec spec, TightDbDataType type, string name)
-        {
-            //add pinvoke call and mashalling to  void        spec_add_column(Spec *spec,  TightdbDataType type, const char *name);
-            fakepinvoke(spec.TDBspec, type, name);
-            //vaules to send : TDBspec, type, name
-        }
-
-        public static Spec spec_add_column_table(Spec spec, string name)
-        {
-            Spec r = new Spec();
-            //add pinvoke call and mashalling to  Spec       *spec_add_column_table(Spec *spec, const char *name);
-            r.TDBspec = (UIntPtr)fakepinvoke(spec, name);
-            return r;
-        }
-
-
-        //column indexes in C# for specs are ints
-        public static Spec spec_get_spec(Spec spec, long column_idx)
-        {
-            Spec r = new Spec();
-            UIntPtr TDBColix = (UIntPtr)column_idx;//should safely set the TDBColix to the value of the int index
-            UIntPtr TDBspec = (UIntPtr)fakepinvoke(spec.TDBspec, TDBColix);
-            //Spec       *spec_get_spec(Spec *spec, size_t column_ndx);
-            r.TDBspec = TDBspec;
-            return r;
-        }
-
-
-        //size_t spec_get_column_count(Spec* spec);
-        public static long spec_get_column_count(Spec spec)
-        {
-            UIntPtr res = (UIntPtr)fakepinvoke(spec.TDBspec);        //size_t spec_get_column_count(Spec* spec);
-            return (long)res;
-        }
-
-
-
-        //TightdbDataType spec_get_column_type(Spec* spec, size_t column_idx);
-        public static TightDbDataType spec_get_column_type(Spec spec,long column_idx)
-        {
-            UIntPtr TDBcolix = (UIntPtr)column_idx;
-            TightDbDataType r = (TightDbDataType)fakepinvoke(spec.TDBspec, TDBcolix);
-            return r;
-        }
-
-
-        // const char *spec_get_column_name(Spec *spec, size_t column_idx);
-        public static String spec_get_column_name(Spec spec, long column_idx)
-        {
-            UIntPtr TDBcolix = (UIntPtr)column_idx;
-            String res = (string)fakepinvoke(spec.TDBspec, TDBcolix);
-            return res;
-        }
-
-
-        //    size_t      spec_get_column_index(Spec *spec, const char *name);
-
-        public static long spec_get_column_index(Spec spec, String name)
-        {
-            UIntPtr col_idx = (UIntPtr)fakepinvoke(spec.TDBspec, name);
-            long res = (long)col_idx;
-            return res;
-        }
-
-        /* Delete spec after use of functions that returns a Spec* */
-        // void spec_delete(Spec* spec);
-        // so this will deallocate the internal spec pointer inside the spec objet You send.
-        // intended use is that table_get_spec gets you a spec, and when finished, you must call spec_delete(spec)
-        public static void spec_delete(Spec spec)
-        {
-            fakepinvoke(spec.TDBspec);
-            spec.TDBspec = UIntPtr.Zero;
-        }
-
-        //methods here below are not in use atm.
-        // c code :    size_t      spec_get_ref(Spec *spec);
-        // expected functionality : unknown (seems to take a pointer to a TDBspec and return a pointer sized int)
-        // Not sure if that pointer sized int is a pointer to a spec or what it is
-        private static Spec spec_get_ref(Spec spec)
-        {
-            //add pinvoke call and marshalling to :     size_t      spec_get_ref(Spec *spec);
-            UIntPtr TDBSpecresult  = (UIntPtr)fakepinvoke(spec.TDBspec);
-
-            Spec ret = new Spec();
-            ret.TDBspec = TDBSpecresult;
-            return ret;
-        }
-
-
-        /*** Table ************************************/
-
- //       Table* table_new();
-
-        public static void  table_new(Table table)
-        {
-            UIntPtr TDBTAble = (UIntPtr) fakepinvoke(); //a call to table_new
-            table.TDBTable = TDBTAble;
-        }
-
-//        void table_delete(Table* t);       /* Delete after use of table_new() */
-        public static void table_delete(Table t)
-        {
-            fakepinvoke(t.TDBTable);//replace with call to table_delete
-        }
-
-
-//      void    table_unbind(const Table *t); /* Ref-count delete of table* from table_get_table() */
-        public static void table_unbind(Table t)
-        {
-            fakepinvoke(t.TDBTable);//call table_unbind
-        }
-
-
-//        Spec* table_get_spec(Table* t);     /* Use spec_delete() when done */
-        public static Spec table_get_spec(Table t)
-        {
-            UIntPtr TDBSpec = (UIntPtr)fakepinvoke(t.TDBTable);
-            Spec ret = new Spec();
-            ret.TDBspec = TDBSpec;
-            return ret;
-        }
-
-
- //       void table_update_from_spec(Table* t);
-        public static void table_update_from_spec(Table t)
-        {
-
-            fakepinvoke(t.TDBTable);
-        }
-
-
-//            size_t      table_register_column(Table *t,  TightdbDataType type, const char *name);
-        public static long table_register_column(Table t, TDB type, string name)
-        {
-            UIntPtr col_idx = (UIntPtr) fakepinvoke(t.TDBTable, type, name);
-            return (long)col_idx;
-        }
-
-
-//            size_t      table_get_column_count(const Table *t);
-        public static long table_get_column_count(Table t)
-        {
-            UIntPtr column_cnt = (UIntPtr)fakepinvoke(t.TDBTable);
-            return (long)column_cnt;
-        }
-
-//            size_t      table_get_column_index(const Table *t, const char *name);
-        public static long table_get_column_index(Table t, string name)
-        {
-            UIntPtr column_idx = (UIntPtr)fakepinvoke(t.TDBTable, name);
-            return (long)column_idx;
-        }
-
-
-//            const char *table_get_column_name(const Table *t, size_t ndx);
-        public static string table_get_column_name(Table t, long column_idx)
-        {
-            UIntPtr TDBColix = (UIntPtr)column_idx;
-            return (string)fakepinvoke(t.TDBTable, TDBColix);//will likely need some marshalling and postprocessing of the return string
-        }
-
-        //    TightdbDataType table_get_column_type(const Table *t, size_t ndx);
-        public static TightDbDataType table_get_column_type(Table t, long column_idx)
-        {
-            UIntPtr TDBColix = (UIntPtr)column_idx;
-            TightDbDataType res = (TightDbDataType)fakepinvoke(t.TDBTable, TDBColix);
-            return res;
-        }
-
-
-//             void table_add(Table *t, ...);
-        //I assume this one adds an empty colum to the end of the table and returns the ix of that row
-        public static long table_add(Table t)
-        {
-            UIntPtr colix = (UIntPtr)fakepinvoke(t.TDBTable);
-            return (long)colix;
-        }
-
-
-        //             void table_add(Table *t, ...);
-        //I assume this one adds an empty colum to the end of the table and returns the ix of that row
-        public static long table_insert(Table t,long col_idx)
-        {
-            UIntPtr colix = (UIntPtr)fakepinvoke(t.TDBTable);
-            return (long)colix;
-        }
-
-        public static TightDbDataType table_get_columntype(Table t, long columnindex)
-        {
-           UIntPtr datatype =(UIntPtr)fakepinvoke(t.TDBTable,columnindex);
-           return (TightDbDataType)datatype;
-        }
-
-        public static long table_get_int(Table t ,long ColumnIndex,long RecordIndex)
-        {
-            UIntPtr res = (UIntPtr)fakepinvoke(t.TDBTable, ColumnIndex, RecordIndex);
-            return (long)res;
-        }
-
-        /* Getting values */
-        //    int64_t     table_get_int(const Table *t, size_t column_ndx, size_t ndx);
-        //    bool        table_get_bool(const Table *t, size_t column_ndx, size_t ndx);
-        //    time_t      table_get_date(const Table *t, size_t column_ndx, size_t ndx);
-        //    const char *table_get_string(const Table *t, size_t column_ndx, size_t ndx);
-        //    BinaryData *table_get_binary(const Table *t, size_t column_ndx, size_t ndx);
-        //    Mixed      *table_get_mixed(const Table *t, size_t column_ndx, size_t ndx);
-        //   TightdbDataType table_get_mixed_type(const Table *t, size_t column_ndx, size_t ndx);
-        //    Table       *table_get_subtable(Table *t, size_t column_ndx, size_t ndx);
-        //    const Table *table_get_const_subtable(const Table *t, size_t column_ndx, size_t ndx);
-        /* Use table_unbind() to 'delete' the table after use */
-
-
-        //not used - enables us to write code that resemples the external methods to be created later
-        //fakepinvoke can be calld with any number of parametres of any type and return any kind of object.
-        private static Object fakepinvoke(params object[] parametres) { return null; }
-
-
-    }
-}


Fix depot processor leaving stale jobs

Fix depot processor leaving stale jobs

--- Processors/DepotProcessor.cs
+++ Processors/DepotProcessor.cs
@@ -135,11 +135,6 @@
                     DepotName = depotName
                 };

-                lock (ManifestJobs)
-                {
-                    ManifestJobs.Add(request);
-                }
-
                 int currentBuildID = 0;

                 // Check if manifestid in our database is equal
@@ -173,6 +168,11 @@
                     }
                 }

+                lock (ManifestJobs)
+                {
+                    ManifestJobs.Add(request);
+                }
+
                 // Update/insert depot information straight away
                 if (currentBuildID != buildID || request.PreviousManifestID != request.ManifestID)
                 {


Don't tell ops about successful file downloads

--- Processors/FileDownloader.cs
+++ Processors/FileDownloader.cs
@@ -383,8 +383,6 @@

                 if (file.FileHash.SequenceEqual(checksum))
                 {
-                    IRC.Instance.SendOps("{0}[{1}]{2} Downloaded {3}{4}", Colors.OLIVE, Steam.GetAppName(job.ParentAppID), Colors.NORMAL, Colors.OLIVE, file.FileName);
-
                     Log.WriteInfo("FileDownloader", "Downloaded {0} from {1}", file.FileName, Steam.GetAppName(job.ParentAppID));

                     if (File.Exists(finalPath))
@@ -400,7 +398,6 @@
                 {
                     IRC.Instance.SendOps("{0}[{1}]{2} Failed to download {3}: Only {4} out of {5} chunks downloaded ({6})", Colors.OLIVE, Steam.GetAppName(job.ParentAppID), Colors.NORMAL, file.FileName, count, file.Chunks.Count, lastError);

-
                     Log.WriteError("FileDownloader", "Failed to download {0}: Only {1} out of {2} chunks downloaded ({3})", file.FileName, count, file.Chunks.Count, lastError);

                     File.Delete(downloadPath);


support removing logger

support removing logger

--- QuartzNetWebConsole/Setup.cs
+++ QuartzNetWebConsole/Setup.cs
@@ -16,9 +16,11 @@
                     scheduler.RemoveGlobalTriggerListener(logger);
                     scheduler.RemoveSchedulerListener(logger);
                 }
-                scheduler.AddGlobalJobListener(value);
-                scheduler.AddGlobalTriggerListener(value);
-                scheduler.AddSchedulerListener(value);
+                if (value != null) {
+                    scheduler.AddGlobalJobListener(value);
+                    scheduler.AddGlobalTriggerListener(value);
+                    scheduler.AddSchedulerListener(value);
+                }
                 logger = value;
             }
         }


Added OS specific bindings for PortAudio library

git-svn-id: 6b7e1e5d0861e268462ba7828ef63c1bcab52a9b@30 d3cde5d6-82b8-4669-8b62-43054d6781d8

--- Radio/PortAudio/PortAudio.cs
+++ Radio/PortAudio/PortAudio.cs
@@ -34,15 +34,21 @@

         public const int PaFormatIsSupported = 0;
         public const int PaFramesPerBufferUnspecified = 0;
+
+#if __MonoCS__
+		private const string PortAudioLibrary = "libportaudio.so";
+#else
+		private const string PortAudioLibrary = "PortAudio.dll";
+#endif

         #endregion

         #region **** PORTAUDIO FUNCTIONS ****

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetVersion();

-	 	[DllImport("PortAudio.dll",EntryPoint="Pa_GetVersionText")]
+	 	[DllImport(PortAudioLibrary,EntryPoint="Pa_GetVersionText")]
 	 	private static extern IntPtr IntPtr_Pa_GetVersionText();

 	 	public static string Pa_GetVersionText() {
@@ -50,7 +56,7 @@
 	 		return Marshal.PtrToStringAnsi(strptr);
 	 	}

-	 	[DllImport("PortAudio.dll",EntryPoint="Pa_GetErrorText")]
+	 	[DllImport(PortAudioLibrary,EntryPoint="Pa_GetErrorText")]
 	 	public static extern IntPtr IntPtr_Pa_GetErrorText(PaError errorCode);

 	 	public static string Pa_GetErrorText(PaError errorCode) {
@@ -58,19 +64,19 @@
 	 		return Marshal.PtrToStringAnsi(strptr);
 	 	}

-	 	[DllImport("PortAudio.dll")]
+	 	[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_Initialize();

-	 	[DllImport("PortAudio.dll")]
+	 	[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_Terminate();

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetHostApiCount();

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetDefaultHostApi();

-		[DllImport("PortAudio.dll",EntryPoint="Pa_GetHostApiInfo")]
+		[DllImport(PortAudioLibrary,EntryPoint="Pa_GetHostApiInfo")]
 	 	public static extern IntPtr IntPtr_Pa_GetHostApiInfo(int hostApi);

 	 	public static PaHostApiInfo Pa_GetHostApiInfo(int hostApi) {
@@ -78,13 +84,13 @@
 	 		return (PaHostApiInfo) Marshal.PtrToStructure(structptr, typeof(PaHostApiInfo));
 	 	}

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_HostApiTypeIdToHostApiIndex(PaHostApiTypeId type);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_HostApiDeviceIndexToDeviceIndex(int hostApi, int hostApiDeviceIndex);

-		[DllImport("PortAudio.dll",EntryPoint="Pa_GetLastHostErrorInfo")]
+		[DllImport(PortAudioLibrary,EntryPoint="Pa_GetLastHostErrorInfo")]
 	 	public static extern IntPtr IntPtr_Pa_GetLastHostErrorInfo();

 	 	public static PaHostErrorInfo Pa_GetLastHostErrorInfo() {
@@ -92,16 +98,16 @@
 	 		return (PaHostErrorInfo) Marshal.PtrToStructure(structptr, typeof(PaHostErrorInfo));
 	 	}

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetDeviceCount();

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetDefaultInputDevice();

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetDefaultOutputDevice();

-		[DllImport("PortAudio.dll",EntryPoint="Pa_GetDeviceInfo")]
+		[DllImport(PortAudioLibrary,EntryPoint="Pa_GetDeviceInfo")]
 	 	public static extern IntPtr IntPtr_Pa_GetDeviceInfo(int device);

 	 	public static PaDeviceInfo Pa_GetDeviceInfo(int device) {
@@ -109,25 +115,25 @@
 	 		return (PaDeviceInfo) Marshal.PtrToStructure(structptr, typeof(PaDeviceInfo));
         }

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_IsFormatSupported(
             ref PaStreamParameters inputParameters,
             ref PaStreamParameters outputParameters,
             double sampleRate);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_IsFormatSupported(
             IntPtr inputParameters,
             ref PaStreamParameters outputParameters,
             double sampleRate);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_IsFormatSupported(
             ref PaStreamParameters inputParameters,
             IntPtr outputParameters,
             double sampleRate);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_OpenStream(
             out IntPtr stream,
             ref PaStreamParameters inputParameters,
@@ -138,7 +144,7 @@
             PaStreamCallbackDelegate streamCallback,
             IntPtr userData);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_OpenStream(
             out IntPtr stream,
             IntPtr inputParameters,
@@ -149,7 +155,7 @@
             PaStreamCallbackDelegate streamCallback,
             IntPtr userData);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_OpenStream(
             out IntPtr stream,
             ref PaStreamParameters inputParameters,
@@ -160,7 +166,7 @@
             PaStreamCallbackDelegate streamCallback,
             IntPtr userData);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_OpenDefaultStream(
 	 		out IntPtr stream,
 	 		int numInputChannels,
@@ -171,30 +177,30 @@
 	 		PaStreamCallbackDelegate streamCallback,
 	 		IntPtr userData);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_CloseStream(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_SetStreamFinishedCallback(
 	 		ref IntPtr stream,
 	 		[MarshalAs(UnmanagedType.FunctionPtr)]PaStreamFinishedCallbackDelegate streamFinishedCallback);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_StartStream(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_StopStream(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_AbortStream(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_IsStreamStopped(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_IsStreamActive(IntPtr stream);

-		[DllImport("PortAudio.dll",EntryPoint="Pa_GetStreamInfo")]
+		[DllImport(PortAudioLibrary,EntryPoint="Pa_GetStreamInfo")]
 	 	public static extern IntPtr IntPtr_Pa_GetStreamInfo(IntPtr stream);

 	 	public static PaStreamInfo Pa_GetStreamInfo(IntPtr stream) {
@@ -202,112 +208,112 @@
 	 		return (PaStreamInfo) Marshal.PtrToStructure(structptr,typeof(PaStreamInfo));
 	 	}

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern double Pa_GetStreamTime(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern double Pa_GetStreamCpuLoad(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]float[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]byte[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]sbyte[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]ushort[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]short[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]uint[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_ReadStream(
 	 		IntPtr stream,
 	 		[Out]int[] buffer,
             uint frames);

-        [DllImport("PortAudio.dll")]
+        [DllImport(PortAudioLibrary)]
         public static extern PaError Pa_ReadStream(
             IntPtr stream,
             IntPtr buffer,
             uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]float[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]byte[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]sbyte[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]ushort[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]short[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]uint[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_WriteStream(
 	 		IntPtr stream,
 	 		[In]int[] buffer,
 			uint frames);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetStreamReadAvailable(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern int Pa_GetStreamWriteAvailable(IntPtr stream);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern PaError Pa_GetSampleSize(PaSampleFormat format);

-		[DllImport("PortAudio.dll")]
+		[DllImport(PortAudioLibrary)]
 	 	public static extern void Pa_Sleep(int msec);

 	 	#endregion


Fix failing quot test.

Fix failing quot test.

--- Rant.Tests/Capitalization.cs
+++ Rant.Tests/Capitalization.cs
@@ -38,7 +38,7 @@
 		public void QuotedSentence()
 		{
 			Assert.AreEqual("“This is a sentence. This is another sentence.”",
-				rant.Do(@"[q:[caps:sentence]this is a sentence. this is another sentence.]").Main);
+				rant.Do(@"[quot:[caps:sentence]this is a sentence. this is another sentence.]").Main);
 		}

 		[Test]


started populating scene object

started populating scene object

--- RvtVa3c/Va3cExportContext.cs
+++ RvtVa3c/Va3cExportContext.cs
@@ -306,10 +306,19 @@
     {
       _faces = new List<FaceMaterial>();
       _materials = new Dictionary<string, Va3cScene.SceneMaterial>();
+      _vertices = new VertexLookupInt();
+      transformationStack.Push( Transform.Identity );
+
       _scene = new Va3cScene();
       //_scene = new ExpandoObject();
-      _vertices = new VertexLookupInt();
-      transformationStack.Push( Transform.Identity );
+
+      _scene.metadata.colors = 0;
+      _scene.metadata.faces = 0;
+      _scene.metadata.formatVersion = 3;
+      _scene.metadata.generatedBy = "RvtVa3c";
+      _scene.metadata.materials = 0;
+      _scene.geometries = new Dictionary<string, Va3cScene.Va3cGeometry>();
+      _scene.objects = new Dictionary<string, Va3cScene.Va3cObject>();

       return true;
     }


Update TestRunner.cs

Update TestRunner.cs

--- SampleCodeTest/TestRunner.cs
+++ SampleCodeTest/TestRunner.cs
@@ -9,7 +9,7 @@
 using AuthorizeNet;
 using net.authorize.sample.PaymentTransactions;
 using System.Threading;
-using net.authorize.sample.MobileInAppTransactions;
+using net.authorize.sample.MobileInappTransactions;

 namespace SampleCodeTest
 {


return parameter value from commands with one out parameter

--- tools/Generator/Generator.cs
+++ tools/Generator/Generator.cs
@@ -654,6 +654,7 @@

 		class ParamInfo
 		{
+			public string csName;
 			public string csType;
 			public bool isOut;
 			public bool isStruct;
@@ -698,11 +699,12 @@
 					first = false;
 					continue;
 				}
-				var info = new ParamInfo ();
+				var csName = GetParamName (param);
+				var info = new ParamInfo () { csName = csName };
 				string type = param.Element ("type").Value;
 				bool isPointer = param.Value.Contains (type + "*");
 				info.csType = GetParamCsType (type, ref isPointer, out info.isHandle);
-				paramsDict.Add (GetParamName (param), info);
+				paramsDict.Add (csName, info);
 				info.isPointer = isPointer;
 				info.isConst = info.isPointer && param.Value.Contains ("const ");
 				if (info.isPointer && !info.isConst) {
@@ -723,7 +725,7 @@
 			return paramsDict;
 		}

-		void WriteCommandParameters (XElement commandElement, bool isForHandle = false, bool passToNative = false, Dictionary<string, ParamInfo> paramsDict = null)
+		void WriteCommandParameters (XElement commandElement, bool ignoreFirstOutParameter, bool isForHandle = false, bool passToNative = false, Dictionary<string, ParamInfo> paramsDict = null)
 		{
 			bool first = true;
 			bool previous = false;
@@ -742,6 +744,11 @@
 				string name = GetParamName (param);
 				var info = paramsDict [name];

+				if (ignoreFirstOutParameter && info.isOut && !passToNative) {
+					ignoreFirstOutParameter = false;
+					continue;
+				}
+
 				var optional = param.Attribute ("optional");
 				bool isOptionalParam = (optional != null && optional.Value == "true");
 				bool isDoublePointer = param.Value.Contains (type + "**");
@@ -836,13 +843,34 @@
 			if (hasResult)
 				csType = "void";

+			ParamInfo firstOutParam = null;
+			if (outCount == 1 && csType == "void") {
+				foreach (var param in paramsDict) {
+					if (param.Value.isOut) {
+						firstOutParam = param.Value;
+						switch (firstOutParam.csType) {
+						case "Bool32":
+						case "IntPtr":
+						case "UInt32":
+						case "DeviceSize":
+							firstOutParam.isFixed = false;
+							break;
+						}
+						break;
+					}
+				}
+				csType = firstOutParam.csType;
+			}
+
 			IndentWrite ("public {0}{1} {2} (", isForHandle ? "" : "static ", csType, csFunction);
-			WriteCommandParameters (commandElement, isForHandle, false, paramsDict);
+			WriteCommandParameters (commandElement, firstOutParam != null, isForHandle, false, paramsDict);
 			WriteLine (")");
 			IndentWriteLine ("{");
 			IndentLevel++;
 			if (hasResult)
 				IndentWriteLine ("Result result;");
+			if (firstOutParam != null)
+				IndentWriteLine ("{0} {1};", csType, firstOutParam.csName);
 			IndentWriteLine ("unsafe {");
 			IndentLevel++;

@@ -859,7 +887,7 @@

 				foreach (var param in paramsDict) {
 					if (param.Value.isFixed) {
-						IndentWriteLine ("fixed ({0}* ptr{1} = &{1}{2}) {{", GetManagedType (param.Value.csType), param.Key, param.Value.isHandle ? ".m" : "");
+						IndentWriteLine ("fixed ({0}* ptr{1} = &{2}{3}) {{", GetManagedType (param.Value.csType), param.Key, param.Key, param.Value.isHandle ? ".m" : "");
 						IndentLevel++;
 					}
 				}
@@ -871,8 +899,8 @@
 						IndentWriteLine ("{0} = new {1} ();", param.Key, info.csType);
 				}

-			IndentWrite ("{0}{1}Interop.NativeMethods.{2} (", hasResult ? "result = " : "", csType != "void" ? "return " : "", function);
-			WriteCommandParameters (commandElement, isForHandle, true, paramsDict);
+			IndentWrite ("{0}{1}Interop.NativeMethods.{2} (", hasResult ? "result = " : "", (firstOutParam == null && csType != "void") ? "return " : "", function);
+			WriteCommandParameters (commandElement, firstOutParam != null, isForHandle, true, paramsDict);
 			WriteLine (");");

 			if (fixedCount > 0) {
@@ -891,6 +919,10 @@
 				IndentLevel++;
 				IndentWriteLine ("throw new ResultException (result);");
 				IndentLevel--;
+			}
+			if (firstOutParam != null) {
+				WriteLine ();
+				IndentWriteLine ("return {0};", firstOutParam.csName);
 			}
 			IndentLevel--;
 			IndentWriteLine ("}");


binary literal Digit separator examples

binary literal Digit separator examples

--- CSharp7/Program.cs
+++ CSharp7/Program.cs
@@ -13,11 +13,17 @@
             IsDemo();
             CaseStatementDemo();
             DeconstructDemo();
+            DigitSeparatorDemo();
+            BinaryLiteralDemo();
             Console.ReadLine();
         }

+        /// <summary>
+        /// Method demonstrating Tuples
+        /// </summary>
         static void TuplesDemo()
         {
+            Console.WriteLine("****TUPLES DEMO*****");
             var m = TupleTesting();
             Console.WriteLine($"First Name : {m.firstName} Middle :{ m.middle}, Last:{m.lastName}");
         }
@@ -25,6 +31,10 @@
         {
             return (firstName: "John", middle: "C", lastName: "Doe");
         }
+
+        /// <summary>
+        /// Method demonstrating Out variables
+        /// </summary>
         static void OutVariables()
         {
             var inputValue = "12121";
@@ -40,6 +50,9 @@
             //Console.WriteLine($"Circle area is { area}");
         }

+        /// <summary>
+        /// Method demonstrating pattern matching with is
+        /// </summary>
         static void IsDemo()
         {
             Console.WriteLine("****PATTERN MATCHING IS STATEMENT*****");
@@ -52,6 +65,9 @@
             }
         }

+        /// <summary>
+        /// Method demonstrating pattern matching in switch statement
+        /// </summary>
         static void CaseStatementDemo()
         {

@@ -63,7 +79,7 @@
                 new Rectangle {Length=10,Height=10 },
                 null
             };
-            Console.WriteLine("****CASE STATEMENT*****");
+            Console.WriteLine("****SWITCH STATEMENT PATTERN MATCHING*****");
             // case statement on type
             foreach (Shape item in shapes)
             {
@@ -95,7 +111,9 @@
                 }
             }
         }
-
+        /// <summary>
+        /// Method demonstrating the deconstruct functionality
+        /// </summary>
         static void DeconstructDemo()
         {
             Console.WriteLine("****DECONSTRUCTION*****");
@@ -113,7 +131,22 @@

         }

-
+
+        static  void DigitSeparatorDemo()
+        {
+            Console.WriteLine("****DIGIT SEPARATORS*****");
+            // We can use _ as a digit separator
+            int myval = 123_3_4_343;
+            Console.WriteLine(myval);
+        }
+        static void BinaryLiteralDemo()
+        {
+            Console.WriteLine("****BINARY LITERAL*****");
+            // Binary literal with digit separator
+            var b = 0b10_01_1100_010_00;
+            //should write out 5000;
+            Console.WriteLine(b);
+        }
     }


As a general rule of thumb, call base implementation which fires events, after and not before local processing has been done.

--- Sandra.UI.WF/PlayingBoard.cs
+++ Sandra.UI.WF/PlayingBoard.cs
@@ -385,9 +385,9 @@

         protected override void OnBackColorChanged(EventArgs e)
         {
-            base.OnBackColorChanged(e);
             updateBackgroundBrush();
             Invalidate();
+            base.OnBackColorChanged(e);
         }

@@ -704,8 +704,8 @@

         protected override void OnLayout(LayoutEventArgs levent)
         {
+            verifySizeToFit();
             base.OnLayout(levent);
-            verifySizeToFit();
         }

         /// <summary>
@@ -781,17 +781,15 @@

         protected override void OnMouseEnter(EventArgs e)
         {
+            if (lastKnownMouseMovePoint.X >= 0 && lastKnownMouseMovePoint.Y >= 0)
+            {
+                hitTest(lastKnownMouseMovePoint);
+            }
             base.OnMouseEnter(e);
-            if (lastKnownMouseMovePoint.X >= 0 && lastKnownMouseMovePoint.Y >= 0)
-            {
-                hitTest(lastKnownMouseMovePoint);
-            }
         }

         protected override void OnMouseDown(MouseEventArgs e)
         {
-            base.OnMouseDown(e);
-
             int hit = hitTest(e.Location);

             // Start dragging?
@@ -813,12 +811,12 @@
                     }
                 }
             }
+
+            base.OnMouseDown(e);
         }

         protected override void OnMouseMove(MouseEventArgs e)
         {
-            base.OnMouseMove(e);
-
             // Do a hit test, which updates hover information.
             int hit = hitTest(e.Location);

@@ -837,12 +835,12 @@

             // Remember position for mouse-enters without mouse-leaves.
             lastKnownMouseMovePoint = e.Location;
+
+            base.OnMouseMove(e);
         }

         protected override void OnMouseUp(MouseEventArgs e)
         {
-            base.OnMouseUp(e);
-
             if (dragging)
             {
                 // End drag mode.
@@ -859,22 +857,22 @@

                 Invalidate();
             }
+
+            base.OnMouseUp(e);
         }

         protected override void OnMouseLeave(EventArgs e)
         {
-            base.OnMouseLeave(e);
-
             // Hit test a position outside of the control to reset the hover square index and raise proper events.
             lastKnownMouseMovePoint = new Point(-1, -1);
             hitTest(lastKnownMouseMovePoint);
+
+            base.OnMouseLeave(e);
         }

         protected override void OnPaint(PaintEventArgs pe)
         {
-            base.OnPaint(pe);
-
             Graphics g = pe.Graphics;
             g.SmoothingMode = SmoothingMode.AntiAlias;

@@ -1035,6 +1033,8 @@
                     }
                 }
             }
+
+            base.OnPaint(pe);
         }

         protected override void Dispose(bool disposing)


fix bug where munged docs were getting nested summary elements

--- Sawmill.DocMunger/Program.cs
+++ Sawmill.DocMunger/Program.cs
@@ -20,13 +20,15 @@
                 .Rewrite(
                     el =>
                     {
-                        var cref = GetSeeAlsoCrefFromMember(el);
-                        if (cref == null)
+                        var seeAlso = GetSeeAlsoFromMember(el);
+                        if (seeAlso == null)
                         {
                             return el;
                         }
                         var replacement = new XElement(el);
-                        replacement.Element("summary").AddFirst(LookupCref(sawmillDoc, cref));
+                        var newChildren = LookupCref(sawmillDoc, seeAlso.Attribute("cref").Value).ToList();
+                        newChildren.Add(seeAlso);  // put the seealso element back
+                        replacement.Element("summary").ReplaceWith(newChildren);
                         return replacement;
                     }
                 );
@@ -35,7 +37,7 @@
             docToMunge.Save(args[1]);
         }

-        static string GetSeeAlsoCrefFromMember(XElement el)
+        static XElement GetSeeAlsoFromMember(XElement el)
         {
             if (el.Name != "member" || el.Elements().Count() != 1)
             {
@@ -48,7 +50,7 @@
                 return null;
             }

-            return summary.Element("seealso")?.Attribute("cref")?.Value;
+            return summary.Element("seealso");
         }

         static IEnumerable<XElement> LookupCref(XDocument sawmillDoc, string cref)
@@ -56,6 +58,7 @@
                 .Element("doc")
                 .SelfAndDescendants()
                 .FirstOrDefault(el => el.Name == "member" && el.Attribute("name")?.Value == cref)
-                .Elements();
+                .Elements()
+                .Select(x => new XElement(x));  // clone
     }
 }


[Branches/1.0] fixed TileLayer crash when displaying error in tile

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS01]$/SharpMap/Branches/1.0;C106253

--- SharpMap/Layers/TileLayer.cs
+++ SharpMap/Layers/TileLayer.cs
@@ -304,17 +304,27 @@
                 }
                 if (_showErrorInTile)
                 {
-                    //an issue with this method is that one an error tile is in the memory cache it will stay even
-                    //if the error is resolved. PDD.
-                    var schema = (TileSchema) _source.Schema;
-                    var bitmap = new Bitmap(schema.Width, schema.Height);
-                    using (var graphics = Graphics.FromImage(bitmap))
-                    {
-                        graphics.DrawString(ex.Message, new Font(FontFamily.GenericSansSerif, 12),
-                                            new SolidBrush(Color.Black),
-                                            new RectangleF(0, 0, schema.Width, schema.Height));
-                    }
-                    bitmaps.Add(tileInfo.Index, bitmap);
+                    try
+                    {
+                        //an issue with this method is that one an error tile is in the memory cache it will stay even
+                        //if the error is resolved. PDD.
+                        var tileWidth = _source.Schema.GetTileWidth(tileInfo.Index.Level);
+                        var tileHeight = _source.Schema.GetTileHeight(tileInfo.Index.Level);
+                        var bitmap = new Bitmap(tileWidth, tileHeight);
+                        using (var graphics = Graphics.FromImage(bitmap))
+                        {
+                            graphics.DrawString(ex.Message, new Font(FontFamily.GenericSansSerif, 12),
+                                                new SolidBrush(Color.Black),
+                                                new RectangleF(0, 0, tileWidth, tileHeight));
+                        }
+                        bitmaps.Add(tileInfo.Index, bitmap);
+                    }
+                    catch (Exception e)
+                    {
+                        // we don't want fatal exceptions here!
+                        Logger.Error(e);
+                    }
+
                 }
             }
             catch(Exception ex)


Fix floating number comparison in Matrix

--- SharpMath/Geometry/Matrix.cs
+++ SharpMath/Geometry/Matrix.cs
@@ -1,8 +1,6 @@
 using System;
 using System.Globalization;
 using System.Text;
-
-// ReSharper disable CompareOfFloatsByEqualityOperator

 namespace SharpMath.Geometry
 {
@@ -104,7 +102,7 @@
                 for (uint y = 0; y < RowCount; ++y)
                     for (uint x = 0; x < ColumnCount; ++x)
                     {
-                        if ((y == x && this[y, x] == 0) || (y != x && this[y, x] != 0))
+                        if ((y == x && FloatingNumber.AreApproximatelyEqual(this[y, x], 0)) || (y != x && !FloatingNumber.AreApproximatelyEqual(this[y, x], 0)))
                             return false;
                     }
                 return true;
@@ -121,7 +119,7 @@
                 for (uint y = 0; y < RowCount; ++y)
                     for (uint x = 0; x < ColumnCount; ++x)
                     {
-                        if ((y == x && this[y, x] == 0) || (y != x && this[y, x] != 0))
+                        if ((y == x && FloatingNumber.AreApproximatelyEqual(this[y, x], 0)) || (y != x && !FloatingNumber.AreApproximatelyEqual(this[y, x], 0)))
                             return false;
                     }
                 return true;
@@ -299,7 +297,7 @@
             {
                 for (uint x = 0; x < firstMatrix.ColumnCount; ++x)
                 {
-                    if (firstMatrix[y, x] != secondMatrix[y, x])
+                    if (!FloatingNumber.AreApproximatelyEqual(firstMatrix[y, x], secondMatrix[y, x]))
                         return false;
                 }
             }
@@ -393,7 +391,7 @@
             {
                 for (uint x = 0; x < ColumnCount; ++x)
                 {
-                    if (this[y, x] != other[y, x])
+                    if (!FloatingNumber.AreApproximatelyEqual(this[y, x], other[y, x]))
                         return false;
                 }
             }


Fix tox data parsing, stop when EOF (255) is reached

--- SharpTox/Core/ToxDataInfo.cs
+++ SharpTox/Core/ToxDataInfo.cs
@@ -58,6 +58,9 @@
                     while (left >= length)
                     {
                         var type = ReadStateType(reader);
+
+                        if (type == StateType.EOF)
+                            break;

                         switch (type)
                         {
@@ -127,7 +130,8 @@
             Status = 6,
             TcpRelay = 10,
             PathNode = 11,
-            Corrupt = 50
+            Corrupt = 50,
+            EOF = 255,
         }
     }
 }


registering the types to the autofac container

--- ShortUrl/Common/Bootstrap.cs
+++ ShortUrl/Common/Bootstrap.cs
@@ -2,8 +2,13 @@
 using System.Web.Http;
 using Autofac;
 using Autofac.Integration.WebApi;
+using ShortUrl.Core.Patterns;
 using ShortUrl.DataAccessLayer;
 using ShortUrl.DataAccessLayer.Contacts;
+using ShortUrl.Repositories;
+using ShortUrl.Repositories.Contracts;
+using ShortUrl.Services;
+using ShortUrl.Services.Contracts;

 namespace ShortUrl.Common
 {
@@ -22,6 +27,9 @@

 			builder.RegisterType<UnitOfWork>().As<IUnitOfWork>();
 			builder.RegisterType<DatabaseFactory>().As<IDatabaseFactory>();
+			builder.RegisterType<UrlRepository>().As<IUrlRepository>();
+			builder.RegisterType<SimplePatternGenerator>().As<IPatternGenerator>();
+			builder.RegisterType<UrlService>().As<IUrlService>();

 			var container = builder.Build();


Prevent reset button data from being posted with a form. Addresses issue #57.

--- SimpleBrowser/HtmlElement.cs
+++ SimpleBrowser/HtmlElement.cs
@@ -128,6 +128,7 @@
 						case "submit":
 						case "image":
 						case "button":
+						case "reset":
 							result = new ButtonInputElement(element);
 							break;
 						case "file":


Fix destroyed PlayerShip moving to BlackHole

--- Client/PlayerShip.cs
+++ Client/PlayerShip.cs
@@ -76,10 +76,19 @@
         public override void Destroy() {
             // override because we do not want player ships to be scheduled for deletion,
             // that would cause null ref exceptions on the clients.
+
+            // run only once
             if (destroyed || !world.IsServer) return;
             destroyed = true;
+            // deplete hull bar, in case it wasn't empty yet
             hull = 0f;
+            // stop moving
             throttle = 0f;
+            // disable all collision and physics (black holes, in particular)
+            bounding = 0f;
+            layer = CollisionLayer.None;
+            layermask = CollisionLayer.None;
+            // fancy display
             Particle.CreateExplosion(NetServer.world, position);
         }


Fix grammatical error in PivotalTracker c'tor comments for HttpClient

--- PivotalTrackerApi/Services/PivotalTracker.cs
+++ PivotalTrackerApi/Services/PivotalTracker.cs
@@ -33,7 +33,7 @@
         public PivotalTracker(string apiToken)
         {
             _apiToken = apiToken;
-            // Setups up our HttpService to make sure it is ready to use
+            // Sets up up our HttpService to make sure it is ready to use
             HttpService.SetupHttpClient(_apiToken);
         }


Made CallResult and Callback IDisposable

Closes #124

--- Plugins/Steamworks.NET/CallbackDispatcher.cs
+++ Plugins/Steamworks.NET/CallbackDispatcher.cs
@@ -59,7 +59,7 @@
         }
     }

-	public sealed class Callback<T> {
+	public sealed class Callback<T> : IDisposable {
 		private CCallbackBaseVTable VTable;
 		private IntPtr m_pVTable = IntPtr.Zero;
 		private CCallbackBase m_CCallbackBase;
@@ -70,6 +70,8 @@

 		private bool m_bGameServer;
 		private readonly int m_size = Marshal.SizeOf(typeof(T));
+
+		private bool m_bDisposed = false;

 		/// <summary>
 		/// Creates a new Callback. You must be calling SteamAPI.RunCallbacks() to retrieve the callbacks.
@@ -94,6 +96,16 @@
 		}

 		~Callback() {
+			Dispose();
+		}
+
+		public void Dispose() {
+			if (m_bDisposed) {
+				return;
+			}
+
+			GC.SuppressFinalize(this);
+
 			Unregister();

 			if (m_pVTable != IntPtr.Zero) {
@@ -103,8 +115,10 @@
 			if (m_pCCallbackBase.IsAllocated) {
 				m_pCCallbackBase.Free();
 			}
-		}
-
+
+			m_bDisposed = true;
+		}
+
 		// Manual registration of the callback
 		public void Register(DispatchDelegate func) {
 			if (func == null) {
@@ -145,7 +159,7 @@
 			}
 		}

-		// Shouldn't get ever get called here, but this is what C++ Steamworks does!
+		// Shouldn't ever get called here, but this is what C++ Steamworks does!
 		private void OnRunCallResult(
 #if !STDCALL
 			IntPtr thisptr,
@@ -186,7 +200,7 @@
 		}
 	}

-	public sealed class CallResult<T> {
+	public sealed class CallResult<T> : IDisposable {
 		private CCallbackBaseVTable VTable;
 		private IntPtr m_pVTable = IntPtr.Zero;
 		private CCallbackBase m_CCallbackBase;
@@ -199,6 +213,8 @@
 		public SteamAPICall_t Handle { get { return m_hAPICall; } }

 		private readonly int m_size = Marshal.SizeOf(typeof(T));
+
+		private bool m_bDisposed = false;

 		/// <summary>
 		/// Creates a new async CallResult. You must be calling SteamAPI.RunCallbacks() to retrieve the callback.
@@ -214,6 +230,16 @@
 		}

 		~CallResult() {
+			Dispose();
+		}
+
+		public void Dispose() {
+			if (m_bDisposed) {
+				return;
+			}
+
+			GC.SuppressFinalize(this);
+
 			Cancel();

 			if (m_pVTable != IntPtr.Zero) {
@@ -223,6 +249,8 @@
 			if (m_pCCallbackBase.IsAllocated) {
 				m_pCCallbackBase.Free();
 			}
+
+			m_bDisposed = true;
 		}

 		public void Set(SteamAPICall_t hAPICall, APIDispatchDelegate func = null) {
@@ -260,7 +288,7 @@

 		public void SetGameserverFlag() { m_CCallbackBase.m_nCallbackFlags |= CCallbackBase.k_ECallbackFlagsGameServer; }

-		// Shouldn't get ever get called here, but this is what C++ Steamworks does!
+		// Shouldn't ever get called here, but this is what C++ Steamworks does!
 		private void OnRunCallback(
 #if !STDCALL
 			IntPtr thisptr,


Formatting

Formatting

--- Presentation.Web/Views/Shared/_Layout.cshtml
+++ Presentation.Web/Views/Shared/_Layout.cshtml
@@ -31,7 +31,6 @@
                 }
             </style>
         }
-
     }
 </head>
 <body data-ng-cloak>


Adding example.

Adding example.

--- ProgramSynthesis/RefazerUnitTests/Example.cs
+++ ProgramSynthesis/RefazerUnitTests/Example.cs
@@ -33,7 +33,7 @@
         [TestMethod]
         public void N20()
         {
-            var classes = new List<string> { "QueryableExtensions" };
+            var classes = new List<string> { "PackageRepositoryExtensions" };
             CompleteTestBase(classes);
         }


now have a service that returns number of issues open

--- Purchasing.Web/Controllers/HelpController.cs
+++ Purchasing.Web/Controllers/HelpController.cs
@@ -3,6 +3,7 @@
 using System.Net;
 using System.Web.Mvc;
 using AutoMapper;
+using Newtonsoft.Json.Linq;
 using Purchasing.Core.Domain;
 using Purchasing.Web.Helpers;
 using Purchasing.Web.Models;
@@ -24,14 +25,21 @@
             _faqRepository = faqRepository;
         }

+        //const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/suggestions.json?category=31579&sort=newest";
+        //const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/categories/31577.json";
+        //const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/categories.json";
+        //const string query = "https://ucdavis.uservoice.com/api/v1/users/24484752.json";
+
+        /// <summary>
+        /// Gets the number of active issues in the purchasing uservoice forum
+        /// </summary>
+        /// <returns></returns>
         [HandleTransactionsManually]
-        public ActionResult GetActiveIssues()
-        {
-            const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/suggestions.json?sort=newest&filter=inbox";
-            //const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/suggestions/search.json?query='Status':'Closed'";
-
+        public ActionResult GetActiveIssuesCount()
+        {
+            const string query = "https://ucdavis.uservoice.com/api/v1/forums/126891/categories.json";
+
             var oauth = new Manager();
-
             oauth["consumer_key"] = "RfVVMKtNAL9AhXDHVx0FyQ";
             oauth["consumer_secret"] = "r0H7iLuZZokE0BWiszUr9mxuDYFuhmoghdomUsvqw";

@@ -44,8 +52,14 @@
             {
                 using (var reader = new System.IO.StreamReader(response.GetResponseStream()))
                 {
-                    var content = reader.ReadToEnd();
-                    return Content(content, "application/json");
+                    var obj = JObject.Parse(reader.ReadToEnd());
+
+                    var issueCategory =
+                        obj["categories"].Children().Single(c => c["name"].Value<string>() == "Issues");
+
+                    var issuesCount = issueCategory["suggestions_count"].Value<int>();
+
+                    return Json(new {HasIssues = issuesCount > 0, IssuesCount = issuesCount});
                 }
             }
         }


Use same icon for tab and URL links, use black version of icon

--- R7.Documents/ViewModels/DocumentViewModel.cs
+++ R7.Documents/ViewModels/DocumentViewModel.cs
@@ -158,12 +158,12 @@

                     case TabType.Tab:
                         _formatIcon = string.Format ("",
-                                                     IconController.IconURL ("Tabs", "16X16"), Localization.GetString ("Page.Text", Context.LocalResourceFile));
+                                                     IconController.IconURL ("FileLink", "16X16", "Black"), Localization.GetString ("Page.Text", Context.LocalResourceFile));
                         break;

                     default:
                         _formatIcon = string.Format ("",
-                                                     IconController.IconURL ("Link", "16X16", "Gray"), "URL");
+                                                     IconController.IconURL ("FileLink", "16X16", "Black"), "URL");
                         break;
                     }
                 }


Bumped version of SpecsFor<Web> Helpers for final 1.3.0 release.

--- SpecsFor.Helpers.Web/Properties/AssemblyInfo.cs
+++ SpecsFor.Helpers.Web/Properties/AssemblyInfo.cs
@@ -34,4 +34,4 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.3.0")]
 [assembly: AssemblyFileVersion("1.3.0")]
-[assembly: AssemblyInformationalVersion("1.3.0-alpha01")]
+[assembly: AssemblyInformationalVersion("1.3.0")]


Update version number again

Update version number again

--- Swashbuckle.Examples/Properties/AssemblyInfo.cs
+++ Swashbuckle.Examples/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.0.0")]
+[assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/Server/WebSocketBehavior.cs
+++ websocket-sharp/Server/WebSocketBehavior.cs
@@ -457,8 +457,11 @@
         var req = context.CookieCollection;
         var res = context.WebSocket.CookieCollection;

-        if (!_cookiesValidator (req, res))
-          return "It includes no cookie or an invalid one.";
+        if (!_cookiesValidator (req, res)) {
+          var msg = "The Cookie header is non-existent or invalid.";
+
+          return msg;
+        }
       }

       return null;


Fixing IsDialogVisible in DialogControl. Also created implicit bindings for ViewModel, IsDialogVisible, and DialogCompleteCommand.

--- Tools/WickedSick.MVVM/DialogEx/DialogControl.cs
+++ Tools/WickedSick.MVVM/DialogEx/DialogControl.cs
@@ -2,6 +2,7 @@
 using System.ComponentModel;
 using System.Windows;
 using System.Windows.Controls;
+using System.Windows.Data;
 using System.Windows.Input;
 using System.Windows.Threading;

@@ -20,7 +21,7 @@
         public static readonly DependencyProperty ViewModelProperty = DependencyProperty.Register("ViewModel", typeof(ObservableObject), typeof(DialogControl),
             new FrameworkPropertyMetadata(new PropertyChangedCallback(TryShowDialog)));
         public static readonly DependencyProperty IsDialogVisibleProperty = DependencyProperty.Register("IsDialogVisible", typeof(bool), typeof(DialogControl),
-            new FrameworkPropertyMetadata(new PropertyChangedCallback(TryShowDialog)));
+            new FrameworkPropertyMetadata(false, FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, TryShowDialog));
         public static readonly DependencyProperty DialogCompleteCommandProperty = DependencyProperty.Register("DialogCompleteCommand", typeof(ICommand), typeof(DialogControl));
         public static readonly DependencyProperty StartupLocationProperty =
             DependencyProperty.Register("StartupLocation", typeof(WindowStartupLocation), typeof(DialogControl), new UIPropertyMetadata(WindowStartupLocation.CenterOwner));
@@ -29,6 +30,9 @@
         {
             // The control doesn't have any specific rendering of its own.
             Visibility = Visibility.Hidden;
+            SetBinding(ViewModelProperty, new Binding("DialogDataContext"));
+            SetBinding(IsDialogVisibleProperty, new Binding("IsRequestingChange") { Mode = BindingMode.TwoWay });
+            SetBinding(DialogCompleteCommandProperty, new Binding("ChangedCommand"));
         }

         public Type ViewType
@@ -70,8 +74,12 @@
             dc.TryShowDialog();
         }

+        private bool _IgnoreChanges;
         private void TryShowDialog()
         {
+            if (_IgnoreChanges)
+                return;
+
             if (!IsDialogVisible)
                 return;
             if (ViewType == null)
@@ -86,7 +94,18 @@
             newDialog.WindowStartupLocation = StartupLocation;
             newDialog.DataContext = ViewModel;
             bool? result = newDialog.ShowDialog();
-            IsDialogVisible = false;
+
+            try
+            {
+                _IgnoreChanges = true;
+                var be = GetBindingExpression(IsDialogVisibleProperty);
+                be.UpdateTarget();
+                SetCurrentValue(IsDialogVisibleProperty, false);
+            }
+            finally
+            {
+                _IgnoreChanges = false;
+            }
             ICommand completeCommand = DialogCompleteCommand;
             if (completeCommand != null)
             {


Show shortcuts for WindowCommands.

Show shortcuts for WindowCommands.

--- Commands.cs
+++ Commands.cs
@@ -161,23 +161,26 @@

             static Windows()
             {
+                var togglePreviewKeyGesture = new KeyGesture(Key.OemCloseBrackets, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl+Alt+]");
                 var togglePreviewGestures = new InputGestureCollection
                 {
-                    new KeyGesture(Key.OemCloseBrackets, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl+Alt+]")
+                    togglePreviewKeyGesture
                 };
-                TogglePreviewCommand = new RoutedUICommand(StringResources._togglePreview, "TogglePreview", typeof (Commands), togglePreviewGestures);
+                TogglePreviewCommand = new RoutedUICommand(string.Format("{0} ({1})", StringResources._togglePreview, togglePreviewKeyGesture.DisplayString), "TogglePreview", typeof (Commands), togglePreviewGestures);

+                var toggleSidebarKeyGesture = new KeyGesture(Key.OemOpenBrackets, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl+Alt+[");
                 var toggleSidebarGestures = new InputGestureCollection
                 {
-                    new KeyGesture(Key.OemOpenBrackets, ModifierKeys.Control | ModifierKeys.Alt, "Ctrl+Alt+[")
+                    toggleSidebarKeyGesture
                 };
-                ToggleSidebarCommand = new RoutedUICommand(StringResources._toggleSidebar, "ToggleSidebar", typeof (Commands), toggleSidebarGestures);
+                ToggleSidebarCommand = new RoutedUICommand(string.Format("{0} ({1})", StringResources._toggleSidebar, toggleSidebarKeyGesture.DisplayString), "ToggleSidebar", typeof (Commands), toggleSidebarGestures);

+                var quickOptionsKeyGesture = new KeyGesture(Key.OemComma, ModifierKeys.Control, "Ctrl+,");
                 var toggleQuickOptionsGestures = new InputGestureCollection
                 {
-                    new KeyGesture(Key.OemComma, ModifierKeys.Control, "Ctrl+,")
+                    quickOptionsKeyGesture
                 };
-                ToggleQuickOptionsCommand = new RoutedUICommand(StringResources._toggleQuickOptions, "ToggleQuickOptions", typeof (Commands), toggleQuickOptionsGestures);
+                ToggleQuickOptionsCommand = new RoutedUICommand(string.Format("{0} ({1})", StringResources._toggleQuickOptions, quickOptionsKeyGesture.DisplayString), "ToggleQuickOptions", typeof (Commands), toggleQuickOptionsGestures);
             }

             #endregion


- Added extra comments

- Added extra comments

--- Source/src/WixSharp/Files.cs
+++ Source/src/WixSharp/Files.cs
@@ -72,6 +72,11 @@

         /// <summary>
         /// Initializes a new instance of the <see cref="Files"/> class with properties/fields initialized with specified parameters.
+        /// <para>You can control inclusion of empty folders (if picked by the wild card patter) by setting
+        /// <see cref="Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories"/> to <c>true</c>.</para>
+        /// <para>If more specific control is required you can always use a flat list of <c>Dirs</c> of the
+        /// Project.<see cref="Project.AllDirs"/> to remove the undesired folder from its parent collection.
+        /// </para>
         /// </summary>
         /// <param name="sourcePath">The relative path to source directory. It must include wildcard pattern for files to be included
         /// into MSI (e.g. <c>new Files(@"Release\Bin\*.*")</c>).</param>
@@ -83,6 +88,11 @@

         /// <summary>
         /// Initializes a new instance of the <see cref="Files"/> class with properties/fields initialized with specified parameters.
+        /// <para>You can control inclusion of empty folders (if picked by the wild card patter) by setting
+        /// <see cref="Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories"/> to <c>true</c>.</para>
+        /// <para>If more specific control is required you can always use a flat list of <c>Dirs</c> of the
+        /// Project.<see cref="Project.AllDirs"/> to remove the undesired folder from its parent collection.
+        /// </para>
         /// </summary>
         /// <param name="sourcePath">The relative path to source directory. It must include wildcard pattern for files to be included
         /// into MSI (e.g. <c>new Files(@"Release\Bin\*.*")</c>).</param>
@@ -97,6 +107,11 @@

         /// <summary>
         /// Initializes a new instance of the <see cref="Files"/> class with properties/fields initialized with specified parameters.
+        /// <para>You can control inclusion of empty folders (if picked by the wild card patter) by setting
+        /// <see cref="Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories"/> to <c>true</c>.</para>
+        /// <para>If more specific control is required you can always use a flat list of <c>Dirs</c> of the
+        /// Project.<see cref="Project.AllDirs"/> to remove the undesired folder from its parent collection.
+        /// </para>
         /// </summary>
         /// <param name="feature"><see cref="Feature"></see> the directory files should be included in.</param>
         /// <param name="sourcePath">The relative path to source directory. It must include wildcard pattern for files to be included
@@ -110,6 +125,11 @@

         /// <summary>
         /// Initializes a new instance of the <see cref="Files"/> class with properties/fields initialized with specified parameters.
+        /// <para>You can control inclusion of empty folders (if picked by the wild card patter) by setting
+        /// <see cref="Compiler.AutoGeneration.IgnoreWildCardEmptyDirectories"/> to <c>true</c>.</para>
+        /// <para>If more specific control is required you can always use a flat list of <c>Dirs</c> of the
+        /// Project.<see cref="Project.AllDirs"/> to remove the undesired folder from its parent collection.
+        /// </para>
         /// </summary>
         /// <param name="feature"><see cref="Feature"></see> the directory files should be included in.</param>
         /// <param name="sourcePath">The relative path to source directory. It must include wildcard pattern for files to be included


am 6f7ba2dc: Merge change 20234 into donut

Merge commit '6f7ba2dce2c112eb4be33dbad54751d55ddd2276' into eclair

* commit '6f7ba2dce2c112eb4be33dbad54751d55ddd2276':
  Remove extraneous quotation mark in template file

--- tools/droiddoc/templates-sdk/sdkpage.cs
+++ tools/droiddoc/templates-sdk/sdkpage.cs
@@ -5,7 +5,7 @@
   <head>
     <title>Redirecting...</title>
     <meta http-equiv="refresh" content="0;url=<?cs var:toroot ?>sdk/<?cs
-      if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?>"<?cs
+      if:sdk.redirect.path ?><?cs var:sdk.redirect.path ?><?cs
       else ?><?cs var:sdk.current ?>/index.html<?cs /if ?>">
     <link href="<?cs var:toroot ?>assets/android-developer-docs.css" rel="stylesheet" type="text/css" />
   </head>


Added new getDarkerGrayColor method which for now still returns constant Color.Gray.

--- Sandra.UI.WF.Chess/StandardChessBoardForm.cs
+++ Sandra.UI.WF.Chess/StandardChessBoardForm.cs
@@ -728,6 +728,11 @@
             lastMoveArrowPen.EndCap = LineCap.RoundAnchor;
         }

+        private Color getDarkerGrayColor()
+        {
+            return Color.Gray;
+        }
+
         private void playingBoard_Paint(object sender, PaintEventArgs e)
         {
             // Draw a dotted line between the centers of the squares of the last move.
@@ -747,7 +752,12 @@
                 Rectangle hoverRect = PlayingBoard.GetSquareRectangle(hoverSquare);
                 e.Graphics.ExcludeClip(Rectangle.Inflate(hoverRect, -10, 0));
                 e.Graphics.ExcludeClip(Rectangle.Inflate(hoverRect, 0, -10));
-                e.Graphics.DrawRectangle(Pens.Gray, new Rectangle(hoverRect.X, hoverRect.Y, hoverRect.Width - 1, hoverRect.Height - 1));
+
+                using (var darkerGrayPen = new Pen(getDarkerGrayColor(), 1f))
+                {
+                    e.Graphics.DrawRectangle(darkerGrayPen, new Rectangle(hoverRect.X, hoverRect.Y, hoverRect.Width - 1, hoverRect.Height - 1));
+                }
+
                 e.Graphics.ResetClip();
             }

@@ -786,9 +796,9 @@
             {
                 Rectangle activeRect = PlayingBoard.GetSquareRectangle(moveStartSquare);

-                using (Pen darkBluePen = new Pen(Color.Gray, 2f))
-                {
-                    e.Graphics.DrawRectangle(darkBluePen, activeRect.X, activeRect.Y, activeRect.Width - 1, activeRect.Height - 1);
+                using (Pen darkerGrayPen = new Pen(getDarkerGrayColor(), 2f))
+                {
+                    e.Graphics.DrawRectangle(darkerGrayPen, activeRect.X, activeRect.Y, activeRect.Width - 1, activeRect.Height - 1);
                 }
             }
         }


inlinecode doesn't work with IntrinsicProperty

--- Serenity.Script.Imports/Q/Q.Notifications.cs
+++ Serenity.Script.Imports/Q/Q.Notifications.cs
@@ -45,7 +45,6 @@
         {
         }

-        [IntrinsicProperty]
         public static ToastrOptions DefaultNotifyOptions { [InlineCode("Q.defaultNotifyOptions")] get; private set; }

         [InlineCode("window.console && window.console.log({message})")]


remove LogCommand

remove LogCommand

--- Signum.Engine.Extensions/Cache/CacheLogic.cs
+++ Signum.Engine.Extensions/Cache/CacheLogic.cs
@@ -205,7 +205,6 @@
             else
             {
                 using (var p = preCommand.UnsafeExecuteDataReader())
-                using (DbLog.LogCommand(p.Command))
                 {
                     FieldReader reader = new FieldReader(p.Reader);
                     while (p.Reader.Read())


Test expression type when advancing result set in a transaction.

--- Silk.Data.SQL.ORM/Queries/QueryCollection.cs
+++ Silk.Data.SQL.ORM/Queries/QueryCollection.cs
@@ -34,7 +34,7 @@
 				{
 					foreach (var query in Queries)
 					{
-						if (query.Delegate != null)
+						if (query.Query is SelectExpression)
 						{
 							if (!queryResult.NextResult())
 								throw new Exception("Failed to move to query result.");
@@ -46,7 +46,7 @@
 				{
 					foreach (var query in Queries)
 					{
-						if (query.AsyncDelegate != null)
+						if (query.Query is SelectExpression)
 						{
 							if (!await queryResult.NextResultAsync().ConfigureAwait(false))
 								throw new Exception("Failed to move to query result.");


Bugfix: Don't attempt to flip player.ship if ship is null...

--- SpaceInvaders/Core/Player.cs
+++ SpaceInvaders/Core/Player.cs
@@ -75,7 +75,9 @@

             copy.AlienManager = AlienManager.CopyAndFlip(player.AlienManager, flipper, flippedEntities);

-            copy.Ship = Ship.CopyAndFlip(player.Ship, flipper, flippedEntities);
+            if (player.Ship != null) {
+                copy.Ship = Ship.CopyAndFlip(player.Ship, flipper, flippedEntities);
+            }

             return copy;
         }