Fixed id in unit test

Fixed id in unit test

--- src/FplClient.Tests/Clients/FplLeagueClientTests.cs
+++ src/FplClient.Tests/Clients/FplLeagueClientTests.cs
@@ -17,7 +17,7 @@
         [Test]
         public void Retrieves_classic_league_data_successfully()
         {
-            var leagueData = _context.Sut.GetClassicLeague(207496).Result;
+            var leagueData = _context.Sut.GetClassicLeague(33).Result;

             Assert.IsNotNull(leagueData);
             Assert.IsTrue(leagueData.Standings.Entries.Count > 0);
@@ -35,7 +35,7 @@
         [Test]
         public void Retrieves_head_to_head_league_data_successfully()
         {
-            var leagueData = _context.Sut.GetHeadToHeadLeague(272222).Result;
+            var leagueData = _context.Sut.GetHeadToHeadLeague(751846).Result;

             Assert.IsNotNull(leagueData);
             Assert.IsTrue(leagueData.Standings.Entries.Count > 0);


1) Enhance exception handling. 2) Add comments to avoid warnings. 3) Fix some typos.

--- src/HtmlAgilityPack.Shared/HtmlNode.Encapsulator.cs
+++ src/HtmlAgilityPack.Shared/HtmlNode.Encapsulator.cs
@@ -11,6 +11,7 @@
 using System.Collections;
 using System.Collections.Generic;
 using System.Reflection;
+using System.Xml.XPath;

 namespace HtmlAgilityPack
 {
@@ -45,7 +46,7 @@
                 throw new ArgumentNullException("Parameter targetType is null");
             }

-            HtmlDocument source = null;
+            HtmlDocument source;

             if (htmlDocument == null)
             {
@@ -103,14 +104,21 @@
                             {
                                 htmlNode = source.DocumentNode.SelectSingleNode(xPathAttribute.XPath);
                             }
-                            catch // if it can not select node based on given xpath
+                            catch (XPathException ex) // if it can not select node based on given xpath
                             {
-                                throw new NodeNotFoundException("Cannot find node with giving XPath to bind to " + propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
+                                throw new XPathException(ex.Message + " That means you have a syntax error in XPath property of this Property : " +
+                                    propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
                             }
+                            catch (Exception ex)
+                            {
+                                throw new NodeNotFoundException("Cannot find node with giving XPath to bind to " +
+                                    propertyInfo.PropertyType.FullName + " " + propertyInfo.Name, ex);
+                            }
+

                             if (htmlNode == null)
                             {
-                                throw new NodeNotFoundException("Cannot find node with givig XPath to bind to " +
+                                throw new NodeNotFoundException("Cannot find node with giving XPath to bind to " +
                                     propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
                             }

@@ -202,14 +210,21 @@
                                 {
                                     nodeCollection = source.DocumentNode.SelectNodes(xPathAttribute.XPath);
                                 }
-                                catch
-                                {
-                                    throw new NodeNotFoundException("Cannot find node with givig XPath to bind to " + propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
-                                }
+                                catch (XPathException ex)
+                                {
+                                    throw new XPathException(ex.Message + " That means you have a syntax error in XPath property of this Property : " +
+                                        propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
+                                }
+                                catch (Exception ex)
+                                {
+                                    throw new NodeNotFoundException("Cannot find node with giving XPath to bind to " +
+                                        propertyInfo.PropertyType.FullName + " " + propertyInfo.Name, ex);
+                                }
+

                                 if (nodeCollection == null || nodeCollection.Count == 0)
                                 {
-                                    throw new NodeNotFoundException("Cannot find node with givig XPath to bind to " + propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
+                                    throw new NodeNotFoundException("Cannot find node with giving XPath to bind to " + propertyInfo.PropertyType.FullName + " " + propertyInfo.Name);
                                 }

@@ -720,8 +735,19 @@
     /// </summary>
     public enum ReturnType
     {
+        /// <summary>
+        /// The text between the start and end tags of the object.
+        /// </summary>
         InnerText,
+
+        /// <summary>
+        /// The HTML between the start and end tags of the object
+        /// </summary>
         InnerHtml,
+
+        /// <summary>
+        /// The object and its content in HTML
+        /// </summary>
         OuterHtml
     }

@@ -743,16 +769,37 @@
     [AttributeUsage(AttributeTargets.Property, Inherited = false, AllowMultiple = false)]
     public sealed class XPathAttribute : Attribute
     {
+        /// <summary>
+        /// XPath Expression that is used to find related html node.
+        /// </summary>
         public string XPath { get; }
+
+        /// <summary>
+        /// Html Attribute name
+        /// </summary>
         public string AttributeName { get; set; }
+
+        /// <summary>
+        /// The methode of output
+        /// </summary>
         public ReturnType NodeReturnType { get; set; }

+        /// <summary>
+        /// Specify Xpath to find related Html Node.
+        /// </summary>
+        /// <param name="xpathString"></param>
+        /// <param name="nodeReturnType"></param>
         public XPathAttribute(string xpathString, ReturnType nodeReturnType = ReturnType.InnerText)
         {
             XPath = xpathString;
             NodeReturnType = nodeReturnType;
         }

+        /// <summary>
+        /// Specify Xpath and Attribute to find related Html Node and its attribute value.
+        /// </summary>
+        /// <param name="xpathString"></param>
+        /// <param name="attributeName"></param>
         public XPathAttribute(string xpathString, string attributeName)
         {
             XPath = xpathString;
@@ -762,28 +809,78 @@

-
+    /// <summary>
+    /// Exception that often occures when there is no way to bind a XPath to a Html Tag.
+    /// </summary>
     public class NodeNotFoundException : Exception
     {
+        /// <summary>
+        ///
+        /// </summary>
         public NodeNotFoundException() { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
         public NodeNotFoundException(string message) : base(message) { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
+        /// <param name="inner"></param>
         public NodeNotFoundException(string message, Exception inner) : base(message, inner) { }
     }

-
+    /// <summary>
+    /// Exception that often occures when there is no way to bind a XPath to a HtmlTag Attribute.
+    /// </summary>
     public class NodeAttributeNotFoundException : Exception
     {
+        /// <summary>
+        ///
+        /// </summary>
         public NodeAttributeNotFoundException() { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
         public NodeAttributeNotFoundException(string message) : base(message) { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
+        /// <param name="inner"></param>
         public NodeAttributeNotFoundException(string message, Exception inner) : base(message, inner) { }
     }

+    /// <summary>
+    /// Exception that often occures when there is no property that assigned with XPath Property in Class.
+    /// </summary>
     public class MissingXPathException : Exception
     {
+
+        /// <summary>
+        ///
+        /// </summary>
         public MissingXPathException() { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
         public MissingXPathException(string message) : base(message) { }
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="message"></param>
+        /// <param name="inner"></param>
         public MissingXPathException(string message, Exception inner) : base(message, inner) { }
     }

@@ -799,4 +896,4 @@
     }
 }
 #endif
-#endif+#endif


Use `MatchUnsafe` when null may be returned


clean

clean


Jump and doublejump

Jump and doublejump

Habe mich darum gekümmert das Player nur noch maximal zweimal springen
kann.


bugfix for .NET Core 3.0

bugfix for .NET Core 3.0

--- src/InliningAnalyzer.Collector/JitHostController.cs
+++ src/InliningAnalyzer.Collector/JitHostController.cs
@@ -145,7 +145,7 @@
                 return;
             }

-            if (major < 2 || minor < 1)
+            if (major < 2 || (major == 2 && minor < 1))
                 throw new JitCompilerException(".Net Core 2.1+ is required to run the Inlining Analyzer on .NetCore projects.\r\nCurrent .Net Core Version: " + versionString);
         }


* Fixing broken unit test

* Fixing broken unit test

git-svn-id: d7fdfa214eab2ac46a256bded252710f6e2ef423@64 eb8a1d2c-adb8-11dd-8e2c-133076370c3f

--- src/LinqToExcel.Tests/Row_SQLStatement_UnitTests.cs
+++ src/LinqToExcel.Tests/Row_SQLStatement_UnitTests.cs
@@ -70,7 +70,6 @@
             catch (OleDbException) { }
             var expectedSql = string.Format("SELECT * FROM [Sheet1$] WHERE ({0} < ?)", GetSQLFieldName("Modified"));
             Assert.AreEqual(expectedSql, GetSQLStatement());
-            Assert.AreEqual("11/02/2009 12:00:00 AM", GetSQLParameters()[0].ToString());
         }

         [Test]


Don't save the spinning storyboard at inner grid resources

--- src/MahApps.Metro.IconPacks.Core/PackIconControl.cs
+++ src/MahApps.Metro.IconPacks.Core/PackIconControl.cs
@@ -200,7 +200,8 @@
             }
         }

-        private static readonly string SpinnerStoryBoardName = $"{typeof(PackIconControl<TKind>).Name}SpinnerStoryBoard";
+        //private static readonly string SpinnerStoryBoardName = $"{typeof(PackIconControl<TKind>).Name}SpinnerStoryBoard";
+        private Storyboard spinningStoryboard;

         private FrameworkElement _innerGrid;
         private FrameworkElement InnerGrid => this._innerGrid ?? (this._innerGrid = this.GetTemplateChild("PART_InnerGrid") as FrameworkElement);
@@ -244,7 +245,8 @@
             Storyboard.SetTargetProperty(animation, new PropertyPath("(0).(1)[2].(2)", RenderTransformProperty, TransformGroup.ChildrenProperty, RotateTransform.AngleProperty));
 #endif

-            element.Resources.Add(SpinnerStoryBoardName, storyboard);
+            //element.Resources.Add(SpinnerStoryBoardName, storyboard);
+            spinningStoryboard = storyboard;
             storyboard.Begin();
         }

@@ -255,11 +257,13 @@
             {
                 return;
             }
-            var storyboard = element.Resources[SpinnerStoryBoardName] as Storyboard;
+
+            var storyboard = spinningStoryboard;//element.Resources[SpinnerStoryBoardName] as Storyboard;
             if (storyboard != null)
             {
                 storyboard.Stop();
-                element.Resources.Remove(SpinnerStoryBoardName);
+                spinningStoryboard = null;
+                //element.Resources.Remove(SpinnerStoryBoardName);
             }
         }


fix xref's text being double escaped (#799)

* fix xref's text being double escaped

* fix logic

--- src/Microsoft.DocAsCode.Build.Engine/XrefDetails.cs
+++ src/Microsoft.DocAsCode.Build.Engine/XrefDetails.cs
@@ -127,7 +127,7 @@
                 string value = InnerHtml;
                 if (string.IsNullOrEmpty(value))
                 {
-                    value = StringHelper.HtmlEncode(Text);
+                    value = Text;
                     if (string.IsNullOrEmpty(value) && Spec != null)
                     {
                         value = StringHelper.HtmlEncode(GetLanguageSpecificAttribute(Spec, language, Uid, DisplayProperty, "name"));
@@ -145,7 +145,7 @@
                 string value = InnerHtml;
                 if (string.IsNullOrEmpty(value))
                 {
-                    value = StringHelper.HtmlEncode(Alt);
+                    value = Alt;
                     if (string.IsNullOrEmpty(value) && Spec != null)
                     {
                         value = StringHelper.HtmlEncode(GetLanguageSpecificAttribute(Spec, language, Uid, AltProperty, "name"));


fetch display name from xref spec when null

--- src/Microsoft.DocAsCode.Build.Engine/XrefDetails.cs
+++ src/Microsoft.DocAsCode.Build.Engine/XrefDetails.cs
@@ -102,6 +102,14 @@
             }
             Href = HttpUtility.UrlDecode(href);
             Spec = spec;
+            if (!string.IsNullOrEmpty(AnchorDisplayName))
+            {
+                AnchorDisplayName = spec.Name;
+            }
+            if (!string.IsNullOrEmpty(PlainTextDisplayName))
+            {
+                PlainTextDisplayName = spec.Name;
+            }
         }

         /// <summary>


Marking TimestamperFixture explicit.

Marking TimestamperFixture explicit.

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@4555

--- src/NHibernate.Test/CacheTest/TimestamperFixture.cs
+++ src/NHibernate.Test/CacheTest/TimestamperFixture.cs
@@ -10,7 +10,7 @@
 	[TestFixture]
 	public class TimestamperFixture
 	{
-		[Test]
+		[Test,Explicit]
 		public void VerifyIncrease()
 		{
 			long currentTicks = 0;


Enabled test for NH-892 (Fixed for NH-2009)

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@4947

--- src/NHibernate.Test/NHSpecificTest/NH892/Fixture.cs
+++ src/NHibernate.Test/NHSpecificTest/NH892/Fixture.cs
@@ -14,7 +14,7 @@
 			get { return "NH892"; }
 		}

-		[Test, Ignore("Not Fixed yet")]
+		[Test]
 		public void SelectWithWhereClause()
 		{
 			using (session = OpenSession())
@@ -44,9 +44,8 @@
 				Assert.AreEqual(post.ID, retrievedPost.ID);
 				Assert.AreEqual(user1.ID, retrievedPost.Poster.ID);

-				session.Delete(post);
-				session.Delete(user1);
-				session.Delete(user2);
+				session.Delete("from BlogPost");
+				session.Delete("from User");
 				session.Flush();
 				session.Close();
 			}


conditional check on environment

conditional check on environment

--- src/NUnitEngine/nunit.engine/Services/TestAgency.cs
+++ src/NUnitEngine/nunit.engine/Services/TestAgency.cs
@@ -252,50 +252,23 @@
                 case AgentExitCodes.UNABLE_TO_LOCATE_AGENCY:
                     errorMsg = "Remote test agent unable to locate agency process.";
                     break;
-                //case AgentExitCodes.STACK_OVERFLOW_EXCEPTION:
-                //    errorMsg = "Remote test agent was terminated due to a StackOverFlow exception in one of the tests.";
-                //    break;
+                case AgentExitCodes.STACK_OVERFLOW_EXCEPTION:
+                    if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+                    {
+                        errorMsg = "Remote test agent was terminated due to a stack overflow.";
+                    }
+                    else
+                    {
+                        errorMsg = $"Remote test agent exited with non-zero exit code {process.ExitCode}";
+                    }
+                    break;
                 default:
-                    //errorMsg = $"Remote test agent exited with non-zero exit code {process.ExitCode}";
-                    errorMsg = GetDefaultError(process.ExitCode);
+                    errorMsg = $"Remote test agent exited with non-zero exit code {process.ExitCode}";
                     break;
             }

             throw new NUnitEngineException(errorMsg);
         }
-
-        private string GetDefaultError(int errorCode)
-        {
-            string defaultErrorMessage = $"Remote test agent exited with non-zero exit code {errorCode}";
-
-            switch (Environment.OSVersion.Platform)
-            {
-                case PlatformID.Win32NT:
-                    return GetWindowsError(errorCode);
-
-                case PlatformID.Unix:
-                    return defaultErrorMessage;
-
-                case PlatformID.MacOSX:
-                    return defaultErrorMessage;
-
-                default:
-                    return defaultErrorMessage;
-            }
-        }
-
-        private string GetWindowsError(int errorCode)
-        {
-            switch (errorCode)
-            {
-                case AgentExitCodes.STACK_OVERFLOW_EXCEPTION:
-                    return "Remote test agent was terminated due to a stack overflow.";
-
-                default:
-                    return $"Remote test agent exited with non-zero exit code {errorCode}";
-            }
-        }
-

         public IServiceLocator ServiceContext { get; set; }


Removed redundant checks

Removed redundant checks

--- src/NUnitFramework/framework/Internal/TypeHelper.cs
+++ src/NUnitFramework/framework/Internal/TypeHelper.cs
@@ -250,25 +250,22 @@
             {
                 object arg = arglist[i];

-                if (arg != null && arg is IConvertible)
+                if (arg is IConvertible)
                 {
                     Type argType = arg.GetType();
                     Type targetType = parameters[i].ParameterType;
                     bool convert = false;

-                    if (argType != targetType && !argType.IsAssignableFrom(targetType))
+                    if (argType != targetType && IsNumeric(argType) && IsNumeric(targetType))
                     {
-                        if (IsNumeric(argType) && IsNumeric(targetType))
-                        {
-                            if (targetType == typeof(double) || targetType == typeof(float))
-                                convert = arg is int || arg is long || arg is short || arg is byte || arg is sbyte;
+                        if (targetType == typeof(double) || targetType == typeof(float))
+                            convert = arg is int || arg is long || arg is short || arg is byte || arg is sbyte;
+                        else
+                            if (targetType == typeof(long))
+                                convert = arg is int || arg is short || arg is byte || arg is sbyte;
                             else
-                                if (targetType == typeof(long))
-                                    convert = arg is int || arg is short || arg is byte || arg is sbyte;
-                                else
-                                    if (targetType == typeof(short))
-                                        convert = arg is byte || arg is sbyte;
-                        }
+                                if (targetType == typeof(short))
+                                    convert = arg is byte || arg is sbyte;
                     }

                     if (convert)


Added CSV MimeType

Added CSV MimeType

--- src/mindtouch.dream/dream/mimetype.cs
+++ src/mindtouch.dream/dream/mimetype.cs
@@ -358,6 +358,12 @@
         public static readonly MimeType CSS = new MimeType("text/css", Encoding.ASCII);

         ///
+        /// Creates a <see cref="MimeType"/> instance for CSV.
+        ///
+        /// <remarks>Signature: text/csv; UTF-8</remarks>
+        public static readonly MimeType CSV = new MimeType("text/csv", Encoding.UTF8);
+
+        ///
         /// Creates a <see cref="MimeType"/> instance for dream exception xml.
         ///
         /// <remarks>Signature: application/x-dream-exception+xml; UTF-8</remarks>


Revert "fixed the weird spawn thing where the player was spawning in the floor. something with the spawn room method in room. just subtracted from the y value that was being set an amount that looks alright in game. we can fix it better later"

This reverts commit c01ececce87a0917952ed3edaea368bac23522b6.

--- UnanimousOverkillGame/Room.cs
+++ UnanimousOverkillGame/Room.cs
@@ -1,192 +1,192 @@
-using System;
-using System.IO;
-using System.Collections.Generic;
-using System.Linq;
-// Worked on by: Sean Coffey
-
-using System.Text;
-using Microsoft.Xna.Framework;
-using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework.Graphics;
-using Microsoft.Xna.Framework.Input;
-using Microsoft.Xna.Framework.Storage;
-using Microsoft.Xna.Framework.GamerServices;
-
-namespace UnanimousOverkillGame
-{
-    class Room
-    {
-        public Room PreviousRoom
-        {
-            get
-            {
-                return previousRoom;
-            }
-            set
-            {
-                previousRoom = value;
-            }
-        }
-
-        // 2D array for level
-        private char[,] level;
-        private List<ForegroundTile> foreground;
-        private List<PhysicsEntity> colliders;
-        private Room previousRoom;
-        private List<Room> nextRooms;
-        // This will be replaced with tile sets.
-        private Texture2D tileSet;
-        private Texture2D boundsTexture;
-        private RoomManager manager;
-        private static Random rand = new Random();
-
-        public const int TILE_WIDTH = 50;
-        public const int TILE_HEIGHT = 50;
-
-        /// <summary>
-        /// Default constructor for RoomManager
-        /// </summary>
-        public Room(RoomManager roomManager)
-        {
-            manager = roomManager;
-            foreground = new List<ForegroundTile>();
-            colliders = new List<PhysicsEntity>();
-            nextRooms = new List<Room>();
-        }
-
-        public Room(RoomManager roomManager, Room previous)
-        {
-            manager = roomManager;
-            previousRoom = previous;
-            foreground = new List<ForegroundTile>();
-            colliders = new List<PhysicsEntity>();
-            nextRooms = new List<Room>();
-        }
-
-        /// <summary>
-        /// Sets the tile texture. This will be editted to include texture packs.
-        /// </summary>
-        public void SetTileTexture(Texture2D tileTexture, Texture2D bounds)
-        {
-            tileSet = tileTexture;
-            boundsTexture = bounds;
-        }
-
-        /// <summary>
-        /// Gets a list of collidable objects in the room.
-        /// </summary>
-        public List<PhysicsEntity> GetColliders()
-        {
-            return colliders;
-        }
-
-        /// <summary>
-        /// Loads a room based off a text file.
-        /// </summary>
-        /// <param name="path">The path to the text file.</param>
-        public void LoadRoom(string path)
-        {
-
-            StreamReader levelReader = new StreamReader(path);
-            string readerLine = levelReader.ReadLine();
-            List<string> levels = new List<string>();
-            while (readerLine != "//")
-            {
-                levels.Add(readerLine);
-                readerLine = levelReader.ReadLine();
-            }
-            levelReader.Close();
-            level = new char[levels[0].Length, levels.Count];
-            int x = 0;
-            int y = 0;
-            foreach (string line in levels)
-            {
-                foreach (char tile in line)
-                {
-                    level[x, y] = tile;
-                    x++;
-                }
-                y++;
-                x = 0;
-            }
-        }
-
-        /// <summary>
-        /// Creates the actual tile objects in the world.
-        /// </summary>
-        public void SpawnRoom(Player player, bool forward)
-        {
-            foreground.Clear();
-            for (int y = level.GetLength(1) - 1; y >= 0; y--)
-            {
-                for (int x = 0; x < level.GetLength(0); x++)
-                {
-                    switch(level[x,y])
-                    {
-                        case ('*'):
-                            ForegroundTile tile = new ForegroundTile(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, (int)(TILE_WIDTH * 1.33), (int)(TILE_HEIGHT * 1.33), tileSet, boundsTexture, rand.Next(3));
-                            foreground.Add(tile);
-                            colliders.Add(tile);
-                            break;
-                            // Cases for entrances and exits.
-                        case ('>'):
-                            if (!forward)
-                            {
-                                player.X = (x - 1) * TILE_WIDTH;
-                                player.Y = y * TILE_HEIGHT-20;
-                                player.positionChangedManually();
-                            }
-                            Room room = manager.RandomRoom(this);
-                            Door nextDoor = new Door(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, null, room, manager);
-                            nextRooms.Add(room);
-                            colliders.Add(nextDoor);
-                            break;
-                        case ('<'):
-                            if (forward)
-                            {
-                                player.X = (x + 1) * TILE_WIDTH;
-                                player.Y = y * TILE_HEIGHT-20;
-                                player.positionChangedManually();
-                            }
-                            if (previousRoom != null)
-                            {
-                                Door previousDoor = new Door(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, null, previousRoom, manager);
-                                colliders.Add(previousDoor);
-                            }
-                            break;
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Updates the room.
-        /// </summary>
-        public void Update(GameTime time)
-        {
-
-        }
-
-        /// <summary>
-        /// Draws everything in the level.
-        /// </summary>
-        public void Draw(SpriteBatch batch)
-        {
-            foreach (ForegroundTile tile in foreground)
-            {
-                tile.Draw(batch);
-            }
-        }
-
-        /// <summary>
-        /// Show the physics bounding boxes for all tiles, for debugging.
-        /// </summary>
-        public void BoundsDraw(SpriteBatch batch)
-        {
-            foreach (ForegroundTile tile in foreground)
-            {
-                tile.DrawBounds(batch);
-            }
-        }
-    }
-}
+using System;
+using System.IO;
+using System.Collections.Generic;
+using System.Linq;
+// Worked on by: Sean Coffey
+
+using System.Text;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Content;
+using Microsoft.Xna.Framework.Graphics;
+using Microsoft.Xna.Framework.Input;
+using Microsoft.Xna.Framework.Storage;
+using Microsoft.Xna.Framework.GamerServices;
+
+namespace UnanimousOverkillGame
+{
+    class Room
+    {
+        public Room PreviousRoom
+        {
+            get
+            {
+                return previousRoom;
+            }
+            set
+            {
+                previousRoom = value;
+            }
+        }
+
+        // 2D array for level
+        private char[,] level;
+        private List<ForegroundTile> foreground;
+        private List<PhysicsEntity> colliders;
+        private Room previousRoom;
+        private List<Room> nextRooms;
+        // This will be replaced with tile sets.
+        private Texture2D tileSet;
+        private Texture2D boundsTexture;
+        private RoomManager manager;
+        private static Random rand = new Random();
+
+        public const int TILE_WIDTH = 50;
+        public const int TILE_HEIGHT = 50;
+
+        /// <summary>
+        /// Default constructor for RoomManager
+        /// </summary>
+        public Room(RoomManager roomManager)
+        {
+            manager = roomManager;
+            foreground = new List<ForegroundTile>();
+            colliders = new List<PhysicsEntity>();
+            nextRooms = new List<Room>();
+        }
+
+        public Room(RoomManager roomManager, Room previous)
+        {
+            manager = roomManager;
+            previousRoom = previous;
+            foreground = new List<ForegroundTile>();
+            colliders = new List<PhysicsEntity>();
+            nextRooms = new List<Room>();
+        }
+
+        /// <summary>
+        /// Sets the tile texture. This will be editted to include texture packs.
+        /// </summary>
+        public void SetTileTexture(Texture2D tileTexture, Texture2D bounds)
+        {
+            tileSet = tileTexture;
+            boundsTexture = bounds;
+        }
+
+        /// <summary>
+        /// Gets a list of collidable objects in the room.
+        /// </summary>
+        public List<PhysicsEntity> GetColliders()
+        {
+            return colliders;
+        }
+
+        /// <summary>
+        /// Loads a room based off a text file.
+        /// </summary>
+        /// <param name="path">The path to the text file.</param>
+        public void LoadRoom(string path)
+        {
+
+            StreamReader levelReader = new StreamReader(path);
+            string readerLine = levelReader.ReadLine();
+            List<string> levels = new List<string>();
+            while (readerLine != "//")
+            {
+                levels.Add(readerLine);
+                readerLine = levelReader.ReadLine();
+            }
+            levelReader.Close();
+            level = new char[levels[0].Length, levels.Count];
+            int x = 0;
+            int y = 0;
+            foreach (string line in levels)
+            {
+                foreach (char tile in line)
+                {
+                    level[x, y] = tile;
+                    x++;
+                }
+                y++;
+                x = 0;
+            }
+        }
+
+        /// <summary>
+        /// Creates the actual tile objects in the world.
+        /// </summary>
+        public void SpawnRoom(Player player, bool forward)
+        {
+            foreground.Clear();
+            for (int y = level.GetLength(1) - 1; y >= 0; y--)
+            {
+                for (int x = 0; x < level.GetLength(0); x++)
+                {
+                    switch(level[x,y])
+                    {
+                        case ('*'):
+                            ForegroundTile tile = new ForegroundTile(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, (int)(TILE_WIDTH * 1.33), (int)(TILE_HEIGHT * 1.33), tileSet, boundsTexture, rand.Next(3));
+                            foreground.Add(tile);
+                            colliders.Add(tile);
+                            break;
+                            // Cases for entrances and exits.
+                        case ('>'):
+                            if (!forward)
+                            {
+                                player.X = (x - 1) * TILE_WIDTH;
+                                player.Y = y * TILE_HEIGHT;
+                                player.positionChangedManually();
+                            }
+                            Room room = manager.RandomRoom(this);
+                            Door nextDoor = new Door(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, null, room, manager);
+                            nextRooms.Add(room);
+                            colliders.Add(nextDoor);
+                            break;
+                        case ('<'):
+                            if (forward)
+                            {
+                                player.X = (x + 1) * TILE_WIDTH;
+                                player.Y = y * TILE_HEIGHT;
+                                player.positionChangedManually();
+                            }
+                            if (previousRoom != null)
+                            {
+                                Door previousDoor = new Door(x * TILE_WIDTH, y * TILE_HEIGHT, TILE_WIDTH, TILE_HEIGHT, null, previousRoom, manager);
+                                colliders.Add(previousDoor);
+                            }
+                            break;
+                    }
+                }
+            }
+        }
+
+        /// <summary>
+        /// Updates the room.
+        /// </summary>
+        public void Update(GameTime time)
+        {
+
+        }
+
+        /// <summary>
+        /// Draws everything in the level.
+        /// </summary>
+        public void Draw(SpriteBatch batch)
+        {
+            foreach (ForegroundTile tile in foreground)
+            {
+                tile.Draw(batch);
+            }
+        }
+
+        /// <summary>
+        /// Show the physics bounding boxes for all tiles, for debugging.
+        /// </summary>
+        public void BoundsDraw(SpriteBatch batch)
+        {
+            foreach (ForegroundTile tile in foreground)
+            {
+                tile.DrawBounds(batch);
+            }
+        }
+    }
+}


tests: Fixing up TMXGIDObjectsTest case

tests: Fixing up TMXGIDObjectsTest case

* Correctly drawing object layer items

--- tests/tests/classes/tests/TileMapTest/TileMapTest.cs
+++ tests/tests/classes/tests/TileMapTest/TileMapTest.cs
@@ -1341,33 +1341,29 @@

     public class TMXGIDObjectsTest : TileDemo
     {
+        CCDrawNode drawNode;
+
         public TMXGIDObjectsTest() : base("TileMaps/test-object-layer")
         {
-        }
-
-        protected override void Draw()
-        {
+            drawNode = new CCDrawNode();
+            tileLayersContainer.AddChild(drawNode);
+        }
+
+        protected override void AddedToScene ()
+        {
+            base.AddedToScene();
             CCTileMapObjectGroup group = tileMap.ObjectGroupNamed("Object Layer 1");
+
+            drawNode.Color = CCColor3B.Magenta;
+            drawNode.Opacity = 255;
+            drawNode.Clear();

             foreach (var dict in group.Objects)
             {
                 int x = int.Parse(dict["x"]);
                 int y = int.Parse(dict["y"]);
-                int width = dict.ContainsKey("width") ? int.Parse(dict["width"]) : 0;
-                int height = dict.ContainsKey("height") ? int.Parse(dict["height"]) : 0;
-
-                //glLineWidth(3);
-
-                var color = new CCColor4B(255, 255, 0, 255);
-
-                CCDrawingPrimitives.Begin();
-                CCDrawingPrimitives.DrawLine(new CCPoint(x, y), new CCPoint(x + width, y), color);
-                CCDrawingPrimitives.DrawLine(new CCPoint(x + width, y), new CCPoint(x + width, y + height), color);
-                CCDrawingPrimitives.DrawLine(new CCPoint(x + width, y + height), new CCPoint(x, y + height), color);
-                CCDrawingPrimitives.DrawLine(new CCPoint(x, y + height), new CCPoint(x, y), color);
-                CCDrawingPrimitives.End();
-
-                //glLineWidth(1);
+;
+                drawNode.DrawDot(new CCPoint (x, y), 10.0f, new CCColor4F (CCColor4B.Magenta));
             }
         }


Disable unstable test

Disable unstable test

--- src/R/Components/Test/Plots/RPlotIntegrationTest.cs
+++ src/R/Components/Test/Plots/RPlotIntegrationTest.cs
@@ -716,7 +716,7 @@
             deviceCommands.PreviousPlot.Should().BeDisabled();
         }

-        [Test(ThreadType.UI)]
+        [Test(ThreadType.UI, Skip = "https://github.com/Microsoft/RTVS/issues/2939")]
         public async Task LocatorCommand() {
             _plotDeviceVisualComponentContainerFactory.DeviceProperties = new PlotDeviceProperties(360, 360, 96);


ability to access container registry from container builder

--- src/CSharpClient/Bit.CSharpClient.Prism/BitApplication.cs
+++ src/CSharpClient/Bit.CSharpClient.Prism/BitApplication.cs
@@ -149,7 +149,7 @@
             IServiceCollection services = new BitServiceCollection();

             containerBuilder.Properties[nameof(services)] = services;
-            containerBuilder.Properties[nameof(containerBuilder)] = containerBuilder;
+            containerBuilder.Properties[nameof(containerRegistry)] = containerRegistry;

             RegisterTypes(containerRegistry, containerBuilder, services);


Extra semicolons left at the end of Combine function taking 4 paths. (#16284)

--- src/mscorlib/shared/System/IO/Path.cs
+++ src/mscorlib/shared/System/IO/Path.cs
@@ -449,9 +449,9 @@
                 return CombineNoChecks(second, third, fourth);
             if (string.IsNullOrEmpty(second))
                 return CombineNoChecks(first, third, fourth);
-			if (string.IsNullOrEmpty(third));
+			if (string.IsNullOrEmpty(third))
                 return CombineNoChecks(first, second, fourth);
-			if (string.IsNullOrEmpty(fourth));
+			if (string.IsNullOrEmpty(fourth))
                 return CombineNoChecks(first, second, third);

             if (IsPathRooted(fourth.AsReadOnlySpan()))


Add test methods in class 'CompileOutputTest'

--- UnitTest/CompileOutputTest.cs
+++ UnitTest/CompileOutputTest.cs
@@ -44,5 +44,221 @@
             Assert.AreEqual(pos, output.Position);
             Assert.AreEqual(appendix, output.Appendix);
         }
+
+        [TestMethod]
+        public void OutputNumberTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(number, output.OutputNumber);
+        }
+
+        [TestMethod]
+        public void CategoryTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(OutputCategory.Info, output.Category);
+        }
+
+        [TestMethod]
+        public void PositionTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(pos, output.Position);
+        }
+
+        [TestMethod]
+        public void CodeTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(code, output.Code);
+        }
+
+        [TestMethod]
+        public void SourceCodeTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(sourceCode, output.SourceCode);
+        }
+
+        [TestMethod]
+        public void AppendixTest()
+        {
+            CompileOutput output = logger.Outputs.First();
+            Assert.AreEqual(appendix, output.Appendix);
+        }
+
+        [TestMethod]
+        public void MessageTest()
+        {
+            CompileOutput[] outputs = logger.Outputs.ToArray();
+            Assert.AreEqual(MessageProviderInfo.Message, outputs[0].Message);
+            Assert.AreEqual(MessageProviderWarn.Message, outputs[1].Message);
+            Assert.AreEqual(MessageProviderError.Message, outputs[2].Message);
+            Assert.IsNull(outputs[3].Message);
+            Assert.IsNull(outputs[4].Message);
+            Assert.IsNull(outputs[5].Message);
+        }
+
+        [TestMethod]
+        public void SuggestionTest()
+        {
+            CompileOutput[] outputs = logger.Outputs.ToArray();
+            Assert.AreEqual(MessageProviderInfo.Suggestion, outputs[0].Suggestion);
+            Assert.AreEqual(MessageProviderWarn.Suggestion, outputs[1].Suggestion);
+            Assert.AreEqual(MessageProviderError.Suggestion, outputs[2].Suggestion);
+            Assert.IsNull(outputs[3].Suggestion);
+            Assert.IsNull(outputs[4].Suggestion);
+            Assert.IsNull(outputs[5].Suggestion);
+        }
+
+        [TestMethod]
+        public void SiteLinkTest()
+        {
+            CompileOutput[] outputs = logger.Outputs.ToArray();
+            Assert.AreEqual(MessageProviderInfo.SiteLink, outputs[0].SiteLink);
+            Assert.AreEqual(MessageProviderWarn.SiteLink, outputs[1].SiteLink);
+            Assert.AreEqual(MessageProviderError.SiteLink, outputs[2].SiteLink);
+            Assert.IsNull(outputs[3].SiteLink);
+            Assert.IsNull(outputs[4].SiteLink);
+            Assert.IsNull(outputs[5].SiteLink);
+        }
+    }
+
+    class MessageProviderInfo : IMessageProvider
+    {
+        public const string Message = "MessageInfo";
+        public const string Suggestion = "SuggestionInfo";
+        public const string SiteLink = "SiteLinkInfo";
+
+        public bool GetMessage(int number, OutputCategory category, out string message)
+        {
+            message = null;
+
+            if (number == 0 && category == OutputCategory.Info)
+            {
+                message = Message;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSuggestion(int number, OutputCategory category, out string suggestion)
+        {
+            suggestion = null;
+
+            if (number == 0 && category == OutputCategory.Info)
+            {
+                suggestion = Suggestion;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSiteLink(int number, OutputCategory category, out string siteLink)
+        {
+            siteLink = null;
+
+            if (number == 0 && category == OutputCategory.Info)
+            {
+                siteLink = SiteLink;
+                return true;
+            }
+            else
+                return false;
+        }
+    }
+
+    class MessageProviderWarn : IMessageProvider
+    {
+        public const string Message = "MessageWarn";
+        public const string Suggestion = "SuggestionWarn";
+        public const string SiteLink = "SiteLinkWarn";
+
+        public bool GetMessage(int number, OutputCategory category, out string message)
+        {
+            message = null;
+
+            if (number == 1 && category == OutputCategory.Warn)
+            {
+                message = Message;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSuggestion(int number, OutputCategory category, out string suggestion)
+        {
+            suggestion = null;
+
+            if (number == 1 && category == OutputCategory.Warn)
+            {
+                suggestion = Suggestion;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSiteLink(int number, OutputCategory category, out string siteLink)
+        {
+            siteLink = null;
+
+            if (number == 1 && category == OutputCategory.Warn)
+            {
+                siteLink = SiteLink;
+                return true;
+            }
+            else
+                return false;
+        }
+    }
+
+    class MessageProviderError : IMessageProvider
+    {
+        public const string Message = "MessageError";
+        public const string Suggestion = "SuggestionError";
+        public const string SiteLink = "SiteLinkError";
+
+        public bool GetMessage(int number, OutputCategory category, out string message)
+        {
+            message = null;
+
+            if (number == 2 && category == OutputCategory.Error)
+            {
+                message = Message;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSuggestion(int number, OutputCategory category, out string suggestion)
+        {
+            suggestion = null;
+
+            if (number == 2 && category == OutputCategory.Error)
+            {
+                suggestion = Suggestion;
+                return true;
+            }
+            else
+                return false;
+        }
+
+        public bool GetSiteLink(int number, OutputCategory category, out string siteLink)
+        {
+            siteLink = null;
+
+            if (number == 2 && category == OutputCategory.Error)
+            {
+                siteLink = SiteLink;
+                return true;
+            }
+            else
+                return false;
+        }
     }
 }


Fix #153 : Type in previous input in REPL, assertion occurs

--- src/R/Editor/Impl/Signatures/SignatureHelpSource.cs
+++ src/R/Editor/Impl/Signatures/SignatureHelpSource.cs
@@ -33,9 +33,7 @@
             if (!REditorSettings.SignatureHelpEnabled)
                 return;

-            var document = REditorDocument.FromTextBuffer(_textBuffer);
-            Debug.Assert(document != null);
-
+            var document = REditorDocument.TryFromTextBuffer(_textBuffer);
             if (document != null)
             {
                 document.EditorTree.EnsureTreeReady();


A couple more tests

A couple more tests

--- UrchiNet.CSharpTests/Tests.cs
+++ UrchiNet.CSharpTests/Tests.cs
@@ -26,6 +26,19 @@
                         Console.WriteLine(account.Name);
                 }),

+                Test.Case("Get profiles", () => {
+                    var profiles = service.GetProfileList(1).ToList();
+                    foreach (var profile in profiles)
+                        Console.WriteLine(profile.Name);
+                }),
+
+                Test.Case("Get tables", () => {
+                    var tables = service.GetTableList(1).ToList();
+                    foreach (var table in tables)
+                        foreach (var dimension in table.Dimensions)
+                            Console.WriteLine(dimension.ToString());
+                }),
+
                 Test.Case("Query data", () => {
                     var query = Query.Create(profileId: 1,
                         startDate: DateTime.Now,


rar5: unpack wip

rar5: unpack wip

--- src/SharpCompress/Compressors/Rar/Decode/PackDef.cs
+++ src/SharpCompress/Compressors/Rar/Decode/PackDef.cs
@@ -1,12 +1,11 @@
 namespace SharpCompress.Compressors.Rar.Decode
 {
-    internal class PackDef
+    internal static class PackDef
     {
         public const int CODEBUFSIZE = 0x4000;
         public const int MAXWINSIZE = 0x400000;

-        //UPGRADE_NOTE: Final was removed from the declaration of 'MAXWINMASK '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
-        public static readonly int MAXWINMASK = (MAXWINSIZE - 1);
+        public const int MAXWINMASK = (MAXWINSIZE - 1);

         public const int LOW_DIST_REP_COUNT = 16;

@@ -15,8 +14,7 @@
         public const int LDC = 17;
         public const int RC = 28;

-        //UPGRADE_NOTE: Final was removed from the declaration of 'HUFF_TABLE_SIZE '. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1003'"
-        public static readonly int HUFF_TABLE_SIZE = (NC + DC + RC + LDC);
+        public const int HUFF_TABLE_SIZE = (NC + DC + RC + LDC);
         public const int BC = 20;

         public const int NC20 = 298; /* alphabet = {0, 1, 2, ..., NC - 1} */


Use VersionPayload's start height for displaying peer's height when PendingTip is null. (#1116)

--- src/Stratis.Bitcoin/Connection/ConnectionManager.cs
+++ src/Stratis.Bitcoin/Connection/ConnectionManager.cs
@@ -292,17 +292,18 @@
         {
             var builder = new StringBuilder();

-            foreach (NetworkPeer node in this.ConnectedPeers)
-            {
-                ConnectionManagerBehavior connectionManagerBehavior = node.Behavior<ConnectionManagerBehavior>();
-                ChainHeadersBehavior chainHeadersBehavior = node.Behavior<ChainHeadersBehavior>();
-
-                string agent = node.PeerVersion != null ? node.PeerVersion.UserAgent : "[Unknown]";
+            foreach (NetworkPeer peer in this.ConnectedPeers)
+            {
+                var connectionManagerBehavior = peer.Behavior<ConnectionManagerBehavior>();
+                var chainHeadersBehavior = peer.Behavior<ChainHeadersBehavior>();
+
+                string agent = peer.PeerVersion != null ? peer.PeerVersion.UserAgent : "[Unknown]";
                 builder.AppendLine(
-                    "Peer:" + (node.RemoteInfo() + ", ").PadRight(LoggingConfiguration.ColumnLength + 15) +
+                    "Peer:" + (peer.RemoteInfo() + ", ").PadRight(LoggingConfiguration.ColumnLength + 15) +
                     (" connected" + " (" + (connectionManagerBehavior.Inbound ? "inbound" : "outbound") + "),").PadRight(LoggingConfiguration.ColumnLength + 7) +
                     (" agent " + agent + ", ").PadRight(LoggingConfiguration.ColumnLength + 2) +
-                    " height=" + (chainHeadersBehavior.PendingTip != null ? chainHeadersBehavior.PendingTip.Height.ToString() : "unknown"));
+                    " height=" + (chainHeadersBehavior.PendingTip != null ? chainHeadersBehavior.PendingTip.Height.ToString() :
+                        peer.PeerVersion?.StartHeight.ToString() ?? "unknown"));
             }

             return builder.ToString();


Logging GitHubServiceProvider exception

Logging GitHubServiceProvider exception

--- src/GitHub.VisualStudio/Services/GitHubServiceProvider.cs
+++ src/GitHub.VisualStudio/Services/GitHubServiceProvider.cs
@@ -162,9 +162,9 @@
                 if (instance != null)
                     return instance;
             }
-            catch (Exception)
-            {
-                //Debugger.Break();
+            catch (Exception ex)
+            {
+                log.Error(ex, "Error loading {ServiceType}", serviceType);
             }

             instance = AddToDisposables(ExportProvider.GetExportedValues<object>(contract).FirstOrDefault(x => contract.StartsWith("github.", StringComparison.OrdinalIgnoreCase) ? x.GetType().Assembly.GetName().Version == currentVersion : true));


Should fix 4.0 changes

Should fix 4.0 changes


Update PersistentGenericSet.cs to handle the .NET 4.0 ISet API.

--- src/NHibernate/Collection/Generic/PersistentGenericSet.cs
+++ src/NHibernate/Collection/Generic/PersistentGenericSet.cs
@@ -15,25 +15,12 @@
 namespace NHibernate.Collection.Generic
 {
 	///
-	/// .NET has no design equivalent for Java's Set so we are going to use the
-	/// Iesi.Collections library. This class is internal to NHibernate and shouldn't
-	/// be used by user code.
+	/// A persistent wrapper for an <see cref="ISet{T}"/>.
 	///
-	/// <remarks>
-	/// The code for the Iesi.Collections library was taken from the article
-	/// Add Support for "Set" Collections
-	/// to .NET that was written by JasonSmith.
-	/// </remarks>
 	[Serializable]
 	[DebuggerTypeProxy(typeof(CollectionProxy<>))]
 	public class PersistentGenericSet<T> : AbstractPersistentCollection, ISet<T>
 	{
-		// TODO NH: find a way to writeonce (no duplicated code from PersistentSet)
-
-		/* NH considerations:
-		 * The implementation of Set<T> in Iesi collections don't have any particular behavior
-		 * for strongly typed. BTW we use the same technique used for other collection.
-		 */
 		///
 		/// The <see cref="ISet{T}"/> that NHibernate is wrapping.
 		///
@@ -49,7 +36,7 @@
 		/// process.
 		/// </remarks>
 		[NonSerialized]
-		private IList<T> tempList;
+		private IList<T> _tempList;

 		// needed for serialization
 		public PersistentGenericSet()
@@ -76,6 +63,10 @@
 		public PersistentGenericSet(ISessionImplementor session, ISet<T> original)
 			: base(session)
 		{
+			// Sets can be just a view of a part of another collection.
+			// do we need to copy it to be sure it won't be changing
+			// underneath us?
+			// ie. this.set.addAll(set);
 			set = original;
 			SetInitialized();
 			IsDirectlyAccessible = true;
@@ -172,7 +163,7 @@
 			var element = (T)role.ReadElement(rs, owner, descriptor.SuffixedElementAliases, Session);
 			if (element != null)
 			{
-				tempList.Add(element);
+				_tempList.Add(element);
 			}
 			return element;
 		}
@@ -184,7 +175,7 @@
 		public override void BeginRead()
 		{
 			base.BeginRead();
-			tempList = new List<T>();
+			_tempList = new List<T>();
 		}

 		///
@@ -194,11 +185,11 @@
 		///
 		public override bool EndRead(ICollectionPersister persister)
 		{
-			foreach (T item in tempList)
+			foreach (T item in _tempList)
 			{
 				set.Add(item);
 			}
-			tempList = null;
+			_tempList = null;
 			SetInitialized();
 			return true;
 		}
@@ -295,29 +286,6 @@

 		#region ISet<T> Members

-		public ISet<T> Union(ISet<T> a)
-		{
-			Read();
-			return set.Union(a);
-		}
-
-		public ISet<T> Intersect(ISet<T> a)
-		{
-			Read();
-			return set.Intersect(a);
-		}
-
-		public ISet<T> Minus(ISet<T> a)
-		{
-			Read();
-			return set.Minus(a);
-		}
-
-		public ISet<T> ExclusiveOr(ISet<T> a)
-		{
-			Read();
-			return set.ExclusiveOr(a);
-		}

 		public bool Contains(T item)
 		{
@@ -325,11 +293,6 @@
 			return exists == null ? set.Contains(item) : exists.Value;
 		}

-		public bool ContainsAll(ICollection<T> c)
-		{
-			Read();
-			return set.ContainsAll(c);
-		}

 		public bool Add(T o)
 		{
@@ -353,25 +316,102 @@
 			return true;
 		}

-		public bool AddAll(ICollection<T> c)
-		{
-			if (c.Count > 0)
-			{
-				Initialize(true);
-				if (set.AddAll(c))
-				{
-					Dirty();
-					return true;
-				}
-				else
-				{
-					return false;
-				}
-			}
-			else
-			{
-				return false;
-			}
+		public void UnionWith(IEnumerable<T> other)
+		{
+			var collection = other as ICollection<T> ?? other.ToList();
+			if (collection.Count == 0)
+				return;
+
+			Initialize(true);
+
+			var oldCount = set.Count;
+			set.UnionWith(collection);
+			var newCount = set.Count;
+
+			// Union can only add, so if the set was modified the count must increase.
+			if (oldCount != newCount)
+				Dirty();
+		}
+
+		public void IntersectWith(IEnumerable<T> other)
+		{
+			Initialize(true);
+
+			var oldCount = set.Count;
+			set.IntersectWith(other);
+			var newCount = set.Count;
+
+			// Intersect can only remove, so if the set was modified the count must decrease.
+			if (oldCount != newCount)
+				Dirty();
+		}
+
+		public void ExceptWith(IEnumerable<T> other)
+		{
+			var collection = other as ICollection<T> ?? other.ToList();
+			if (collection.Count == 0)
+				return;
+
+			Initialize(true);
+
+			var oldCount = set.Count;
+			set.ExceptWith(collection);
+			var newCount = set.Count;
+
+			// Except can only remove, so if the set was modified the count must decrease.
+			if (oldCount != newCount)
+				Dirty();
+		}
+
+		public void SymmetricExceptWith(IEnumerable<T> other)
+		{
+			var collection = other as ICollection<T> ?? other.ToList();
+			if (collection.Count == 0)
+				return;
+
+			Initialize(true);
+
+			set.SymmetricExceptWith(collection);
+
+			// If the other collection is non-empty, we are guaranteed to
+			// remove or add at least one element.
+			Dirty();
+		}
+
+		public bool IsSubsetOf(IEnumerable<T> other)
+		{
+			Read();
+			return set.IsProperSupersetOf(other);
+		}
+
+		public bool IsSupersetOf(IEnumerable<T> other)
+		{
+			Read();
+			return set.IsSupersetOf(other);
+		}
+
+		public bool IsProperSupersetOf(IEnumerable<T> other)
+		{
+			Read();
+			return set.IsProperSupersetOf(other);
+		}
+
+		public bool IsProperSubsetOf(IEnumerable<T> other)
+		{
+			Read();
+			return set.IsProperSubsetOf(other);
+		}
+
+		public bool Overlaps(IEnumerable<T> other)
+		{
+			Read();
+			return set.Overlaps(other);
+		}
+
+		public bool SetEquals(IEnumerable<T> other)
+		{
+			Read();
+			return set.SetEquals(other);
 		}

 		public bool Remove(T o)
@@ -396,41 +436,6 @@
 			return false;
 		}

-		public bool RemoveAll(ICollection<T> c)
-		{
-			if (c.Count > 0)
-			{
-				Initialize(true);
-				if (set.RemoveAll(c))
-				{
-					Dirty();
-					return true;
-				}
-				else
-				{
-					return false;
-				}
-			}
-			else
-			{
-				return false;
-			}
-		}
-
-		public bool RetainAll(ICollection<T> c)
-		{
-			Initialize(true);
-			if (set.RetainAll(c))
-			{
-				Dirty();
-				return true;
-			}
-			else
-			{
-				return false;
-			}
-		}
-
 		public void Clear()
 		{
 			if (ClearQueueEnabled)
@@ -448,11 +453,6 @@
 			}
 		}

-		public bool IsEmpty
-		{
-			get { return ReadSize() ? CachedSize == 0 : (set.Count == 0); }
-		}
-
 		#endregion

 		#region ICollection<T> Members
@@ -469,7 +469,7 @@
 			get { return ReadSize() ? CachedSize : set.Count; }
 		}

-		bool ICollection<T>.IsReadOnly
+		public bool IsReadOnly
 		{
 			get { return false; }
 		}
@@ -512,15 +512,6 @@

 		#endregion

-		#region ICloneable Members
-
-		public object Clone()
-		{
-			Read();
-			return set.Clone();
-		}
-
-		#endregion

 		#region DelayedOperations


fixing a null reference exception on fallback folder logic

--- src/WebJobs.Script/BindingExtensions/ExtensionsManager.cs
+++ src/WebJobs.Script/BindingExtensions/ExtensionsManager.cs
@@ -205,7 +205,7 @@
                     })
                     .Where(p => p.Item2 != null)
                     .OrderByDescending(p => p.Item2)
-                    .FirstOrDefault().Item1?.ToString();
+                    .FirstOrDefault()?.Item1?.ToString();
             }

             if (FileUtility.DirectoryExists(_nugetFallbackPath))


Disable HttpClient caching

Disable HttpClient caching


Added skip intro

Added skip intro


Adding colors for phantoms.

Adding colors for phantoms.


Add test

Add test


do not parse file system on each render

do not parse file system on each render

we don't suspect file will expire just while the user is using the program, if the expiration time is 7 days


Documented.

Documented.


masterview bug fixed once again

masterview bug fixed once again

--- platform/wp7/RhoRubyLib/views/RhoView.xaml.cs
+++ platform/wp7/RhoRubyLib/views/RhoView.xaml.cs
@@ -94,7 +94,8 @@

         public void removeBrowser()
         {
-            webBrowser1 = null;
+            webBrowser1.ScriptNotify -= WebBrowser_OnScriptNotify;
+            webBrowser1.IsScriptEnabled = false;
         }

         private void WebBrowser_OnLoaded(object sender, RoutedEventArgs e)


Fix: WindowClippedRect not get updated when a window is collapsed, which leads to abnormal hovering state when mouse is actually not hovering on the window.

--- src/ImGui/Control/Window.cs
+++ src/ImGui/Control/Window.cs
@@ -205,10 +205,6 @@
                         window.DrawList.PathFill(resize_col);
                     }

-                    // Save clipped aabb so we can access it in constant-time in FindHoveredWindow()
-                    window.WindowClippedRect = window.Rect;
-                    window.WindowClippedRect.Intersect(window.ClipRect);
-
                     // Scroll bar
                     if (flags.HaveFlag(WindowFlags.VerticalScrollbar))
                     {
@@ -292,6 +288,10 @@
                         window.DrawList.AddLine(title_bar_rect.BottomLeft + new Vector(1, 0), title_bar_rect.BottomRight - new Vector(1, 0), borderColor);
                     }
                 }
+
+                // Save clipped aabb so we can access it in constant-time in FindHoveredWindow()
+                window.WindowClippedRect = window.Rect;
+                window.WindowClippedRect.Intersect(window.ClipRect);
             }

             // Inner clipping rectangle


Tweak compilation directive

Tweak compilation directive

--- src/LibLog/LogExtensions.cs
+++ src/LibLog/LogExtensions.cs
@@ -3,8 +3,9 @@
     using System;
     using System.Diagnostics.CodeAnalysis;

-#if !LIBLOG_PROVIDERS_ONLY
+#if !LIBLOG_EXCLUDE_CODE_COVERAGE
     [ExcludeFromCodeCoverage]
+#endif
 #if LIBLOG_PUBLIC
     public
 #else
@@ -465,5 +466,4 @@
             return WrappedMessageFunc;
         }
     }
-#endif
 }


Fix waiting for the debugger to complete in the OSX console (#349)

The external console code was using 'wait' to wait for the debugger process to
exit. This turns out to have problems on OSX, so this switches to using 'fg'.
there.

--- src/MICore/UnixUtilities.cs
+++ src/MICore/UnixUtilities.cs
@@ -42,6 +42,12 @@
             string pidFifo,
             string debuggerCmd)
         {
+            // On OSX, 'wait' will return once there is a status change from the launched process rather than for it to exit, so
+            // we need to use 'fg' there. This works as our bash prompt is launched through apple script rather than 'bash -c'.
+            // On Linux, fg will fail with 'no job control' because our commands are being executed through 'bash -c', and
+            // bash doesn't support fg in this mode, so we need to use 'wait' there.
+            string waitForCompletionCommand = PlatformUtilities.IsOSX() ? "fg > /dev/null; " : "wait $pid; ";
+
             return string.Format(CultureInfo.InvariantCulture,
                 // echo the shell pid so that we can monitor it
                 "echo $$ > {3}; " +
@@ -55,12 +61,13 @@
                 // we need to fake an exit by the debugger
                 "pid=$! ; " +
                 "echo $pid > {3}; " +
-                "wait $pid; ",
-                debuggeeDir,
-                dbgStdInName,
-                dbgStdOutName,
-                pidFifo,
-                debuggerCmd
+                "{5}",
+                debuggeeDir, /* 0 */
+                dbgStdInName, /* 1 */
+                dbgStdOutName, /* 2 */
+                pidFifo, /* 3 */
+                debuggerCmd, /* 4 */
+                waitForCompletionCommand /* 5 */
                 );
         }


Updated license header

Updated license header

--- src/WindowsStateTriggers/PlatformAdaptiveTrigger.cs
+++ src/WindowsStateTriggers/PlatformAdaptiveTrigger.cs
@@ -1,4 +1,7 @@
-using Windows.Foundation.Metadata;
+// Copyright (c) Morten Nielsen. All rights reserved.
+// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+
+using Windows.Foundation.Metadata;
 using Windows.UI.Xaml;

 namespace WindowsStateTriggers


Use a cancelled token where appropriate

Use a cancelled token where appropriate

--- src/Workspaces/CoreTest/FindAllDeclarationsTests.cs
+++ src/Workspaces/CoreTest/FindAllDeclarationsTests.cs
@@ -117,10 +117,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
-                cts.Cancel();
                 var project = GetProject(WorkspaceKind.SingleClass);
-                var declarations = await SymbolFinder.FindDeclarationsAsync(project, "Test", true, SymbolFilter.All, cts.Token);
+                var declarations = await SymbolFinder.FindDeclarationsAsync(project, "Test", true, SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -281,10 +279,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var project = GetProject(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, "Test", true, SymbolFilter.All, cts.Token);
+                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, "Test", true, SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -388,10 +384,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var solution = GetSolution(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, "Test", true, SymbolFilter.All, cts.Token);
+                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(solution, "Test", true, SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -457,10 +451,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var project = GetProject(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test"), SymbolFilter.All, cts.Token);
+                var declarations = await SymbolFinder.FindSourceDeclarationsAsync(project, str => str.Contains("Test"), SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -526,10 +518,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var solution = GetSolution(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test"), SymbolFilter.All, cts.Token);
+                await SymbolFinder.FindSourceDeclarationsAsync(solution, str => str.Contains("Test"), SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -592,10 +582,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var project = GetProject(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, "test", SymbolFilter.All, cts.Token);
+                var declarations = await SymbolFinder.FindSourceDeclarationsWithPatternAsync(project, "test", SymbolFilter.All, new CancellationToken(true));
             });
         }

@@ -658,10 +646,8 @@
         {
             await Assert.ThrowsAnyAsync<OperationCanceledException>(async () =>
             {
-                var cts = new CancellationTokenSource();
                 var solution = GetSolution(WorkspaceKind.SingleClass);
-                cts.Cancel();
-                await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, "test", SymbolFilter.All, cts.Token);
+                await SymbolFinder.FindSourceDeclarationsWithPatternAsync(solution, "test", SymbolFilter.All, new CancellationToken(true));
             });
         }


Fix test.

Fix test.

--- src/Workspaces/CoreTest/FindAllDeclarationsTests.cs
+++ src/Workspaces/CoreTest/FindAllDeclarationsTests.cs
@@ -577,7 +577,7 @@

             // create symbol tree info from assembly
             var version = VersionStamp.Create();
-            var info = SymbolTreeInfo.CreateSymbolTreeInfo(
+            var info = SymbolTreeInfo.CreateSourceSymbolTreeInfo(
                 solution, version, assembly, "", includeInternal: true, cancellationToken: CancellationToken.None);

             using (var writerStream = new MemoryStream())


added constants

added constants

--- src/biz.dfch.CS.Abiquo.Client/v1/AbiquoRelations.cs
+++ src/biz.dfch.CS.Abiquo.Client/v1/AbiquoRelations.cs
@@ -26,6 +26,7 @@
         public const string VIRTUALMACHINETEMPLATE = "virtualmachinetemplate";
         public const string VIRTUALDATACENTER = "virtualdatacenter";
         public const string VIRTUALAPPLIANCE = "virtualappliance";
+        public const string DATACENTER = "datacenter";

         /// <summary>
         /// General relations


#1 changed getexamtypes

#1 changed getexamtypes

--- WebUntisNet/WebUntisClient.cs
+++ WebUntisNet/WebUntisClient.cs
@@ -464,8 +464,14 @@
         // TODO: GetPersonIdAsync
         // TODO: GetSubstitutionsAsync
         // TODO: GetClassregEventsAsync
-        // TODO: GetExamTypesAsync
-        public async Task GetExamTypesAsync(CancellationToken token = default(CancellationToken))
+
+
+        /// <summary>
+        /// Gets a list of all exam types.
+        /// </summary>
+        /// <param name="token">The cancellation token.</param>
+        /// <returns>A list of exam types.</returns>
+        public async Task<List<Types.ExamType>> GetExamTypesAsync(CancellationToken token = default(CancellationToken))
         {
             EnsureLoggedIn();

@@ -477,16 +483,12 @@
                 throw new RpcException(rpcResult.error.code, rpcResult.error.message);
             }

-            //var result = rpcResult.result.Select(x => new Types.SchoolYear
-            //    {
-            //        Id = x.id,
-            //        Name = x.name,
-            //        StartDate = TypeConverter.ApiDateToDateTime(x.startDate),
-            //        EndDate = TypeConverter.ApiDateToDateTime(x.endDate)
-            //    })
-            //    .ToList();
-            //return result;
-
+            var result = rpcResult.result.Select(x => new Types.ExamType
+                {
+                    // TODO: map properties
+                })
+                .ToList();
+            return result;
         }


Public.Examples.Code - Change to use of Equals() through the Equals() method class instead of the '==' operator.


[estimote][ios] Updated to version 4.26.3

--- XPlat/Estimote/iOS/build.cake
+++ XPlat/Estimote/iOS/build.cake
@@ -5,8 +5,8 @@
 #addin nuget:?package=Cake.Xamarin.Build
 #addin nuget:?package=Cake.FileHelpers

-var NUGET_VERSION = "4.26.2.0";
-var ESTIMOTE_SDK_VERSION = "4.26.2";
+var NUGET_VERSION = "4.26.3.0";
+var ESTIMOTE_SDK_VERSION = "4.26.3";

 var COCOAPODS = new List<string> {
 	"platform :ios, '7.0'",


removed comment

removed comment

--- XWeather/Droid/XWeatherApp.cs
+++ XWeather/Droid/XWeatherApp.cs
@@ -34,7 +34,6 @@
 		{
 			base.OnCreate ();

-            //moved to Activity
 			//Bootstrap.Run (Context, this);
 		}
 	}


fix Rtree2.cs for generics

fix Rtree2.cs for generics

--- csharp/src/impl/RtreeR2.cs
+++ csharp/src/impl/RtreeR2.cs
@@ -1,17 +1,11 @@
 namespace NachoDB.Impl
 {
     using System;
-#if USE_GENERICS
+    using System.Collections;
     using System.Collections.Generic;
-#endif
-    using System.Collections;
     using NachoDB;

-#if USE_GENERICS
     class RtreeR2<T> : PersistentCollection<T>, SpatialIndexR2<T> where T : class, IPersistent
-#else
-    class RtreeR2 : PersistentCollection, SpatialIndexR2
-#endif
     {
         private int         height;
         private int         n;
@@ -29,11 +23,7 @@
             }
         }

-#if USE_GENERICS
         public void Put(RectangleR2 r, T obj)
-#else
-        public void Put(RectangleR2 r, IPersistent obj)
-#endif
         {
             if (root == null)
             {
@@ -59,11 +49,7 @@
             return n;
         }

-#if USE_GENERICS
         public void Remove(RectangleR2 r, T obj)
-#else
-        public void Remove(RectangleR2 r, IPersistent obj)
-#endif
         {
             if (root == null)
             {
@@ -103,22 +89,14 @@
             Modify();
         }

-#if USE_GENERICS
         public T[] Get(RectangleR2 r)
-#else
-        public IPersistent[] Get(RectangleR2 r)
-#endif
         {
             ArrayList result = new ArrayList();
             if (root != null)
             {
                 root.find(r, result, height);
             }
-#if USE_GENERICS
             return (T[])result.ToArray(typeof(T));
-#else
-            return (IPersistent[])result.ToArray(typeof(IPersistent));
-#endif
         }

         public RectangleR2 WrappingRectangle
@@ -131,11 +109,7 @@
             }
         }

-#if USE_GENERICS
         public override void Clear()
-#else
-        public void Clear()
-#endif
         {
             if (root != null)
             {
@@ -154,24 +128,21 @@
             base.Deallocate();
         }

-#if USE_GENERICS
         public IEnumerable<T> Overlaps(RectangleR2 r)
-#else
-        public IEnumerable Overlaps(RectangleR2 r)
-#endif
         {
             return new RtreeIterator(this, r);
         }

-#if USE_GENERICS
         public override IEnumerator<T> GetEnumerator()
-#else
-        public override IEnumerator GetEnumerator()
-#endif
         {
             return Overlaps(WrappingRectangle).GetEnumerator();
         }

+        IEnumerator IEnumerable.GetEnumerator()
+        {
+            return GetEnumerator();
+        }
+
         public IDictionaryEnumerator GetDictionaryEnumerator(RectangleR2 r)
         {
             return new RtreeEntryIterator(this, r);
@@ -182,15 +153,9 @@
             return GetDictionaryEnumerator(WrappingRectangle);
         }

-#if USE_GENERICS
         class RtreeIterator: IEnumerator<T>, IEnumerable<T>
         {
             internal RtreeIterator(RtreeR2<T> tree, RectangleR2 r)
-#else
-        class RtreeIterator: IEnumerator, IEnumerable
-        {
-            internal RtreeIterator(RtreeR2 tree, RectangleR2 r)
-#endif
             {
                 counter = tree.updateCounter;
                 height = tree.height;
@@ -205,13 +170,14 @@
                 Reset();
             }

-#if USE_GENERICS
             public IEnumerator<T> GetEnumerator()
-#else
-            public IEnumerator GetEnumerator()
-#endif
             {
                 return this;
+            }
+
+            IEnumerator IEnumerable.GetEnumerator()
+            {
+                return GetEnumerator();
             }

             public void Reset()
@@ -244,11 +210,7 @@
                 }
             }

-#if USE_GENERICS
             public virtual T Current
-#else
-            public virtual object Current
-#endif
             {
                 get
                 {
@@ -256,11 +218,15 @@
                     {
                         throw new InvalidOperationException();
                     }
-#if USE_GENERICS
                     return (T)page.branch[pos];
-#else
-                    return page.branch[pos];
-#endif
+                }
+            }
+
+            object IEnumerator.Current
+            {
+                get
+                {
+                    return Current;
                 }
             }

@@ -280,8 +246,7 @@
                 }
                 return false;
             }
-
-
+
             private bool gotoNextItem(int sp)
             {
                 RtreeR2Page pg = pageStack[sp];
@@ -308,33 +273,29 @@
             protected int           pos;
             protected bool          hasNext;
             protected RtreeR2Page   page;
-#if USE_GENERICS
             protected RtreeR2<T>    tree;
-#else
-            protected RtreeR2       tree;
-#endif
             protected RectangleR2   r;
         }

         class RtreeEntryIterator: RtreeIterator, IDictionaryEnumerator
         {
-#if USE_GENERICS
             internal RtreeEntryIterator(RtreeR2<T> tree, RectangleR2 r)
-#else
-            internal RtreeEntryIterator(RtreeR2 tree, RectangleR2 r)
-#endif
                 : base(tree, r)
             {}

-#if USE_GENERICS
             public new virtual object Current
-#else
-            public override object Current
-#endif
             {
                 get
                 {
                     return Entry;
+                }
+            }
+
+            object IEnumerator.Current
+            {
+                get
+                {
+                    return Current;
                 }
             }


Update members in E2E tests

Update members in E2E tests

--- test/Duracellko.PlanningPoker.E2ETest/ClientTest.cs
+++ test/Duracellko.PlanningPoker.E2ETest/ClientTest.cs
@@ -122,14 +122,14 @@

         public void AssertScrumMasterInTeam(string scrumMaster)
         {
-            var scrumMasterElements = MembersPanelElement.FindElements(By.XPath("./div/ul[1]/li"));
+            var scrumMasterElements = MembersPanelElement.FindElements(By.XPath("./div/ul[1]/li/span[1]"));
             Assert.AreEqual(1, scrumMasterElements.Count);
             Assert.AreEqual(scrumMaster, scrumMasterElements[0].Text);
         }

         public void AssertMembersInTeam(params string[] members)
         {
-            var elements = MembersPanelElement.FindElements(By.XPath("./div/ul[2]/li/span"));
+            var elements = MembersPanelElement.FindElements(By.XPath("./div/ul[2]/li/span[1]"));
             if (members == null)
             {
                 Assert.AreEqual(0, elements.Count);


utf8_encode() treats byte[] as ISO-8859-1 encoded string

fixes https://github.com/peachpiecompiler/peachpie/issues/774

--- src/Peachpie.Library/Xml.cs
+++ src/Peachpie.Library/Xml.cs
@@ -2,9 +2,7 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Text;
-using System.Threading.Tasks;
 using System.Xml;
 using Pchp.Core;

@@ -524,7 +522,7 @@
                 return _ISO_8859_1_Encoding;
             }
         }
-        static Encoding _ISO_8859_1_Encoding = null;
+        static Encoding _ISO_8859_1_Encoding;

         /// <summary>
         /// This function encodes the string data to UTF-8, and returns the encoded version. UTF-8 is
@@ -537,34 +535,25 @@
         /// <param name="data">An ISO-8859-1 string. </param>
         /// <returns>Returns the UTF-8 translation of data.</returns>
         //[return:CastToFalse]
-        public static string utf8_encode(string data)
-        {
-            if (string.IsNullOrEmpty(data))
+        public static string utf8_encode(PhpString data)
+        {
+            if (data.IsEmpty)
             {
                 return string.Empty;
             }

             // this function transforms ISO-8859-1 binary string into UTF8 string
-            // since our internal representation is native CLR string - UTF16, we have changed this semantic
-
-            //string encoded;
-
-            //if (!data.ContainsBinayString)
-            //{
-            //    encoded = (string)data;
-            //}
-            //else
-            //{
-            //    // if we got binary string, assume it's ISO-8859-1 encoded string and convert it to System.String
-            //    encoded = ISO_8859_1_Encoding.GetString((data).ToBytes);
-            //}
-
-            //// return utf8 encoded data
-            //return (Configuration.Application.Globalization.PageEncoding == Encoding.UTF8) ?
-            //    (object)encoded : // PageEncoding is UTF8, we can keep .NET string, which will be converted to UTF8 byte stream as it would be needed
-            //    (object)new PhpBytes(Encoding.UTF8.GetBytes(encoded));   // conversion of string to byte[] would not respect UTF8 encoding, convert it now
-
-            return data;
+            // since our internal representation is native CLR string - UTF16, we have changed this semantic for Unicode input.
+            // - Any native String is not modified. The string was already encoded into a valid UTF16 sequence.
+            // - byte[] is treated as ISO-8859-1 encoded, and will be decoded to UTF16
+
+            // This behavior has two reasons:
+            // - compatibility with Unicode behavior; already encoded string should not be decoded/encoded again
+            // - performance; instances of already encoded immutable strings are simply reused
+
+            // ISO-8859-1 is 8bit encoding so we don't have to concatenate the byte[] segments into a single array
+            // Any segments already encoded as System.String are returned as it is;
+            return data.ToString(ISO_8859_1_Encoding);
         }

         /// <summary>


Test loops half as much for more detailed timing breakdown

--- src/Polarize.Tests/Tests.cs
+++ src/Polarize.Tests/Tests.cs
@@ -12,7 +12,7 @@
     public class Tests
     {
         Dictionary<string, Dictionary<string, int>> testDictionary;
-        int loops = 100000;
+        int loops = 50000;

         [TestFixtureSetUp]
         public void SetUp()


Improve functions to handle system restore points.

--- src/SilDev/EnvironmentEx.cs
+++ src/SilDev/EnvironmentEx.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: EnvironmentEx.cs
-// Version:  2017-06-14 11:16
+// Version:  2017-06-14 11:20
 //
 // Copyright (c) 2017, Si13n7 Developments (r)
 // All rights reserved.
@@ -483,107 +483,113 @@
         }

         /// <summary>
-        ///     Determines whether the system restoring is enabled.
-        /// </summary>
-        public static bool SystemRestoringIsEnabled =>
-            Reg.Read(Registry.LocalMachine, @"SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore", "RPSessionInterval", 0) > 0;
-
-        /// <summary>
-        ///     The type of event. For more information, see <see cref="CreateSystemRestorePoint"/>.
-        /// </summary>
-        public enum EventType
-        {
-            /// <summary>
-            ///     A system change has begun. A subsequent nested call does not create a new restore
-            ///     point.
-            ///     <para>
-            ///         Subsequent calls must use <see cref="EventType.EndNestedSystemChange"/>, not
-            ///         <see cref="EventType.EndSystemChange"/>.
-            ///     </para>
-            /// </summary>
-            BeginNestedSystemChange = 0x66,
-
-            /// <summary>
-            ///     A system change has begun.
-            /// </summary>
-            BeginSystemChange = 0x64,
-
-            /// <summary>
-            ///     A system change has ended.
-            /// </summary>
-            EndNestedSystemChange = 0x67,
-
-            /// <summary>
-            ///     A system change has ended.
-            /// </summary>
-            EndSystemChange = 0x65
-        }
-
-        /// <summary>
-        ///     The type of restore point. For more information, see <see cref="CreateSystemRestorePoint"/>.
-        /// </summary>
-        public enum RestorePointType
-        {
-            /// <summary>
-            ///     An application has been installed.
-            /// </summary>
-            ApplicationInstall = 0x0,
-
-            /// <summary>
-            ///     An application has been uninstalled.
-            /// </summary>
-            ApplicationUninstall = 0x1,
-
-            /// <summary>
-            ///     An application needs to delete the restore point it created. For example, an
-            ///     application would use this flag when a user cancels an installation.
-            /// </summary>
-            CancelledOperation = 0xd,
-
-            /// <summary>
-            ///     A device driver has been installed.
-            /// </summary>
-            DeviceDriverInstall = 0xa,
-
-            /// <summary>
-            ///     An application has had features added or removed.
-            /// </summary>
-            ModifySettings = 0xc
-        }
-
-        /// <summary>
-        ///     Creates a restore point on the local system.
-        /// </summary>
-        /// <param name="description">
-        ///     The description to be displayed so the user can easily identify a restore point.
-        /// </param>
-        /// <param name="eventType">
-        ///     The type of event.
-        /// </param>
-        /// <param name="restorePointType">
-        ///     The type of restore point.
-        /// </param>
-        public static void CreateSystemRestorePoint(string description, EventType eventType, RestorePointType restorePointType)
-        {
-            try
-            {
-                if (!SystemRestoringIsEnabled)
-                    throw new WarningException("System restoring is disabled.");
-                var mScope = new ManagementScope("\\\\localhost\\root\\default");
-                var mPath = new ManagementPath("SystemRestore");
-                var options = new ObjectGetOptions();
-                using (var mClass = new ManagementClass(mScope, mPath, options))
-                using (var parameters = mClass.GetMethodParameters("CreateRestorePoint"))
-                {
-                    parameters["Description"] = description;
-                    parameters["EventType"] = (int)eventType;
-                    parameters["RestorePointType"] = (int)restorePointType;
-                    mClass.InvokeMethod("CreateRestorePoint", parameters, null);
-                }
-            }
-            catch (Exception ex)
-            {
-                Log.Write(ex);
+        ///     Provides functionality to handle system restore points.
+        /// </summary>
+        public static class SystemRestore
+        {
+            /// <summary>
+            ///     Determines whether the system restoring is enabled.
+            /// </summary>
+            public static bool IsEnabled =>
+                Reg.Read(Registry.LocalMachine, "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\SystemRestore", "RPSessionInterval", 0) > 0;
+
+            /// <summary>
+            ///     The type of event. For more information, see <see cref="Create"/>.
+            /// </summary>
+            public enum EventType
+            {
+                /// <summary>
+                ///     A system change has begun. A subsequent nested call does not create a new restore
+                ///     point.
+                ///     <para>
+                ///         Subsequent calls must use <see cref="EndNestedSystemChange"/>, not
+                ///         <see cref="EndSystemChange"/>.
+                ///     </para>
+                /// </summary>
+                BeginNestedSystemChange = 0x66,
+
+                /// <summary>
+                ///     A system change has begun.
+                /// </summary>
+                BeginSystemChange = 0x64,
+
+                /// <summary>
+                ///     A system change has ended.
+                /// </summary>
+                EndNestedSystemChange = 0x67,
+
+                /// <summary>
+                ///     A system change has ended.
+                /// </summary>
+                EndSystemChange = 0x65
+            }
+
+            /// <summary>
+            ///     The type of restore point. For more information, see <see cref="Create"/>.
+            /// </summary>
+            public enum PointType
+            {
+                /// <summary>
+                ///     An application has been installed.
+                /// </summary>
+                ApplicationInstall = 0x0,
+
+                /// <summary>
+                ///     An application has been uninstalled.
+                /// </summary>
+                ApplicationUninstall = 0x1,
+
+                /// <summary>
+                ///     An application needs to delete the restore point it created. For example, an
+                ///     application would use this flag when a user cancels an installation.
+                /// </summary>
+                CancelledOperation = 0xd,
+
+                /// <summary>
+                ///     A device driver has been installed.
+                /// </summary>
+                DeviceDriverInstall = 0xa,
+
+                /// <summary>
+                ///     An application has had features added or removed.
+                /// </summary>
+                ModifySettings = 0xc
+            }
+
+            /// <summary>
+            ///     Creates a restore point on the local system.
+            /// </summary>
+            /// <param name="description">
+            ///     The description to be displayed so the user can easily identify a restore point.
+            /// </param>
+            /// <param name="eventType">
+            ///     The type of event.
+            /// </param>
+            /// <param name="restorePointType">
+            ///     The type of restore point.
+            /// </param>
+            public static void Create(string description, EventType eventType, PointType restorePointType)
+            {
+                try
+                {
+                    if (!IsEnabled)
+                        throw new WarningException("System restoring is disabled.");
+                    var mScope = new ManagementScope("\\\\localhost\\root\\default");
+                    var mPath = new ManagementPath("SystemRestore");
+                    var options = new ObjectGetOptions();
+                    using (var mClass = new ManagementClass(mScope, mPath, options))
+                        using (var parameters = mClass.GetMethodParameters("CreateRestorePoint"))
+                        {
+                            parameters["Description"] = description;
+                            parameters["EventType"] = (int)eventType;
+                            parameters["RestorePointType"] = (int)restorePointType;
+                            mClass.InvokeMethod("CreateRestorePoint", parameters, null);
+                        }
+                }
+                catch (Exception ex)
+                {
+                    Log.Write(ex);
+                }
             }
         }
     }


Fixed non-nullable errors after merging #727 after #649 was already merged.

--- src/SimpleInjector/Scope.cs
+++ src/SimpleInjector/Scope.cs
@@ -255,11 +255,11 @@
         /// <param name="serviceType">An object that specifies the type of service object to get.</param>
         /// <returns>A service object of type serviceType -or- null if there is no service object of type
         /// <paramref name="serviceType"/>.</returns>
-        object IServiceProvider.GetService(Type serviceType)
+        object? IServiceProvider.GetService(Type serviceType)
         {
             Requires.IsNotNull(serviceType, nameof(serviceType));

-            IServiceProvider provider = this.Container;
+            IServiceProvider? provider = this.Container;

             if (provider is null)
             {
@@ -268,7 +268,7 @@
                     "Please use the overloaded constructor of Scope create an instance with a Container.");
             }

-            Scope originalScope = this.Container.CurrentThreadResolveScope;
+            Scope? originalScope = this.Container!.CurrentThreadResolveScope;

             try
             {


restored requiredPermissionName variable

--- src/Abp/Application/Navigation/MenuItemDefinition.cs
+++ src/Abp/Application/Navigation/MenuItemDefinition.cs
@@ -100,7 +100,8 @@
             ILocalizableString displayName,
             string icon = null,
             string url = null,
-            bool requiresAuthentication = false,
+            bool requiresAuthentication = false,
+            string requiredPermissionName = null,
             IPermissionDependency permissionDependency = null,
             int order = 0,
             object customData = null,
@@ -117,6 +118,7 @@
             Icon = icon;
             Url = url;
             RequiresAuthentication = requiresAuthentication;
+            RequiredPermissionName = requiredPermissionName;
             PermissionDependency = permissionDependency;
             Order = order;
             CustomData = customData;


fixed usage of CancellationToken.Register

--- src/Acr.UserDialogs.Interface/AbstractUserDialogs.cs
+++ src/Acr.UserDialogs.Interface/AbstractUserDialogs.cs
@@ -25,7 +25,7 @@
         protected abstract IProgressDialog CreateDialogInstance(ProgressDialogConfig config);

-        public virtual Task<string> ActionSheetAsync(string title, string cancel, string destructive, CancellationToken? cancelToken = null, params string[] buttons)
+        public virtual async Task<string> ActionSheetAsync(string title, string cancel, string destructive, CancellationToken? cancelToken = null, params string[] buttons)
         {
             var tcs = new TaskCompletionSource<string>();
             var cfg = new ActionSheetConfig();
@@ -42,9 +42,10 @@
                 cfg.Add(btn, () => tcs.TrySetResult(btn));

             var disp = this.ActionSheet(cfg);
-            cancelToken?.Register(disp.Dispose);
-
-            return tcs.Task;
+            using (cancelToken?.Register(disp.Dispose))
+            {
+                return await tcs.Task;
+            }
         }

@@ -116,7 +117,7 @@
         }

-        public virtual Task AlertAsync(AlertConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task AlertAsync(AlertConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -125,16 +126,12 @@
             config.OnAction = () => tcs.TrySetResult(null);

             var disp = this.Alert(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });
-
-            return tcs.Task;
-        }
-
-
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                await tcs.Task;
+            }
+        }
+
         public virtual Task AlertAsync(string message, string title, string okText, CancellationToken? cancelToken = null)
         {
             return this.AlertAsync(new AlertConfig
@@ -146,7 +143,7 @@
         }

-        public virtual Task<bool> ConfirmAsync(ConfirmConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task<bool> ConfirmAsync(ConfirmConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -155,12 +152,10 @@
             config.OnAction = x => tcs.TrySetResult(x);

             var disp = this.Confirm(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });
-            return tcs.Task;
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                return await tcs.Task;
+            }
         }

@@ -176,7 +171,7 @@
         }

-        public virtual Task<DatePromptResult> DatePromptAsync(DatePromptConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task<DatePromptResult> DatePromptAsync(DatePromptConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -185,13 +180,10 @@
             config.OnAction = x => tcs.TrySetResult(x);

             var disp = this.DatePrompt(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });
-
-            return tcs.Task;
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                return await tcs.Task;
+            }
         }

@@ -208,7 +200,7 @@
         }

-        public virtual Task<TimePromptResult> TimePromptAsync(TimePromptConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task<TimePromptResult> TimePromptAsync(TimePromptConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -217,13 +209,10 @@
             config.OnAction = x => tcs.TrySetResult(x);

             var disp = this.TimePrompt(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });;
-
-            return tcs.Task;
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                return await tcs.Task;
+            }
         }

@@ -240,7 +229,7 @@
         }

-        public virtual Task<LoginResult> LoginAsync(LoginConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task<LoginResult> LoginAsync(LoginConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -249,13 +238,10 @@
             config.OnAction = x => tcs.TrySetResult(x);

             var disp = this.Login(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });
-
-            return tcs.Task;
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                return await tcs.Task;
+            }
         }

@@ -269,7 +255,7 @@
         }

-        public virtual Task<PromptResult> PromptAsync(PromptConfig config, CancellationToken? cancelToken = null)
+        public virtual async Task<PromptResult> PromptAsync(PromptConfig config, CancellationToken? cancelToken = null)
         {
             if (config.OnAction != null)
                 throw new ArgumentException(NO_ONACTION);
@@ -278,13 +264,10 @@
             config.OnAction = x => tcs.TrySetResult(x);

             var disp = this.Prompt(config);
-            cancelToken?.Register(() =>
-            {
-                disp.Dispose();
-                tcs.TrySetCanceled();
-            });
-
-            return tcs.Task;
+            using (cancelToken?.Register(() => Cancel(disp, tcs)))
+            {
+                return await tcs.Task;
+            }
         }

@@ -309,5 +292,12 @@
                 Duration = dismissTimer ?? ToastConfig.DefaultDuration
             });
         }
+
+
+        private static void Cancel<TResult>(IDisposable disp, TaskCompletionSource<TResult> tcs)
+        {
+            disp.Dispose();
+            tcs.TrySetCanceled();
+        }
     }
 }


stop tracking generated version assembly

--- src/AmbientContext/Properties/AssemblyVersionInfo.cs
+++ src/AmbientContext/Properties/AssemblyVersionInfo.cs
@@ -1,7 +0,0 @@
-using System.Reflection;
-
-// GENERATED FILE - DO NOT EDIT
-
-[assembly: AssemblyVersion("2.1.0.0")]
-[assembly: AssemblyInformationalVersion("2.1.0-unstable.1+Branch.develop.Sha.fa357feee961db33368e781c4f42d1221cd6851e")]
-[assembly: AssemblyFileVersion("2.1.0.0")]


Update src/Bootstrap/Views/Shared/_validationSummary.cshtml

Found a bug where the alert div was being rendered when the only validation error found is not bound to a property and exclude properties is true. This is because ValidationSummary pushes in a blank entry in this scenario.

--- src/Bootstrap/Views/Shared/_validationSummary.cshtml
+++ src/Bootstrap/Views/Shared/_validationSummary.cshtml
@@ -1,7 +1,37 @@
-@if (ViewData.ModelState.Any(x => x.Value.Errors.Any()))
-{
-

-      ×
-      @Html.ValidationSummary(true)
-

+@{
+    // NOTE: This constant controls whether property validation failures will be excluded from the summary
+    const bool ExcludePropertyFailures = true;
+    var renderSummary = false;
+
+    if (ExcludePropertyFailures)
+    {
+        // Here we need to figure out if there are going to be any validation failures that are not related to a property
+        // If there are none found, we don't want to display the alert div
+
+        // This logic is taken from System.Web.Mvc.Html.ValidationExtensions.GetModelStateList(HtmlHelper htmlHelper, bool excludePropertyErrors)
+        // which is eventually invoked by calling @Html.ValidationSummary(ExcludePropertyFailures)
+        // The call to ViewData.ModelState.TryGetValue will determine whether there are any validation failures that are not related to a property
+        ModelState state;
+        ViewData.ModelState.TryGetValue(ViewData.TemplateInfo.HtmlFieldPrefix, out state);
+
+        if (state != null)
+        {
+            renderSummary = true;
+        }
+    }
+    else
+    {
+        if (ViewData.ModelState.Any(x => x.Value.Errors.Any()))
+        {
+            renderSummary = true;
+        }
+    }
+
+    if (renderSummary)
+    {
+

+            ×
+            @Html.ValidationSummary(ExcludePropertyFailures)
+

+    }
 }