Extends Avatar Appearance tests

Extends Avatar Appearance tests

From: Arthur Rodrigo S Valadares <5dafb278bc2a854a2d71fa92741f40d305025750@linux.vnet.ibm.com>

--- OpenSim/Data/Tests/BasicUserTest.cs
+++ OpenSim/Data/Tests/BasicUserTest.cs
@@ -438,6 +438,7 @@
             UUID secureagent = UUID.Random();
             string agentip = RandomName();
             uint agentport = (uint)random.Next();
+            bool agentonline = (random.NextDouble() > 0.5);
             int logintime = random.Next();
             int logouttime = random.Next();
             UUID regionid = UUID.Random();
@@ -452,6 +453,7 @@
             a.SecureSessionID = secureagent;
             a.AgentIP = agentip;
             a.AgentPort = agentport;
+            a.AgentOnline = agentonline;
             a.LoginTime = logintime;
             a.LogoutTime = logouttime;
             a.Region = regionid;
@@ -468,6 +470,7 @@
             Assert.That(secureagent,Is.EqualTo(a1.SecureSessionID));
             Assert.That(agentip,Is.EqualTo(a1.AgentIP));
             Assert.That(agentport,Is.EqualTo(a1.AgentPort));
+            Assert.That(agentonline,Is.EqualTo(a1.AgentOnline));
             Assert.That(logintime,Is.EqualTo(a1.LoginTime));
             Assert.That(logouttime,Is.EqualTo(a1.LogoutTime));
             Assert.That(regionid,Is.EqualTo(a1.Region));
@@ -542,6 +545,111 @@
             AvatarAppearance user1app = db.GetUserAppearance(user1);
             Assert.That(user1,Is.EqualTo(user1app.Owner));
         }
+
+        [Test]
+        public void T041_UserAppearancePersistency()
+        {
+            AvatarAppearance appear = new AvatarAppearance();
+            UUID owner = UUID.Random();
+            int serial = random.Next();
+            byte[] visualp = new byte[218];
+            random.NextBytes(visualp);
+            UUID bodyitem = UUID.Random();
+            UUID bodyasset = UUID.Random();
+            UUID skinitem = UUID.Random();
+            UUID skinasset = UUID.Random();
+            UUID hairitem = UUID.Random();
+            UUID hairasset = UUID.Random();
+            UUID eyesitem = UUID.Random();
+            UUID eyesasset = UUID.Random();
+            UUID shirtitem = UUID.Random();
+            UUID shirtasset = UUID.Random();
+            UUID pantsitem = UUID.Random();
+            UUID pantsasset = UUID.Random();
+            UUID shoesitem = UUID.Random();
+            UUID shoesasset = UUID.Random();
+            UUID socksitem = UUID.Random();
+            UUID socksasset = UUID.Random();
+            UUID jacketitem = UUID.Random();
+            UUID jacketasset = UUID.Random();
+            UUID glovesitem = UUID.Random();
+            UUID glovesasset = UUID.Random();
+            UUID ushirtitem = UUID.Random();
+            UUID ushirtasset = UUID.Random();
+            UUID upantsitem = UUID.Random();
+            UUID upantsasset = UUID.Random();
+            UUID skirtitem = UUID.Random();
+            UUID skirtasset = UUID.Random();
+            Primitive.TextureEntry texture = AvatarAppearance.GetDefaultTexture();
+            float avatarheight = (float) (Math.Round(random.NextDouble(),5));
+
+            appear.Owner = owner;
+            appear.Serial = serial;
+            appear.VisualParams = visualp;
+            appear.BodyItem = bodyitem;
+            appear.BodyAsset = bodyasset;
+            appear.SkinItem = skinitem;
+            appear.SkinAsset = skinasset;
+            appear.HairItem = hairitem;
+            appear.HairAsset = hairasset;
+            appear.EyesItem = eyesitem;
+            appear.EyesAsset = eyesasset;
+            appear.ShirtItem = shirtitem;
+            appear.ShirtAsset = shirtasset;
+            appear.PantsItem = pantsitem;
+            appear.PantsAsset = pantsasset;
+            appear.ShoesItem = shoesitem;
+            appear.ShoesAsset = shoesasset;
+            appear.SocksItem = socksitem;
+            appear.SocksAsset = socksasset;
+            appear.JacketItem = jacketitem;
+            appear.JacketAsset = jacketasset;
+            appear.GlovesItem = glovesitem;
+            appear.GlovesAsset = glovesasset;
+            appear.UnderShirtItem = ushirtitem;
+            appear.UnderShirtAsset = ushirtasset;
+            appear.UnderPantsItem = upantsitem;
+            appear.UnderPantsAsset = upantsasset;
+            appear.SkirtItem = skirtitem;
+            appear.SkirtAsset = skirtasset;
+            appear.Texture = texture;
+            appear.AvatarHeight = avatarheight;
+
+            db.UpdateUserAppearance(owner, appear);
+            AvatarAppearance app = db.GetUserAppearance(owner);
+
+            Assert.That(owner,Is.EqualTo(app.Owner));
+            Assert.That(serial,Is.EqualTo(app.Serial));
+            Assert.That(visualp,Is.EqualTo(app.VisualParams));
+            Assert.That(bodyitem,Is.EqualTo(app.BodyItem));
+            Assert.That(bodyasset,Is.EqualTo(app.BodyAsset));
+            Assert.That(skinitem,Is.EqualTo(app.SkinItem));
+            Assert.That(skinasset,Is.EqualTo(app.SkinAsset));
+            Assert.That(hairitem,Is.EqualTo(app.HairItem));
+            Assert.That(hairasset,Is.EqualTo(app.HairAsset));
+            Assert.That(eyesitem,Is.EqualTo(app.EyesItem));
+            Assert.That(eyesasset,Is.EqualTo(app.EyesAsset));
+            Assert.That(shirtitem,Is.EqualTo(app.ShirtItem));
+            Assert.That(shirtasset,Is.EqualTo(app.ShirtAsset));
+            Assert.That(pantsitem,Is.EqualTo(app.PantsItem));
+            Assert.That(pantsasset,Is.EqualTo(app.PantsAsset));
+            Assert.That(shoesitem,Is.EqualTo(app.ShoesItem));
+            Assert.That(shoesasset,Is.EqualTo(app.ShoesAsset));
+            Assert.That(socksitem,Is.EqualTo(app.SocksItem));
+            Assert.That(socksasset,Is.EqualTo(app.SocksAsset));
+            Assert.That(jacketitem,Is.EqualTo(app.JacketItem));
+            Assert.That(jacketasset,Is.EqualTo(app.JacketAsset));
+            Assert.That(glovesitem,Is.EqualTo(app.GlovesItem));
+            Assert.That(glovesasset,Is.EqualTo(app.GlovesAsset));
+            Assert.That(ushirtitem,Is.EqualTo(app.UnderShirtItem));
+            Assert.That(ushirtasset,Is.EqualTo(app.UnderShirtAsset));
+            Assert.That(upantsitem,Is.EqualTo(app.UnderPantsItem));
+            Assert.That(upantsasset,Is.EqualTo(app.UnderPantsAsset));
+            Assert.That(skirtitem,Is.EqualTo(app.SkirtItem));
+            Assert.That(skirtasset,Is.EqualTo(app.SkirtAsset));
+            Assert.That(texture.ToString(),Is.EqualTo(app.Texture.ToString()));
+            Assert.That(avatarheight,Is.EqualTo(app.AvatarHeight));
+        }

         public UserProfileData NewUser(UUID id,string fname,string lname)
         {
@@ -577,6 +685,6 @@
                 name.Append(ch);
             }
             return name.ToString();
-        }
+        }
     }
 }


- New attempt after merging problem

- New attempt after merging problem

--- OpenSim/Data/Tests/BasicUserTest.cs
+++ OpenSim/Data/Tests/BasicUserTest.cs
@@ -214,7 +214,6 @@
         [Test]
         public void T022_ExceptionalCases()
         {
-            // This will follow User behavior, return Null, in the future
             UserAgentData a0 = NewAgent(user4,zero);
             UserAgentData a4 = NewAgent(zero,agent4);
             db.AddNewUserAgent(a0);
@@ -222,10 +221,6 @@

             UserAgentData a0a = db.GetAgentByUUID(user4);
             UserAgentData a4a = db.GetAgentByUUID(zero);
-            Assert.That(zero,Is.EqualTo(a0a.SessionID));
-            Assert.That(user4,Is.EqualTo(a0a.ProfileID));
-            Assert.That(agent4,Is.EqualTo(a4a.SessionID));
-            Assert.That(zero,Is.EqualTo(a4a.ProfileID));

             Assert.That(db.GetAgentByUUID(user4),Is.Null);
             Assert.That(db.GetAgentByUUID(zero),Is.Null);


Web request tweaks and changes Add full response output on failed request Remove Date content header restriction

--- Oxide.Core/Libraries/WebRequests.cs
+++ Oxide.Core/Libraries/WebRequests.cs
@@ -168,7 +168,18 @@
                     {
                         ResponseText = ex.Message.Trim('\r', '\n', ' ');
                         var response = ex.Response as HttpWebResponse;
-                        if (response != null) ResponseCode = (int)response.StatusCode;
+                        if (response != null)
+                        {
+                            try
+                            {
+                                using (var stream = response.GetResponseStream())
+                                    using (var reader = new StreamReader(stream))
+                                        ResponseText = reader.ReadToEnd();
+                            }
+                            catch (Exception)
+                            {}
+                            ResponseCode = (int)response.StatusCode;
+                        }
                     }
                     catch (Exception ex)
                     {
@@ -349,7 +360,6 @@
             "Connection",
             "Content-Length",
             "Content-Type",
-            "Date",
             "Expect",
             "Host",
             "If-Modified-Since",


add appkey.

add appkey.

Signed-off-by: Jerin <af74fa2ce35b69390cf05d133cd2762ecd43713d@hotmail.com>

--- Picker/Picker.Core/Api/DoubanApi.cs
+++ Picker/Picker.Core/Api/DoubanApi.cs
@@ -17,10 +17,10 @@
     public const string ApiPrefix_Movie = ApiPrefix + "movie/";
     public const string ApiPrefix_music = ApiPrefix + "music/";

-    public const string Api_MyBookCollections = ApiPrefix_Book + "user/{0}/collections?start={1}";
-    public const string Api_BooksOfSerie = ApiPrefix_Book + "series/{0}/books?start={1}";
-    public const string Api_BookById = ApiPrefix_Book + "{0}";
-    public const string Api_BookByIsbn = ApiPrefix_Book + "isbn/{0}";
+    public const string Api_MyBookCollections = ApiPrefix_Book + "user/{0}/collections?start={1}&apikey={2}";
+    public const string Api_BooksOfSerie = ApiPrefix_Book + "series/{0}/books?start={1}&apikey={1}";
+    public const string Api_BookById = ApiPrefix_Book + "{0}?apikey={1}";
+    public const string Api_BookByIsbn = ApiPrefix_Book + "isbn/{0}?apikey={1}";

     const string UriPrefix_Book_Subject = "http://book.douban.com/subject/";

@@ -41,7 +41,7 @@
     /// </summary>
     /// <param name="username"></param>
     public async Task<Dictionary<string, JObject>> GetMyBookCollections( string username, int pageIndex ) {
-      string uri = string.Format( Api_MyBookCollections, username, pageIndex );
+      string uri = string.Format( Api_MyBookCollections, username, pageIndex, appKey );
       string json = await client.DownloadStringTaskAsync( uri );
       var obj = JObject.Parse( json );
       return getItems( (JArray)obj["collections"], "book" );
@@ -52,7 +52,7 @@
     /// </summary>
     /// <param name="username"></param>
     public async Task<Dictionary<string, JObject>> GetBooksOfSerie( string serieId, int pageIndex ) {
-      string uri = string.Format( Api_BooksOfSerie, serieId, pageIndex );
+      string uri = string.Format( Api_BooksOfSerie, serieId, pageIndex, appKey );
       string json = await client.DownloadStringTaskAsync( uri );
       var obj = JObject.Parse( json );
       return getItems( (JArray)obj["books"] );
@@ -63,7 +63,7 @@
     /// </summary>
     /// <param name="username"></param>
     public async Task<JObject> GetBookById( string id ) {
-      string uri = string.Format( Api_BookById, id );
+      string uri = string.Format( Api_BookById, id, appKey );
       string json = await client.DownloadStringTaskAsync( uri );
       var obj = JObject.Parse( json );
       return obj;
@@ -74,12 +74,17 @@
     /// </summary>
     /// <param name="username"></param>
     public async Task<JObject> GetBookByIsbn( string isbn ) {
-      string uri = string.Format( Api_BookByIsbn, isbn );
+      string uri = string.Format( Api_BookByIsbn, isbn, appKey );
       string json = await client.DownloadStringTaskAsync( uri );
       var obj = JObject.Parse( json );
       return obj;
     }

+    /// <summary>
+    /// 获取book的subject链接.
+    /// </summary>
+    /// <param name="book"></param>
+    /// <returns></returns>
     public string GetSubjectUriOfBook( JObject book ) {
       if ( book == null )
         return null;


Improved on paintbrush thickness cursor icon.

--- Pinta.Tools/Tools/PaintBrushTool.cs
+++ Pinta.Tools/Tools/PaintBrushTool.cs
@@ -40,7 +40,9 @@
 		public override string Name { get { return Catalog.GetString ("Paintbrush"); } }
 		public override string Icon { get { return "Tools.Paintbrush.png"; } }
 		public override string StatusBarText { get { return Catalog.GetString ("Left click to draw with primary color, right click to draw with secondary color."); } }
-		public override Gdk.Cursor DefaultCursor { get { return new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, SetThicknessIcon("Menu.Edit.EraseSelection.png"), BrushWidth / 2 + 2, BrushWidth / 2 + 2); } }
+		private int iconOffsetX, iconOffsetY;
+		private Color iconColor = new Color(0, 0, 0);
+		public override Gdk.Cursor DefaultCursor { get { return new Gdk.Cursor(PintaCore.Chrome.Canvas.Display, CreateThicknessIcon("Tools.Paintbrush.png", 16, 16, 0, 16, iconColor, 1), iconOffsetX, iconOffsetY); } }
 		public override Gdk.Key ShortcutKey { get { return Gdk.Key.B; } }
 		public override int Priority { get { return 25; } }

@@ -56,19 +58,26 @@
 		private ToolBarLabel brush_label;
 		private ToolBarComboBox brush_combo_box;

-		private Gdk.Pixbuf SetThicknessIcon(string name)
-		{
-			ImageSurface i = new ImageSurface(Format.ARGB32, BrushWidth + 17, BrushWidth + 17);
+		private Gdk.Pixbuf CreateThicknessIcon(string name, int cursorWidth, int cursorHeight, int cursorOffsetX, int cursorOffsetY, Color ellipseColor, int ellipseThickness)
+		{
+			int halfOfEllipseThickness = (int)Math.Ceiling(ellipseThickness / 2d);
+			int halfOfBrushWidth = BrushWidth / 2;
+
+			int iconWidth = (int)Math.Max(cursorWidth + cursorOffsetX + halfOfBrushWidth + halfOfEllipseThickness, BrushWidth + ellipseThickness + 1);
+			int iconHeight = (int)Math.Max(cursorHeight + cursorOffsetY + halfOfBrushWidth + halfOfEllipseThickness, BrushWidth + ellipseThickness + 1);
+
+			iconOffsetX = (int)Math.Max(cursorOffsetX, halfOfBrushWidth + halfOfEllipseThickness);
+			iconOffsetY = (int)Math.Max(cursorOffsetY, halfOfBrushWidth + halfOfEllipseThickness);
+
+			ImageSurface i = new ImageSurface(Format.ARGB32, iconWidth, iconHeight);

 			using (Context g = new Context(i))
 			{
-				g.DrawEllipse(new Rectangle(2, 2, BrushWidth, BrushWidth), new Color(0, 0, 0), 1);
-				g.DrawLine(new PointD(0d, (double)BrushWidth / 2d + 2d), new PointD(4d, (double)BrushWidth / 2d + 2d), new Color(0, 0, 0), 1);
-				g.DrawLine(new PointD((double)BrushWidth / 2d + 2d, 0d), new PointD((double)BrushWidth / 2d + 2d, 4d), new Color(0, 0, 0), 1);
-				g.DrawLine(new PointD((double)BrushWidth, (double)BrushWidth / 2d + 2d), new PointD((double)BrushWidth + 4d, (double)BrushWidth / 2d + 2d), new Color(0, 0, 0), 1);
-				g.DrawLine(new PointD((double)BrushWidth / 2d + 2d, (double)BrushWidth), new PointD((double)BrushWidth / 2d + 2d, (double)BrushWidth + 4d), new Color(0, 0, 0), 1);
-				g.DrawEllipse(new Rectangle(BrushWidth / 2 + 2, BrushWidth / 2 + 2, 1, 1), new Color(0, 0, 0), 1);
-				g.DrawPixbuf(PintaCore.Resources.GetIcon(name), new Point(BrushWidth + 1, BrushWidth + 1));
+				g.DrawEllipse(new Rectangle(iconOffsetX - halfOfBrushWidth, iconOffsetY - halfOfBrushWidth, BrushWidth, BrushWidth),
+					ellipseColor, ellipseThickness);
+
+				g.DrawPixbuf(PintaCore.Resources.GetIcon(name),
+					new Point(iconOffsetX - cursorOffsetX, iconOffsetY - cursorOffsetY));
 			}

 			return CairoExtensions.ToPixbuf(i);


CreateChildLifetime helper

CreateChildLifetime helper

--- PowerArgs/Observability/Lifetime.cs
+++ PowerArgs/Observability/Lifetime.cs
@@ -11,6 +11,24 @@
         bool TryDispose();
         void Dispose();
     }
+
+    public static class ILifetimeEx
+    {
+        public static Lifetime CreateChildLifetime(this ILifetime lt)
+        {
+            var ret = new Lifetime();
+            lt.OnDisposed(() =>
+            {
+                if (ret.IsExpired == false)
+                {
+                    ret.Dispose();
+                }
+            });
+            return ret;
+        }
+    }
+
+

     /// <summary>
     /// An object that has a beginning and and end  that can be used to define the lifespan of event and observable subscriptions.
@@ -197,23 +215,7 @@
             return ret;
         }

-        /// <summary>
-        /// Creates a new lifetime that may be disposed earlier, but will be disposed when this
-        /// lifetime ends
-        /// </summary>
-        /// <returns></returns>
-        public Lifetime CreateChildLifetime()
-        {
-            var ret = new Lifetime();
-            _manager.OnDisposed(()=>
-            {
-                if(ret.IsExpired == false)
-                {
-                    ret.Dispose();
-                }
-            });
-            return ret;
-        }
+

         /// <summary>
         /// Runs all the cleanup actions that have been registerd


Fix debug environment setting

Fix debug environment setting

Debug environment value was replaced by default value on every build
or debugging session. It was caused by a try to remove illegal value
from project user file. Implementation was not working as expected and
is totally removed now. It is unnecessary because problem is caused by
addin version 1.1.11 supporting Qt4 and only Qt5 support is available
in 1.2.x versions. Also just removing project user file solves the
issue of illegal value if it exist.

Task-number: QTVSADDINBUG-159
Change-Id: I420a97c3061e1908856ce8da187e28cf0e45c63f
Reviewed-by: Joerg Bornemann <47777b9406dbddd02a3fdca8341789a013805a11@digia.com>

--- Qt4VS2003/QtProjectLib/QtProject.cs
+++ Qt4VS2003/QtProjectLib/QtProject.cs
@@ -3616,22 +3616,7 @@
             try
             {
                 var propertyAccess = (IVCBuildPropertyStorage)vcPro;
-
-                // Remove old property if one exists
-                // This is set incorrectly for projects by version 1.1.10:
-                // propertyAccess.SetPropertyValue("QTDIR", null, "UserFile", qtDir);
                 VCProject vcprj = envPro.Object as VCProject;
-                if (!string.IsNullOrEmpty(propertyAccess.GetPropertyValue("QTDIR", null, "UserFile")))
-                {
-                    propertyAccess.RemoveProperty("QTDIR", null, "UserFile");
-                    // Also remove all debugger paths cause those may be invalid
-                    foreach (VCConfiguration conf in vcprj.Configurations as IVCCollection)
-                    {
-                        VCPlatform cur_platform = conf.Platform as VCPlatform;
-                        string cur_solution = conf.ConfigurationName + "|" + cur_platform.Name;
-                        propertyAccess.RemoveProperty("LocalDebuggerEnvironment", cur_solution, "UserFile");
-                    }
-                }

                 // Get platform name from given solution configuration
                 // or if not available take the active configuration


added code for intellisense 1.1 (commented out)

--- Quandl.Excel.UDF.Functions/AddIn.cs
+++ Quandl.Excel.UDF.Functions/AddIn.cs
@@ -17,7 +17,10 @@
             Shared.Helpers.HttpHelper.EnableTlsSupport();
             Shared.Globals.Instance.HostService = new ExcelDnaHostService();
             // This registers the intellisense server. ATM this plugin is slightly buggy and prone to crashes.
+            // For IntelliSense 1.0.9
             IntelliSenseServer.Register();
+            // For IntelliSense 1.1.0
+            //IntelliSenseServer.Install();

             // Reset the stop execution function incase excel crashed last time.
             QuandlConfig.StopCurrentExecution = false;
@@ -36,6 +39,8 @@
         public void AutoClose()
         {
             FunctionGrimReaper.EndReaping();
+            // For Intellisense 1.1.0
+            // IntelliSenseServer.Uninstall();
         }
     }
 }


Changed region name

Changed region name

--- RDFSharp/Model/RDFModelUtilities.cs
+++ RDFSharp/Model/RDFModelUtilities.cs
@@ -33,7 +33,7 @@
     public static class RDFModelUtilities
     {

-        #region Greta
+        #region Hashing
         /// <summary>
         /// Performs MD5 hash calculation of the given string
         /// </summary>


Fix Box-Box AABB physics check not working

--- Raccoon/Core/Physics/Physics.Box.cs
+++ Raccoon/Core/Physics/Physics.Box.cs
@@ -13,32 +13,31 @@
             // AABB x AABB
             if (System.Math.Abs(boxA.Rotation) < Math.Epsilon && System.Math.Abs(shapeB.Rotation) < Math.Epsilon) {
                 Vector2 translation = BPos - APos;
-                Vector2 overlap = boxA.HalwidthExtents + shapeB.HalwidthExtents - Math.Abs(translation);
+                Vector2 overlap = (boxA.HalwidthExtents + shapeB.HalwidthExtents) - Math.Abs(translation);

                 if (overlap.X < 0f || overlap.Y < 0f) {
                     contacts = null;
                     return false;
                 }

-                contacts = new Contact[2];
-
-                Contact contact1 = new Contact {
-                    Position = Math.Max(APos - boxA.HalwidthExtents, BPos - shapeB.HalwidthExtents)
-                },
-                        contact2 = new Contact {
-                    Position = Math.Min(APos + boxA.HalwidthExtents, BPos + shapeB.HalwidthExtents)
-                };
+                contacts = new Contact[1];

                 if (overlap.X < overlap.Y) {
-                    contact1.Normal = contact2.Normal = translation.X < 0 ? Vector2.Left : Vector2.Right;
-                    contact1.PenetrationDepth = contact2.PenetrationDepth = overlap.X;
+                    float sign = Math.Sign(translation.X);
+                    contacts[0] = new Contact {
+                        Position = new Vector2(APos.X + boxA.HalwidthExtents.X * sign, BPos.Y),
+                        Normal = new Vector2(sign, 0f),
+                        PenetrationDepth = Math.Abs(overlap.X)
+                    };
                 } else {
-                    contact1.Normal = contact2.Normal = translation.Y < 0 ? Vector2.Up : Vector2.Down;
-                    contact1.PenetrationDepth = contact2.PenetrationDepth = overlap.Y;
+                    float sign = Math.Sign(translation.Y);
+                    contacts[0] = new Contact {
+                        Position = new Vector2(BPos.X, APos.Y + boxA.HalwidthExtents.Y * sign),
+                        Normal = new Vector2(0f, sign),
+                        PenetrationDepth = Math.Abs(overlap.Y)
+                    };
                 }

-                contacts[0] = contact1;
-                contacts[1] = contact2;
                 return true;
             }


replaced reporting spreadsheet against relhax forum URL for bug reports

--- RelicModManager/Forms/MainWindow.cs
+++ RelicModManager/Forms/MainWindow.cs
@@ -2150,7 +2150,7 @@

         private void findBugAddModLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
         {
-            System.Diagnostics.Process.Start("https://docs.google.com/spreadsheets/d/1LmPCMAx0RajW4lVYAnguHjjd8jArtWuZIGciFN76AI4/edit?usp=sharing");
+            System.Diagnostics.Process.Start("http://forums.relhaxmodpack.com/");
         }

         private void DiscordServerLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)


more silverlight fixes

more silverlight fixes

--- Runner/Platforms/shared/RunTests.cs
+++ Runner/Platforms/shared/RunTests.cs
@@ -64,12 +64,24 @@
 			request.ContentLength = byteArray.Length;
 			request.ContentType = @"application/json";

-			using (Stream dataStream = request.GetRequestStream())
+			var asyncReq = request.BeginGetRequestStream (null, null);
+			if (!asyncReq.IsCompleted && !asyncReq.AsyncWaitHandle.WaitOne (10000)) {
+				request.Abort ();
+				throw new Exception ("The request timed out");
+			}
+
+			using (var dataStream = request.EndGetRequestStream (asyncReq))
 			{
 				dataStream.Write(byteArray, 0, byteArray.Length);
 			}

-			using (var response = (HttpWebResponse)request.GetResponse())
+			var asyncResp = request.BeginGetResponse (null, null);
+			if (!asyncResp.IsCompleted && !asyncResp.AsyncWaitHandle.WaitOne (10000)) {
+				request.Abort ();
+				throw new Exception ("The request timed out");
+			}
+
+			using (var response = (HttpWebResponse)request.EndGetResponse (asyncResp))
 			{
 				return response.StatusCode == HttpStatusCode.OK;
 			}
@@ -83,7 +95,14 @@
 			Console.WriteLine (url);
 			request.Method = "GET";
 			request.ContentType = "text/plain";
-			using (var response = (HttpWebResponse)request.GetResponse())
+
+			var asyncResult = request.BeginGetResponse (null, null);
+			if (!asyncResult.IsCompleted && !asyncResult.AsyncWaitHandle.WaitOne ()) {
+				request.Abort ();
+				throw new Exception ("The request timed out");
+			}
+
+			using (var response = (HttpWebResponse)request.EndGetResponse (asyncResult))
 			using (var reader = new StreamReader(response.GetResponseStream()))
 			{
 				var text=reader.ReadToEnd();


frozen pens

frozen pens

--- SchematicControls/ElementControl.cs
+++ SchematicControls/ElementControl.cs
@@ -16,8 +16,8 @@
             DefaultStyleKeyProperty.OverrideMetadata(typeof(ElementControl), new FrameworkPropertyMetadata(typeof(ElementControl)));
         }

-        public static Pen HighlightPen = new Pen(Brushes.Gray, 0.5f) { DashStyle = DashStyles.Dash };
-        public static Pen SelectedPen = new Pen(Brushes.Blue, 0.5f) { DashStyle = DashStyles.Dash };
+        public static Pen HighlightPen = new Pen(Brushes.Gray, 0.5f) { DashStyle = DashStyles.Dash }.GetAsFrozen() as Pen;
+        public static Pen SelectedPen = new Pen(Brushes.Blue, 0.5f) { DashStyle = DashStyles.Dash }.GetAsFrozen() as Pen;

         private Pen pen = null;
         public Pen Pen { get { return pen; } set { pen = value; InvalidateVisual(); } }
@@ -84,21 +84,20 @@

         public static double TerminalSize = 2.0;
         public static double EdgeThickness = 1.0;
-        public static GuidelineSet Guidelines = new GuidelineSet(new double[] { EdgeThickness / 2 }, new double[] { EdgeThickness / 2 });

         public static Brush WireBrush = Brushes.DarkBlue;
-        public static Pen WirePen = new Pen(WireBrush, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen TerminalPen = new Pen(Brushes.Black, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
+        public static Pen WirePen = new Pen(WireBrush, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen TerminalPen = new Pen(Brushes.Black, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;

-        public static Pen BlackPen = new Pen(Brushes.Black, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen GrayPen = new Pen(Brushes.Gray, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen RedPen = new Pen(Brushes.Red, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen GreenPen = new Pen(Brushes.Lime, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen BluePen = new Pen(Brushes.Blue, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen YellowPen = new Pen(Brushes.Yellow, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen CyanPen = new Pen(Brushes.Cyan, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen MagentaPen = new Pen(Brushes.Magenta, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
-        public static Pen OrangePen = new Pen(Brushes.Orange, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round };
+        public static Pen BlackPen = new Pen(Brushes.Black, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen GrayPen = new Pen(Brushes.Gray, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen RedPen = new Pen(Brushes.Red, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen GreenPen = new Pen(Brushes.Lime, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen BluePen = new Pen(Brushes.Blue, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen YellowPen = new Pen(Brushes.Yellow, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen CyanPen = new Pen(Brushes.Cyan, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen MagentaPen = new Pen(Brushes.Magenta, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;
+        public static Pen OrangePen = new Pen(Brushes.Orange, EdgeThickness) { StartLineCap = PenLineCap.Round, EndLineCap = PenLineCap.Round }.GetAsFrozen() as Pen;

         public static Pen MapToPen(Circuit.EdgeType Edge)
         {


Fix C# snippet to generate TaskRouter TaskQueue Capability Token

--- rest/taskrouter/jwts/taskqueue/example-1/example-1.5.x.cs
+++ rest/taskrouter/jwts/taskqueue/example-1/example-1.5.x.cs
@@ -35,7 +35,7 @@
             accountSid,
             authToken,
             workspaceSid,
-            null,
+            taskQueueSid,
             policies: policies,
             expiration: DateTime.UtcNow.AddSeconds(28800) // 60 * 60 * 8
             );
@@ -59,7 +59,7 @@
         _taskQueueSid = taskQueueSid;
     }

-    public string TaskQueue => $"{Workspace}/TaskQueue/{_taskQueueSid}";
+    public string TaskQueue => $"{Workspace}/TaskQueues/{_taskQueueSid}";

     string Workspace =>
         $"{taskRouterBaseUrl}/{taskRouterVersion}/Workspaces/{_workspaceSid}";


Remove extraneous AssemblyInfo.cs.

Remove extraneous AssemblyInfo.cs.

--- rat/AssemblyInfo.cs
+++ rat/AssemblyInfo.cs
@@ -1,33 +0,0 @@
-/**
- * AssemblyInfo.cs
- * Assembly boilerplate for Packrat.
- * Copyright (c) 2015 | gruebait (gruebait@eatenbygrues.com)
- * License: MIT
- */
-
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// Information about this assembly is defined by the following attributes.
-// Change them to the values specific to your project.
-
-[assembly: AssemblyTitle("packrat 0.1.0")]
-[assembly: AssemblyDescription("Down 'n dirty texture atlas packing and creation.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("")]
-[assembly: AssemblyCopyright("gruebait (gruebait@eatenbygrues.com)")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
-// The form "{Major}.{Minor}.*" will automatically update the build and revision,
-// and "{Major}.{Minor}.{Build}.*" will update just the revision.
-
-[assembly: AssemblyVersion("0.1.*")]
-
-// The following attributes are used to specify the signing key for the assembly,
-// if desired. See the Mono documentation for more information about signing.
-
-//[assembly: AssemblyDelaySign(false)]
-//[assembly: AssemblyKeyFile("")]


Added XML documentation to SentryStacktrace

--- SharpRaven/Data/SentryStacktrace.cs
+++ SharpRaven/Data/SentryStacktrace.cs
@@ -7,7 +7,14 @@
 using Newtonsoft.Json;

 namespace SharpRaven.Data {
+    /// <summary>
+    /// Represents Sentry's version of an <see cref="Exception"/>'s stack trace.
+    /// </summary>
     public class SentryStacktrace {
+        /// <summary>
+        /// Initializes a new instance of the <see cref="SentryStacktrace"/> class.
+        /// </summary>
+        /// <param name="e">The decimal.</param>
         public SentryStacktrace(Exception e) {
             StackTrace trace = new StackTrace(e, true);

@@ -44,6 +51,12 @@
             };
         }

+        /// <summary>
+        /// Gets or sets the <see cref="Exception"/> frames.
+        /// </summary>
+        /// <value>
+        /// The <see cref="Exception"/> frames.
+        /// </value>
         [JsonProperty(PropertyName = "frames")]
         public ExceptionFrame[] Frames { get; set; }


git-svn-id: 75210f800c74dac7ab89a5be233e5d30c702c3e4@149 a0bf3537-8e53-448f-ae4a-0b965e85af5e

--- Sinobyl/Sinobyl.Engine/ChessEval.cs
+++ Sinobyl/Sinobyl.Engine/ChessEval.cs
@@ -134,6 +134,7 @@
             int valEndPieceSq = 0;
             int valStartMobility = 0;
             int valEndMobility = 0;
+            int basicMaterialCount = 0;
             for (int ipos = 0; ipos < 64; ipos++)
             {
                 ChessPosition pos = ChessPositionInfo.AllPositions[ipos];
@@ -156,15 +157,19 @@
                         break;
                     case ChessPiece.WKnight:
                         slidingAttacks = Attacks.KnightAttacks(pos);
+                        basicMaterialCount += 3;
                         break;
                     case ChessPiece.WBishop:
                         slidingAttacks = Attacks.BishopAttacks(pos, board.PieceLocationsAllA1H8, board.PieceLocationsAllH1A8);
+                        basicMaterialCount += 3;
                         break;
                     case ChessPiece.WRook:
                         slidingAttacks = Attacks.RookAttacks(pos, board.PieceLocationsAll, board.PieceLocationsAllVert);
+                        basicMaterialCount += 5;
                         break;
                     case ChessPiece.WQueen:
                         slidingAttacks = Attacks.QueenAttacks(pos, board.PieceLocationsAll, board.PieceLocationsAllVert, board.PieceLocationsAllA1H8, board.PieceLocationsAllH1A8);
+                        basicMaterialCount += 9;
                         break;
                     case ChessPiece.WKing:
                         break;
@@ -172,15 +177,19 @@
                         break;
                     case ChessPiece.BKnight:
                         slidingAttacks = Attacks.KnightAttacks(pos);
+                        basicMaterialCount += 3;
                         break;
                     case ChessPiece.BBishop:
                         slidingAttacks = Attacks.BishopAttacks(pos, board.PieceLocationsAllA1H8, board.PieceLocationsAllH1A8);
+                        basicMaterialCount += 3;
                         break;
                     case ChessPiece.BRook:
                         slidingAttacks = Attacks.RookAttacks(pos, board.PieceLocationsAll, board.PieceLocationsAllVert);
+                        basicMaterialCount += 5;
                         break;
                     case ChessPiece.BQueen:
                         slidingAttacks = Attacks.QueenAttacks(pos, board.PieceLocationsAll, board.PieceLocationsAllVert, board.PieceLocationsAllA1H8, board.PieceLocationsAllH1A8);
+                        basicMaterialCount += 9;
                         break;
                     case ChessPiece.BKing:
                         break;
@@ -221,9 +230,8 @@
                 + (valEndMobility * WeightMobilityEndgame / 100)
                 + pawns.EndVal;

-            float startWeight;
-            float endWeight;
-            CalcStartEndWeights(board, out startWeight, out endWeight);
+            float startWeight = CalcStartWeight(basicMaterialCount);
+            float endWeight = 1 - startWeight;

             ChessEvalResults retval = new ChessEvalResults();
             retval.MatStart = valStartMat;
@@ -243,14 +251,23 @@
             //return retval;
         }

-        protected virtual void CalcStartEndWeights(ChessBoard board, out float startWeight, out float endWeight)
-        {
-            int WhiteCount = board.PieceCount(ChessPiece.WKnight) + board.PieceCount(ChessPiece.WBishop) + board.PieceCount(ChessPiece.WRook) + board.PieceCount(ChessPiece.WQueen);
-            int BlackCount = board.PieceCount(ChessPiece.BKnight) + board.PieceCount(ChessPiece.BBishop) + board.PieceCount(ChessPiece.BRook) + board.PieceCount(ChessPiece.BQueen);
-
-            startWeight = (float)(WhiteCount + BlackCount) / (float)14;
-            endWeight = 1 - startWeight;
-
+        protected virtual float CalcStartWeight(int basicMaterialCount)
+        {
+            //full material would be 62
+            if (basicMaterialCount >= 56)
+            {
+                return 1;
+            }
+            else if (basicMaterialCount <= 10)
+            {
+                return 0;
+            }
+            else
+            {
+                int rem = basicMaterialCount - 10;
+                float retval = (float)rem / 46f;
+                return retval;
+            }
         }

     }


Correction des calculs du triangle rectangle

--- Sohcahtoa.Core/TriangleRectangle.cs
+++ Sohcahtoa.Core/TriangleRectangle.cs
@@ -39,8 +39,8 @@
       set
       {
         _hypotenuse = value;
+        _adjacent = Math.Cos(_angle) * _hypotenuse;
         _oppose = Math.Sqrt(_hypotenuse * _hypotenuse - _adjacent * _adjacent);
-        _angle = Math.Asin(Sinus(_adjacent, _oppose));
       }
     }

@@ -50,8 +50,8 @@
       set
       {
         _adjacent = value;
-        _oppose = Math.Sqrt(_adjacent * _adjacent - _hypotenuse * _hypotenuse);
-        _angle = Math.Asin(Sinus(_oppose, _adjacent));
+        _hypotenuse = _adjacent / Math.Cos(_angle);
+        _oppose = Math.Sqrt(_hypotenuse * _hypotenuse - _adjacent * _adjacent);
       }
     }

@@ -61,8 +61,9 @@
       set
       {
         _angle = value;
-        _hypotenuse = _adjacent * Math.Tan(_angle);
+        _hypotenuse = _adjacent / Math.Cos(_angle);
         _oppose = _hypotenuse * Math.Sin(_angle);
+
       }
     }


Add decoupled clock tests

Add decoupled clock tests

--- osu.Framework.Tests/NonVisual/TestDecoupleableClock.cs
+++ osu.Framework.Tests/NonVisual/TestDecoupleableClock.cs
@@ -46,6 +46,32 @@
             Assert.IsFalse(source.IsRunning, "Source should not be running.");
         }

+        /// <summary>
+        /// Tests that the source clock starts when the decoupled clock starts.
+        /// </summary>
+        [Test]
+        public void TestSourceStartedByDecoupled()
+        {
+            decoupleable.IsCoupled = false;
+            decoupleable.Start();
+
+            Assert.IsTrue(source.IsRunning, "Source should be running.");
+        }
+
+        /// <summary>
+        /// Tests that the source clock stops when the decoupled clock stops.
+        /// </summary>
+        [Test]
+        public void TestSourceStoppedByDecoupled()
+        {
+            decoupleable.Start();
+
+            decoupleable.IsCoupled = false;
+            decoupleable.Stop();
+
+            Assert.IsFalse(source.IsRunning, "Source should not be running.");
+        }
+
 #endregion

 #region Start/stop by source
@@ -76,6 +102,35 @@
             Assert.IsFalse(decoupleable.IsRunning, "Coupled should not be running.");
         }

+        /// <summary>
+        /// Tests that the decoupled clock doesn't start when the source clock starts.
+        /// </summary>
+        [Test]
+        public void TestDecoupledNotStartedBySourceClock()
+        {
+            decoupleable.IsCoupled = false;
+
+            source.Start();
+            decoupleable.ProcessFrame();
+
+            Assert.IsFalse(decoupleable.IsRunning, "Decoupled should not be running.");
+        }
+
+        /// <summary>
+        /// Tests that the decoupled clock doesn't stop when the source clock stops.
+        /// </summary>
+        [Test]
+        public void TestDecoupledNotStoppedBySourceClock()
+        {
+            decoupleable.Start();
+            decoupleable.IsCoupled = false;
+
+            source.Stop();
+            decoupleable.ProcessFrame();
+
+            Assert.IsTrue(decoupleable.IsRunning, "Decoupled should be running.");
+        }
+
 #endregion

 #region Offset start
@@ -86,28 +141,40 @@
         [Test]
         public void TestCoupledStartBySourceWithSourceOffset()
         {
-            const double expected_time = 1000;
-
-            source.Seek(expected_time);
+            source.Seek(1000);

             source.Start();
             decoupleable.ProcessFrame();

-            Assert.AreEqual(expected_time, decoupleable.CurrentTime, "Coupled time should match source time.");
-        }
-
-        /// <summary>
-        /// Tests that the coupled clock seeks the source to its time when it starts.
+            Assert.AreEqual(source.CurrentTime, decoupleable.CurrentTime, "Coupled time should match source time.");
+        }
+
+        /// <summary>
+        /// Tests that the coupled clock seeks the source clock to its time when it starts.
         /// </summary>
         [Test]
         public void TestCoupledStartWithSouceOffset()
         {
-            const double expected_time = 0;
-
-            source.Seek(1000);
-            decoupleable.Start();
-
-            Assert.AreEqual(expected_time, decoupleable.CurrentTime, "Coupled time should match source time.");
+            source.Seek(1000);
+            decoupleable.Start();
+
+            Assert.AreEqual(0, source.CurrentTime);
+            Assert.AreEqual(source.CurrentTime, decoupleable.CurrentTime, "Coupled time should match source time.");
+        }
+
+        /// <summary>
+        /// Tests that the decoupled clock seeks the source clock to its time when it starts.
+        /// </summary>
+        [Test]
+        public void TestDecoupledStartWithSouceOffset()
+        {
+            decoupleable.IsCoupled = false;
+
+            source.Seek(1000);
+            decoupleable.Start();
+
+            Assert.AreEqual(0, source.CurrentTime);
+            Assert.AreEqual(source.CurrentTime, decoupleable.CurrentTime, "Deoupled time should match source time.");
         }

 #endregion
@@ -120,11 +187,9 @@
         [Test]
         public void TestSourceSeekedByCoupledSeek()
         {
-            const double expected_time = 1000;
-
-            decoupleable.Seek(expected_time);
-
-            Assert.AreEqual(expected_time, source.CurrentTime, "Source time should match coupled time.");
+            decoupleable.Seek(1000);
+
+            Assert.AreEqual(source.CurrentTime, source.CurrentTime, "Source time should match coupled time.");
         }

         /// <summary>
@@ -133,14 +198,39 @@
         [Test]
         public void TestCoupledSeekedBySourceSeek()
         {
-            const double expected_time = 1000;
-
-            decoupleable.Start();
-
-            source.Seek(expected_time);
-            decoupleable.ProcessFrame();
-
-            Assert.AreEqual(expected_time, decoupleable.CurrentTime, "Coupled time should match source time.");
+            decoupleable.Start();
+
+            source.Seek(1000);
+            decoupleable.ProcessFrame();
+
+            Assert.AreEqual(source.CurrentTime, decoupleable.CurrentTime, "Coupled time should match source time.");
+        }
+
+        /// <summary>
+        /// Tests that the source clock is seeked when the decoupled clock is seeked.
+        /// </summary>
+        [Test]
+        public void TestSourceSeekedByDecoupledSeek()
+        {
+            decoupleable.IsCoupled = false;
+            decoupleable.Seek(1000);
+
+            Assert.AreEqual(decoupleable.CurrentTime, source.CurrentTime, "Source time should match coupled time.");
+        }
+
+        /// <summary>
+        /// Tests that the coupled clock is not seeked while stopped and the source clock is seeked.
+        /// </summary>
+        [Test]
+        public void TestDecoupledNotSeekedBySourceSeekWhenStopped()
+        {
+            decoupleable.IsCoupled = false;
+
+            source.Seek(1000);
+            decoupleable.ProcessFrame();
+
+            Assert.AreEqual(0, decoupleable.CurrentTime);
+            Assert.AreNotEqual(source.CurrentTime, decoupleable.CurrentTime, "Coupled time should not match source time.");
         }

 #endregion


Fix children added during load() not being async-loaded.

--- osu.Framework/Graphics/Containers/CompositeDrawable.cs
+++ osu.Framework/Graphics/Containers/CompositeDrawable.cs
@@ -298,7 +298,7 @@
             if (drawable.LoadState >= LoadState.Ready)
                 drawable.Parent = this;
             // If we're already loaded, we can eagerly allow children to be loaded
-            else if (LoadState >= LoadState.Ready)
+            else if (LoadState >= LoadState.Loading)
                 loadChild(drawable);

             internalChildren.Add(drawable);


[packages,CommandLineProcessor] Do not assume that the tool Executable TokenizedString has not been parsed. It can be a procedurally generated path, e.g. Qt moc

--- packages/CommandLineProcessor/bam/Scripts/Processor.cs
+++ packages/CommandLineProcessor/bam/Scripts/Processor.cs
@@ -40,7 +40,7 @@
             string hostApplication = null,
             string workingDirectory = null)
         {
-            var executablePath = tool.Executable.ToString();
+            var executablePath = tool.Executable.Parse();
             var processStartInfo = new System.Diagnostics.ProcessStartInfo();
             if (null != hostApplication)
             {


fix error

fix error

--- source/Cosmos.System2/FileSystem/VFS/FileSystemManager.cs
+++ source/Cosmos.System2/FileSystem/VFS/FileSystemManager.cs
@@ -37,7 +37,7 @@
         {
             foreach (var item in registeredFileSystems)
             {
-                if(item.Name == factory.Name)
+                if(item.Name == factoryName)
                 {
                     registeredFileSystems.Remove(item);
                     return true;


hello beauty

hello beauty

--- source/DotNetBay.Test/Storage/StorageProviderBaseTests.cs
+++ source/DotNetBay.Test/Storage/StorageProviderBaseTests.cs
@@ -158,6 +158,7 @@
             using (var factory = this.CreateFactory())
             {
                 var testStore = factory.CreateStore();
+
                 testStore.Add(myAuction);
                 testStore.Add(theBidder);
                 testStore.Add(bid);


Require Format match if provided

Require Format match if provided

--- Source/Miruken.Map/MapsAttribute.cs
+++ Source/Miruken.Map/MapsAttribute.cs
@@ -20,13 +20,10 @@
             var format  = mapping.Format;
             if (format == null) return true;
             var dispatch = binding.Dispatcher;
-            var formats  = dispatch.Attributes
-                .OfType<IFormatMatching>().ToArray();
-            if (Matches(format, formats)) return true;
-            var sharedFormats = dispatch.Owner.Attributes
-                .OfType<IFormatMatching>().ToArray();
-            if (Matches(format, sharedFormats)) return true;
-            return formats.Length == 0 && sharedFormats.Length == 0;
+            return Matches(format, dispatch.Attributes
+                      .OfType<IFormatMatching>())
+                || Matches(format, dispatch.Owner.Attributes
+                      .OfType<IFormatMatching>());
         }

         private static bool Matches(


Corrected bug in LineSeries when axis is reversed

--- Source/OxyPlot/Series/LineSeries.cs
+++ Source/OxyPlot/Series/LineSeries.cs
@@ -145,8 +145,10 @@
             double minDistSquared = MinimumSegmentLength * MinimumSegmentLength;

             var clipping = new CohenSutherlandClipping(
-                XAxis.ScreenMin.X, XAxis.ScreenMax.X,
-                YAxis.ScreenMin.Y, YAxis.ScreenMax.Y);
+                Math.Min(XAxis.ScreenMin.X, XAxis.ScreenMax.X),
+                Math.Max(XAxis.ScreenMin.X, XAxis.ScreenMax.X),
+                Math.Min(YAxis.ScreenMin.Y, YAxis.ScreenMax.Y),
+                Math.Max(YAxis.ScreenMin.Y, YAxis.ScreenMax.Y));

             int n = InternalPoints.Count;


Fix crash on start.

Fix crash on start.

--- editor/Program.cs
+++ editor/Program.cs
@@ -86,7 +86,7 @@
             Updater.NotifyEditorRun();

             settings = new Settings();
-            var displayDevice = DisplayDevice.GetDisplay(DisplayIndex.Default);
+            var displayDevice = findDisplayDevice();

             using (var window = createWindow(displayDevice))
             using (audioManager = createAudioManager(window))
@@ -107,6 +107,31 @@

                 settings.Save();
             }
+        }
+
+        private static DisplayDevice findDisplayDevice()
+        {
+            try
+            {
+                // Can throw ArgumentOutOfRangeException with OpenTK.Platform.SDL2
+                return DisplayDevice.GetDisplay(DisplayIndex.Default);
+            }
+            catch (Exception e1)
+            {
+                Trace.WriteLine($"Failed to use the default display device: {e1}");
+
+                var deviceIndex = 0;
+                while (deviceIndex <= (int)DisplayIndex.Sixth)
+                    try
+                    {
+                        return DisplayDevice.GetDisplay((DisplayIndex)deviceIndex);
+                    }
+                    catch (Exception e2)
+                    {
+                        Trace.WriteLine($"Failed to use display device #{deviceIndex}: {e2}");
+                    }
+            }
+            throw new InvalidOperationException("Failed to find a display device");
         }

         private static GameWindow createWindow(DisplayDevice displayDevice)
@@ -313,7 +338,7 @@
                 try
                 {
 #endif
-                action.Invoke();
+                    action.Invoke();
 #if !DEBUG
                 }
                 catch (Exception e)


Check for null visual parent. (#7298)

Check for null visual parent. (#7298)

It shouldn't be possible to come across a null visual parent here because the visual should be attached to the visual tree, but according to #6930, it is. Because we don't have a repro here, defensively return a null value instead of throwing if we hit this case.

--- src/Avalonia.Visuals/Rendering/SceneGraph/SceneBuilder.cs
+++ src/Avalonia.Visuals/Rendering/SceneGraph/SceneBuilder.cs
@@ -126,7 +126,12 @@

             while (node == null && visual.IsVisible)
             {
-                visual = visual.VisualParent!;
+                var parent = visual.VisualParent;
+
+                if (parent is null)
+                    return null;
+
+                visual = parent;
                 node = scene.FindNode(visual);
             }


Update AssemblyInfo.cs

Update AssemblyInfo.cs

--- src/Avalonia.Xaml.Interactions/Properties/AssemblyInfo.cs
+++ src/Avalonia.Xaml.Interactions/Properties/AssemblyInfo.cs
@@ -5,3 +5,6 @@

 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Xaml.Interactions")]
 [assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Xaml.Interactions.Core")]
+[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Xaml.Interactions.Custom")]
+[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Xaml.Interactions.DragAndDrop")]
+[assembly: XmlnsDefinition("https://github.com/avaloniaui", "Avalonia.Xaml.Interactions.Draggable")]


BankTransactionID seems to need to be nullable for adding new entries through the API

--- source/XeroApi/Model/BankTransaction.cs
+++ source/XeroApi/Model/BankTransaction.cs
@@ -5,7 +5,7 @@
     public class BankTransaction : ModelBase
     {
         [ItemId]
-        public Guid BankTransactionID { get; set; }
+        public Guid? BankTransactionID { get; set; }

         public Account BankAccount { get; set; }


Splitted bindable & trackable bindable classes

--- src/CSharpClient/Bit.CSharpClient.Prism/Model/Bindable.cs
+++ src/CSharpClient/Bit.CSharpClient.Prism/Model/Bindable.cs
@@ -18,7 +18,7 @@
         bool HasChanges { get; }
     }

-    public class Bindable : BindableBase, ITrackable
+    public class Bindable : BindableBase
     {
         public virtual void RaiseMemberChanged([CallerMemberName] string memberName = null)
         {
@@ -29,14 +29,17 @@
         {
             RaisePropertyChanged(".");
         }
+    }

-        private Dictionary<string, object> changedProps = null;
+    public class TrackableBindable : BindableBase
+    {
+        Dictionary<string, object> changedProps = null;

-        private bool IsBeingTracked => changedProps != null;
+        bool IsBeingTracked => changedProps != null;

         public virtual void OnPropertyChanged(string propertyName, object before, object after)
         {
-            if (IsBeingTracked)
+            if (IsBeingTracked && GetType().GetProperty(propertyName).CanWrite == true)
             {
                 if (!changedProps.Any(p => p.Key == propertyName))
                     changedProps.Add(propertyName, before);
@@ -47,7 +50,7 @@
             RaisePropertyChanged(propertyName);
         }

-        void ITrackable.BeginTrack()
+        public virtual void BeginTrack()
         {
             if (IsBeingTracked)
                 throw new InvalidOperationException("Object is being tracked");
@@ -55,7 +58,7 @@
             changedProps = new Dictionary<string, object> { };
         }

-        void ITrackable.AcceptChanges()
+        public virtual void AcceptChanges()
         {
             if (!IsBeingTracked)
                 throw new InvalidOperationException("Object isn't being tracked");
@@ -63,7 +66,7 @@
             changedProps.Clear();
         }

-        void ITrackable.RevertChanges()
+        public virtual void RevertChanges()
         {
             if (!IsBeingTracked)
                 throw new InvalidOperationException("Object isn't being tracked");
@@ -80,8 +83,7 @@
                     if (propInfo == null)
                         throw new InvalidOperationException($"Property {prp.Key} could not be found");

-                    if (propInfo.CanWrite)
-                        propInfo.SetValue(this, prp.Value);
+                    propInfo.SetValue(this, prp.Value);
                 }
             }
             finally
@@ -90,6 +92,6 @@
             }
         }

-        bool ITrackable.HasChanges => IsBeingTracked && changedProps.Any();
+        public virtual bool HasChanges => IsBeingTracked && changedProps.Any();
     }
 }


Updated row logic to properly group items

--- src/EPiBootstrapArea/BootstrapAwareContentAreaRenderer.cs
+++ src/EPiBootstrapArea/BootstrapAwareContentAreaRenderer.cs
@@ -85,24 +85,35 @@
             }

             var items = contentAreaItems.ToList();
+            var currentRow = 0;
             var rowWidthState = 0;
             var itemInfos = items.Select(item =>
                                          {
                                              var tag = GetContentAreaItemTemplateTag(htmlHelper, item);
                                              var columnWidth = GetColumnWidth(tag);
-                                             rowWidthState += columnWidth;
+
+                                             if(rowWidthState + columnWidth > 12)
+                                             {
+                                                 currentRow++;
+                                                 rowWidthState = columnWidth;
+                                             }
+                                             else
+                                             {
+                                                 rowWidthState += columnWidth;
+                                             }
+
                                              return new
-                                                    {
-                                                        ContentAreaItem = item,
-                                                        Tag = tag,
-                                                        ColumnWidth = columnWidth,
-                                                        RowWidthState = rowWidthState,
-                                                        RowNumber = rowWidthState % 12 == 0 ? rowWidthState / 12 - 1 : rowWidthState / 12
-                                                    };
+                                             {
+                                                 ContentAreaItem = item,
+                                                 Tag = tag,
+                                                 ColumnWidth = columnWidth,
+                                                 RowWidthState = rowWidthState,
+                                                 RowNumber = currentRow
+                                             };
                                          }).ToList();

             var rows = itemInfos.GroupBy(a => a.RowNumber, a => a.ContentAreaItem);
-            foreach (var row in rows)
+            foreach(var row in rows)
             {
                 var originalWriter = htmlHelper.ViewContext.Writer;
                 var tempWriter = new StringWriter();
@@ -146,7 +157,7 @@

                 // persist selected DisplayOption for content template usage (if needed there of course)

-                using (new ContentAreaItemContext(htmlHelper.ViewContext.ViewData, contentAreaItem))
+                using(new ContentAreaItemContext(htmlHelper.ViewContext.ViewData, contentAreaItem))
                 {
                     // NOTE: if content area was rendered with tag (Html.PropertyFor(m => m.Area, new { tag = "..." }))
                     // this tag is overridden if editor chooses display option for the block


Updated to hold source in memory cache

Updated to hold source in memory cache

--- src/ElevatorSharp.Web/Controllers/SkyscraperController.cs
+++ src/ElevatorSharp.Web/Controllers/SkyscraperController.cs
@@ -23,7 +23,7 @@
         public ActionResult Index(string message = null, string source = null, string diagnostics = null)
         {
             ViewBag.Message = message;
-            ViewBag.Source = string.IsNullOrWhiteSpace(source) ? _defaultCode : Encoding.Default.GetString(Convert.FromBase64String(source));
+            ViewBag.Source = string.IsNullOrWhiteSpace(source) ? _defaultCode : Encoding.Default.GetString(Convert.FromBase64String((string)MemoryCache.Default.Get(source)));

             if (diagnostics != null && diagnostics.Any())
             {
@@ -111,15 +111,16 @@
             using (var ms = new MemoryStream())
             {
                 var result = compilation.Emit(ms);
-                source = Convert.ToBase64String(Encoding.Default.GetBytes(source));
+                var sourceGuid = Guid.NewGuid().ToString();
+                MemoryCache.Default.Add(sourceGuid, Convert.ToBase64String(Encoding.Default.GetBytes(source)), new CacheItemPolicy {AbsoluteExpiration = DateTimeOffset.Now.AddDays(1)});
                 if (result.Success)
                 {
                     ms.Seek(0, SeekOrigin.Begin);
                     var dll = Assembly.Load(ms.ToArray());
-                    return FindPlayer(dll, source);
+                    return FindPlayer(dll, sourceGuid);
                 }

-                return RedirectToAction("Index", new { message = "Compilation issues", source, diagnostics = Convert.ToBase64String(Encoding.Default.GetBytes(string.Join("±", result.Diagnostics))) });
+                return RedirectToAction("Index", new { message = "Compilation issues", source = sourceGuid, diagnostics = Convert.ToBase64String(Encoding.Default.GetBytes(string.Join("±", result.Diagnostics))) });
             }
         }


Fix code analysis

Fix code analysis

--- src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs
+++ src/GitHub.App/ViewModels/PullRequestCreationViewModel.cs
@@ -6,15 +6,12 @@
 using ReactiveUI;
 using GitHub.Services;
 using System.Reactive.Linq;
-using System.Collections.ObjectModel;
 using GitHub.Extensions.Reactive;
 using GitHub.UI;
 using System.Linq;
-using System.Windows.Input;
 using GitHub.Validation;
 using GitHub.Extensions;
 using NullGuard;
-using System.Reactive.Disposables;

 namespace GitHub.ViewModels
 {
@@ -24,7 +21,6 @@
     {
         readonly IRepositoryHost repositoryHost;
         readonly ISimpleRepositoryModel activeRepo;
-        readonly CompositeDisposable disposables = new CompositeDisposable();

         [ImportingConstructor]
         PullRequestCreationViewModel(
@@ -52,7 +48,6 @@
             var titleObs = this.WhenAny(x => x.PRTitle, x => x.Value);
             TitleValidator = ReactivePropertyValidator.ForObservable(titleObs)
                 .IfNullOrEmpty("Please enter a title for the Pull Request");
-            disposables.Add(TitleValidator);

             var branchObs = this.WhenAny(
                 x => x.SourceBranch,
@@ -61,18 +56,16 @@
             BranchValidator = ReactivePropertyValidator.ForObservable(branchObs)
                 .IfTrue(x => x == null, "Source branch doesn't exist remotely, have you pushed it?")
                 .IfTrue(x => x.Name == TargetBranch.Name, "Source and target branch cannot be the same");
-            disposables.Add(BranchValidator);

             var whenAnyValidationResultChanges = this.WhenAny(
                 x => x.TitleValidator.ValidationResult,
                 x => x.BranchValidator.ValidationResult,
                 (x, y) => (x.Value?.IsValid ?? false) && (y.Value?.IsValid ?? false));

-            disposables.Add(
-                this.WhenAny(x => x.BranchValidator.ValidationResult, x => x.GetValue())
-                    .WhereNotNull()
-                    .Where(x => !x.IsValid && x.DisplayValidationError)
-                    .Subscribe(x => notifications.ShowError(BranchValidator.ValidationResult.Message)));
+            this.WhenAny(x => x.BranchValidator.ValidationResult, x => x.GetValue())
+                .WhereNotNull()
+                .Where(x => !x.IsValid && x.DisplayValidationError)
+                .Subscribe(x => notifications.ShowError(BranchValidator.ValidationResult.Message));

             createPullRequest = ReactiveCommand.CreateAsyncObservable(whenAnyValidationResultChanges,
                 _ => service.CreatePullRequest(repositoryHost, activeRepo, PRTitle, SourceBranch, TargetBranch)
@@ -83,7 +76,6 @@
                 {
                 }
             });
-            disposables.Add(createPullRequest);
         }

         public override void Initialize([AllowNull] ViewWithData data)


typo fixed in aztec decoder (thanks to Danilo)

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS05/]$/ZXingNet/trunk;C72635

--- Source/lib/aztec/decoder/Decoder.cs
+++ Source/lib/aztec/decoder/Decoder.cs
@@ -380,7 +380,7 @@

                }

-               flag = (int)((uint)flag >> 2); // flag >>>= 1;
+               flag = (int)((uint)flag >> 1); // flag >>>= 1;
             }
          }


Fixed culture sensitivity bug in WktShapeParser.NextDouble()

--- Spatial4n.Core/Io/WktShapeParser.cs
+++ Spatial4n.Core/Io/WktShapeParser.cs
@@ -501,7 +501,7 @@
                 double result;
                 try
                 {
-                    result = double.Parse(rawString.Substring(startOffset, offset - startOffset));
+                    result = double.Parse(rawString.Substring(startOffset, offset - startOffset), CultureInfo.InvariantCulture);
                 }
                 catch (RuntimeException e)
                 {


Fixed so RenderDebugCss in CssBundle writes to .debug.css file instead of simply removing the file ending to avoid conflict with similarly named folders

--- SquishIt.Framework/Css/CssBundle.cs
+++ SquishIt.Framework/Css/CssBundle.cs
@@ -237,12 +237,12 @@
                 {
                     string outputFile = ResolveAppRelativePathToFileSystem(file);
                     string css = ProcessLess(outputFile);
-                    outputFile = outputFile.Substring(0, outputFile.Length - 5);
+                    outputFile += ".debug.css";
                     using (var fileWriter = fileWriterFactory.GetFileWriter(outputFile))
                     {
                         fileWriter.Write(css);
                     }
-                    processedCssFiles.Add(file.Substring(0, file.Length - 5));
+                    processedCssFiles.Add(file + ".debug.css");
                 }
                 else
                 {


Tweak PropertyInfoExtensions documentation

--- src/Invio.Extensions.Reflection/PropertyInfoExtensions.cs
+++ src/Invio.Extensions.Reflection/PropertyInfoExtensions.cs
@@ -250,8 +250,6 @@

         /// <summary>
         ///   Return an efficient getter delegate for the specified property.
-        ///   The delegate is strongly compile-time typed for the base type
-        ///   on which the property is defined, but not for the property's type.
         /// </summary>
         /// <remarks>
         ///   While use of the returned delegate is efficient, construction


Stop using state under WorkspacesByTestId unsafely across threads

--- src/NUnit.TestAdapter.Tests.Acceptance/AcceptanceTests.cs
+++ src/NUnit.TestAdapter.Tests.Acceptance/AcceptanceTests.cs
@@ -70,9 +70,12 @@

             var workspace = Initialization.Value.manager.CreateWorkspace(test.Name);

-            if (!WorkspacesByTestId.TryGetValue(test.ID, out var workspaces))
-                WorkspacesByTestId.Add(test.ID, workspaces = new List<IsolatedWorkspace>());
-            workspaces.Add(workspace);
+            lock (WorkspacesByTestId)
+            {
+                if (!WorkspacesByTestId.TryGetValue(test.ID, out var workspaces))
+                    WorkspacesByTestId.Add(test.ID, workspaces = new List<IsolatedWorkspace>());
+                workspaces.Add(workspace);
+            }

             return workspace;
         }
@@ -87,21 +90,25 @@
         {
             var test = TestContext.CurrentContext?.Test ?? throw new InvalidOperationException("There is no current test.");

-            if (WorkspacesByTestId.TryGetValue(test.ID, out var workspaces))
+            List<IsolatedWorkspace> workspaces;
+            lock (WorkspacesByTestId)
             {
+                if (!WorkspacesByTestId.TryGetValue(test.ID, out workspaces))
+                    return;
+
                 WorkspacesByTestId.Remove(test.ID);
+            }

-                if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
-                {
-                    Initialization.Value.manager.PreserveDirectory(
-                        test.FullName + " failed:" + Environment.NewLine
-                        + TestContext.CurrentContext.Result.Message.TrimEnd() + Environment.NewLine);
-                }
-                else if (!Initialization.Value.keepWorkspaces)
-                {
-                    foreach (var workspace in workspaces)
-                        Utils.DeleteDirectoryRobust(workspace.Directory);
-                }
+            if (TestContext.CurrentContext.Result.Outcome.Status == TestStatus.Failed)
+            {
+                Initialization.Value.manager.PreserveDirectory(
+                    test.FullName + " failed:" + Environment.NewLine
+                    + TestContext.CurrentContext.Result.Message.TrimEnd() + Environment.NewLine);
+            }
+            else if (!Initialization.Value.keepWorkspaces)
+            {
+                foreach (var workspace in workspaces)
+                    Utils.DeleteDirectoryRobust(workspace.Directory);
             }
         }


Null check.

Null check.

--- src/Neptunium/Media/StationMediaPlayerAudioCoordinator.cs
+++ src/Neptunium/Media/StationMediaPlayerAudioCoordinator.cs
@@ -153,6 +153,8 @@

         private void UpdateNowPlaying(IMediaStreamer streamer, BasicSongInfo songInfo)
         {
+            if (songInfo == null) return;
+
             if (streamer != null)
             {
                 if (streamer.CurrentStation != null)
@@ -160,21 +162,16 @@

                 if (systemMediaTransportControls != null)
                 {
-                    try
-                    {
-
-                        systemMediaTransportControls.DisplayUpdater.Type = Windows.Media.MediaPlaybackType.Music;
-                        systemMediaTransportControls.DisplayUpdater.MusicProperties.Title = songInfo.Track;
-                        systemMediaTransportControls.DisplayUpdater.MusicProperties.Artist = songInfo.Artist;
-
-                        if (streamer.CurrentStation != null)
-                            if (!string.IsNullOrWhiteSpace(streamer.CurrentStation.Logo))
-                                systemMediaTransportControls.DisplayUpdater.Thumbnail =
-                                    RandomAccessStreamReference.CreateFromUri(new Uri(streamer.CurrentStation.Logo));
-
-                        systemMediaTransportControls.DisplayUpdater.Update();
-                    }
-                    catch (Exception) { }
+                    systemMediaTransportControls.DisplayUpdater.Type = Windows.Media.MediaPlaybackType.Music;
+                    systemMediaTransportControls.DisplayUpdater.MusicProperties.Title = songInfo.Track;
+                    systemMediaTransportControls.DisplayUpdater.MusicProperties.Artist = songInfo.Artist;
+
+                    if (streamer.CurrentStation != null)
+                        if (!string.IsNullOrWhiteSpace(streamer.CurrentStation.Logo))
+                            systemMediaTransportControls.DisplayUpdater.Thumbnail =
+                                RandomAccessStreamReference.CreateFromUri(new Uri(streamer.CurrentStation.Logo));
+
+                    systemMediaTransportControls.DisplayUpdater.Update();
                 }

                 metadataReceivedSub.OnNext(songInfo);


Add test for building with precise assembly version and no .git folder

Effectively repros #103

--- src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs
+++ src/NerdBank.GitVersioning.Tests/BuildIntegrationTests.cs
@@ -99,6 +99,22 @@
     }

     [Fact]
+    public async Task GetBuildVersion_Without_Git_HighPrecisionAssemblyVersion()
+    {
+        this.WriteVersionFile(new VersionOptions
+        {
+            Version = SemanticVersion.Parse("3.4"),
+            AssemblyVersion = new VersionOptions.AssemblyVersionOptions
+            {
+                Precision = VersionOptions.VersionPrecision.Revision,
+            },
+        });
+        var buildResult = await this.BuildAsync();
+        Assert.Equal("3.4", buildResult.BuildVersion);
+        Assert.Equal("3.4.0", buildResult.AssemblyInformationalVersion);
+    }
+
+    [Fact]
     public async Task GetBuildVersion_OutsideGit_PointingToGit()
     {
         // Write a version file to the 'virtualized' repo.


Fixing a unit test that was broken when menus started cropping empty sections

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045948

--- src/Orchard.Tests/UI/Navigation/NavigationManagerTests.cs
+++ src/Orchard.Tests/UI/Navigation/NavigationManagerTests.cs
@@ -20,7 +20,7 @@
         }

         public class StubAuth : IAuthorizationService {
-            public void CheckAccess(Permission permission, IUser user, IContent content) {
+            public void CheckAccess(Permission permission, IUser user, IContent content) {
             }

             public bool TryCheckAccess(Permission permission, IUser user, IContent content) {
@@ -65,7 +65,6 @@
             Assert.That(subitem1.Position, Is.EqualTo("1.a"));
             Assert.That(subitem2.Text, Is.EqualTo("Frap"));
             Assert.That(subitem2.Position, Is.EqualTo("1.b"));
-
         }

         public class StubProvider : INavigationProvider {
@@ -73,7 +72,7 @@

             public void GetNavigation(NavigationBuilder builder) {
                 builder
-                    .Add("Foo", "1.0")
+                    .Add("Foo", "1.0", x => x.Action("foo"))
                     .Add("Bar", "2.0", x => x.Add("Frap", "1.b"));
             }
         }
@@ -83,10 +82,9 @@

             public void GetNavigation(NavigationBuilder builder) {
                 builder
-                    .Add("Frap", "3.0")
+                    .Add("Frap", "3.0", x => x.Action("foo"))
                     .Add("Bar", "4.0", x => x.Add("Quad", "1.a"));
             }
         }
     }
-
 }


Remove unneeded newlines when stepping in debugger

This change removes a newline that was being written to the debug console
when the user steps through code in the debugger.  This newline was added
for the case where the debug prompt is written at each stop but was not
removed when this feature was temporarily taken out.  The newline will be
reinstated once we have an option for turning on the debugger prompt.

--- src/PowerShellEditorServices/Session/PowerShellContext.cs
+++ src/PowerShellEditorServices/Session/PowerShellContext.cs
@@ -1021,7 +1021,8 @@
                 if (taskIndex == 0)
                 {
                     // Write a new output line before continuing
-                    this.WriteOutput("", true);
+                    // TODO: Re-enable this with fix for #133
+                    //this.WriteOutput("", true);

                     e.ResumeAction = this.debuggerStoppedTask.Task.Result;
                     Logger.Write(LogLevel.Verbose, "Received debugger resume action " + e.ResumeAction.ToString());


Layout using the JS bundle

Layout using the JS bundle

--- src/SFA.DAS.EmployerUsers.Web/Views/Shared/_Layout.cshtml
+++ src/SFA.DAS.EmployerUsers.Web/Views/Shared/_Layout.cshtml
@@ -117,9 +117,7 @@
         </div>
     </footer>

-    @Scripts.Render("~/bundles/jquery")
-    @Scripts.Render("~/bundles/scripts")
-    @RenderSection("scripts", required: false)
+    @Scripts.Render("~/bundles/sfajs")

 </body>
 </html>


Quarantine LogsStartupExceptionExitError (#38733)

https://github.com/dotnet/aspnetcore/issues/38732

--- src/Servers/IIS/IIS/test/Common.LongTests/StartupTests.cs
+++ src/Servers/IIS/IIS/test/Common.LongTests/StartupTests.cs
@@ -245,6 +245,7 @@
     }

     [ConditionalFact]
+    [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/38732")]
     public async Task LogsStartupExceptionExitError()
     {
         var deploymentParameters = Fixture.GetBaseDeploymentParameters(Fixture.InProcessTestSite);


fix broken build

fix broken build

--- src/ServiceStack/WebHost.EndPoints/Support/SoapHandler.cs
+++ src/ServiceStack/WebHost.EndPoints/Support/SoapHandler.cs
@@ -66,11 +66,11 @@
 						: null;
 				}

-				if (EndpointHost.ApplyRequestFilters(httpReq, httpRes, request)) return;
+				if (EndpointHost.ApplyRequestFilters(httpReq, httpRes, request)) return null;

 				var response = ExecuteService(request, endpointAttributes, null);

-				if (EndpointHost.ApplyResponseFilters(httpReq, httpRes, response)) return;
+				if (EndpointHost.ApplyResponseFilters(httpReq, httpRes, response)) return null;

 				return requestMsg.Headers.Action == null
 					? Message.CreateMessage(requestMsg.Version, null, response)


issue 2573 fixed

issue 2573 fixed

--- src/CommandLine/Common/ProjectHelper.cs
+++ src/CommandLine/Common/ProjectHelper.cs
@@ -13,7 +13,8 @@
             ".fsproj",
             ".btproj",
             ".vcxproj",
-            ".jsproj"
+            ".jsproj",
+            ".wixproj"
         };

         public static HashSet<string> SupportedProjectExtensions


fix(CommsHomepage): Allow call to action banner to be optional

--- src/StockportWebapp/Views/stockportgov/Comms/Index.cshtml
+++ src/StockportWebapp/Views/stockportgov/Comms/Index.cshtml
@@ -17,13 +17,16 @@

@Model.Homepage.Title

-
-

-
@Model.Homepage.CallToActionBanner.Title

-
@Model.Homepage.CallToActionBanner.ButtonText

-

-
-
+    @if (Model.Homepage.CallToActionBanner != null)
+    {
+
+

+
@Model.Homepage.CallToActionBanner.Title

+
@Model.Homepage.CallToActionBanner.ButtonText

+

+
+
+    }


The directive name "font-src" was accidentally re-used for the "form-action" directive, leading to a duplicate font-src and no form-action directives in the header output.

--- src/ContentSecurityPolicy/CspOptions.cs
+++ src/ContentSecurityPolicy/CspOptions.cs
@@ -4,224 +4,222 @@

 namespace PeterJuhasz.AspNetCore.Extensions.Security
 {
-    public class CspOptions
-    {
-        /// <summary>
-        /// The base-uri directive restricts the URLs which can be used in a document's <base> element. If this value is absent, then any URI is allowed. If this directive is absent, the user agent will use the value in the <base> element.
-        /// </summary>
-        public CspDirective BaseUri { get; set; }
-
-        /// <summary>
-        /// Serves as a fallback for the other fetch directives.
-        /// </summary>
-        public CspDirective DefaultSrc { get; set; } = CspDirective.None;
-
-        /// <summary>
-        /// Specifies valid sources for stylesheets.
-        /// </summary>
-        public StyleCspDirective StyleSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for JavaScript.
-        /// </summary>
-        public ScriptCspDirective ScriptSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources of images and favicons
-        /// </summary>
-        public CspDirective ImgSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for fonts loaded using @font-face.
-        /// </summary>
-        public CspDirective FontSrc { get; set; }
-
-        /// <summary>
-        /// Restricts the URLs which can be loaded using script interfaces.
-        /// </summary>
-        public CspDirective ConnectSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for the <object>, <embed>, and <applet> elements.
-        /// </summary>
-        public CspDirective ObjectSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for loading media using the <audio> and <video> elements.
-        /// </summary>
-        public CspDirective MediaSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources of application manifest files.
-        /// </summary>
-        public CspDirective ManifestSrc { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for nested browsing contexts loading using elements such as <frame> and <iframe>.
-        /// </summary>
-        public CspDirective FrameSrc { get; set; }
-
-        /// <summary>
-        /// Defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>.
-        /// </summary>
-        public CspDirective ChildSrc { get; set; }
-
-        /// <summary>
-        /// Restricts the URLs which can be used as the target of a form submissions from a given context.
-        /// </summary>
-        public CspDirective FormAction { get; set; }
-
-        /// <summary>
-        /// Specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>.
-        /// </summary>
-        public CspDirective FrameAncestors { get; set; }
-
-        /// <summary>
-        /// Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts.
-        /// </summary>
-        public CspDirective WorkerSrc { get; set; }
-
-        /// <summary>
-        /// Restricts the URLs to which a document can navigate by any means (a, form, window.location, window.open, etc.).
-        /// </summary>
-        public CspDirective NavigationTo { get; set; }
-
-        /// <summary>
-        /// Enables a sandbox for the requested resource similar to the <iframe> sandbox attribute.
-        /// </summary>
-        public CspSandboxRules? Sandbox { get; set; }
-
-        /// <summary>
-        /// Restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
-        /// </summary>
-        public IReadOnlyCollection<string> PluginTypes { get; set; }
-
-        /// <summary>
-        /// Requires the use of SRI for scripts or styles on the page.
-        /// </summary>
-        public CspRequireSRIResources? RequireSriFor { get; set; }
-
-        /// <summary>
-        /// Instructs a user agent to activate or deactivate any heuristics used to filter or block reflected cross-site scripting attacks, equivalent to the effects of the non-standard X-XSS-Protection header.
-        /// </summary>
-        public CspReflectedXss? ReflectedXss { get; set; } = CspReflectedXss.Block;
-
-        /// <summary>
-        /// The upgrade-insecure-requests directive instructs user agents to treat all of a site's insecure URLs (those served over HTTP) as though they have been replaced with secure URLs (those served over HTTPS).
-        /// </summary>
-        public bool UpgradeInsecureRequests { get; set; } = true;
-
-        /// <summary>
-        /// The block-all-mixed-content directive prevents loading any assets using HTTP when the page is loaded using HTTPS.
-        /// </summary>
-        public bool BlockAllMixedContent { get; set; } = true;
-
-        [Obsolete]
-        public Uri ReportUri { get; set; }
-
-
-        public CspOptions Clone()
-        {
-            return new CspOptions
-            {
-                BaseUri = this.BaseUri,
-                BlockAllMixedContent = this.BlockAllMixedContent,
-                ChildSrc = this.ChildSrc,
-                ConnectSrc = this.ConnectSrc,
-                DefaultSrc = this.DefaultSrc,
-                FontSrc = this.FontSrc,
-                FormAction = this.FormAction,
-                FrameAncestors = this.FrameAncestors,
-                FrameSrc = this.FrameSrc,
-                ImgSrc = this.ImgSrc,
-                ManifestSrc = this.ManifestSrc,
-                MediaSrc = this.MediaSrc,
-                NavigationTo = this.NavigationTo,
-                ObjectSrc = this.ObjectSrc,
-                PluginTypes = this.PluginTypes,
-                ReflectedXss = this.ReflectedXss,
-                RequireSriFor = this.RequireSriFor,
-                Sandbox = this.Sandbox,
-                ScriptSrc = this.ScriptSrc,
-                StyleSrc = this.StyleSrc,
-                UpgradeInsecureRequests = this.UpgradeInsecureRequests,
-                WorkerSrc = this.WorkerSrc,
+	public class CspOptions
+	{
+		/// <summary>
+		/// The base-uri directive restricts the URLs which can be used in a document's <base> element. If this value is absent, then any URI is allowed. If this directive is absent, the user agent will use the value in the <base> element.
+		/// </summary>
+		public CspDirective BaseUri { get; set; }
+
+		/// <summary>
+		/// Serves as a fallback for the other fetch directives.
+		/// </summary>
+		public CspDirective DefaultSrc { get; set; } = CspDirective.None;
+
+		/// <summary>
+		/// Specifies valid sources for stylesheets.
+		/// </summary>
+		public StyleCspDirective StyleSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for JavaScript.
+		/// </summary>
+		public ScriptCspDirective ScriptSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources of images and favicons
+		/// </summary>
+		public CspDirective ImgSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for fonts loaded using @font-face.
+		/// </summary>
+		public CspDirective FontSrc { get; set; }
+
+		/// <summary>
+		/// Restricts the URLs which can be loaded using script interfaces.
+		/// </summary>
+		public CspDirective ConnectSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for the <object>, <embed>, and <applet> elements.
+		/// </summary>
+		public CspDirective ObjectSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for loading media using the <audio> and <video> elements.
+		/// </summary>
+		public CspDirective MediaSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources of application manifest files.
+		/// </summary>
+		public CspDirective ManifestSrc { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for nested browsing contexts loading using elements such as <frame> and <iframe>.
+		/// </summary>
+		public CspDirective FrameSrc { get; set; }
+
+		/// <summary>
+		/// Defines the valid sources for web workers and nested browsing contexts loaded using elements such as <frame> and <iframe>.
+		/// </summary>
+		public CspDirective ChildSrc { get; set; }
+
+		/// <summary>
+		/// Restricts the URLs which can be used as the target of a form submissions from a given context.
+		/// </summary>
+		public CspDirective FormAction { get; set; }
+
+		/// <summary>
+		/// Specifies valid parents that may embed a page using <frame>, <iframe>, <object>, <embed>, or <applet>.
+		/// </summary>
+		public CspDirective FrameAncestors { get; set; }
+
+		/// <summary>
+		/// Specifies valid sources for Worker, SharedWorker, or ServiceWorker scripts.
+		/// </summary>
+		public CspDirective WorkerSrc { get; set; }
+
+		/// <summary>
+		/// Restricts the URLs to which a document can navigate by any means (a, form, window.location, window.open, etc.).
+		/// </summary>
+		public CspDirective NavigationTo { get; set; }
+
+		/// <summary>
+		/// Enables a sandbox for the requested resource similar to the <iframe> sandbox attribute.
+		/// </summary>
+		public CspSandboxRules? Sandbox { get; set; }
+
+		/// <summary>
+		/// Restricts the set of plugins that can be embedded into a document by limiting the types of resources which can be loaded.
+		/// </summary>
+		public IReadOnlyCollection<string> PluginTypes { get; set; }
+
+		/// <summary>
+		/// Requires the use of SRI for scripts or styles on the page.
+		/// </summary>
+		public CspRequireSRIResources? RequireSriFor { get; set; }
+
+		/// <summary>
+		/// Instructs a user agent to activate or deactivate any heuristics used to filter or block reflected cross-site scripting attacks, equivalent to the effects of the non-standard X-XSS-Protection header.
+		/// </summary>
+		public CspReflectedXss? ReflectedXss { get; set; } = CspReflectedXss.Block;
+
+		/// <summary>
+		/// The upgrade-insecure-requests directive instructs user agents to treat all of a site's insecure URLs (those served over HTTP) as though they have been replaced with secure URLs (those served over HTTPS).
+		/// </summary>
+		public bool UpgradeInsecureRequests { get; set; } = true;
+
+		/// <summary>
+		/// The block-all-mixed-content directive prevents loading any assets using HTTP when the page is loaded using HTTPS.
+		/// </summary>
+		public bool BlockAllMixedContent { get; set; } = true;
+
+		[Obsolete]
+		public Uri ReportUri { get; set; }
+
+		public CspOptions Clone()
+		{
+			return new CspOptions
+			{
+				BaseUri = this.BaseUri,
+				BlockAllMixedContent = this.BlockAllMixedContent,
+				ChildSrc = this.ChildSrc,
+				ConnectSrc = this.ConnectSrc,
+				DefaultSrc = this.DefaultSrc,
+				FontSrc = this.FontSrc,
+				FormAction = this.FormAction,
+				FrameAncestors = this.FrameAncestors,
+				FrameSrc = this.FrameSrc,
+				ImgSrc = this.ImgSrc,
+				ManifestSrc = this.ManifestSrc,
+				MediaSrc = this.MediaSrc,
+				NavigationTo = this.NavigationTo,
+				ObjectSrc = this.ObjectSrc,
+				PluginTypes = this.PluginTypes,
+				ReflectedXss = this.ReflectedXss,
+				RequireSriFor = this.RequireSriFor,
+				Sandbox = this.Sandbox,
+				ScriptSrc = this.ScriptSrc,
+				StyleSrc = this.StyleSrc,
+				UpgradeInsecureRequests = this.UpgradeInsecureRequests,
+				WorkerSrc = this.WorkerSrc,
 #pragma warning disable CS0612
-                ReportUri = this.ReportUri,
+				ReportUri = this.ReportUri,
 #pragma warning restore CS0612
-            };
-        }
-
-
-        public override string ToString()
-        {
-            ICollection<string> directives = new List<string>();
-
-            if (this.DefaultSrc != null) directives.Add($"default-src {this.DefaultSrc}");
-            if (this.BaseUri != null) directives.Add($"base-uri {this.BaseUri}");
-            if (this.ChildSrc != null) directives.Add($"child-src {this.ChildSrc}");
-            if (this.ConnectSrc != null) directives.Add($"connect-src {this.ConnectSrc}");
-            if (this.FontSrc != null) directives.Add($"font-src {this.FontSrc}");
-            if (this.FormAction != null) directives.Add($"font-src {this.FormAction}");
-            if (this.FrameAncestors != null) directives.Add($"frame-ancestors {this.FrameAncestors}");
-            if (this.FrameSrc != null) directives.Add($"frame-src {this.FrameSrc}");
-            if (this.ImgSrc != null) directives.Add($"img-src {this.ImgSrc}");
-            if (this.ManifestSrc != null) directives.Add($"manifest-src {this.ManifestSrc}");
-            if (this.MediaSrc != null) directives.Add($"media-src {this.MediaSrc}");
-            if (this.NavigationTo != null) directives.Add($"navigation-to {this.NavigationTo}");
-            if (this.ObjectSrc != null) directives.Add($"object-src {this.ObjectSrc}");
-            if (this.ScriptSrc != null) directives.Add($"script-src {this.ScriptSrc}");
-            if (this.StyleSrc != null) directives.Add($"style-src {this.StyleSrc}");
-            if (this.WorkerSrc != null) directives.Add($"worker-src {this.WorkerSrc}");
-
-            if (this.BlockAllMixedContent) directives.Add("block-all-mixed-content");
-            if (this.UpgradeInsecureRequests) directives.Add("upgrade-insecure-requests");
-            if (this.ReflectedXss != null) directives.Add(ConstructHeaderValue(this.ReflectedXss.Value));
-            if (this.PluginTypes?.Any() ?? false) directives.Add($"plugin-types {String.Join(" ", this.PluginTypes)}");
-            if (this.RequireSriFor != null) directives.Add(ConstructHeaderValue(this.RequireSriFor.Value));
-            if (this.Sandbox != null) directives.Add(ConstructHeaderValue(this.Sandbox.Value));
+			};
+		}
+
+		public override string ToString()
+		{
+			ICollection<string> directives = new List<string>();
+
+			if (this.DefaultSrc != null) directives.Add($"default-src {this.DefaultSrc}");
+			if (this.BaseUri != null) directives.Add($"base-uri {this.BaseUri}");
+			if (this.ChildSrc != null) directives.Add($"child-src {this.ChildSrc}");
+			if (this.ConnectSrc != null) directives.Add($"connect-src {this.ConnectSrc}");
+			if (this.FontSrc != null) directives.Add($"font-src {this.FontSrc}");
+			if (this.FormAction != null) directives.Add($"form-action {this.FormAction}");
+			if (this.FrameAncestors != null) directives.Add($"frame-ancestors {this.FrameAncestors}");
+			if (this.FrameSrc != null) directives.Add($"frame-src {this.FrameSrc}");
+			if (this.ImgSrc != null) directives.Add($"img-src {this.ImgSrc}");
+			if (this.ManifestSrc != null) directives.Add($"manifest-src {this.ManifestSrc}");
+			if (this.MediaSrc != null) directives.Add($"media-src {this.MediaSrc}");
+			if (this.NavigationTo != null) directives.Add($"navigation-to {this.NavigationTo}");
+			if (this.ObjectSrc != null) directives.Add($"object-src {this.ObjectSrc}");
+			if (this.ScriptSrc != null) directives.Add($"script-src {this.ScriptSrc}");
+			if (this.StyleSrc != null) directives.Add($"style-src {this.StyleSrc}");
+			if (this.WorkerSrc != null) directives.Add($"worker-src {this.WorkerSrc}");
+
+			if (this.BlockAllMixedContent) directives.Add("block-all-mixed-content");
+			if (this.UpgradeInsecureRequests) directives.Add("upgrade-insecure-requests");
+			if (this.ReflectedXss != null) directives.Add(ConstructHeaderValue(this.ReflectedXss.Value));
+			if (this.PluginTypes?.Any() ?? false) directives.Add($"plugin-types {String.Join(" ", this.PluginTypes)}");
+			if (this.RequireSriFor != null) directives.Add(ConstructHeaderValue(this.RequireSriFor.Value));
+			if (this.Sandbox != null) directives.Add(ConstructHeaderValue(this.Sandbox.Value));

 #pragma warning disable CS0612
-            if (this.ReportUri != null) directives.Add($"report-uri {this.ReportUri}");
+			if (this.ReportUri != null) directives.Add($"report-uri {this.ReportUri}");
 #pragma warning restore CS0612

-            return String.Join("; ", directives);
-        }
-
-        internal static string ConstructHeaderValue(CspReflectedXss value)
-        {
-            return $"reflected-xss {value.ToString().ToLowerInvariant()}";
-        }
-
-        internal static string ConstructHeaderValue(CspRequireSRIResources values)
-        {
-            ICollection<string> tokens = new List<string>();
-
-            if (values.HasFlag(CspRequireSRIResources.Style)) tokens.Add("style");
-            if (values.HasFlag(CspRequireSRIResources.Script)) tokens.Add("script");
-
-            return $"require-sri-for {String.Join(" ", tokens)}";
-        }
-
-        internal static string ConstructHeaderValue(CspSandboxRules values)
-        {
-            if (values == CspSandboxRules.Sandbox)
-                return "sandbox";
-
-            ICollection<string> tokens = new List<string>();
-
-            if (values.HasFlag(CspSandboxRules.AllowForms)) tokens.Add("allow-forms");
-            if (values.HasFlag(CspSandboxRules.AllowModals)) tokens.Add("allow-modals");
-            if (values.HasFlag(CspSandboxRules.AllowOrientationLock)) tokens.Add("allow-orientation-lock");
-            if (values.HasFlag(CspSandboxRules.AllowPointerLock)) tokens.Add("allow-pointer-lock");
-            if (values.HasFlag(CspSandboxRules.AllowPopups)) tokens.Add("allow-popups");
-            if (values.HasFlag(CspSandboxRules.AllowPopupsToEscapeSandbox)) tokens.Add("allow-popups-to-escape-sandbox");
-            if (values.HasFlag(CspSandboxRules.AllowPresentation)) tokens.Add("allow-presentation");
-            if (values.HasFlag(CspSandboxRules.AllowSameOrigin)) tokens.Add("allow-same-origin");
-            if (values.HasFlag(CspSandboxRules.AllowScripts)) tokens.Add("allow-scripts");
-            if (values.HasFlag(CspSandboxRules.AllowTopNavigation)) tokens.Add("allow-top-navigation");
-
-            return $"sandbox {String.Join(" ", tokens)}";
-        }
-    }
+			return String.Join("; ", directives);
+		}
+
+		internal static string ConstructHeaderValue(CspReflectedXss value)
+		{
+			return $"reflected-xss {value.ToString().ToLowerInvariant()}";
+		}
+
+		internal static string ConstructHeaderValue(CspRequireSRIResources values)
+		{
+			ICollection<string> tokens = new List<string>();
+
+			if (values.HasFlag(CspRequireSRIResources.Style)) tokens.Add("style");
+			if (values.HasFlag(CspRequireSRIResources.Script)) tokens.Add("script");
+
+			return $"require-sri-for {String.Join(" ", tokens)}";
+		}
+
+		internal static string ConstructHeaderValue(CspSandboxRules values)
+		{
+			if (values == CspSandboxRules.Sandbox)
+				return "sandbox";
+
+			ICollection<string> tokens = new List<string>();
+
+			if (values.HasFlag(CspSandboxRules.AllowForms)) tokens.Add("allow-forms");
+			if (values.HasFlag(CspSandboxRules.AllowModals)) tokens.Add("allow-modals");
+			if (values.HasFlag(CspSandboxRules.AllowOrientationLock)) tokens.Add("allow-orientation-lock");
+			if (values.HasFlag(CspSandboxRules.AllowPointerLock)) tokens.Add("allow-pointer-lock");
+			if (values.HasFlag(CspSandboxRules.AllowPopups)) tokens.Add("allow-popups");
+			if (values.HasFlag(CspSandboxRules.AllowPopupsToEscapeSandbox)) tokens.Add("allow-popups-to-escape-sandbox");
+			if (values.HasFlag(CspSandboxRules.AllowPresentation)) tokens.Add("allow-presentation");
+			if (values.HasFlag(CspSandboxRules.AllowSameOrigin)) tokens.Add("allow-same-origin");
+			if (values.HasFlag(CspSandboxRules.AllowScripts)) tokens.Add("allow-scripts");
+			if (values.HasFlag(CspSandboxRules.AllowTopNavigation)) tokens.Add("allow-top-navigation");
+
+			return $"sandbox {String.Join(" ", tokens)}";
+		}
+	}
 }