#25: Address change in YouTube page structure

--- src/libvideo/YouTubeVideo.Decrypt.cs
+++ src/libvideo/YouTubeVideo.Decrypt.cs
@@ -256,7 +256,7 @@
         }

         private string DeclaredFunctionPrefix(string function) =>
-            "function " + function + '(';
+            "var " + function + "=function(";

         private int LiteralFunctionStart(string function, string js) =>
             js.IndexOf(LiteralFunctionPrefix(function));


Added serialization test for #73

Added serialization test for #73

--- AngleSharp.Core.Tests/Css/CssBorderProperty.cs
+++ AngleSharp.Core.Tests/Css/CssBorderProperty.cs
@@ -729,5 +729,23 @@
             Assert.AreEqual(Color.Transparent, concrete.Color);
             Assert.AreEqual(LineStyle.Outset, concrete.Style);
         }
+
+        [Test]
+        public void CssBorderOutSetWithNoColor()
+        {
+            var snippet = "border: 1px outset";
+            var property = CssParser.ParseDeclaration(snippet);
+            Assert.AreEqual("border", property.Name);
+            Assert.IsFalse(property.IsImportant);
+            Assert.IsInstanceOf<CssBorderProperty>(property);
+            var concrete = (CssBorderProperty)property;
+            Assert.AreEqual(CssValueType.List, concrete.Value.Type);
+            Assert.IsFalse(concrete.IsInherited);
+            Assert.IsTrue(concrete.HasValue);
+            Assert.AreEqual("1px outset", concrete.Value.CssText);
+            Assert.AreEqual(new Length(1f, Length.Unit.Px), concrete.Width);
+            Assert.AreEqual(Color.Transparent, concrete.Color);
+            Assert.AreEqual(LineStyle.Outset, concrete.Style);
+        }
     }
 }


Delete empty NativeResults file

Delete empty NativeResults file

--- Realm.Shared/native/NativeResults.cs
+++ Realm.Shared/native/NativeResults.cs
@@ -1,24 +0,0 @@
-////////////////////////////////////////////////////////////////////////////
-//
-// Copyright 2016 Realm Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////
-
-using System;
-using System.Runtime.InteropServices;
-
-namespace Realms
-{
-}


Report all dimensions of a PCB Panel

Report all dimensions of a PCB Panel

Report all dimensions of a PCB Panel

--- Reports/Report_All_Profile_Bounds.cs
+++ Reports/Report_All_Profile_Bounds.cs
@@ -125,7 +125,7 @@
                 BoaurdSizeLU = (BoardSize.X * unit).ToString("N3") + " / " + (BoardSize.Y * unit).ToString("N3");
                 BoardSizeRO = (BoardSize.Right * unit).ToString("N3") + " / " + (BoardSize.Bottom * unit).ToString("N3");
                 OriginBoardPoint = (originOfBoard.X * unit).ToString("N3") + " / " + (originOfBoard.Y * unit).ToString("N3");
-                g.TranslateTransform(1, -1);
+               // g.TranslateTransform(1, -1);
                 g.DrawString(BoaurdSizeWidth + " mm", new Font("Arial", 10), Brushes.YellowGreen, new Point((int)((locationBoard.X + rightTopBoard.X) / 2.1), locationBoard.Y - 20));
                 g.DrawString(BoardSizeHeight + " mm", new Font("Arial", 10), Brushes.YellowGreen, new Point(rightTopBoard.X - 70, (int)((rightTopBoard.Y + locationBoard.Y) / 2) - 5));

@@ -136,7 +136,7 @@
             }
             else
             {
-                g.TranslateTransform(1, -1);
+              //  g.TranslateTransform(1, -1);
                 g.DrawString(BoaurdSizeWidth + " mils", new Font("Arial", 10), Brushes.YellowGreen, new Point((int)((locationBoard.X + rightTopBoard.X) / 2.1), locationBoard.Y - 20));
                 g.DrawString(BoardSizeHeight + " mils", new Font("Arial", 10), Brushes.YellowGreen, new Point(rightTopBoard.X - 70, (int)((rightTopBoard.Y + locationBoard.Y) / 2) - 10));


Version bump.

Version bump.

--- Rock.Core/Properties/AssemblyInfo.cs
+++ Rock.Core/Properties/AssemblyInfo.cs
@@ -34,6 +34,6 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("0.9.0.0")]
 [assembly: AssemblyFileVersion("0.0.4")]
-[assembly: AssemblyInformationalVersion("0.0.4-alpha05")]
+[assembly: AssemblyInformationalVersion("0.0.4-alpha06")]

 [assembly: InternalsVisibleTo("Rock.Core.UnitTests")]


Improve failure message options in FluentAssert (#390)

* Add an option to skip printing the xml to the console
  for tests which are working with very large files
* Add the option for an informative message to help
  debugging assert failures

--- SIL.TestUtilities/FluentAssertXml.cs
+++ SIL.TestUtilities/FluentAssertXml.cs
@@ -198,26 +198,22 @@
 			}
 		}

-		public void HasNoMatchForXpath(string xpath, XmlNamespaceManager nameSpaceManager)
-		{
-			XmlNode node = GetNode( xpath, nameSpaceManager);
+		public void HasNoMatchForXpath(string xpath, XmlNamespaceManager nameSpaceManager = null, string message = null, bool print = true)
+		{
+			if (nameSpaceManager == null)
+			{
+				nameSpaceManager = new XmlNamespaceManager(new NameTable());
+			}
+			var node = GetNode(xpath, nameSpaceManager);
 			if (node != null)
 			{
-				Console.WriteLine("Was not supposed to match " + xpath);
-				PrintNodeToConsole(NodeOrDom);
-			}
-			Assert.IsNull(node, "Should not have matched: " + xpath);
-		}
-
-		public  void HasNoMatchForXpath(string xpath)
-		{
-			XmlNode node = GetNode( xpath, new XmlNamespaceManager(new NameTable()));
-			if (node != null)
-			{
-				Console.WriteLine("Was not supposed to match " + xpath);
-				PrintNodeToConsole(NodeOrDom);
-			}
-			Assert.IsNull(node, "Should not have matched: " + xpath);
+				if (message != null)
+					Console.WriteLine(message);
+				Console.WriteLine(@"Was not supposed to match " + xpath);
+				if (print)
+					PrintNodeToConsole(NodeOrDom);
+			}
+			Assert.IsNull(node, "Should not have matched: {0}{1}{2}", xpath, Environment.NewLine, message);
 		}

 		private XmlNode GetNode(string xpath)


Update todo

Update todo

--- SQLServerCDCSync/SQLServerCDCSync.cs
+++ SQLServerCDCSync/SQLServerCDCSync.cs
@@ -715,7 +715,7 @@
                 this.Tables = cdctables.Keys.ToArray();
             }

-            // TODO: implement check so we don't fail if the initial load is not done yet, fx skip table
+            // TODO: implement check so we don't fail if the initial load is not done yet, fx skip tables not done, if ILUPDATE or TFSTART or TFREDO
             // CDC States: http://msdn.microsoft.com/en-us/library/hh758667.aspx
             var merge_sql =
                 "IF(@cdcstate IS NULL OR @cdcstate = '') BEGIN\n" +
@@ -751,7 +751,8 @@
                     throw new Exception("Could not find any unique colums on the table");
                 }

-                // CDC Debug : http://msdn.microsoft.com/en-us/library/hh758686.aspx
+                // CDC Debug : http://msdn.microsoft.com/en-us/library/hh758686.aspx
+                // TODO: Do per table skip as first TODO suggested, if ILEND
                 // Create the merge SQL statement
                 merge_sql +=
                     // Reset start LSN


Update Program.cs

Update Program.cs

--- SchoolOfCSharp/ValueTypes/Program.cs
+++ SchoolOfCSharp/ValueTypes/Program.cs
@@ -11,7 +11,7 @@

             //No pointers or references
             //No object allocated on the heap
-            int valueTypeInt = 4; //No need to use the 'new' keyboard
+            int valueTypeInt = 4; //No need to use the 'new' keyword
             int valueTypeIntTwo = new int(); //but you could
             valueTypeIntTwo = 5;
             valueTypeInt = valueTypeIntTwo; //This is a copy and paste from memory, not a reference


Moving some of SSVertexBuffer functionality to SSArrayBuffer so that it can be shared with attribute buffers

--- SimpleScene/Meshes/SSVertexBuffer.cs
+++ SimpleScene/Meshes/SSVertexBuffer.cs
@@ -10,42 +10,46 @@
 		void bindGLAttributes();
 	}

-	// http://www.opentk.com/doc/graphics/geometry/vertex-buffer-objects
-
     public interface ISSVertexBuffer
     {
         void DrawBind();
         void DrawUnbind();
     }

-    public class SSVertexBuffer<VB> : ISSVertexBuffer
-        where VB : struct, ISSVertexLayout {
+    public interface ISSAttributeBuffer
+    {
+        void ConfigureAttribute (int attrLoc);
+    }
+
+    public abstract class SSArrayBuffer<V> where V: struct
+    {
+        // dummy vertex for calling bindGLAttributes()
+        protected static readonly V c_dummyElement = new V();
+        protected static readonly int c_elementSz = Marshal.SizeOf(c_dummyElement);
+
         private readonly BufferUsageHint m_usageHint;
-        private int m_VBOid = 0;
-        private int m_numVertices = 0;
-        // dummy vertex for calling bindGLAttributes()
-        private static readonly VB c_dummy = new VB();
-        private static readonly int c_vertexSz = Marshal.SizeOf(c_dummy);
+        private int m_bufferIdx = 0;
+        private int m_numElements = 0;

-        public int NumVertices { get { return m_numVertices; } }
+        public int NumElements { get { return m_numElements; } }

-        public SSVertexBuffer(BufferUsageHint hint = BufferUsageHint.DynamicDraw) {
+        public SSArrayBuffer(BufferUsageHint hint = BufferUsageHint.DynamicDraw) {
             m_usageHint = hint;
         }
-
-        public SSVertexBuffer (VB[] vertices,
-                               BufferUsageHint hint = BufferUsageHint.StaticDraw)
-        : this(hint) {
+
+        public SSArrayBuffer (V[] vertices,
+                                 BufferUsageHint hint = BufferUsageHint.StaticDraw)
+            : this(hint) {
             UpdateBufferData(vertices);
-		}
+        }

         public void Delete() {
-            GL.DeleteBuffer(m_VBOid);
-            m_VBOid = 0;
-            m_numVertices = 0;
+            GL.DeleteBuffer(m_bufferIdx);
+            m_bufferIdx = 0;
+            m_numElements = 0;
         }

-        public void UpdateBufferData(VB[] vertices)
+        public void UpdateBufferData(V[] vertices)
         {
             genBufferPrivate();
             bindPrivate();
@@ -53,13 +57,51 @@
             unbindPrivate();
         }

+        protected void bindPrivate() {
+            // bind for use
+            GL.BindBuffer(BufferTarget.ArrayBuffer, m_bufferIdx);
+        }
+
+        protected void unbindPrivate() {
+            // unbind from use
+            GL.BindBuffer (BufferTarget.ArrayBuffer, 0);
+        }
+
+        protected void genBufferPrivate() {
+            if (m_bufferIdx == 0) {
+                m_bufferIdx = GL.GenBuffer();
+            }
+        }
+
+        protected void updatePrivate(V[] vertices) {
+            m_numElements = vertices.Length;
+            GL.BufferData(BufferTarget.ArrayBuffer,
+                (IntPtr)(m_numElements * c_elementSz),
+                vertices,
+                m_usageHint);
+        }
+    }
+
+    // http://www.opentk.com/doc/graphics/geometry/vertex-buffer-objects
+    public class SSVertexBuffer<V> : SSArrayBuffer<V>, ISSVertexBuffer
+        where V : struct, ISSVertexLayout
+    {
+        public SSVertexBuffer(BufferUsageHint hint = BufferUsageHint.DynamicDraw)
+            : base(hint)
+        { }
+
+        public SSVertexBuffer (V[] vertices,
+                               BufferUsageHint hint = BufferUsageHint.StaticDraw)
+            : base(vertices, hint)
+        { }
+
         public void DrawArrays(PrimitiveType primType, bool doBind = true) {
             if (doBind) DrawBind();
             drawPrivate(primType);
             if (doBind) DrawUnbind();
         }

-        public void UpdateAndDrawArrays(VB[] vertices,
+        public void UpdateAndDrawArrays(V[] vertices,
                                         PrimitiveType primType,
                                         bool doBind = true)
         {
@@ -74,7 +116,7 @@
             // bind for use and setup for drawing
             bindPrivate();
             GL.PushClientAttrib(ClientAttribMask.ClientAllAttribBits);
-            c_dummy.bindGLAttributes();
+            c_dummyElement.bindGLAttributes();
         }

         public void DrawUnbind() {
@@ -83,32 +125,9 @@
             unbindPrivate();
         }

-        private void genBufferPrivate() {
-            if (m_VBOid == 0) {
-                m_VBOid = GL.GenBuffer();
-            }
+        protected void drawPrivate(PrimitiveType primType) {
+            GL.DrawArrays(primType, 0, NumElements);
         }
-
-        private void updatePrivate(VB[] vertices) {
-            m_numVertices = vertices.Length;
-            GL.BufferData(BufferTarget.ArrayBuffer,
-                (IntPtr)(m_numVertices * c_vertexSz),
-               vertices,
-               m_usageHint);
-        }
-
-        private void drawPrivate(PrimitiveType primType) {
-            GL.DrawArrays(primType, 0, m_numVertices);
-        }
-
-		private void bindPrivate() {
-            // bind for use
-			GL.BindBuffer (BufferTarget.ArrayBuffer, m_VBOid);
-		}
-		private void unbindPrivate() {
-            // unbind from use
-			GL.BindBuffer (BufferTarget.ArrayBuffer, 0);
-		}
 	}
 }


Removed Camera groupbox

Removed Camera groupbox

--- SkatePark/MainOpenGLForm.Designer.cs
+++ SkatePark/MainOpenGLForm.Designer.cs
@@ -32,6 +32,9 @@
             this.openglControl = new Tao.Platform.Windows.SimpleOpenGlControl();
             this.refreshTimer = new System.Windows.Forms.Timer(this.components);
             this.panel1 = new System.Windows.Forms.Panel();
+            this.groupBox4 = new System.Windows.Forms.GroupBox();
+            this.btnImport = new System.Windows.Forms.Button();
+            this.btnExport = new System.Windows.Forms.Button();
             this.groupBox3 = new System.Windows.Forms.GroupBox();
             this.btnNewRails = new System.Windows.Forms.Button();
             this.btnNewIncurve = new System.Windows.Forms.Button();
@@ -41,14 +44,10 @@
             this.btnBlockMove = new System.Windows.Forms.Button();
             this.btnBlockRotate = new System.Windows.Forms.Button();
             this.btnBlockDelete = new System.Windows.Forms.Button();
-            this.groupBox1 = new System.Windows.Forms.GroupBox();
-            this.btnExport = new System.Windows.Forms.Button();
-            this.btnImport = new System.Windows.Forms.Button();
-            this.groupBox4 = new System.Windows.Forms.GroupBox();
             this.panel1.SuspendLayout();
+            this.groupBox4.SuspendLayout();
             this.groupBox3.SuspendLayout();
             this.groupBox2.SuspendLayout();
-            this.groupBox4.SuspendLayout();
             this.SuspendLayout();
             //
             // openglControl
@@ -85,20 +84,50 @@
             this.panel1.Controls.Add(this.groupBox4);
             this.panel1.Controls.Add(this.groupBox3);
             this.panel1.Controls.Add(this.groupBox2);
-            this.panel1.Controls.Add(this.groupBox1);
             this.panel1.Dock = System.Windows.Forms.DockStyle.Left;
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Name = "panel1";
             this.panel1.Size = new System.Drawing.Size(228, 511);
             this.panel1.TabIndex = 1;
             //
+            // groupBox4
+            //
+            this.groupBox4.Controls.Add(this.btnImport);
+            this.groupBox4.Controls.Add(this.btnExport);
+            this.groupBox4.Location = new System.Drawing.Point(3, 286);
+            this.groupBox4.Name = "groupBox4";
+            this.groupBox4.Size = new System.Drawing.Size(216, 76);
+            this.groupBox4.TabIndex = 9;
+            this.groupBox4.TabStop = false;
+            this.groupBox4.Text = "Scene";
+            //
+            // btnImport
+            //
+            this.btnImport.Location = new System.Drawing.Point(75, 19);
+            this.btnImport.Name = "btnImport";
+            this.btnImport.Size = new System.Drawing.Size(62, 45);
+            this.btnImport.TabIndex = 8;
+            this.btnImport.Text = "Import";
+            this.btnImport.UseVisualStyleBackColor = true;
+            this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
+            //
+            // btnExport
+            //
+            this.btnExport.Location = new System.Drawing.Point(7, 19);
+            this.btnExport.Name = "btnExport";
+            this.btnExport.Size = new System.Drawing.Size(62, 45);
+            this.btnExport.TabIndex = 7;
+            this.btnExport.Text = "Export";
+            this.btnExport.UseVisualStyleBackColor = true;
+            this.btnExport.Click += new System.EventHandler(this.button1_Click);
+            //
             // groupBox3
             //
             this.groupBox3.Controls.Add(this.btnNewRails);
             this.groupBox3.Controls.Add(this.btnNewIncurve);
             this.groupBox3.Controls.Add(this.btnNewQP);
             this.groupBox3.Controls.Add(this.btnNewCube);
-            this.groupBox3.Location = new System.Drawing.Point(4, 283);
+            this.groupBox3.Location = new System.Drawing.Point(4, 147);
             this.groupBox3.Name = "groupBox3";
             this.groupBox3.Size = new System.Drawing.Size(217, 133);
             this.groupBox3.TabIndex = 0;
@@ -150,7 +179,7 @@
             this.groupBox2.Controls.Add(this.btnBlockMove);
             this.groupBox2.Controls.Add(this.btnBlockRotate);
             this.groupBox2.Controls.Add(this.btnBlockDelete);
-            this.groupBox2.Location = new System.Drawing.Point(3, 139);
+            this.groupBox2.Location = new System.Drawing.Point(3, 3);
             this.groupBox2.Name = "groupBox2";
             this.groupBox2.Size = new System.Drawing.Size(217, 138);
             this.groupBox2.TabIndex = 1;
@@ -186,46 +215,6 @@
             this.btnBlockDelete.Text = "Delete";
             this.btnBlockDelete.UseVisualStyleBackColor = true;
             this.btnBlockDelete.Click += new System.EventHandler(this.btnBlockDelete_Click);
-            //
-            // groupBox1
-            //
-            this.groupBox1.Location = new System.Drawing.Point(4, 4);
-            this.groupBox1.Name = "groupBox1";
-            this.groupBox1.Size = new System.Drawing.Size(217, 129);
-            this.groupBox1.TabIndex = 0;
-            this.groupBox1.TabStop = false;
-            this.groupBox1.Text = "Camera";
-            //
-            // btnExport
-            //
-            this.btnExport.Location = new System.Drawing.Point(7, 19);
-            this.btnExport.Name = "btnExport";
-            this.btnExport.Size = new System.Drawing.Size(62, 45);
-            this.btnExport.TabIndex = 7;
-            this.btnExport.Text = "Export";
-            this.btnExport.UseVisualStyleBackColor = true;
-            this.btnExport.Click += new System.EventHandler(this.button1_Click);
-            //
-            // btnImport
-            //
-            this.btnImport.Location = new System.Drawing.Point(75, 19);
-            this.btnImport.Name = "btnImport";
-            this.btnImport.Size = new System.Drawing.Size(62, 45);
-            this.btnImport.TabIndex = 8;
-            this.btnImport.Text = "Import";
-            this.btnImport.UseVisualStyleBackColor = true;
-            this.btnImport.Click += new System.EventHandler(this.btnImport_Click);
-            //
-            // groupBox4
-            //
-            this.groupBox4.Controls.Add(this.btnImport);
-            this.groupBox4.Controls.Add(this.btnExport);
-            this.groupBox4.Location = new System.Drawing.Point(4, 422);
-            this.groupBox4.Name = "groupBox4";
-            this.groupBox4.Size = new System.Drawing.Size(216, 76);
-            this.groupBox4.TabIndex = 9;
-            this.groupBox4.TabStop = false;
-            this.groupBox4.Text = "Scene";
             //
             // MainOpenGLForm
             //
@@ -237,9 +226,9 @@
             this.Name = "MainOpenGLForm";
             this.Text = "Skate Park Alpha";
             this.panel1.ResumeLayout(false);
+            this.groupBox4.ResumeLayout(false);
             this.groupBox3.ResumeLayout(false);
             this.groupBox2.ResumeLayout(false);
-            this.groupBox4.ResumeLayout(false);
             this.ResumeLayout(false);

         }
@@ -258,7 +247,6 @@
         private System.Windows.Forms.Button btnBlockMove;
         private System.Windows.Forms.Button btnBlockRotate;
         private System.Windows.Forms.Button btnBlockDelete;
-        private System.Windows.Forms.GroupBox groupBox1;
         private System.Windows.Forms.Button btnImport;
         private System.Windows.Forms.Button btnExport;
         private System.Windows.Forms.GroupBox groupBox4;


Change message.

Change message.

--- src/CompetitionPlatform/Views/Shared/CreateClosed.cshtml
+++ src/CompetitionPlatform/Views/Shared/CreateClosed.cshtml
@@ -6,7 +6,6 @@

Creating projects is temporarily unavailable.

-        The Function "сreating project" will be available for lykke community members very soon.
-        Thank you for your patience.
+        The Function "сreating project" is only available for lykke community members with an approved KYC Status.


Added function GetRadius

Added function GetRadius

--- SourceFiles/FP3.0/Common/Vertices.cs
+++ SourceFiles/FP3.0/Common/Vertices.cs
@@ -132,6 +132,25 @@
             // Centroid
             c *= 1.0f / area;
             return c;
+        }
+
+        /// <summary>
+        /// Gets the radius based on area.
+        /// </summary>
+        /// <returns></returns>
+        public float GetRadius()
+        {
+            float radius;
+            float area = GetSignedArea();
+
+            double radiusSqrd = (double)area / MathHelper.Pi;
+            if (radiusSqrd < 0)
+            {
+                radiusSqrd *= -1;
+            }
+
+            radius = (float)System.Math.Sqrt(radiusSqrd);
+            return radius;
         }

         /// <summary>


Update JpegSkiaSharpExporter.cs

Update JpegSkiaSharpExporter.cs

--- src/Core2D/FileWriter/SkiaSharp/JpegSkiaSharpExporter.cs
+++ src/Core2D/FileWriter/SkiaSharp/JpegSkiaSharpExporter.cs
@@ -29,7 +29,7 @@
         /// <inheritdoc/>
         public void Save(Stream stream, IPageContainer container)
         {
-            var info = new SKImageInfo((int)container.Width, (int)container.Height);
+            var info = new SKImageInfo((int)container.Width, (int)container.Height, SKImageInfo.PlatformColorType, SKAlphaType.Unpremul);
             using var bitmap = new SKBitmap(info);
             using (var canvas = new SKCanvas(bitmap))
             {


changed: LE.ParameterExpression back to array in LambdaExpression in regards to #116

--- src/FastExpressionCompiler.LightExpression/Expression.cs
+++ src/FastExpressionCompiler.LightExpression/Expression.cs
@@ -170,8 +170,7 @@
             new ArithmeticBinaryExpression(ExpressionType.Divide, left, right, left.Type);

         public static BlockExpression Block(params Expression[] expressions) =>
-            new BlockExpression(expressions[expressions.Length - 1].Type,
-                Tools.Empty<ParameterExpression>(), expressions);
+            new BlockExpression(expressions[expressions.Length - 1].Type, Tools.Empty<ParameterExpression>(), expressions);

         public static TryExpression TryCatch(Expression body, params CatchBlock[] handlers) =>
             new TryExpression(body, null, handlers);
@@ -665,14 +664,14 @@

         public Type ReturnType => Body.Type;
         public readonly Expression Body;
-        public readonly IReadOnlyList<ParameterExpression> Parameters;
+        public readonly ParameterExpression[] Parameters;

         public override SysExpr ToExpression() => ToLambdaExpression();

         public System.Linq.Expressions.LambdaExpression ToLambdaExpression() =>
             SysExpr.Lambda(Body.ToExpression(), Parameters.Map(p => p.ParamExpr));

-        internal LambdaExpression(Type delegateType, Expression body, IReadOnlyList<ParameterExpression> parameters)
+        internal LambdaExpression(Type delegateType, Expression body, ParameterExpression[] parameters)
         {
             Body = body;
             Parameters = parameters;


Removed "sealed" - breaking change

Removed "sealed" - breaking change

--- src/GeneticSharp.Domain/Chromosomes/IntegerChromosome.cs
+++ src/GeneticSharp.Domain/Chromosomes/IntegerChromosome.cs
@@ -7,7 +7,7 @@
 	/// <summary>
 	/// Integer chromosome with binary values (0 and 1).
 	/// </summary>
-	public sealed class IntegerChromosome : BinaryChromosomeBase
+	public class IntegerChromosome : BinaryChromosomeBase
 	{
 		private int m_minValue;
 		private int m_maxValue;


Fixed to add entry to the CheckInOut

Fixed to add entry to the CheckInOut

--- StarRezApiClient/StarRezApiClient.cs
+++ StarRezApiClient/StarRezApiClient.cs
@@ -449,7 +449,7 @@

         private dynamic[] CheckInOut(int id, XElement postXml)
         {
-            List<object> urlBits = new List<object> { "function" };
+            List<object> urlBits = new List<object> { "function", "entry" };
             if (id > -1)
             {
                 urlBits.Add(id);


CommandLineParser: tidy up output

CommandLineParser: tidy up output

--- src/Kirkin.Experimental/CommandLine/CommandLineParser.cs
+++ src/Kirkin.Experimental/CommandLine/CommandLineParser.cs
@@ -59,7 +59,7 @@
                 return BuildCommand(definition, args);
             }

-            throw new InvalidOperationException($"Unknown command: '{commandName}'.");
+            throw new InvalidOperationException($"Unknown command '{commandName}'.");
         }

         private static ICommand BuildCommand(CommandDefinition definition, string[] args)
@@ -110,7 +110,7 @@
                         string fullName = chunk[0].Substring(2);

                         if (!definition.OptionsByFullName.TryGetValue(fullName, out option)) {
-                            throw new InvalidOperationException($"Unable to find option with name '{fullName}'.");
+                            throw new InvalidOperationException($"Unknown option '{fullName}'.");
                         }
                     }
                     else if (chunk[0].StartsWith("/"))
@@ -118,7 +118,7 @@
                         string fullName = chunk[0].Substring(1);

                         if (!definition.OptionsByFullName.TryGetValue(fullName, out option)) {
-                            throw new InvalidOperationException($"Unable to find option with name '{fullName}'.");
+                            throw new InvalidOperationException($"Unknown option '{fullName}'.");
                         }
                     }
                     else if (chunk[0].StartsWith("-"))
@@ -126,16 +126,16 @@
                         string shortName = chunk[0].Substring(1);

                         if (!definition.OptionsByShortName.TryGetValue(shortName, out option)) {
-                            throw new InvalidOperationException($"Unable to find option with short name '{shortName}'.");
+                            throw new InvalidOperationException($"Unknown option '{shortName}'.");
                         }
                     }

                     if (option == null) {
-                        throw new InvalidOperationException($"Unhandled syntax token: '{chunk[0]}'.");
+                        throw new InvalidOperationException($"Unhandled syntax token '{chunk[0]}'.");
                     }

                     if (!seenParameters.Add(option)) {
-                        throw new InvalidOperationException($"Duplicate option: '{chunk[0]}'.");
+                        throw new InvalidOperationException($"Duplicate option '{chunk[0]}'.");
                     }

                     chunk.RemoveAt(0);
@@ -149,7 +149,7 @@
                     }

                     if (!seenParameters.Add(definition.Parameter)) {
-                        throw new InvalidOperationException("Duplicate parameter value detected.");
+                        throw new InvalidOperationException("Duplicate parameter value.");
                     }

                     argValues.Add(definition.Parameter.Name, definition.Parameter.ParseArgs(chunk));


Write the XML files out with formatting (instead of all on one line)!

--- SynthesiaMetadataGui/MetadataFile.cs
+++ SynthesiaMetadataGui/MetadataFile.cs
@@ -35,8 +35,8 @@

         public void Save(Stream output)
         {
-            using (XmlWriter writer = XmlWriter.Create(output))
-                m_document.Save(writer);
+            using (StreamWriter writer = new StreamWriter(output))
+                m_document.Save(writer, SaveOptions.None);
         }

         public void RemoveSong(string uniqueId)


default header and parameter is used

default header and parameter is used

--- TIKSN.Core/Web/Rest/RestRequester.cs
+++ TIKSN.Core/Web/Rest/RestRequester.cs
@@ -62,10 +62,10 @@
                             propertyStringValue = propertyValue.ToString();
                         }

-                        parameter = Uri.EscapeUriString(propertyStringValue);
+                        parameter = propertyStringValue;
                     }

-                    resourceLocation = resourceLocation.Replace($"{{{property.Name}}}", parameter);
+                    resourceLocation = ReplaceParameterValueInLocation(resourceLocation, property.Name, parameter);
                 }
                 else
                 {
@@ -78,12 +78,39 @@
                 }
             }

+            var resourceParameters = await _configuration.GetResourceParameters(restEndpointAttribute.ApiName);
+            if (resourceParameters != null)
+            {
+                foreach (var resourceParameter in resourceParameters)
+                {
+                    resourceLocation = ReplaceParameterValueInLocation(resourceLocation, resourceParameter.Key, resourceParameter.Value);
+                }
+            }
+
             var baseUrl = await _configuration.GetBaseUrl(restEndpointAttribute.ApiName);
             var requestUrl = new Uri(baseUrl, resourceLocation);

             var httpClient = new HttpClient();

+            var defaultHeaders = await _configuration.GetDefaultHeaders(restEndpointAttribute.ApiName);
+            if (defaultHeaders != null)
+            {
+                foreach (var defaultHeader in defaultHeaders)
+                {
+                    httpClient.DefaultRequestHeaders.Add(defaultHeader.Key, defaultHeader.Value);
+                }
+            }
+
             return await MakeRequest<TResult>(httpClient, restEndpointAttribute.Verb, requestUrl, requestContent, requestContentMediaType, restEndpointAttribute.MediaType, cancellationToken);
+        }
+
+        private static string ReplaceParameterValueInLocation(string resourceLocation, string parameterName, string parameterValue)
+        {
+            var escapedParameterValue = parameterValue ?? string.Empty;
+            escapedParameterValue = Uri.EscapeUriString(parameterValue);
+
+            resourceLocation = resourceLocation.Replace($"{{{parameterName}}}", escapedParameterValue);
+            return resourceLocation;
         }

         private HttpContent GetContent(object requestContent, string requestContentMediaType)


Combinations AddChildVisitor algo under dev

--- src/NCase.Core/Back.Imp/Combinations/AddChildVisitors.cs
+++ src/NCase.Core/Back.Imp/Combinations/AddChildVisitors.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Linq;
 using JetBrains.Annotations;
 using NCaseFramework.Back.Api.Combinations;
@@ -21,7 +22,7 @@
             mCodeLocationPrinter = codeLocationPrinter;
         }

-        public void Visit([NotNull] IAddChildDirector dir, [NotNull] IProdNode root, [NotNull] INode nodeToAdd)
+        public void Visit([NotNull] IAddChildDirector dir, [NotNull] IProdNode prodNode, [NotNull] INode nodeToAdd)
         {
             // GRAMMAR:
             // prod   := union (emptyline union)*
@@ -31,67 +32,60 @@

             CodeLocation codeLocation = nodeToAdd.CodeLocation;

-            if (!root.Children.Any())
-            {
-                var unionNode = new UnionNode(new UnionId(), codeLocation);
-                unionNode.AddBranch(new BranchNode(new BranchId(), codeLocation, nodeToAdd));
-                root.AddUnion(unionNode);
+            if (!prodNode.Children.Any())
+            {
+                // CASE ROOT: ONLY PROD NODE TO NOT HAVE ANY CHILDREN INITIALLY
+                var branchNode = new BranchNode(new BranchId(), prodNode.CodeLocation, nodeToAdd);
+                var unionNode = new UnionNode(new UnionId(), prodNode.CodeLocation);
+                unionNode.AddBranch(branchNode);
+                prodNode.AddUnion(unionNode);
+            }
+
+            // NOW NORMAL CASE: THERE ARE ONLY BLOCKS OF (prod-union-branch)
+
+            IUnionNode lastUnion = prodNode.Unions.Last();
+            if (lastUnion == null) throw new ArgumentException("lastUnion is null");
+
+            IBranchNode lastBranch = lastUnion.Branches.Last();
+            if (lastBranch == null) throw new ArgumentException("lastBranch is null");
+
+            if(lastBranch.Product == null)
+            {
+                // CASE: k
             }

             int nodeToAddIndentation = GetIndentation(nodeToAdd);
-            INode parent = FindBestParentRegardingToIndentation(root, nodeToAddIndentation, nodeToAdd);
-
-            if (parent == null)
+            INode topParentCandidate = FindTopParentRegardingToIndentation(prodNode, nodeToAddIndentation, nodeToAdd);
+
+            if (topParentCandidate == null)
             {
                 throw new InvalidSyntaxException(mCodeLocationPrinter,
                                                  codeLocation,
                                                  "No parent found to add the node corresponding to this statement");
             }

-            INode previousSibling = parent.Children.LastOrDefault();
-
-            if (parent is IProdNode)
-            {
-
-            }
-            else if (parent is UnionNode)
-            {
-
-            }
-            else if (parent is BranchNode)
-            {
-
-            }
-            if (previousSibling == null)
-            {
-                parent.AddTreeBranch(new ProdNode(nodeToAdd.CodeLocation, new ProdId(), nodeToAdd));
-                return;
-            }
-
-            bool isNewBranch = ExistBracketsBetweenSiblings(previousSibling, nodeToAdd);
-            if (isNewBranch)
-            {
-                parent.AddTreeBranch(new ProdNode(nodeToAdd.CodeLocation, new ProdId(), nodeToAdd));
-                return;
-            }
-
-            bool isNewSetOfCartesianProduct = ExistEmptyLineBetweenSiblings(previousSibling, nodeToAdd);
-            if (isNewSetOfCartesianProduct)
-            {
-            }
-
-            // else belongs to same set
+            /* bool isNewBranch = ExistBracketsBetweenSiblings(previousSibling, nodeToAdd);
+             * bool isNewSetOfCartesianProduct = ExistEmptyLineBetweenSiblings(previousSibling, nodeToAdd); */
+
+            INode previousSibling = topParentCandidate.Children.LastOrDefault();
+
+            if (!(topParentCandidate is IProdNode))
+                throw new InvalidOperationException("unexpected node type. Indentation occurs only at branch node, as a consequence, triplet prod-union-branch are blockwise at same level");
+
+
+            if()
         }

         [CanBeNull]
-        private INode FindBestParentRegardingToIndentation([NotNull] INode parentCandidate,
+        private INode FindTopParentRegardingToIndentation([NotNull] INode parentCandidate,
                                                            int nodeToAddIndentation,
                                                            [NotNull] INode nodeToAdd)
         {
+            int parentCandidateIndentation = GetIndentation(parentCandidate);
+
             INode lastChild = parentCandidate.Children.LastOrDefault();
             if (lastChild == null)
             {
-                int parentCandidateIndentation = GetIndentation(parentCandidate);
                 if (nodeToAddIndentation < parentCandidateIndentation + INDENTATION_SIZE)
                     throw new IndentationException(mCodeLocationPrinter, nodeToAdd.CodeLocation, "Invalid Indentation");

@@ -106,7 +100,14 @@
             if (nodeToAddIndentation == lastChildIndentation)
                 return parentCandidate;

-            return FindBestParentRegardingToIndentation(lastChild, nodeToAddIndentation, nodeToAdd);
+            var temporaryResult = FindTopParentRegardingToIndentation(lastChild, nodeToAddIndentation, nodeToAdd);
+            if(temporaryResult == null)
+                throw new InvalidOperationException("should never happen");
+
+            int temporaryResultIndentation = GetIndentation(temporaryResult);
+            return temporaryResultIndentation == parentCandidateIndentation
+                    ? parentCandidate
+                    : temporaryResult;
         }

         private bool ExistBracketsBetweenSiblings([NotNull] INode previousSibling, [NotNull] INode nodeToAdd)


Stream fixed

Stream fixed

--- src/NUnit.TestAdapter.Tests.Acceptance/DirectoryMutex.cs
+++ src/NUnit.TestAdapter.Tests.Acceptance/DirectoryMutex.cs
@@ -11,7 +11,7 @@
         {
             var mutexFilePath = Path.Combine(directoryPath, ".mutex");

-            Stream stream;
+            FileStream stream;
             try
             {
                 stream = new FileStream(mutexFilePath, FileMode.Create, FileAccess.Write, FileShare.None, bufferSize: 1, FileOptions.DeleteOnClose);


Ensure that projects are expanded before trying to run

--- src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs
+++ src/NUnitEngine/nunit.engine/Runners/MasterTestRunner.cs
@@ -50,11 +50,13 @@
             _services = services;
             TestPackage = package;

+            // Get references to the services we use
             _projectService = _services.GetService<IProjectService>();
             _runtimeService = _services.GetService<IRuntimeFrameworkService>();
             _extensionService = _services.GetService<ExtensionService>();
             _engineRunner = _services.GetService<ITestRunnerFactory>().MakeTestRunner(package);
-            //LoadPackage();
+
+            InitializePackage();
         }

         #region Properties
@@ -204,10 +206,10 @@
         #region Helper Methods

         /// <summary>
-        /// Load a TestPackage for possible execution,
-        /// saving the result in the LoadResult property.
-        /// </summary>
-        private void LoadPackage()
+        /// Check the package settings, expand projects and
+        /// determine what runtimes may be needed.
+        /// </summary>
+        private void InitializePackage()
         {
             // Last chance to catch invalid settings in package,
             // in case the client runner missed them.
@@ -230,8 +232,6 @@
             {
                 throw new NUnitEngineException("Cannot run tests in process - a 32 bit process is required.");
             }
-
-            LoadResult = _engineRunner.Load().Aggregate(TEST_RUN_ELEMENT, TestPackage.Name, TestPackage.FullName);
         }

         private TestEngineResult PrepareResult(TestEngineResult result)


ABIDeserialiser.cs reverted

ABIDeserialiser.cs reverted

--- src/Nethereum.ABI/JsonDeserialisation/ABIDeserialiser.cs
+++ src/Nethereum.ABI/JsonDeserialisation/ABIDeserialiser.cs
@@ -17,7 +17,6 @@
         public EventABI BuildEvent(IDictionary<string, object> eventobject)
         {
             var eventABI = new EventABI((string) eventobject["name"]);
-            eventABI.IsAnonymous = (bool)eventobject["anonymous"];
             eventABI.InputParameters = BuildEventParameters((List<object>) eventobject["inputs"]);

             return eventABI;


Fixed an issue where spawnnpc would compare the pointer for two different objects rather than the object type.

--- Terraria_Server/Commands/Commands.cs
+++ Terraria_Server/Commands/Commands.cs
@@ -774,7 +774,7 @@
 				// Get the class id of the npc
 				Int32 realNPCId = 0;
 				NPC fclass = Registries.NPC.FindClass(npcName);
-				if (fclass != Registries.NPC.Default)
+				if (fclass.type != Registries.NPC.Default.type)
 				{
 					realNPCId = fclass.Type;
 				}


codegen: fix array factory

codegen: fix array factory

--- src/Odachi.CodeGen.TypeScript/TypeScriptModuleContext.cs
+++ src/Odachi.CodeGen.TypeScript/TypeScriptModuleContext.cs
@@ -454,7 +454,7 @@
 	return {{
 		create: (source: any): Array<T> =>
 			Array.isArray(source) ?
-				source.map((item: any) => T_factory.create(source)) :
+				source.map((item: any) => T_factory.create(item)) :
 				fail(`Contract violation: expected array, got \\'{{typeof(source)}}\\'`)
 	}};
 }}");


Switching cast from Int64 to Int32

Switching cast from Int64 to Int32

Not sure why we were originally casting it to an Int64 in the first place,
although I seem to remember that MySQL stored a lot of things as Int64
where MSSQL didn't. Anyways, it was throwing cast errors and now it's not.

--- TeslaSQL/DataUtils/MySQLDataUtils.cs
+++ TeslaSQL/DataUtils/MySQLDataUtils.cs
@@ -1045,9 +1045,10 @@
                 {
                     fields[tc] = new List<TColumn>();
                 }
+
                 fields[tc].Add(new TColumn(
                     (String)row["COLUMN_NAME"],
-                    (Int64)row["InPrimaryKey"] > 0 ? true : false,
+                    (Int32)row["InPrimaryKey"] > 0 ? true : false,
                     DataType.ParseDataType(row),
                     //for some reason IS_NULLABLE is a varchar(3) rather than a bool or bit
                     (String)row["IS_NULLABLE"] == "YES" ? true : false));


Adding clarification on usage

Adding clarification on usage

--- src/AutoMapper/Mapper.cs
+++ src/AutoMapper/Mapper.cs
@@ -54,7 +54,7 @@
         }

         /// <summary>
-        /// Resets the mapper configuration
+        /// Resets the mapper configuration. Not intended for production use, but for testing scenarios.
         /// </summary>
         public static void Reset()
         {


Reduce number of branches and IL size of string.Trim methods (#9115)

--- src/mscorlib/src/System/String.Manipulation.cs
+++ src/mscorlib/src/System/String.Manipulation.cs
@@ -1556,7 +1556,7 @@
             {
                 return TrimWhiteSpaceHelper(TrimType.Both);
             }
-            fixed (char* pTrimChars = trimChars)
+            fixed (char* pTrimChars = &trimChars[0])
             {
                 return TrimHelper(pTrimChars, trimChars.Length, TrimType.Both);
             }
@@ -1575,7 +1575,7 @@
             {
                 return TrimWhiteSpaceHelper(TrimType.Head);
             }
-            fixed (char* pTrimChars = trimChars)
+            fixed (char* pTrimChars = &trimChars[0])
             {
                 return TrimHelper(pTrimChars, trimChars.Length, TrimType.Head);
             }
@@ -1594,7 +1594,7 @@
             {
                 return TrimWhiteSpaceHelper(TrimType.Tail);
             }
-            fixed (char* pTrimChars = trimChars)
+            fixed (char* pTrimChars = &trimChars[0])
             {
                 return TrimHelper(pTrimChars, trimChars.Length, TrimType.Tail);
             }


Revise 'Check For Update' window padding

--- AboutPage/CheckForUpdatesPage.cs
+++ AboutPage/CheckForUpdatesPage.cs
@@ -19,7 +19,7 @@
 			FlowLayoutWidget topToBottom = new FlowLayoutWidget(FlowDirection.TopToBottom);
 			topToBottom.AnchorAll();
 			topToBottom.BackgroundColor = ActiveTheme.Instance.SecondaryBackgroundColor;
-			Padding = new BorderDouble(left: 5, right: 5);
+			Padding = 0;

 			FlowLayoutWidget currentFeedAndDropDownContainer = new FlowLayoutWidget(FlowDirection.LeftToRight);
 			currentFeedAndDropDownContainer.VAnchor = VAnchor.FitToChildren;


(GraFormat): fixed stride calculation.

(GraFormat): fixed stride calculation.

--- ArcFormats/MnoViolet/ImageGRA.cs
+++ ArcFormats/MnoViolet/ImageGRA.cs
@@ -26,9 +26,7 @@
 using System;
 using System.ComponentModel.Composition;
 using System.IO;
-using System.Windows;
 using System.Windows.Media;
-using System.Windows.Media.Imaging;
 using GameRes.Compression;

 namespace GameRes.Formats.MnoViolet
@@ -78,15 +76,12 @@

         public override ImageData Read (Stream stream, ImageMetaData info)
         {
-            var meta = info as GraMetaData;
-            if (null == meta)
-                throw new ArgumentException ("GraFormat.Read should be supplied with GraMetaData", "info");
-
+            var meta = (GraMetaData)info;
             stream.Position = 0x14;
             using (var reader = new LzssReader (stream, meta.PackedSize, meta.UnpackedSize))
             {
                 reader.Unpack();
-                int stride = (int)info.Width*info.BPP/8;
+                int stride = ((int)info.Width*info.BPP/8 + 3) & ~3;
                 PixelFormat format;
                 if (24 == info.BPP)
                     format = PixelFormats.Bgr24;


Refactor Toggle component

Refactor Toggle component

 * Add missing [Serializable] attribute to _toggleGroup.
 * Make it less dependent on prefab structure, so it can be reused
  more easily(i.e. in DropDown).

--- Assets/Alensia/Core/UI/Toggle.cs
+++ Assets/Alensia/Core/UI/Toggle.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Globalization;
 using Alensia.Core.I18n;
 using Alensia.Core.UI.Event;
@@ -9,6 +10,7 @@
 using UnityEngine.Assertions;
 using UnityEngine.EventSystems;
 using UnityEngine.UI;
+using Object = UnityEngine.Object;
 using UEToggle = UnityEngine.UI.Toggle;

 namespace Alensia.Core.UI
@@ -72,13 +74,13 @@
             set { _toggleGroup.Value = value; }
         }

-        public IObservable<bool> OnValueChange => PeerToggle.OnValueChangedAsObservable();
-
-        public IObservable<PointerEventData> OnPointerPress => this.OnPointerDownAsObservable();
-
-        public IObservable<PointerEventData> OnPointerRelease => this.OnPointerUpAsObservable();
-
-        public IObservable<PointerEventData> OnPointerSelect => this.OnPointerClickAsObservable();
+        public UniRx.IObservable<bool> OnValueChange => PeerToggle.OnValueChangedAsObservable();
+
+        public UniRx.IObservable<PointerEventData> OnPointerPress => this.OnPointerDownAsObservable();
+
+        public UniRx.IObservable<PointerEventData> OnPointerRelease => this.OnPointerUpAsObservable();
+
+        public UniRx.IObservable<PointerEventData> OnPointerSelect => this.OnPointerClickAsObservable();

         protected override TextStyle DefaultTextStyle
         {
@@ -104,10 +106,10 @@

         protected Text PeerText => _peerText ?? (_peerText = GetComponentInChildren<Text>());

-        protected Image PeerCheckbox => _peerCheckbox ?? (_peerCheckbox = PeerBackground.GetComponent<Image>());
+        protected Image PeerCheckbox => _peerCheckbox ?? (_peerCheckbox = PeerToggle.image);

         protected Image PeerCheckmark =>
-            _peerCheckmark ?? (_peerCheckmark = PeerBackground.Find("Checkmark").GetComponent<Image>());
+            _peerCheckmark ?? (_peerCheckmark = PeerToggle.graphic.GetComponent<Image>());

         protected Transform PeerBackground => _peerBackground ?? (_peerBackground = Transform.Find("Background"));

@@ -218,6 +220,7 @@
             return Instantiate(prefab).GetComponent<Toggle>();
         }

+        [Serializable]
         internal class ToggleGroupReactiveProperty : ReactiveProperty<ToggleGroup>
         {
         }


Fixed country map sizing.

Fixed country map sizing.

--- Assets/Scripts/GUI/CountryMap.cs
+++ Assets/Scripts/GUI/CountryMap.cs
@@ -13,12 +13,12 @@
     // Use this for initialization
     void Start()
     {
-        ResizeToScreen();
+        //ResizeToScreen();
     }

     void Awake()
     {
-        ResizeToScreen();
+        //ResizeToScreen();
     }

     // Update is called once per frame


mana update for demo

mana update for demo

--- Assets/Scripts/Mechanics/Mana.cs
+++ Assets/Scripts/Mechanics/Mana.cs
@@ -5,7 +5,7 @@
 {
     //public float StartingMana = 0;
     public int ManaRegenRate = 1;
-    public float MaxMana = 0;
+    public float MaxMana = 80;
     private float mana;
     private float baseMana;
     private float bonusMana;
@@ -49,7 +49,7 @@

     public void Full_Regen()
     {
-        mana = GetMaxMana(); ;
+        mana = GetMaxMana();
     }

     /*


Confirming that the merged second unit is destroyed.

--- Assets/Scripts/Unit/Mergeable.cs
+++ Assets/Scripts/Unit/Mergeable.cs
@@ -64,6 +64,7 @@
 	private Attackable ownerAttackable;
 	private static List<MergePair> pairs = new List<MergePair>();
 	private NetworkView playerNetworkView;
+	private bool confirmedDestroyed;

 	[RPC]
 	public void RPC_AddPair(NetworkViewID firstViewID, NetworkViewID secondViewID) {
@@ -77,6 +78,7 @@
 		Mergeable.pairs.Clear();
 		this.playerNetworkView = this.GetComponent<NetworkView>();
 		this.ownerAttackable = this.GetComponent<Attackable>();
+		this.confirmedDestroyed = false;
 	}

 	public void Update() {
@@ -149,9 +151,12 @@
 							div.SetDivisible(false);
 						}
 					}
+
+					Mergeable secondMerge = pair.second.GetComponent<Mergeable>();
+					if (secondMerge.confirmedDestroyed) {
+						Mergeable.pairs.Remove(pair);
+					}
 				}
-				Mergeable.pairs.Remove(pair);
-
 			}
 			yield return null;
 		}
@@ -180,4 +185,8 @@
 		pair.elapsedTime += Time.deltaTime / 15f;
 		Mergeable.pairs[i] = pair;
 	}
+
+	public void OnDestroy() {
+		this.confirmedDestroyed = true;
+	}
 }


Villagers walk off screen when they are cleaned/saved/cured

--- Assets/Scripts/VillagerObject.cs
+++ Assets/Scripts/VillagerObject.cs
@@ -19,6 +19,7 @@
 	private ParticleSystem.MainModule _main;

 	private bool _particleReady;
+	private int _animSpeed = 1;

 	private Vector3 _toPosition;

@@ -38,8 +39,13 @@

 		}
 		var distance = Vector3.Distance(_toPosition, transform.position);
-//		iTween.MoveTo(gameObject, iTween.Hash("position", _toPosition, "time", distance/_targetAnimSpeed, "easetype", iTween.EaseType.linear, "oncomplete", "Complete"));
+		iTween.MoveTo(gameObject, iTween.Hash("position", _toPosition, "time", distance/_animSpeed, "easetype", iTween.EaseType.linear, "oncomplete", "CompleteWalkOff"));

+	}
+
+	private void CompleteWalkOff()
+	{
+		Destroy(gameObject);
 	}

 	// Use this for initialization
@@ -126,7 +132,6 @@
 			return;
 		}

-		iTween.ScaleTo(gameObject, Vector3.zero, 1f);
 		Events.instance.Raise (new ScoreEvent(pointsWorth));

 		StartCoroutine(RemoveVillager());


重新修改ToLuaMenu的修改，尝试解决git pr diff失效的问题

重新修改ToLuaMenu的修改，尝试解决git pr diff失效的问题

--- Assets/ToLua/Editor/ToLuaMenu.cs
+++ Assets/ToLua/Editor/ToLuaMenu.cs
@@ -1315,17 +1315,17 @@
     [MenuItem("Lua/Enable Lua Injection &e", false, 102)]
     static void EnableLuaInjection()
     {
-        BuildTargetGroup curBuildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);
-        string existSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(curBuildTargetGroup);
-        if (!existSymbols.Contains("ENABLE_LUA_INJECTION"))
-        {
-            PlayerSettings.SetScriptingDefineSymbolsForGroup(curBuildTargetGroup, existSymbols + ";ENABLE_LUA_INJECTION");
-}
-
         bool EnableSymbols = false;
-        if (UpdateMonoCecil(ref EnableSymbols))
-        {
-            AssetDatabase.Refresh();
+        if (UpdateMonoCecil(ref EnableSymbols) != -1)
+        {
+			BuildTargetGroup curBuildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
+			string existSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(curBuildTargetGroup);
+			if (!existSymbols.Contains("ENABLE_LUA_INJECTION"))
+			{
+				PlayerSettings.SetScriptingDefineSymbolsForGroup(curBuildTargetGroup, existSymbols + ";ENABLE_LUA_INJECTION");
+			}
+
+			AssetDatabase.Refresh();
         }
     }

@@ -1340,13 +1340,13 @@
             return;
         }

-        BuildTargetGroup curBuildTargetGroup = BuildPipeline.GetBuildTargetGroup(EditorUserBuildSettings.activeBuildTarget);
+		BuildTargetGroup curBuildTargetGroup = EditorUserBuildSettings.selectedBuildTargetGroup;
         string existSymbols = PlayerSettings.GetScriptingDefineSymbolsForGroup(curBuildTargetGroup);
         PlayerSettings.SetScriptingDefineSymbolsForGroup(curBuildTargetGroup, existSymbols.Replace("ENABLE_LUA_INJECTION", ""));
         Debug.Log("Lua Injection Removed!");
     }

-    public static bool UpdateMonoCecil(ref bool EnableSymbols)
+    public static int UpdateMonoCecil(ref bool EnableSymbols)
     {
         string appFileName = Environment.GetCommandLineArgs()[0];
         string appPath = Path.GetDirectoryName(appFileName);
@@ -1376,13 +1376,15 @@
         string suitedMonoCecilToolPath = directory + "Unity.CecilTools.dll";

         if (!File.Exists(suitedMonoCecilPath)
+#if UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_3_OR_NEWER
             && !File.Exists(suitedMonoCecilMdbPath)
             && !File.Exists(suitedMonoCecilPdbPath)
+#endif
         )
         {
             EnableSymbols = false;
             Debug.Log("Haven't found Mono.Cecil.dll!Symbols Will Be Disabled");
-            return false;
+            return -1;
         }

         bool bInjectionToolUpdated = false;
@@ -1392,13 +1394,23 @@
         string existMonoCecilMdbPath = injectionToolPath + Path.GetFileName(suitedMonoCecilMdbPath);
         string existMonoCecilToolPath = injectionToolPath + Path.GetFileName(suitedMonoCecilToolPath);

-        bInjectionToolUpdated = TryUpdate(suitedMonoCecilPath, existMonoCecilPath) ? true : bInjectionToolUpdated;
-        bInjectionToolUpdated = TryUpdate(suitedMonoCecilPdbPath, existMonoCecilPdbPath) ? true : bInjectionToolUpdated;
-        bInjectionToolUpdated = TryUpdate(suitedMonoCecilMdbPath, existMonoCecilMdbPath) ? true : bInjectionToolUpdated;
-        TryUpdate(suitedMonoCecilToolPath, existMonoCecilToolPath);
+        try
+        {
+            bInjectionToolUpdated = TryUpdate(suitedMonoCecilPath, existMonoCecilPath) ? true : bInjectionToolUpdated;
+#if UNITY_5_1 || UNITY_5_2 || UNITY_5_3 || UNITY_5_3_OR_NEWER
+            bInjectionToolUpdated = TryUpdate(suitedMonoCecilPdbPath, existMonoCecilPdbPath) ? true : bInjectionToolUpdated;
+            bInjectionToolUpdated = TryUpdate(suitedMonoCecilMdbPath, existMonoCecilMdbPath) ? true : bInjectionToolUpdated;
+#endif
+            TryUpdate(suitedMonoCecilToolPath, existMonoCecilToolPath);
+        }
+        catch (Exception e)
+        {
+            Debug.LogError(e.ToString());
+            return -1;
+        }
         EnableSymbols = true;

-        return bInjectionToolUpdated;
+        return bInjectionToolUpdated ? 1 : 0;
     }

     static bool TryUpdate(string srcPath, string destPath)
@@ -1414,24 +1426,21 @@

     static string GetFileContentMD5(string file)
     {
-        try
-        {
-            FileStream fs = new FileStream(file, FileMode.Open);
-            System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
-            byte[] retVal = md5.ComputeHash(fs);
-            fs.Close();
-
-            StringBuilder sb = StringBuilderCache.Acquire();
-            for (int i = 0; i < retVal.Length; i++)
-            {
-                sb.Append(retVal[i].ToString("x2"));
-            }
-            return StringBuilderCache.GetStringAndRelease(sb);
-        }
-        catch (System.Exception ex)
-        {
-            Debugger.LogError("Md5file() fail, error:" + ex.Message);
-            return string.Empty;
-        }
+		if (!File.Exists(file))
+		{
+			return string.Empty;
+		}
+
+        FileStream fs = new FileStream(file, FileMode.Open);
+        System.Security.Cryptography.MD5 md5 = new System.Security.Cryptography.MD5CryptoServiceProvider();
+        byte[] retVal = md5.ComputeHash(fs);
+        fs.Close();
+
+        StringBuilder sb = StringBuilderCache.Acquire();
+        for (int i = 0; i < retVal.Length; i++)
+        {
+            sb.Append(retVal[i].ToString("x2"));
+        }
+        return StringBuilderCache.GetStringAndRelease(sb);
     }
 }


Made planet rotation smoother

Made planet rotation smoother

--- Assets/script/RotationControl.cs
+++ Assets/script/RotationControl.cs
@@ -3,45 +3,43 @@

 public class RotationControl : MonoBehaviour
 {
-    private Vector3 _mouseDown;
-    private Vector3 _worldClick;
-
+    private Vector2 _speed;
     [Tooltip("The maximum speed at which the world should rotate")]
-    public float Speed = 1;
+    public float
+        Speed = 1;
     [Tooltip("What axes should the world rotate around when the mouse is dragged horizontally or vertically?")]
     public RotationMode
         RotationMode = RotationMode.XY;
+    public float RotationDecay = 1;

-    void OnMouseDown ()
-    {
-        _mouseDown = Input.mousePosition;
-        _worldClick = Camera.main.ScreenToWorldPoint (Input.mousePosition);
-    }
-
-    void OnMouseUp ()
-    {
-        _mouseDown.Set (float.NaN, float.NaN, float.NaN);
-        _worldClick = _mouseDown;
-    }
-
-    void Update ()
+    void FixedUpdate ()
     {
         if (Input.GetMouseButton (0)) {
             float h = Input.GetAxis ("Mouse X");
             float v = Input.GetAxis ("Mouse Y");
-            this.transform.RotateAround (
+            this._speed.x = h * -Speed * Time.deltaTime;
+            this._speed.y = v * Speed * Time.deltaTime;
+        } else {
+            this._speed = Vector2.Lerp (this._speed, Vector2.zero, Time.deltaTime * RotationDecay);
+        }
+
+        // TODO: Store the speed, affect the speed in here
+        // Apply the speed regardless, but affect the speed in the get mouse block
+        // Lerp the speed to zero
+        this.transform.RotateAround (
                 Vector3.zero,
                 this.RotationMode.HorizontalAxis (Camera.main.transform),
-                h * -Speed * Time.deltaTime
-            );
+                this._speed.x
+        );

-            this.transform.RotateAround (
+        this.transform.RotateAround (
                 Vector3.zero,
                 this.RotationMode.VerticalAxis (Camera.main.transform),
-                v * Speed * Time.deltaTime
-            );
+                this._speed.y
+        );

-        }
+
+
     }
 }


Code deduplication

Code deduplication

--- BTDB/IL/ILGeneratorExtensions.cs
+++ BTDB/IL/ILGeneratorExtensions.cs
@@ -214,31 +214,28 @@
         internal static ILGenerator Newobj(this ILGenerator il, Expression<Action> expression)
         {
             var constructorInfo = (expression.Body as NewExpression).Constructor;
+            return Newobj(il, constructorInfo);
+        }
+
+        internal static ILGenerator Newobj(this ILGenerator il, ConstructorInfo constructorInfo)
+        {
             il.Emit(OpCodes.Newobj, constructorInfo);
             return il;
         }

-        internal static ILGenerator Newobj(this ILGenerator il, ConstructorInfo constructorInfo)
-        {
-            il.Emit(OpCodes.Newobj, constructorInfo);
-            return il;
-        }
-
         internal static ILGenerator Callvirt(this ILGenerator il, Expression<Action> expression)
         {
             var methodInfo = (expression.Body as MethodCallExpression).Method;
+            return Callvirt(il, methodInfo);
+        }
+
+        internal static ILGenerator Callvirt(this ILGenerator il, MethodInfo methodInfo)
+        {
             if (methodInfo.IsStatic) throw new ArgumentException("Method in Callvirt cannot be static");
             il.Emit(OpCodes.Callvirt, methodInfo);
             return il;
         }

-        internal static ILGenerator Callvirt(this ILGenerator il, MethodInfo methodInfo)
-        {
-            if (methodInfo.IsStatic) throw new ArgumentException("Method in Callvirt cannot be static");
-            il.Emit(OpCodes.Callvirt, methodInfo);
-            return il;
-        }
-
         internal static ILGenerator Call(this ILGenerator il, Expression<Action> expression)
         {
             var newExpression = expression.Body as NewExpression;


cleanup implemented TODO note

cleanup implemented TODO note

--- BitSharp.Wallet/WalletMonitor.cs
+++ BitSharp.Wallet/WalletMonitor.cs
@@ -18,11 +18,6 @@

 namespace BitSharp.Wallet
 {
-    //TODO the wallet is currently intimately tied to the chain state
-    //TODO what do i do if the chain state commits before the wallet has had a chance to save its current state?
-    //TODO i could potentially use the saved blocks & stored rollback information to replay any blocks that the wallet is behind on
-    //TODO this would be useful to have in general, as wallets could then be turned off & on and then catch up properly
-
     public class WalletMonitor : Worker
     {
         private readonly Logger logger;


clear code.

clear code.

--- CSharpGL.Objects/Texts/Font3D.cs
+++ CSharpGL.Objects/Texts/Font3D.cs
@@ -7,7 +7,6 @@
     /// <summary>
     /// A true 3D Font
     /// </summary>
-
     public class Font3D : IDisposable
     {
         private uint list_base;


Use IList<T>

Use IList<T>

--- CSharpGameLibrary/GLFW/Window.cs
+++ CSharpGameLibrary/GLFW/Window.cs
@@ -11,7 +11,7 @@
         WindowPtr window;

         Monitor monitor;
-        Bitmap<Color4b>[] icons;
+        IList<Bitmap<Color4b>> icons;

         string title;

@@ -56,7 +56,7 @@
             }
         }

-        public Bitmap<Color4b>[] Icons {
+        public IList<Bitmap<Color4b>> Icons {
             get {
                 return icons;
             }
@@ -168,7 +168,7 @@
         public event Action<MouseButton, KeyAction, KeyMod> OnMouseButton = delegate { };
         public event Action<double, double> OnScroll = delegate { };

-        public event Action<string[]> OnPathDrop = delegate { };
+        public event Action<IList<string>> OnPathDrop = delegate { };

         protected Window() {
             //empty constructor so derived classes can manually call CreateWindow
@@ -336,14 +336,14 @@
         }

         void PathDrop(WindowPtr window, int count, IntPtr stringArray) {
-            string[] result = new string[count];
+            IList<string> result = new List<string>(count);

             unsafe
             {
                 byte** paths = (byte**)stringArray;

                 for (int i = 0; i < count; i++) {
-                    result[i] = Interop.GetString(paths[i]);
+                    result.Add(Interop.GetString(paths[i]));
                 }
             }


Added a null reference check for Cisco commands lookup by ID.

--- CiscoMigration/CiscoConverter.cs
+++ CiscoMigration/CiscoConverter.cs
@@ -649,15 +649,6 @@
             if (originalName != cpObject.SafeName())
             {
                 _cpUnsafeNames.Add(originalName);
-
-                ciscoCommand.ConversionIncidentType = ConversionIncidentType.Informative;
-                cpObject.ConversionIncidentType = ConversionIncidentType.Informative;   // report on converted object as well!!!
-
-                string errorDescription = string.Format("Object original name: {0}. Modified name: {1}", originalName, cpObject.SafeName());
-                _conversionIncidents.Add(new ConversionIncident(ciscoCommand.Id,
-                                                                "Cisco object name contains illegal character. Modifying the original name to a Check Point valid name.",
-                                                                errorDescription,
-                                                                ciscoCommand.ConversionIncidentType));
             }

             if (cpObject.GetType().ToString().EndsWith("_TcpService") || cpObject.GetType().ToString().EndsWith("_UdpService"))
@@ -2232,7 +2223,7 @@
                     {
                         CiscoCommand ciscoPortReferenceCommand = _ciscoParser.GetCommandByCiscoId(ciscoAcl.DestinationProperties.TcpUdpPortValue);

-                        if (ciscoPortReferenceCommand.Name() == "object-group")
+                        if (ciscoPortReferenceCommand != null && ciscoPortReferenceCommand.Name() == "object-group")
                         {
                             var ciscoGroupReferenceObject = (Cisco_GroupObject)ciscoPortReferenceCommand;

@@ -2294,7 +2285,7 @@
             {
                 CiscoCommand ciscoProtocolReferenceCommand = _ciscoParser.GetCommandByCiscoId(ciscoAcl.ProtocolReference);

-                if (ciscoProtocolReferenceCommand.Name() == "object-group")   // services group or protocols group
+                if (ciscoProtocolReferenceCommand != null && ciscoProtocolReferenceCommand.Name() == "object-group")   // services group or protocols group
                 {
                     var ciscoGroupReferenceObject = (Cisco_GroupObject)ciscoProtocolReferenceCommand;

@@ -2307,7 +2298,7 @@
                         Add_AclProtocols_To_CPRule(ciscoAcl, ciscoGroupReferenceObject, cpRule);
                     }
                 }
-                else if (ciscoProtocolReferenceCommand.Name() == "object")   // service object
+                else if (ciscoProtocolReferenceCommand != null && ciscoProtocolReferenceCommand.Name() == "object")   // service object
                 {
                     var ciscoReferenceObject = (Cisco_Object)ciscoProtocolReferenceCommand;

@@ -2371,7 +2362,7 @@

                     _conversionIncidents.Add(new ConversionIncident(ciscoAcl.Id,
                                                                     "Error creating a rule, missing information for Cisco ACL protocol",
-                                                                    "ACL Protocol details: " + ciscoProtocolReferenceCommand.CiscoId + ".",
+                                                                    "ACL Protocol details: " + ciscoAcl.ProtocolReference + ".",
                                                                     ciscoAcl.ConversionIncidentType));
                 }
             }
@@ -2601,7 +2592,7 @@
                     // specific protocol with a service group of ports
                     CiscoCommand ciscoPortReferenceCommand = _ciscoParser.GetCommandByCiscoId(ciscoAcl.DestinationProperties.TcpUdpPortValue);

-                    if (ciscoPortReferenceCommand.Name() == "object-group")
+                    if (ciscoPortReferenceCommand != null && ciscoPortReferenceCommand.Name() == "object-group")
                     {
                         var ciscoGroupReferenceObject = (Cisco_GroupObject)ciscoPortReferenceCommand;

@@ -4182,6 +4173,12 @@
                 file.WriteLine("
Commands with conversion notification
");
                 file.WriteLine("
");

+                file.WriteLine("
");
+                file.WriteLine("   " + HtmlAlertImageTag);
+                file.WriteLine("       Valid Check Point object name consists of the following characters only - \"A-Za-z0-9_.-\". Any invalid character will be replaced with a \"_\" character.");
+                file.WriteLine("   ");
+                file.WriteLine("
");
+
                 if (_conversionIncidents.Count > 0)
                 {
                     file.WriteLine("
");
@@ -4227,7 +4224,7 @@
                     file.WriteLine("
Conversion Issues
");

                     bool first = true;
-                    string prevTitle = "";
+                    ConversionIncident prevErr = null;

                     foreach (ConversionIncident err in _conversionIncidents.OrderByDescending(item => item.IncidentType).ThenBy(item => item.Title).ThenBy(item => item.LineNumber).ToList())
                     {
@@ -4244,7 +4241,7 @@
                             file.WriteLine("
");
                         }

-                        if (!first && prevTitle != err.Title)
+                        if (!first && prevErr.Title != err.Title)
                         {
                             file.WriteLine("
");

@@ -4259,13 +4256,17 @@
                             file.WriteLine("
");
                         }

-                        file.WriteLine("
");
-                        file.WriteLine("     " + err.LineNumber + "	");
-                        file.WriteLine("    " + err.Description + "	");
-                        file.WriteLine("
");
+                        // Do not display the same description for the same line...
+                        if (prevErr == null || prevErr.LineNumber != err.LineNumber || prevErr.Description != err.Description)
+                        {
+                            file.WriteLine("
");
+                            file.WriteLine("     " + err.LineNumber + "	");
+                            file.WriteLine("    " + err.Description + "	");
+                            file.WriteLine("
");
+                        }

                         first = false;
-                        prevTitle = err.Title;
+                        prevErr = err;
                     }
                 }


Fixed RemoteShell redirecting of standard output not working after redirecting error output

--- Client/Core/RemoteShell/Shell.cs
+++ Client/Core/RemoteShell/Shell.cs
@@ -14,8 +14,7 @@
         // error output stream from the shell (after we are done reading the standard
         // output). Reading the standard output and the standard error output at the
         // same time will cause a deadlock.
-        private ManualResetEvent _redirectOutputEvent;
-
+        private ManualResetEvent _redirectStandardOutputEvent;
         private ManualResetEvent _redirectStandardErrorEvent;

         private void CreateSession()
@@ -51,10 +50,10 @@
         /// </summary>
         private void InitializeResetEvents()
         {
-            if (_redirectOutputEvent != null)
-                _redirectOutputEvent.Close();
+            if (_redirectStandardOutputEvent != null)
+                _redirectStandardOutputEvent.Close();

-            _redirectOutputEvent = new ManualResetEvent(false);
+            _redirectStandardOutputEvent = new ManualResetEvent(false);

             if (_redirectStandardErrorEvent != null)
                 _redirectStandardErrorEvent.Close();
@@ -79,22 +78,20 @@
                     while (!reader.EndOfStream && _read)
                     {
                         if (_redirectStandardErrorEvent == null)
-                            // Break out completely if the second part of our chain won't work...
                             return;

                         // If we are reading the standard error output, just wait.
                         _redirectStandardErrorEvent.WaitOne();
-                        _redirectOutputEvent.Set();
+                        _redirectStandardOutputEvent.Set();

                         var read = reader.ReadLine();
                         if (!string.IsNullOrEmpty(read))
                         {
-                            Thread.Sleep(200);
                             new Packets.ClientPackets.DoShellExecuteResponse(read + Environment.NewLine).Execute(
                                 Program.ConnectClient);
                         }

-                        _redirectOutputEvent.Reset();
+                        _redirectStandardOutputEvent.Reset();
                     }
                 }

@@ -125,23 +122,20 @@
                 {
                     while (!reader.EndOfStream && _read)
                     {
-                        // Wait for your turn! ;)
-                        if (_redirectOutputEvent == null)
-                            // Break out completely if the first part of our chain doesn't work...
+                        if (_redirectStandardErrorEvent == null)
                             return;

-                        _redirectOutputEvent.WaitOne();
-                        _redirectStandardErrorEvent.Set();
+                        _redirectStandardOutputEvent.WaitOne();
+                        _redirectStandardErrorEvent.Reset();

                         var read = reader.ReadLine();
                         if (!string.IsNullOrEmpty(read))
                         {
-                            Thread.Sleep(200);
                             new Packets.ClientPackets.DoShellExecuteResponse(read + Environment.NewLine, true).Execute(
                                 Program.ConnectClient);
                         }

-                        _redirectStandardErrorEvent.Reset();
+                        _redirectStandardErrorEvent.Set();
                     }
                 }

@@ -216,9 +210,9 @@
                 { }
                 finally
                 {
-                    if (_redirectOutputEvent != null)
-                    {
-                        _redirectOutputEvent.Close();
+                    if (_redirectStandardOutputEvent != null)
+                    {
+                        _redirectStandardOutputEvent.Close();
                     }
                     if (_redirectStandardErrorEvent != null)
                     {


Changes to Dispose(bool)

Changes to Dispose(bool)

Changes to how the shell is disposed.

--- Client/Core/RemoteShell/Shell.cs
+++ Client/Core/RemoteShell/Shell.cs
@@ -159,9 +159,10 @@
         {
             if (disposing)
             {
+                _read = false;
+
                 try
                 {
-                    _read = false;
                     if (_prc != null)
                     {
                         if (!_prc.HasExited)
@@ -176,10 +177,19 @@
                         _prc.Dispose();
                         _prc = null;
                     }
-                    GC.SuppressFinalize(this);
                 }
                 catch
+                { }
+                finally
                 {
+                    if (redirectOutputEvent != null)
+                    {
+                        redirectOutputEvent.Close();
+                    }
+                    if (redirectStandardErrorEvent != null)
+                    {
+                        redirectStandardErrorEvent.Close();
+                    }
                 }
             }
         }


test success

test success

--- ConsoleHelpers/ArgumentParser.cs
+++ ConsoleHelpers/ArgumentParser.cs
@@ -15,7 +15,12 @@
 		{
 			Longname=longname;
 		}
+		public bool Recognizes(string argument)
+		{
+			return true;
+		}
 	}
+
 	public class ArgumentWithParameters
 	{
 		public Argument Argument{get;private set;}
@@ -28,13 +33,23 @@
 	}
 	public class ArgumentParser
 	{
+		private IEnumerable<string> arguments;
+		private	IEnumerable<Argument> actions;
 		public ArgumentParser(IEnumerable<string> arguments,IEnumerable<Argument> actions)
 		{
-
+			this.arguments = arguments;
+			this.actions = actions;
 		}
-		public IEnumerable<ArgumentWithParameters> GetArguments ()
+		public IEnumerable<ArgumentWithParameters> GetInvokedArguments ()
 		{
-			throw new System.NotImplementedException ();
+			return actions.Select(act=>
+				new{
+					arguments= arguments.Where(arg=>act.Recognizes(arg)),
+					action=act
+				})
+				.Where(couple=>couple.arguments.Any())
+				.Select(couple=> new ArgumentWithParameters(couple.action,couple.arguments.First()))
+				;
 		}
 	}

@@ -52,13 +67,14 @@
 			var arg = new Argument("argument");

 			var parser = new ArgumentParser(new []{"-a"},new[]{arg});
-			var arguments = parser.GetArguments();
+			var arguments = parser.GetInvokedArguments();
 			Assert.That(arguments.Count(),Is.EqualTo(1));
 			var arg1=arguments.First();
 			Assert.That(arg1.Argument,Is.EqualTo(arg));
 		}

+

 	}
 }


changing behavior of indexeddatareder.

changing behavior of indexeddatareder.

--- Destrier/IndexedSqlDataReader.cs
+++ Destrier/IndexedSqlDataReader.cs
@@ -54,6 +54,11 @@

         }

+        public String GetColumnName(Int32 index)
+        {
+            return ColumnIndexMap[index];
+        }
+
         public Boolean HasRows
         {
             get
@@ -193,7 +198,7 @@

         public string GetName(int i)
         {
-            return ColumnIndexMap[i];
+            return _dr.GetName(i);
         }

         public int GetOrdinal(string name)


Fix role list

Fix role list

--- DiscordBot/Modules/UserModule.cs
+++ DiscordBot/Modules/UserModule.cs
@@ -946,20 +946,13 @@
                                  "```To get the publisher role type **!pinfo** and follow the instructions." +
                                  "https://www.assetstore.unity3d.com/en/#!/search/page=1/sortby=popularity/query=publisher:7285 <= Example Digits```\n");
                 await ReplyAsync("```!role add/remove Artists - The Graphic Designers, Artists and Modellers. \n" +
-                                 "!role add/remove 3DModelers - People behind every vertex. \n" +
-                                 "!role add/remove Coders - The valiant knights of programming who toil away, without rest. \n" +
-                                 "!role add/remove C# - If you are using C# to program in Unity3D \n" +
-                                 "!role add/remove Javascript - If you are using Javascript to program in Unity3D \n" +
-                                 "!role add/remove Game-Designers - Those who specialise in writing, gameplay design and level design.\n" +
-                                 "!role add/remove Audio-Artists - The unsung heroes of sound effects .\n" +
-                                 "!role add/remove Generalists - Generalist may refer to a person with a wide array of knowledge.\n" +
+                                 "!role add/remove Artist-3D - People behind every vertex. \n" +
+                                 "!role add/remove Programmer - The valiant knights of programming who toil away, without rest. \n" +
+                                 "!role add/remove Game-Designer - Those who specialise in writing, gameplay design and level design.\n" +
+                                 "!role add/remove Audio-Engineer - The unsung heroes of sound effects .\n" +
+                                 "!role add/remove Generalist - Generalist may refer to a person with a wide array of knowledge.\n" +
                                  "!role add/remove Hobbyists - A person who is interested in Unity3D or Game Making as a hobby.\n" +
-                                 "!role add/remove Vector-Artists - The people who love to have infinite resolution.\n" +
-                                 "!role add/remove Voxel-Artist - People who love to voxelize the world.\n" +
-                                 "!role add/remove Students - The eager learners among us, never stop learning. \n" +
-                                 "!role add/remove VR-Developers - Passionate people who wants to bridge virtual world with real life. \n" +
-                                 "--------------------------------------------------------------------------------------------\n" +
-                                 "!role add/remove Streamer - If you stream on twitch/youtube or other discord integrated platforms content about tutorials and gaming. \n" +
+                                 "!role add/remove Student - The eager learners among us, never stop learning. \n" +
                                  "```");
             }
         }


Fix that unpacked string cannot be used as Hashtable's key

--- cli/src/MsgPack/MessagePackString.cs
+++ cli/src/MsgPack/MessagePackString.cs
@@ -138,6 +138,12 @@
 				return this._decoded.GetHashCode();
 			}

+			this.DecodeIfNeeded();
+			if ( this._decoded != null )
+			{
+				return this._decoded.GetHashCode();
+			}
+
 			if ( this._encoded != null )
 			{
 				int hashCode = 0;


Don't need the overhead right now...

Don't need the overhead right now...

--- Shell.cs
+++ Shell.cs
@@ -586,9 +586,9 @@

   private void ShowEditor() {
     GUILayout.BeginHorizontal();
-      EditorGUILayout.BeginVertical(GUILayout.Width(35));
+//      EditorGUILayout.BeginVertical(GUILayout.Width(35));
         GUILayout.Label(useContinuationPrompt ? "cont>" : "---->", EditorStyles.wordWrappedLabel, GUILayout.Width(35));
-      EditorGUILayout.EndVertical();
+//      EditorGUILayout.EndVertical();

       // This is a WAG about Unity's box model.  Seems to work though, so...
       // yeah.


Avoid faster moves with diagonals

Avoid faster moves with diagonals

--- Assets/Scripts/Characters/PlayableCharacter.cs
+++ Assets/Scripts/Characters/PlayableCharacter.cs
@@ -41,7 +41,8 @@
             Vector2 direction = Controls.GetDirection(controls);
             if (direction != Vector2.zero)
             {
-                _rb.velocity = Vector2.MoveTowards(_rb.velocity, direction * speed, 1);
+				direction *= speed;
+                _rb.velocity = Vector2.MoveTowards(_rb.velocity, direction.normalized, 1);
             }
             else
             {


Delete commented code

Delete commented code

--- Assets/Scripts/Network/ArduinoNetworkPlayer.cs
+++ Assets/Scripts/Network/ArduinoNetworkPlayer.cs
@@ -36,17 +36,5 @@
             if (!arduinoController) return;
             arduinoController.WriteToArduino(data);
         }
-
-        //[SerializeField]
-        //protected string writeStream = "A,255,255,0";
-        //private void OnGUI()
-        //{
-        //    if (!isLocalPlayer) return;
-        //    writeStream = GUILayout.TextField(writeStream);
-        //    if (GUILayout.Button("Send"))
-        //    {
-        //        CmdWrite(writeStream);
-        //    }
-        //}
     }
 }


Avatar Animator created in real time has it´s settings based on existing animator.

--- Assets/UMA/UMA_Project/Scripts/UMAGenerator.cs
+++ Assets/UMA/UMA_Project/Scripts/UMAGenerator.cs
@@ -170,10 +170,15 @@
 		    if (umaData.animationController)
 		    {
                 var animator = umaData.GetComponent<Animator>();
-                if (animator) Object.DestroyImmediate(animator);
+
+				bool applyRootMotion = animator.applyRootMotion;
+				bool animatePhysics = animator.animatePhysics;
+				AnimatorCullingMode cullingMode = animator.cullingMode;
+
+				if (animator) Object.DestroyImmediate(animator);
 		        var oldParent = umaData.transform.parent;
                 umaData.transform.parent = null;
-                CreateAnimator(umaData.gameObject, umaData.umaRecipe.raceData.TPose, umaData.animationController);
+                CreateAnimator(umaData.gameObject, umaData.umaRecipe.raceData.TPose, umaData.animationController,applyRootMotion,animatePhysics,cullingMode);
 		        umaData.transform.parent = oldParent;
                 animator = umaData.GetComponent<Animator>();
 #if !UNITY_4_2
@@ -189,16 +194,16 @@
 		    }
 		}
 	}
-
-    public static void CreateAnimator(GameObject root, UmaTPose umaTPose, RuntimeAnimatorController controller)
+
+    public static void CreateAnimator(GameObject root, UmaTPose umaTPose, RuntimeAnimatorController controller,bool applyRootMotion, bool animatePhysics,AnimatorCullingMode cullingMode)
     {
         umaTPose.DeSerialize();
         var animator = root.AddComponent<Animator>();
         animator.avatar = CreateAvatar(root, umaTPose);
         animator.runtimeAnimatorController = controller;
-        animator.applyRootMotion = true;
-        animator.animatePhysics = false;
-        animator.cullingMode = AnimatorCullingMode.AlwaysAnimate;
+        animator.applyRootMotion = applyRootMotion;
+        animator.animatePhysics = animatePhysics;
+        animator.cullingMode = cullingMode;
     }

     public static Avatar CreateAvatar(GameObject root, UmaTPose umaTPose)