Add failing test for hue wrap-around

Add failing test for hue wrap-around

--- osu.Framework.Tests/Visual/UserInterface/TestSceneHSVColourPicker.cs
+++ osu.Framework.Tests/Visual/UserInterface/TestSceneHSVColourPicker.cs
@@ -116,6 +116,24 @@
             AddAssert("hue is unchanged", () => colourPicker.HueControl.Hue.Value == 0.5f);
         }

+        [Test]
+        public void TestHueDoesNotWrapAround()
+        {
+            // the hue of 1 is special, because it's equivalent to hue of 0.
+            // we want to make sure there is never a jump from 1 to 0, since it doesn't actually do anything.
+            AddStep("set hue to 1", () => colourPicker.HueControl.Hue.Value = 1);
+            AddStep("click saturation value control", () =>
+            {
+                InputManager.MoveMouseTo(colourPicker.SaturationValueControl.ScreenSpaceDrawQuad.Centre);
+                InputManager.Click(MouseButton.Left);
+            });
+            assertHue(1, 0);
+
+            AddStep("set hue to 1", () => colourPicker.HueControl.Hue.Value = 1);
+            AddStep("set colour externally", () => colourPicker.Current.Value = Colour4.Red);
+            assertHue(1, 0);
+        }
+
         private void assertHue(float hue, float tolerance = 0.005f)
         {
             AddAssert($"hue selector has {hue}", () => Precision.AlmostEquals(colourPicker.HueControl.Hue.Value, hue, tolerance));


make storyboard text more visible

make storyboard text more visible

--- osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs
+++ osu.Game.Tests/Visual/Background/TestSceneBackgroundScreenBeatmap.cs
@@ -10,6 +10,7 @@
 using osu.Framework.Audio;
 using osu.Framework.Bindables;
 using osu.Framework.Graphics;
+using osu.Framework.Graphics.Sprites;
 using osu.Framework.Input.Events;
 using osu.Framework.Input.States;
 using osu.Framework.Platform;
@@ -244,12 +245,13 @@
             player.ReplacesBackground.Value = false;
             player.CurrentStoryboardContainer.Add(new OsuSpriteText
             {
-                Size = new Vector2(250, 50),
+                Size = new Vector2(500, 50),
                 Alpha = 1,
-                Colour = Color4.Tomato,
+                Colour = Color4.White,
                 Anchor = Anchor.Centre,
                 Origin = Anchor.Centre,
                 Text = "THIS IS A STORYBOARD",
+                Font = new FontUsage(size: 50)
             });
         });


Fix exception

Fix exception

--- osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs
+++ osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerMatchSubScreen.cs
@@ -416,7 +416,8 @@
             UpdateMods();

             if (client.LocalUser.State == MultiplayerUserState.Spectating
-                && (client.Room.State == MultiplayerRoomState.Playing || client.Room.State == MultiplayerRoomState.WaitingForLoad))
+                && (client.Room.State == MultiplayerRoomState.Playing || client.Room.State == MultiplayerRoomState.WaitingForLoad)
+                && ParentScreen.IsCurrentScreen())
             {
                 StartPlay();


Increase downloader major version

Increase downloader major version

--- RuneScapeCacheTools/Cache/Downloader/DownloaderCache.cs
+++ RuneScapeCacheTools/Cache/Downloader/DownloaderCache.cs
@@ -83,7 +83,7 @@
         ///     If connection states the version is outdated, the <see cref="TcpMajorVersion" /> will be increased until it is
         ///     accepted.
         /// </summary>
-        private int TcpMajorVersion { get; set; } = 876;
+        private int TcpMajorVersion { get; set; } = 877;

         private object TcpResponseProcessorLock { get; } = new object();


updaetd inline documentation to account for mimetype

--- Scripts/Services/VisualRecognition/VisualRecognition.cs
+++ Scripts/Services/VisualRecognition/VisualRecognition.cs
@@ -815,6 +815,7 @@
         /// <param name="classifierName">Classifier name.</param>
         /// <param name="positiveExamples">Dictionary of class name and positive example paths.</param>
         /// <param name="negativeExamplesPath">Negative example file path.</param>
+        /// <param name="mimeType">Mime type of the positive examples and negative examples data. Use GetMimeType to get Mimetype from filename.</param>
         public bool TrainClassifier(OnTrainClassifier callback, string classifierName, Dictionary<string, string> positiveExamples, string negativeExamplesPath = default(string), string mimeType = "application/zip", string customData = default(string))
         {
             if (string.IsNullOrEmpty(mp_ApiKey))
@@ -859,8 +860,9 @@
         /// </summary>
         /// <param name="callback">Callback.</param>
         /// <param name="classifierName">Classifier name.</param>
-        /// <param name="positiveExamplesData">Dictionary of class name and class training zip byte data.</param>
-        /// <param name="negativeExamplesData">Negative examples zip byte data.</param>
+        /// <param name="positiveExamplesData">Dictionary of class name and class training zip or image byte data.</param>
+        /// <param name="negativeExamplesData">Negative examples zip or image byte data.</param>
+        /// <param name="mimeType">Mime type of the positive examples and negative examples data.</param>
         /// <returns></returns>
         public bool TrainClassifier(OnTrainClassifier callback, string classifierName, Dictionary<string, byte[]> positiveExamplesData, byte[] negativeExamplesData = null, string mimeType = "application/zip", string customData = default(string))
         {
@@ -906,10 +908,6 @@
 			/// </summary>
             public string Data { get; set; }
             /// <summary>
-            /// Are the training files zip files or image files
-            /// </summary>
-            public bool IsZip { get; set; }
-            /// <summary>
             /// The OnTrainClassifier callback delegate.
             /// </summary>
             public OnTrainClassifier Callback { get; set; }
@@ -1002,8 +1000,8 @@
         /// <param name="callback">Callback.</param>
         /// <param name="classifierID">Classifier identifier.</param>
         /// <param name="classifierName">Classifier name.</param>
-        /// <param name="positiveExamplesData">Dictionary of class name and class training zip byte data.</param>
-        /// <param name="negativeExamplesData">Negative examples zip byte data.</param>
+        /// <param name="positiveExamplesData">Dictionary of class name and class training zip or image byte data.</param>
+        /// <param name="negativeExamplesData">Negative examples zip or image byte data.</param>
         /// <param name="mimeType">Mimetype of the file. Use GetMimeType to get Mimetype from filename.</param>
         /// <returns></returns>
         public bool UpdateClassifier(OnTrainClassifier callback, string classifierID, string classifierName, Dictionary<string, byte[]> positiveExamplesData, byte[] negativeExamplesData = null, string mimeType = "application/zip", string customData = default(string))


Increased timeouts to reduce test failure chance on CI server

--- SharpRemote.Test/Remoting/SocketRemotingEndPointTest.cs
+++ SharpRemote.Test/Remoting/SocketRemotingEndPointTest.cs
@@ -133,7 +133,7 @@
 				server.RemoteEndPoint.Should().BeNull();

 // ReSharper disable AccessToDisposedClosure
-				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(1)))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 // ReSharper restore AccessToDisposedClosure
 					.ShouldNotThrow();

@@ -161,7 +161,7 @@
 				server.RemoteEndPoint.Should().BeNull();

 				// ReSharper disable AccessToDisposedClosure
-				new Action(() => client.Connect(server.Name, TimeSpan.FromSeconds(1)))
+				new Action(() => client.Connect(server.Name, TimeSpan.FromSeconds(10)))
 					// ReSharper restore AccessToDisposedClosure
 					.ShouldNotThrow();

@@ -283,7 +283,7 @@
 			using (var server = CreateServer("Rep2", authenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint)).ShouldNotThrow();
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10))).ShouldNotThrow();
 				server.IsConnected.Should().BeTrue();
 				client.IsConnected.Should().BeTrue();
 			}
@@ -299,7 +299,7 @@
 			using (var server = CreateServer("Rep2", actualAuthenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 					.ShouldThrow<AuthenticationException>();
 				server.IsConnected.Should().BeFalse();
 				client.IsConnected.Should().BeFalse();
@@ -315,7 +315,7 @@
 			using (var server = CreateServer("Rep2", null, authenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint)).ShouldNotThrow();
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10))).ShouldNotThrow();
 				server.IsConnected.Should().BeTrue();
 				client.IsConnected.Should().BeTrue();
 			}
@@ -331,7 +331,7 @@
 			using (var server = CreateServer("Rep2", null, wrongAuthenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 					.ShouldThrow<AuthenticationException>();
 				server.IsConnected.Should().BeFalse();
 				client.IsConnected.Should().BeFalse();
@@ -348,7 +348,7 @@
 			using (var server = CreateServer("Rep2", clientAuthenticator, serverAuthenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint)).ShouldNotThrow();
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10))).ShouldNotThrow();
 				server.IsConnected.Should().BeTrue();
 				client.IsConnected.Should().BeTrue();
 			}
@@ -363,7 +363,7 @@
 			using (var server = CreateServer("Rep2", new Test2Authenticator(), serverAuthenticator))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 					.ShouldThrow<AuthenticationException>();
 				server.IsConnected.Should().BeFalse();
 				client.IsConnected.Should().BeFalse();
@@ -379,7 +379,7 @@
 			using (var server = CreateServer("Rep2", clientAuthenticator, new Test2Authenticator()))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 					.ShouldThrow<AuthenticationException>();
 				server.IsConnected.Should().BeFalse();
 				client.IsConnected.Should().BeFalse();
@@ -394,7 +394,7 @@
 			using (var server = CreateServer("Rep2", new TestAuthenticator()))
 			{
 				server.Bind(IPAddress.Loopback);
-				new Action(() => client.Connect(server.LocalEndPoint))
+				new Action(() => client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10)))
 					.ShouldThrow<AuthenticationRequiredException>();
 				server.IsConnected.Should().BeFalse();
 				client.IsConnected.Should().BeFalse();
@@ -640,7 +640,7 @@
 				var proxy2 = server.CreateProxy<IVoidMethodObjectParameter>(1);

 				server.Bind(IPAddress.Loopback);
-				client.Connect(server.LocalEndPoint);
+				client.Connect(server.LocalEndPoint, TimeSpan.FromSeconds(10));

 				const int numListeners = 1000;
 				var task1 = new Task(() =>


Fixed DowntimeMiddleware to correctly return 503 code.

--- Simple.Web.Server/Code/Middleware/DowntimeMiddleware.cs
+++ Simple.Web.Server/Code/Middleware/DowntimeMiddleware.cs
@@ -33,7 +33,7 @@
             bool isDowntime;
             if (bool.TryParse(_configuration[AppSettingsConst.IsDowntime], out isDowntime) && isDowntime)
             {
-                context.Response.StatusCode = 502;
+                context.Response.StatusCode = StatusCodes.Status503ServiceUnavailable;
                 return Task.CompletedTask;
             }


fix inspections

fix inspections

--- Snippets/Snippets_5/Encryption/MessageBodyEncryption.cs
+++ Snippets/Snippets_5/Encryption/MessageBodyEncryption.cs
@@ -1,9 +1,5 @@
-using System.Collections.Generic;
-using System.Linq;
+using System.Linq;
 using NServiceBus;
-using NServiceBus.Config;
-using NServiceBus.Config.ConfigurationSource;
-using NServiceBus.Encryption;
 using NServiceBus.MessageMutator;
 using NServiceBus.Unicast.Messages;


Cleaned up my ruble code.

Cleaned up my ruble code.

--- SoundScape/SoundScape/GameplaySceneComponents/Player.cs
+++ SoundScape/SoundScape/GameplaySceneComponents/Player.cs
@@ -38,14 +38,6 @@
         {
             _padState = GamePad.GetState(ControllerIndex);

-            // Test rumble
-            if (_padState.IsButtonDown(Buttons.A) && _padOldState.IsButtonUp(Buttons.A))
-                GamePad.SetVibration(_controllerIndex, 0, 0);
-
-            if(_padState.IsConnected)
-                Game.Window.Title = string.Format("Rumble Left: {0:n1} {1} - Rumble Right: {2:n1} / {3}",
-                    _rumbleLeft, DateTime.Now - _rumbleLeftTime, _rumbleRight, DateTime.Now - _rumbleRightTime);
-
             // Expire rumbles
             if (_rumbleLeftTime < DateTime.Now)
             {
@@ -70,7 +62,9 @@
                 if (component != this && component is GameplaySceneComponent)
                 {
                     GameplaySceneComponent gsc = component as GameplaySceneComponent;
-                    if (gsc.Hitbox.Intersects(this.Hitbox))
+                    // TODO: Stop ignoring collision when right sholder is pressed.
+                    if (_padState.Buttons.RightShoulder == ButtonState.Released
+                        && gsc.Hitbox.Intersects(this.Hitbox))
                     {
                         Position = oldPosition;
                         // Rumble for the player coliding.
@@ -120,26 +114,17 @@
             base.Update(gameTime);
         }

-        private void ResetRumble()
-        {
-            GamePad.SetVibration(_controllerIndex, _rumbleLeft, _rumbleRight);
-            Console.WriteLine("Reset Rumble {0:n3} - {1:n3}\nFor: {2}", RumbleLeft, RumbleRight, _controllerIndex);
-        }
-
         public override void Draw(GameTime gameTime)
         {
-            //if (!arrow.Equals(Vector2.Zero))
+            SpriteBatch.Begin();
+            foreach (Vector2 aimVector in _aimVectors)
             {
-                SpriteBatch.Begin();
-                foreach (Vector2 aimVector in _aimVectors)
+                if (aimVector != Vector2.Zero)
                 {
-                    if (aimVector != Vector2.Zero)
-                    {
-                        SpriteBatch.Draw(Texture, aimVector, Colour);
-                    }
+                    SpriteBatch.Draw(Texture, aimVector, Colour);
                 }
-                SpriteBatch.End();
             }
+            SpriteBatch.End();
             base.Draw(gameTime);
         }

@@ -158,7 +143,7 @@
                 if (Math.Abs(_rumbleLeft - value) > 0.01)
                 {
                     _rumbleLeft = value;
-                    ResetRumble();
+                    GamePad.SetVibration(_controllerIndex, _rumbleLeft, _rumbleRight);
                 }
             }
         }
@@ -171,7 +156,7 @@
                 if (Math.Abs(_rumbleRight - value) > 0.01)
                 {
                     _rumbleRight = value;
-                    ResetRumble();
+                    GamePad.SetVibration(_controllerIndex, _rumbleLeft, _rumbleRight);
                 }
             }
         }
@@ -181,18 +166,12 @@
             if (leftMotor > 0)
             {
                 _rumbleLeftTime = DateTime.Now.AddMilliseconds(miliseconds);
-            //}
-            //else
-            //{
                 _rumbleLeft = leftMotor;
             }

             if (rightMotor > 0)
             {
                 _rumbleRightTime = DateTime.Now.AddMilliseconds(miliseconds);
-            //}
-            //else
-            //{
                 _rumbleRight = rightMotor;
             }


Fix for failed appender

Fix for failed appender

--- Source/Library/Elmah.Everywhere/Everywhere/ErrorInfo.cs
+++ Source/Library/Elmah.Everywhere/Everywhere/ErrorInfo.cs
@@ -7,6 +7,7 @@

 using Elmah.Everywhere.Utils;
 using Elmah.Everywhere.Appenders;
+using System.IO;

 namespace Elmah.Everywhere
@@ -90,11 +91,11 @@
             {
                 return;
             }
-            var appenders = (from x in Appenders
-                             let a = Activator.CreateInstance(x) as BaseAppender
-                             where a != null
-                             orderby a.Order
-                             select a).ToList();
+            var appenders = from x in Appenders
+                            let a = Activator.CreateInstance(x) as BaseAppender
+                            where a != null
+                            orderby a.Order
+                            select a;

             foreach (var appender in appenders)
             {
@@ -104,9 +105,9 @@
                 }
                 catch (Exception ex)
                 {
-#if !SILVERLIGHT
-                    Trace.WriteLine(ex);
-#endif
+                    // If appender fails then add error details and attach the exeption instead.
+                    this.AddDetail(appender.Name, "Message", "Appender failed to load exception details.");
+                    this.AddDetail(appender.Name, "Error", ex.ToString());
                 }
             }
         }


commet out the code

commet out the code

--- DBLike/ClientUnitTest/UploadIntegrationTest.cs
+++ DBLike/ClientUnitTest/UploadIntegrationTest.cs
@@ -51,7 +51,7 @@
             }
 **/
             //6 Server Generate sas container/blob for the client. For basic upload, this case just generate container sas
-            Server.ConnectionManager.BlobConn conn = new Server.ConnectionManager.BlobConn(1);
+            //Server.ConnectionManager.BlobConn conn = new Server.ConnectionManager.BlobConn(1);

             CloudBlobContainer container = blob.container;
             string containerSAS = new Server.ConnectionManager.GenerateSAS().GetContainerSasUri(container, "RWLD");


Updated other parts of the depth refiner test demo for 2.4. Still requires setting the DepthRefiner.tt debug flag to true and uncommenting the demo, though.

--- Demos/SpecializedTests/DepthRefinerTestDemo.cs
+++ Demos/SpecializedTests/DepthRefinerTestDemo.cs
@@ -33,54 +33,127 @@
 //            camera.Yaw = 0;
 //            camera.Pitch = 0;
 //            Simulation = Simulation.Create(BufferPool, new DemoNarrowPhaseCallbacks(), new DemoPoseIntegratorCallbacks(new Vector3(0, 0, 0)), new SolveDescription(8, 1));
+//            {
+//                //var shapeA = new Cylinder(1f, 2f);
+//                //var poseA = new RigidPose(new Vector3(12, 0.5f, 12), Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathF.PI * 0.5f));
+//                //var shapeB = new Triangle(new Vector3(-2f, 0, -2f), new Vector3(2f, 0, -2f), new Vector3(-2f, 0, 2f));
+//                //var poseB = new RigidPose(new Vector3(12, 0, 12));
+//                var shapeA = new Cylinder(0.4f, 0.09f);
+//                //var poseA = new RigidPose(new Vector3(12, 0.5f, 12), Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathF.PI * 0.5f));
+//                var shapeB = new Triangle(new Vector3(-0.104847f, -2.863911f, -0.8221359f), new Vector3(-0.7841263f, 1.040714f, -1.362942f), new Vector3(0.8889847f, 1.823196f, 2.185074f));
+//                //var poseB = new RigidPose(new Vector3(12, 0, 12));
+//                Matrix3x3Wide localOrientationB;
+//                Vector3Wide.Broadcast(new Vector3(-0.4182778f, -0.1956204f, -0.887004f), out localOrientationB.X);
+//                Vector3Wide.Broadcast(new Vector3(-0.8923031f, -0.09407896f, 0.4415249f), out localOrientationB.Y);
+//                Vector3Wide.Broadcast(new Vector3(-0.1698197f, 0.9761565f, -0.1352016f), out localOrientationB.Z);
+//                Vector3Wide.Broadcast(new Vector3(0.3561249f, 2.797102f, 0.4073029f), out var localOffsetB);
+
+//                Vector3Wide.Normalize(localOffsetB, out var initialNormal);
+//                //Vector3Wide.Broadcast(new Vector3(0.9673051f, 0.07194486f, -0.2431969f), out var initialNormal);
+//                //var initialDepth = new Vector<float>(0.007193089f);
+
+//                var convergenceThreshold = new Vector<float>(4e-7f);
+
+//                var minimumDepthThreshold = new Vector<float>(-0.1f);
+
+//                //var simplex = new DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.SimplexWithWitness();
+//                //Vector3Wide.Broadcast(new Vector3(-0.05699956f, -0.4314917f, 0.445577f), out simplex.A.Support);
+//                //Vector3Wide.Broadcast(new Vector3(-0.3718189f, -0.09f, 0.1474812f), out simplex.A.SupportOnA);
+//                //simplex.A.Exists = new Vector<int>(-1);
+
+//                //Vector3Wide.Broadcast(new Vector3(0.3148193f, -0.4314917f, 0.2980957f), out simplex.B.Support);
+//                //Vector3Wide.Broadcast(new Vector3(0f, -0.09f, 0f), out simplex.B.SupportOnA);
+//                //simplex.B.Exists = new Vector<int>(-1);
+
+//                //Vector3Wide.Broadcast(new Vector3(-1.175686f, 3.316494f, 0.7135266f), out simplex.C.Support);
+//                //Vector3Wide.Broadcast(new Vector3(-0.2811551f, -0.09f, -0.2845203f), out simplex.C.SupportOnA);
+//                //simplex.C.Exists = new Vector<int>(-1);
+
+//                basePosition = default;
+//                var poseA = RigidPose.Identity;
+//                Matrix3x3Wide.ReadSlot(ref localOrientationB, 0, out var orientationBNarrow);
+//                RigidPose poseB;
+//                QuaternionEx.CreateFromRotationMatrix(orientationBNarrow, out poseB.Orientation);
+//                Vector3Wide.ReadSlot(ref localOffsetB, 0, out poseB.Position);
+//                shapeLines = MinkowskiShapeVisualizer.CreateLines<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>(
+//                    shapeA, shapeB, poseA, poseB, 65536,
+//                    0.01f, new Vector3(0.4f, 0.4f, 0),
+//                    0.1f, new Vector3(0, 1, 0), default, basePosition, BufferPool);
+
+//                var aWide = default(CylinderWide);
+//                var bWide = default(TriangleWide);
+//                aWide.Broadcast(shapeA);
+//                bWide.Broadcast(shapeB);
+//                //var worldOffsetB = poseB.Position - poseA.Position;
+//                //var localOrientationB = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseB.Orientation, Quaternion.Conjugate(poseA.Orientation)));
+//                //var localOffsetB = Quaternion.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
+//                //Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
+//                //Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
+//                var triangleSupportFinder = default(PretransformedTriangleSupportFinder);
+//                var cylinderSupportFinder = default(CylinderSupportFinder);
+
+//                //var initialNormal = Vector3.Normalize(localOffsetB);
+//                //Vector3Wide.Broadcast(initialNormal, out var initialNormalWide);
+//                steps = new List<DepthRefinerStep>();
+//                //DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
+//                //    aWide, bWide, localOffsetB, localOrientationB, ref cylinderSupportFinder, ref triangleSupportFinder, ref simplex, initialNormal, initialDepth, new Vector<int>(), convergenceThreshold, minimumDepthThreshold,
+//                //    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
+//                DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
+//                    aWide, bWide, localOffsetB, localOrientationB, ref cylinderSupportFinder, ref triangleSupportFinder, initialNormal, new Vector<int>(), convergenceThreshold, minimumDepthThreshold,
+//                    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
+
+//                Simulation.Statics.Add(new StaticDescription(poseA.Position + new Vector3(50, 0, 0), poseA.Orientation, Simulation.Shapes.Add(shapeA)));
+//                Vector3Wide.ReadFirst(localOffsetB, out var localOffsetBNarrow);
+//                Simulation.Statics.Add(new StaticDescription(localOffsetBNarrow + new Vector3(50, 0, 0), Quaternion.Identity, Simulation.Shapes.Add(shapeB)));
+
+//            }
+
 //            //{
-//            //    //var shapeA = new Cylinder(1f, 2f);
+//            //    const int pointCount = 16;
+//            //    var randomizedPoints = new QuickList<Vector3>(pointCount * 2, BufferPool);
+//            //    var random = new Random(5);
+//            //    for (int i = 0; i < pointCount; ++i)
+//            //    {
+//            //        randomizedPoints.AllocateUnsafely() = new Vector3(33 * random.NextSingle(), 1 * random.NextSingle(), 13 * random.NextSingle());
+//            //    }
+//            //    var shapeA = new ConvexHull(randomizedPoints.Span.Slice(randomizedPoints.Count), BufferPool, out var hullCenter);
 //            //    //var poseA = new RigidPose(new Vector3(12, 0.5f, 12), Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathF.PI * 0.5f));
-//            //    //var shapeB = new Triangle(new Vector3(-2f, 0, -2f), new Vector3(2f, 0, -2f), new Vector3(-2f, 0, 2f));
-//            //    //var poseB = new RigidPose(new Vector3(12, 0, 12));
-//            //    var shapeA = new Cylinder(0.4f, 0.09f);
-//            //    //var poseA = new RigidPose(new Vector3(12, 0.5f, 12), Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathF.PI * 0.5f));
-//            //    var shapeB = new Triangle(new Vector3(-0.104847f, -2.863911f, -0.8221359f), new Vector3(-0.7841263f, 1.040714f, -1.362942f), new Vector3(0.8889847f, 1.823196f, 2.185074f));
+//            //    var shapeB = new Triangle(
+//            //        new Vector3(7.499722f, -8.201822f, -23.06599f),
+//            //        new Vector3(1.648121f, -28.36107f, 31.33404f),
+//            //        new Vector3(-9.147846f, 36.56289f, -8.268051f));
+
 //            //    //var poseB = new RigidPose(new Vector3(12, 0, 12));
 //            //    Matrix3x3Wide localOrientationB;
-//            //    Vector3Wide.Broadcast(new Vector3(-0.4182778f, -0.1956204f, -0.887004f), out localOrientationB.X);
-//            //    Vector3Wide.Broadcast(new Vector3(-0.8923031f, -0.09407896f, 0.4415249f), out localOrientationB.Y);
-//            //    Vector3Wide.Broadcast(new Vector3(-0.1698197f, 0.9761565f, -0.1352016f), out localOrientationB.Z);
-//            //    Vector3Wide.Broadcast(new Vector3(0.3561249f, 2.797102f, 0.4073029f), out var localOffsetB);
-
-//            //    Vector3Wide.Normalize(localOffsetB, out var initialNormal);
-//            //    //Vector3Wide.Broadcast(new Vector3(0.9673051f, 0.07194486f, -0.2431969f), out var initialNormal);
-//            //    //var initialDepth = new Vector<float>(0.007193089f);
-
-//            //    var convergenceThreshold = new Vector<float>(4e-7f);
-
-//            //    var minimumDepthThreshold = new Vector<float>(-0.1f);
-
-//            //    //var simplex = new DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.SimplexWithWitness();
-//            //    //Vector3Wide.Broadcast(new Vector3(-0.05699956f, -0.4314917f, 0.445577f), out simplex.A.Support);
-//            //    //Vector3Wide.Broadcast(new Vector3(-0.3718189f, -0.09f, 0.1474812f), out simplex.A.SupportOnA);
-//            //    //simplex.A.Exists = new Vector<int>(-1);
-
-//            //    //Vector3Wide.Broadcast(new Vector3(0.3148193f, -0.4314917f, 0.2980957f), out simplex.B.Support);
-//            //    //Vector3Wide.Broadcast(new Vector3(0f, -0.09f, 0f), out simplex.B.SupportOnA);
-//            //    //simplex.B.Exists = new Vector<int>(-1);
-
-//            //    //Vector3Wide.Broadcast(new Vector3(-1.175686f, 3.316494f, 0.7135266f), out simplex.C.Support);
-//            //    //Vector3Wide.Broadcast(new Vector3(-0.2811551f, -0.09f, -0.2845203f), out simplex.C.SupportOnA);
-//            //    //simplex.C.Exists = new Vector<int>(-1);
+//            //    Vector3Wide.Broadcast(new Vector3(0.3963324f, -0.1519237f, 0.90545f), out localOrientationB.X);
+//            //    Vector3Wide.Broadcast(new Vector3(-0.3329513f, 0.8952942f, 0.2959588f), out localOrientationB.Y);
+//            //    Vector3Wide.Broadcast(new Vector3(-0.8556075f, -0.4187689f, 0.304251f), out localOrientationB.Z);
+//            //    var localOffsetBNarrow = new Vector3(7.41188f, -34.41978f, 7.493548f);
+//            //    Vector3Wide.Broadcast(localOffsetBNarrow, out var localOffsetB);
+
+//            //    //Vector3Wide.Normalize(localOffsetB, out var initialNormal);
+//            //    Vector3Wide.Broadcast(new Vector3(1f, 0, 0), out var initialNormal);
+//            //    var initialDepth = new Vector<float>(2.674457f);
+
+//            //    var convergenceThreshold = new Vector<float>(1e-5f * 4.187582f);
+
+//            //    var minimumDepthThreshold = new Vector<float>(-1f);

 //            //    basePosition = default;
 //            //    var poseA = RigidPose.Identity;
 //            //    Matrix3x3Wide.ReadSlot(ref localOrientationB, 0, out var orientationBNarrow);
 //            //    RigidPose poseB;
-//            //    Quaternion.CreateFromRotationMatrix(orientationBNarrow, out poseB.Orientation);
+//            //    poseB.Orientation = QuaternionEx.CreateFromRotationMatrix(orientationBNarrow);
 //            //    Vector3Wide.ReadSlot(ref localOffsetB, 0, out poseB.Position);
-//            //    shapeLines = MinkowskiShapeVisualizer.CreateLines<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>(
+//            //    shapeLines = MinkowskiShapeVisualizer.CreateLines<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>(
 //            //        shapeA, shapeB, poseA, poseB, 65536,
 //            //        0.01f, new Vector3(0.4f, 0.4f, 0),
 //            //        0.1f, new Vector3(0, 1, 0), default, basePosition, BufferPool);

-//            //    var aWide = default(CylinderWide);
+//            //    var aWide = default(ConvexHullWide);
+//            //    var memoryLength = Unsafe.SizeOf<ConvexHull>() * Vector<float>.Count;
+//            //    var memory = stackalloc byte[memoryLength];
+//            //    aWide.Initialize(new Buffer<byte>(memory, memoryLength));
 //            //    var bWide = default(TriangleWide);
 //            //    aWide.Broadcast(shapeA);
 //            //    bWide.Broadcast(shapeB);
@@ -90,7 +163,23 @@
 //            //    //Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
 //            //    //Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
 //            //    var triangleSupportFinder = default(PretransformedTriangleSupportFinder);
-//            //    var cylinderSupportFinder = default(CylinderSupportFinder);
+//            //    var convexHullSupportFinder = default(ConvexHullSupportFinder);
+
+
+//            //    DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.SimplexWithWitness simplex = default;
+//            //    Vector3Wide.Broadcast(new Vector3(19.4402f, -1.873452f, 1.636454f), out simplex.A.Support);
+//            //    Vector3Wide.Broadcast(new Vector3(17.70424f, 0.2696521f, 0.8619514f), out simplex.A.SupportOnA);
+//            //    simplex.A.Exists = new Vector<int>(-1);
+//            //    Vector3Wide.Broadcast(new Vector3(-20.94802f, 34.62053f, -9.692917f), out simplex.B.Support);
+//            //    Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.B.SupportOnA);
+//            //    simplex.B.Exists = new Vector<int>(-1);
+//            //    Vector3Wide.Broadcast(new Vector3(-28.44774f, 42.82235f, 13.37307f), out simplex.C.Support);
+//            //    Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.C.SupportOnA);
+//            //    simplex.C.Exists = new Vector<int>(-1);
+
+//            //    //Vector3Wide.Broadcast(new Vector3(-28.44774f, 42.82235f, 13.37307f), out simplex.A.Support);
+//            //    //Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.A.SupportOnA);
+//            //    //simplex.A.Exists = new Vector<int>(-1);

 //            //    //var initialNormal = Vector3.Normalize(localOffsetB);
 //            //    //Vector3Wide.Broadcast(initialNormal, out var initialNormalWide);
@@ -98,107 +187,22 @@
 //            //    //DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
 //            //    //    aWide, bWide, localOffsetB, localOrientationB, ref cylinderSupportFinder, ref triangleSupportFinder, ref simplex, initialNormal, initialDepth, new Vector<int>(), convergenceThreshold, minimumDepthThreshold,
 //            //    //    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
-//            //    DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
-//            //        aWide, bWide, localOffsetB, localOrientationB, ref cylinderSupportFinder, ref triangleSupportFinder, initialNormal, new Vector<int>(), convergenceThreshold, minimumDepthThreshold,
+//            //    var inactiveLanes = new Vector<int>(-1);
+//            //    Unsafe.As<Vector<int>, int>(ref inactiveLanes) = 0;
+//            //    //DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
+//            //    //    aWide, bWide, localOffsetB, localOrientationB, ref convexHullSupportFinder, ref triangleSupportFinder, ref simplex, initialNormal, initialDepth, inactiveLanes, convergenceThreshold, minimumDepthThreshold,
+//            //    //    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
+
+
+//            //    //Vector3Wide.Broadcast(new Vector3(0, -1, 0), out initialNormal);
+//            //    DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
+//            //        aWide, bWide, localOffsetB, localOrientationB, ref convexHullSupportFinder, ref triangleSupportFinder, initialNormal, inactiveLanes, convergenceThreshold, minimumDepthThreshold,
 //            //        out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);

+
+//            //    Simulation.Statics.Add(new StaticDescription(poseA.Position + new Vector3(50, 0, 0), poseA.Orientation, Simulation.Shapes.Add(shapeA)));
+//            //    Simulation.Statics.Add(new StaticDescription(localOffsetBNarrow + new Vector3(50, 0, 0), Quaternion.Identity, Simulation.Shapes.Add(shapeB)));
 //            //}
-
-//            {
-//                const int pointCount = 16;
-//                var randomizedPoints = new QuickList<Vector3>(pointCount * 2, BufferPool);
-//                var random = new Random(5);
-//                for (int i = 0; i < pointCount; ++i)
-//                {
-//                    randomizedPoints.AllocateUnsafely() = new Vector3(33 * random.NextSingle(), 1 * random.NextSingle(), 13 * random.NextSingle());
-//                }
-//                var shapeA = new ConvexHull(randomizedPoints.Span.Slice(randomizedPoints.Count), BufferPool, out var hullCenter);
-//                //var poseA = new RigidPose(new Vector3(12, 0.5f, 12), Quaternion.CreateFromAxisAngle(new Vector3(1, 0, 0), MathF.PI * 0.5f));
-//                var shapeB = new Triangle(
-//                    new Vector3(7.499722f, -8.201822f, -23.06599f),
-//                    new Vector3(1.648121f, -28.36107f, 31.33404f),
-//                    new Vector3(-9.147846f, 36.56289f, -8.268051f));
-
-//                //var poseB = new RigidPose(new Vector3(12, 0, 12));
-//                Matrix3x3Wide localOrientationB;
-//                Vector3Wide.Broadcast(new Vector3(0.3963324f, -0.1519237f, 0.90545f), out localOrientationB.X);
-//                Vector3Wide.Broadcast(new Vector3(-0.3329513f, 0.8952942f, 0.2959588f), out localOrientationB.Y);
-//                Vector3Wide.Broadcast(new Vector3(-0.8556075f, -0.4187689f, 0.304251f), out localOrientationB.Z);
-//                var localOffsetBNarrow = new Vector3(7.41188f, -34.41978f, 7.493548f);
-//                Vector3Wide.Broadcast(localOffsetBNarrow, out var localOffsetB);
-
-//                //Vector3Wide.Normalize(localOffsetB, out var initialNormal);
-//                Vector3Wide.Broadcast(new Vector3(1f, 0, 0), out var initialNormal);
-//                var initialDepth = new Vector<float>(2.674457f);
-
-//                var convergenceThreshold = new Vector<float>(1e-5f * 4.187582f);
-
-//                var minimumDepthThreshold = new Vector<float>(-1f);
-
-//                basePosition = default;
-//                var poseA = RigidPose.Identity;
-//                Matrix3x3Wide.ReadSlot(ref localOrientationB, 0, out var orientationBNarrow);
-//                RigidPose poseB;
-//                poseB.Orientation = QuaternionEx.CreateFromRotationMatrix(orientationBNarrow);
-//                Vector3Wide.ReadSlot(ref localOffsetB, 0, out poseB.Position);
-//                shapeLines = MinkowskiShapeVisualizer.CreateLines<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>(
-//                    shapeA, shapeB, poseA, poseB, 65536,
-//                    0.01f, new Vector3(0.4f, 0.4f, 0),
-//                    0.1f, new Vector3(0, 1, 0), default, basePosition, BufferPool);
-
-//                var aWide = default(ConvexHullWide);
-//                var memoryLength = Unsafe.SizeOf<ConvexHull>() * Vector<float>.Count;
-//                var memory = stackalloc byte[memoryLength];
-//                aWide.Initialize(new Buffer<byte>(memory, memoryLength));
-//                var bWide = default(TriangleWide);
-//                aWide.Broadcast(shapeA);
-//                bWide.Broadcast(shapeB);
-//                //var worldOffsetB = poseB.Position - poseA.Position;
-//                //var localOrientationB = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseB.Orientation, Quaternion.Conjugate(poseA.Orientation)));
-//                //var localOffsetB = Quaternion.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
-//                //Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
-//                //Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
-//                var triangleSupportFinder = default(PretransformedTriangleSupportFinder);
-//                var convexHullSupportFinder = default(ConvexHullSupportFinder);
-
-
-//                DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.SimplexWithWitness simplex = default;
-//                Vector3Wide.Broadcast(new Vector3(19.4402f, -1.873452f, 1.636454f), out simplex.A.Support);
-//                Vector3Wide.Broadcast(new Vector3(17.70424f, 0.2696521f, 0.8619514f), out simplex.A.SupportOnA);
-//                simplex.A.Exists = new Vector<int>(-1);
-//                Vector3Wide.Broadcast(new Vector3(-20.94802f, 34.62053f, -9.692917f), out simplex.B.Support);
-//                Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.B.SupportOnA);
-//                simplex.B.Exists = new Vector<int>(-1);
-//                Vector3Wide.Broadcast(new Vector3(-28.44774f, 42.82235f, 13.37307f), out simplex.C.Support);
-//                Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.C.SupportOnA);
-//                simplex.C.Exists = new Vector<int>(-1);
-
-//                //Vector3Wide.Broadcast(new Vector3(-28.44774f, 42.82235f, 13.37307f), out simplex.A.Support);
-//                //Vector3Wide.Broadcast(new Vector3(-13.53614f, 0.2007419f, -2.199368f), out simplex.A.SupportOnA);
-//                //simplex.A.Exists = new Vector<int>(-1);
-
-//                //var initialNormal = Vector3.Normalize(localOffsetB);
-//                //Vector3Wide.Broadcast(initialNormal, out var initialNormalWide);
-//                steps = new List<DepthRefinerStep>();
-//                //DepthRefiner<Cylinder, CylinderWide, CylinderSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
-//                //    aWide, bWide, localOffsetB, localOrientationB, ref cylinderSupportFinder, ref triangleSupportFinder, ref simplex, initialNormal, initialDepth, new Vector<int>(), convergenceThreshold, minimumDepthThreshold,
-//                //    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
-//                var inactiveLanes = new Vector<int>(-1);
-//                Unsafe.As<Vector<int>, int>(ref inactiveLanes) = 0;
-//                //DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
-//                //    aWide, bWide, localOffsetB, localOrientationB, ref convexHullSupportFinder, ref triangleSupportFinder, ref simplex, initialNormal, initialDepth, inactiveLanes, convergenceThreshold, minimumDepthThreshold,
-//                //    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
-
-
-//                //Vector3Wide.Broadcast(new Vector3(0, -1, 0), out initialNormal);
-//                DepthRefiner<ConvexHull, ConvexHullWide, ConvexHullSupportFinder, Triangle, TriangleWide, PretransformedTriangleSupportFinder>.FindMinimumDepth(
-//                    aWide, bWide, localOffsetB, localOrientationB, ref convexHullSupportFinder, ref triangleSupportFinder, initialNormal, inactiveLanes, convergenceThreshold, minimumDepthThreshold,
-//                    out var depthWide, out var localNormalWide, out var witnessOnA, steps, 50);
-
-
-//                Simulation.Statics.Add(new StaticDescription(poseA.Position + new Vector3(50, 0, 0), poseA.Orientation, Simulation.Shapes.Add(shapeA)));
-//                Simulation.Statics.Add(new StaticDescription(localOffsetBNarrow + new Vector3(50, 0, 0), Quaternion.Identity, Simulation.Shapes.Add(shapeB)));
-//            }

 //            //{
 //            //    var shapeA = new Capsule(0.5f, 1f);
@@ -230,12 +234,12 @@
 //            //    var aWide = default(CapsuleWide);
 //            //    var bWide = default(ConvexHullWide);
 //            //    aWide.Broadcast(shapeA);
-//            //    BufferPool.Take(bWide.InternalAllocationSize, out var memory);
+//            //    BufferPool.Take<byte>(bWide.InternalAllocationSize, out var memory);
 //            //    bWide.Initialize(memory.Slice(0, bWide.InternalAllocationSize));
 //            //    bWide.Broadcast(shapeB);
 //            //    var worldOffsetB = poseB.Position - poseA.Position;
 //            //    var localOrientationB = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseB.Orientation, Quaternion.Conjugate(poseA.Orientation)));
-//            //    var localOffsetB = Quaternion.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
+//            //    var localOffsetB = QuaternionEx.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
 //            //    Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
 //            //    Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
 //            //    var supportFinderA = default(CapsuleSupportFinder);
@@ -251,7 +255,7 @@
 //            //    steps.Clear();
 //            //    var worldOffsetA = poseA.Position - poseB.Position;
 //            //    var localOrientationA = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseA.Orientation, Quaternion.Conjugate(poseB.Orientation)));
-//            //    var localOffsetA = Quaternion.Transform(worldOffsetA, Quaternion.Conjugate(poseB.Orientation));
+//            //    var localOffsetA = QuaternionEx.Transform(worldOffsetA, Quaternion.Conjugate(poseB.Orientation));
 //            //    Vector3Wide.Broadcast(localOffsetA, out var localOffsetAWide);
 //            //    Matrix3x3Wide.Broadcast(localOrientationA, out var localOrientationAWide);
 //            //    Vector3Wide.Broadcast(Vector3.Normalize(localOffsetA), out var initialNormalWide2);
@@ -293,7 +297,7 @@
 //            //    //    Z = new Vector3(-0.1333926f, -0.9782246f, -0.1590062f)
 //            //    //};
 //            //    //var poseB = new RigidPose(new Vector3(-0.2570486f, 1.780561f, -1.033215f), Quaternion.CreateFromAxisAngle(Vector3.Normalize(new Vector3(1, 1, 1)), MathF.PI * 0.35f));
-//            //    var poseB = new RigidPose(positionB, Quaternion.CreateFromRotationMatrix(localOrientationBMatrix));
+//            //    var poseB = new RigidPose(positionB, QuaternionEx.CreateFromRotationMatrix(localOrientationBMatrix));

 //            //    basePosition = default;
 //            //    shapeLines = MinkowskiShapeVisualizer.CreateLines<Cylinder, CylinderWide, CylinderSupportFinder, Cylinder, CylinderWide, CylinderSupportFinder>(
@@ -307,7 +311,7 @@
 //            //    bWide.Broadcast(shapeB);
 //            //    var worldOffsetB = poseB.Position - poseA.Position;
 //            //    var localOrientationB = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseB.Orientation, Quaternion.Conjugate(poseA.Orientation)));
-//            //    var localOffsetB = Quaternion.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
+//            //    var localOffsetB = QuaternionEx.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
 //            //    Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
 //            //    Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
 //            //    var supportFinder = default(CylinderSupportFinder);
@@ -357,7 +361,7 @@
 //            //    bWide.Broadcast(shapeB);
 //            //    var worldOffsetB = poseB.Position - poseA.Position;
 //            //    var localOrientationB = Matrix3x3.CreateFromQuaternion(Quaternion.Concatenate(poseB.Orientation, Quaternion.Conjugate(poseA.Orientation)));
-//            //    var localOffsetB = Quaternion.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
+//            //    var localOffsetB = QuaternionEx.Transform(worldOffsetB, Quaternion.Conjugate(poseA.Orientation));
 //            //    Vector3Wide.Broadcast(localOffsetB, out var localOffsetBWide);
 //            //    Matrix3x3Wide.Broadcast(localOrientationB, out var localOrientationBWide);
 //            //    var supportFinder = default(BoxSupportFinder);


Specific container to fix bad request error (#896)

--- examples/logs/Logs.cs
+++ examples/logs/Logs.cs
@@ -23,7 +23,7 @@

             var response = await client.CoreV1.ReadNamespacedPodLogWithHttpMessagesAsync(
                 pod.Metadata.Name,
-                pod.Metadata.NamespaceProperty, follow: true).ConfigureAwait(false);
+                pod.Metadata.NamespaceProperty, container: pod.Spec.Containers[0].Name, follow: true).ConfigureAwait(false);
             var stream = response.Body;
             stream.CopyTo(Console.OpenStandardOutput());
         }


Improved Grid.ResizeBlocks

Improved Grid.ResizeBlocks

--- Source/TilemapTools/Grid.cs
+++ Source/TilemapTools/Grid.cs
@@ -114,8 +114,6 @@
             return new GridBlock<TCell, TCellSize>(BlockSize, blockLocation, this);
         }

-
-
         protected virtual void OnBlockSizeChanged()
         {
             ResizeBlocks();
@@ -126,26 +124,16 @@
             if (this.blocks.Count == 0)
                 return;

-            var tempGrid = CloneEmptyGrid();
+            var tempBlocks = blocks;
+            blocks = new GridBlockCollection<IGridBlock<TCell, TCellSize>>();

-            foreach (var block in blocks)
+            foreach (var block in tempBlocks)
             {
                 foreach (var cell in block)
                 {
-                    tempGrid[cell.X, cell.Y] = cell.Content;
+                    this[cell.X, cell.Y] = cell.Content;
                 }
             }
-
-            this.blocks = tempGrid.blocks;
-        }
-
-        protected virtual Grid<TCell, TCellSize> CloneEmptyGrid()
-        {
-            var tempGrid = new Grid<TCell, TCellSize>();
-            tempGrid.cellSize = this.cellSize;
-            tempGrid.blockSize = this.blockSize;
-
-            return tempGrid;
         }

         protected virtual void OnCellSizeChanged()


Changed scale intervals type from Interval[] to IEnumerable<Interval>

--- DryWetMidi/MusicTheory/Scale/ScaleIntervals.cs
+++ DryWetMidi/MusicTheory/Scale/ScaleIntervals.cs
@@ -1,4 +1,5 @@
-using System.Linq;
+using System.Collections.Generic;
+using System.Linq;

 namespace Melanchall.DryWetMidi.MusicTheory
 {
@@ -7,337 +8,337 @@
         #region Constants

         // aeolian
-        public static readonly Interval[] Aeolian = GetIntervals(2, 1, 2, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> Aeolian = GetIntervals(2, 1, 2, 2, 1, 2, 2);

         // altered
-        public static readonly Interval[] Altered = GetIntervals(1, 2, 1, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Altered = GetIntervals(1, 2, 1, 2, 2, 2, 2);

         // arabian
-        public static readonly Interval[] Arabian = GetIntervals(2, 2, 1, 1, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Arabian = GetIntervals(2, 2, 1, 1, 2, 2, 2);

         // augmented
-        public static readonly Interval[] Augmented = GetIntervals(3, 1, 3, 1, 3, 1);
+        public static readonly IEnumerable<Interval> Augmented = GetIntervals(3, 1, 3, 1, 3, 1);

         // augmented heptatonic
-        public static readonly Interval[] AugmentedHeptatonic = GetIntervals(3, 1, 1, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> AugmentedHeptatonic = GetIntervals(3, 1, 1, 2, 1, 3, 1);

         // balinese
-        public static readonly Interval[] Balinese = GetIntervals(1, 2, 2, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> Balinese = GetIntervals(1, 2, 2, 2, 1, 3, 1);

         // bebop
-        public static readonly Interval[] Bebop = GetIntervals(2, 2, 1, 2, 2, 1, 1, 1);
+        public static readonly IEnumerable<Interval> Bebop = GetIntervals(2, 2, 1, 2, 2, 1, 1, 1);

         // bebop dominant
-        public static readonly Interval[] BebopDominant = GetIntervals(2, 2, 1, 2, 2, 1, 1, 1);
+        public static readonly IEnumerable<Interval> BebopDominant = GetIntervals(2, 2, 1, 2, 2, 1, 1, 1);

         // bebop locrian
-        public static readonly Interval[] BebopLocrian = GetIntervals(1, 2, 2, 1, 1, 1, 2, 2);
+        public static readonly IEnumerable<Interval> BebopLocrian = GetIntervals(1, 2, 2, 1, 1, 1, 2, 2);

         // bebop major
-        public static readonly Interval[] BebopMajor = GetIntervals(2, 2, 1, 2, 1, 1, 2, 1);
+        public static readonly IEnumerable<Interval> BebopMajor = GetIntervals(2, 2, 1, 2, 1, 1, 2, 1);

         // bebop minor
-        public static readonly Interval[] BebopMinor = GetIntervals(2, 1, 1, 1, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> BebopMinor = GetIntervals(2, 1, 1, 1, 2, 2, 1, 2);

         // blues
-        public static readonly Interval[] Blues = GetIntervals(3, 2, 1, 1, 3, 2);
+        public static readonly IEnumerable<Interval> Blues = GetIntervals(3, 2, 1, 1, 3, 2);

         // chinese
-        public static readonly Interval[] Chinese = GetIntervals(4, 2, 1, 4, 1);
+        public static readonly IEnumerable<Interval> Chinese = GetIntervals(4, 2, 1, 4, 1);

         // chromatic
-        public static readonly Interval[] Chromatic = GetIntervals(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+        public static readonly IEnumerable<Interval> Chromatic = GetIntervals(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);

         // composite blues
-        public static readonly Interval[] CompositeBlues = GetIntervals(2, 1, 1, 1, 1, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> CompositeBlues = GetIntervals(2, 1, 1, 1, 1, 1, 2, 1, 2);

         // diminished
-        public static readonly Interval[] Diminished = GetIntervals(2, 1, 2, 1, 2, 1, 2, 1);
+        public static readonly IEnumerable<Interval> Diminished = GetIntervals(2, 1, 2, 1, 2, 1, 2, 1);

         // diminished whole tone
-        public static readonly Interval[] DiminishedWholeTone = GetIntervals(1, 2, 1, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> DiminishedWholeTone = GetIntervals(1, 2, 1, 2, 2, 2, 2);

         // dominant
-        public static readonly Interval[] Dominant = GetIntervals(2, 2, 1, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> Dominant = GetIntervals(2, 2, 1, 2, 2, 1, 2);

         // dorian
-        public static readonly Interval[] Dorian = GetIntervals(2, 1, 2, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> Dorian = GetIntervals(2, 1, 2, 2, 2, 1, 2);

         // dorian #4
-        public static readonly Interval[] Dorian4 = GetIntervals(2, 1, 3, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> Dorian4 = GetIntervals(2, 1, 3, 1, 2, 1, 2);

         // dorian b2
-        public static readonly Interval[] DorianB2 = GetIntervals(1, 2, 2, 2, 2, 2, 1);
+        public static readonly IEnumerable<Interval> DorianB2 = GetIntervals(1, 2, 2, 2, 2, 2, 1);

         // double harmonic lydian
-        public static readonly Interval[] DoubleHarmonicLydian = GetIntervals(1, 3, 2, 1, 1, 3, 1);
+        public static readonly IEnumerable<Interval> DoubleHarmonicLydian = GetIntervals(1, 3, 2, 1, 1, 3, 1);

         // double harmonic major
-        public static readonly Interval[] DoubleHarmonicMajor = GetIntervals(1, 3, 1, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> DoubleHarmonicMajor = GetIntervals(1, 3, 1, 2, 1, 3, 1);

         // egyptian
-        public static readonly Interval[] Egyptian = GetIntervals(2, 3, 2, 3, 2);
+        public static readonly IEnumerable<Interval> Egyptian = GetIntervals(2, 3, 2, 3, 2);

         // enigmatic
-        public static readonly Interval[] Enigmatic = GetIntervals(1, 3, 2, 2, 2, 1, 1);
+        public static readonly IEnumerable<Interval> Enigmatic = GetIntervals(1, 3, 2, 2, 2, 1, 1);

         // flamenco
-        public static readonly Interval[] Flamenco = GetIntervals(1, 2, 1, 2, 1, 3, 2);
+        public static readonly IEnumerable<Interval> Flamenco = GetIntervals(1, 2, 1, 2, 1, 3, 2);

         // flat six pentatonic
-        public static readonly Interval[] FlatSixPentatonic = GetIntervals(2, 2, 3, 1, 4);
+        public static readonly IEnumerable<Interval> FlatSixPentatonic = GetIntervals(2, 2, 3, 1, 4);

         // flat three pentatonic
-        public static readonly Interval[] FlatThreePentatonic = GetIntervals(2, 1, 4, 2, 3);
+        public static readonly IEnumerable<Interval> FlatThreePentatonic = GetIntervals(2, 1, 4, 2, 3);

         // gypsy
-        public static readonly Interval[] Gypsy = GetIntervals(1, 3, 1, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> Gypsy = GetIntervals(1, 3, 1, 2, 1, 3, 1);

         // harmonic major
-        public static readonly Interval[] HarmonicMajor = GetIntervals(2, 2, 1, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> HarmonicMajor = GetIntervals(2, 2, 1, 2, 1, 3, 1);

         // harmonic minor
-        public static readonly Interval[] HarmonicMinor = GetIntervals(2, 1, 2, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> HarmonicMinor = GetIntervals(2, 1, 2, 2, 1, 3, 1);

         // hindu
-        public static readonly Interval[] Hindu = GetIntervals(2, 2, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> Hindu = GetIntervals(2, 2, 1, 2, 1, 2, 2);

         // hirajoshi
-        public static readonly Interval[] Hirajoshi = GetIntervals(2, 1, 4, 1, 4);
+        public static readonly IEnumerable<Interval> Hirajoshi = GetIntervals(2, 1, 4, 1, 4);

         // hungarian major
-        public static readonly Interval[] HungarianMajor = GetIntervals(3, 1, 2, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> HungarianMajor = GetIntervals(3, 1, 2, 1, 2, 1, 2);

         // hungarian minor
-        public static readonly Interval[] HungarianMinor = GetIntervals(2, 1, 3, 1, 1, 3, 1);
+        public static readonly IEnumerable<Interval> HungarianMinor = GetIntervals(2, 1, 3, 1, 1, 3, 1);

         // ichikosucho
-        public static readonly Interval[] Ichikosucho = GetIntervals(2, 2, 1, 1, 1, 2, 2, 1);
+        public static readonly IEnumerable<Interval> Ichikosucho = GetIntervals(2, 2, 1, 1, 1, 2, 2, 1);

         // in-sen
-        public static readonly Interval[] InSen = GetIntervals(1, 4, 2, 3, 2);
+        public static readonly IEnumerable<Interval> InSen = GetIntervals(1, 4, 2, 3, 2);

         // indian
-        public static readonly Interval[] Indian = GetIntervals(4, 1, 2, 3, 2);
+        public static readonly IEnumerable<Interval> Indian = GetIntervals(4, 1, 2, 3, 2);

         // ionian
-        public static readonly Interval[] Ionian = GetIntervals(2, 2, 1, 2, 2, 2, 1);
+        public static readonly IEnumerable<Interval> Ionian = GetIntervals(2, 2, 1, 2, 2, 2, 1);

         // ionian augmented
-        public static readonly Interval[] IonianAugmented = GetIntervals(2, 2, 1, 3, 1, 2, 1);
+        public static readonly IEnumerable<Interval> IonianAugmented = GetIntervals(2, 2, 1, 3, 1, 2, 1);

         // ionian pentatonic
-        public static readonly Interval[] IonianPentatonic = GetIntervals(4, 1, 2, 4, 1);
+        public static readonly IEnumerable<Interval> IonianPentatonic = GetIntervals(4, 1, 2, 4, 1);

         // iwato
-        public static readonly Interval[] Iwato = GetIntervals(1, 4, 1, 4, 2);
+        public static readonly IEnumerable<Interval> Iwato = GetIntervals(1, 4, 1, 4, 2);

         // kafi raga
-        public static readonly Interval[] KafiRaga = GetIntervals(3, 1, 1, 2, 2, 1, 1, 1);
+        public static readonly IEnumerable<Interval> KafiRaga = GetIntervals(3, 1, 1, 2, 2, 1, 1, 1);

         // kumoi
-        public static readonly Interval[] Kumoi = GetIntervals(2, 1, 4, 2, 3);
+        public static readonly IEnumerable<Interval> Kumoi = GetIntervals(2, 1, 4, 2, 3);

         // kumoijoshi
-        public static readonly Interval[] Kumoijoshi = GetIntervals(1, 4, 2, 1, 4);
+        public static readonly IEnumerable<Interval> Kumoijoshi = GetIntervals(1, 4, 2, 1, 4);

         // leading whole tone
-        public static readonly Interval[] LeadingWholeTone = GetIntervals(2, 2, 2, 2, 2, 1, 1);
+        public static readonly IEnumerable<Interval> LeadingWholeTone = GetIntervals(2, 2, 2, 2, 2, 1, 1);

         // locrian
-        public static readonly Interval[] Locrian = GetIntervals(1, 2, 2, 1, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Locrian = GetIntervals(1, 2, 2, 1, 2, 2, 2);

         // locrian #2
-        public static readonly Interval[] Locrian2 = GetIntervals(2, 1, 2, 1, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Locrian2 = GetIntervals(2, 1, 2, 1, 2, 2, 2);

         // locrian major
-        public static readonly Interval[] LocrianMajor = GetIntervals(2, 2, 1, 1, 2, 2, 2);
+        public static readonly IEnumerable<Interval> LocrianMajor = GetIntervals(2, 2, 1, 1, 2, 2, 2);

         // locrian pentatonic
-        public static readonly Interval[] LocrianPentatonic = GetIntervals(3, 2, 1, 4, 2);
+        public static readonly IEnumerable<Interval> LocrianPentatonic = GetIntervals(3, 2, 1, 4, 2);

         // lydian
-        public static readonly Interval[] Lydian = GetIntervals(2, 2, 2, 1, 2, 2, 1);
+        public static readonly IEnumerable<Interval> Lydian = GetIntervals(2, 2, 2, 1, 2, 2, 1);

         // lydian #5P pentatonic
-        public static readonly Interval[] Lydian5PPentatonic = GetIntervals(4, 2, 2, 3, 1);
+        public static readonly IEnumerable<Interval> Lydian5PPentatonic = GetIntervals(4, 2, 2, 3, 1);

         // lydian #9
-        public static readonly Interval[] Lydian9 = GetIntervals(1, 3, 2, 1, 2, 2, 1);
+        public static readonly IEnumerable<Interval> Lydian9 = GetIntervals(1, 3, 2, 1, 2, 2, 1);

         // lydian augmented
-        public static readonly Interval[] LydianAugmented = GetIntervals(2, 2, 2, 2, 1, 2, 1);
+        public static readonly IEnumerable<Interval> LydianAugmented = GetIntervals(2, 2, 2, 2, 1, 2, 1);

         // lydian b7
-        public static readonly Interval[] LydianB7 = GetIntervals(2, 2, 2, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> LydianB7 = GetIntervals(2, 2, 2, 1, 2, 1, 2);

         // lydian diminished
-        public static readonly Interval[] LydianDiminished = GetIntervals(2, 1, 3, 1, 2, 2, 1);
+        public static readonly IEnumerable<Interval> LydianDiminished = GetIntervals(2, 1, 3, 1, 2, 2, 1);

         // lydian dominant
-        public static readonly Interval[] LydianDominant = GetIntervals(2, 2, 2, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> LydianDominant = GetIntervals(2, 2, 2, 1, 2, 1, 2);

         // lydian dominant pentatonic
-        public static readonly Interval[] LydianDominantPentatonic = GetIntervals(4, 2, 1, 3, 2);
+        public static readonly IEnumerable<Interval> LydianDominantPentatonic = GetIntervals(4, 2, 1, 3, 2);

         // lydian minor
-        public static readonly Interval[] LydianMinor = GetIntervals(2, 2, 2, 1, 1, 2, 2);
+        public static readonly IEnumerable<Interval> LydianMinor = GetIntervals(2, 2, 2, 1, 1, 2, 2);

         // lydian pentatonic
-        public static readonly Interval[] LydianPentatonic = GetIntervals(4, 2, 1, 4, 1);
+        public static readonly IEnumerable<Interval> LydianPentatonic = GetIntervals(4, 2, 1, 4, 1);

         // major
-        public static readonly Interval[] Major = GetIntervals(2, 2, 1, 2, 2, 2, 1);
+        public static readonly IEnumerable<Interval> Major = GetIntervals(2, 2, 1, 2, 2, 2, 1);

         // major blues
-        public static readonly Interval[] MajorBlues = GetIntervals(2, 1, 1, 3, 2, 3);
+        public static readonly IEnumerable<Interval> MajorBlues = GetIntervals(2, 1, 1, 3, 2, 3);

         // major flat two pentatonic
-        public static readonly Interval[] MajorFlatTwoPentatonic = GetIntervals(1, 3, 3, 2, 3);
+        public static readonly IEnumerable<Interval> MajorFlatTwoPentatonic = GetIntervals(1, 3, 3, 2, 3);

         // major pentatonic
-        public static readonly Interval[] MajorPentatonic = GetIntervals(2, 2, 3, 2, 3);
+        public static readonly IEnumerable<Interval> MajorPentatonic = GetIntervals(2, 2, 3, 2, 3);

         // malkos raga
-        public static readonly Interval[] MalkosRaga = GetIntervals(3, 2, 3, 2, 2);
+        public static readonly IEnumerable<Interval> MalkosRaga = GetIntervals(3, 2, 3, 2, 2);

         // melodic minor
-        public static readonly Interval[] MelodicMinor = GetIntervals(2, 1, 2, 2, 2, 2, 1);
+        public static readonly IEnumerable<Interval> MelodicMinor = GetIntervals(2, 1, 2, 2, 2, 2, 1);

         // melodic minor fifth mode
-        public static readonly Interval[] MelodicMinorFifthMode = GetIntervals(2, 2, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> MelodicMinorFifthMode = GetIntervals(2, 2, 1, 2, 1, 2, 2);

         // melodic minor second mode
-        public static readonly Interval[] MelodicMinorSecondMode = GetIntervals(1, 2, 2, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> MelodicMinorSecondMode = GetIntervals(1, 2, 2, 2, 2, 1, 2);

         // minor
-        public static readonly Interval[] Minor = GetIntervals(2, 1, 2, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> Minor = GetIntervals(2, 1, 2, 2, 1, 2, 2);

         // minor #7M pentatonic
-        public static readonly Interval[] Minor7MPentatonic = GetIntervals(3, 2, 2, 4, 1);
+        public static readonly IEnumerable<Interval> Minor7MPentatonic = GetIntervals(3, 2, 2, 4, 1);

         // minor bebop
-        public static readonly Interval[] MinorBebop = GetIntervals(2, 1, 2, 2, 1, 2, 1, 1);
+        public static readonly IEnumerable<Interval> MinorBebop = GetIntervals(2, 1, 2, 2, 1, 2, 1, 1);

         // minor blues
-        public static readonly Interval[] MinorBlues = GetIntervals(3, 2, 1, 1, 3, 2);
+        public static readonly IEnumerable<Interval> MinorBlues = GetIntervals(3, 2, 1, 1, 3, 2);

         // minor hexatonic
-        public static readonly Interval[] MinorHexatonic = GetIntervals(2, 1, 2, 2, 4, 1);
+        public static readonly IEnumerable<Interval> MinorHexatonic = GetIntervals(2, 1, 2, 2, 4, 1);

         // minor pentatonic
-        public static readonly Interval[] MinorPentatonic = GetIntervals(3, 2, 2, 3, 2);
+        public static readonly IEnumerable<Interval> MinorPentatonic = GetIntervals(3, 2, 2, 3, 2);

         // minor seven flat five pentatonic
-        public static readonly Interval[] MinorSevenFlatFivePentatonic = GetIntervals(3, 2, 1, 4, 2);
+        public static readonly IEnumerable<Interval> MinorSevenFlatFivePentatonic = GetIntervals(3, 2, 1, 4, 2);

         // minor six diminished
-        public static readonly Interval[] MinorSixDiminished = GetIntervals(2, 1, 2, 2, 1, 1, 2, 1);
+        public static readonly IEnumerable<Interval> MinorSixDiminished = GetIntervals(2, 1, 2, 2, 1, 1, 2, 1);

         // minor six pentatonic
-        public static readonly Interval[] MinorSixPentatonic = GetIntervals(3, 2, 2, 2, 3);
+        public static readonly IEnumerable<Interval> MinorSixPentatonic = GetIntervals(3, 2, 2, 2, 3);

         // mixolydian
-        public static readonly Interval[] Mixolydian = GetIntervals(2, 2, 1, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> Mixolydian = GetIntervals(2, 2, 1, 2, 2, 1, 2);

         // mixolydian b6M
-        public static readonly Interval[] MixolydianB6M = GetIntervals(2, 2, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> MixolydianB6M = GetIntervals(2, 2, 1, 2, 1, 2, 2);

         // mixolydian pentatonic
-        public static readonly Interval[] MixolydianPentatonic = GetIntervals(4, 1, 2, 3, 2);
+        public static readonly IEnumerable<Interval> MixolydianPentatonic = GetIntervals(4, 1, 2, 3, 2);

         // mystery #1
-        public static readonly Interval[] Mystery1 = GetIntervals(1, 3, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Mystery1 = GetIntervals(1, 3, 2, 2, 2, 2);

         // neopolitan
-        public static readonly Interval[] Neopolitan = GetIntervals(1, 2, 2, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> Neopolitan = GetIntervals(1, 2, 2, 2, 1, 3, 1);

         // neopolitan major
-        public static readonly Interval[] NeopolitanMajor = GetIntervals(1, 2, 2, 2, 2, 2, 1);
+        public static readonly IEnumerable<Interval> NeopolitanMajor = GetIntervals(1, 2, 2, 2, 2, 2, 1);

         // neopolitan major pentatonic
-        public static readonly Interval[] NeopolitanMajorPentatonic = GetIntervals(4, 1, 1, 4, 2);
+        public static readonly IEnumerable<Interval> NeopolitanMajorPentatonic = GetIntervals(4, 1, 1, 4, 2);

         // neopolitan minor
-        public static readonly Interval[] NeopolitanMinor = GetIntervals(1, 2, 2, 2, 1, 3, 1);
+        public static readonly IEnumerable<Interval> NeopolitanMinor = GetIntervals(1, 2, 2, 2, 1, 3, 1);

         // oriental
-        public static readonly Interval[] Oriental = GetIntervals(1, 3, 1, 1, 3, 1, 2);
+        public static readonly IEnumerable<Interval> Oriental = GetIntervals(1, 3, 1, 1, 3, 1, 2);

         // pelog
-        public static readonly Interval[] Pelog = GetIntervals(1, 2, 4, 1, 4);
+        public static readonly IEnumerable<Interval> Pelog = GetIntervals(1, 2, 4, 1, 4);

         // pentatonic
-        public static readonly Interval[] Pentatonic = GetIntervals(2, 2, 3, 2, 3);
+        public static readonly IEnumerable<Interval> Pentatonic = GetIntervals(2, 2, 3, 2, 3);

         // persian
-        public static readonly Interval[] Persian = GetIntervals(1, 3, 1, 1, 2, 3, 1);
+        public static readonly IEnumerable<Interval> Persian = GetIntervals(1, 3, 1, 1, 2, 3, 1);

         // phrygian
-        public static readonly Interval[] Phrygian = GetIntervals(1, 2, 2, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> Phrygian = GetIntervals(1, 2, 2, 2, 1, 2, 2);

         // phrygian major
-        public static readonly Interval[] PhrygianMajor = GetIntervals(1, 3, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> PhrygianMajor = GetIntervals(1, 3, 1, 2, 1, 2, 2);

         // piongio
-        public static readonly Interval[] Piongio = GetIntervals(2, 3, 2, 2, 1, 2);
+        public static readonly IEnumerable<Interval> Piongio = GetIntervals(2, 3, 2, 2, 1, 2);

         // pomeroy
-        public static readonly Interval[] Pomeroy = GetIntervals(1, 2, 1, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> Pomeroy = GetIntervals(1, 2, 1, 2, 2, 2, 2);

         // prometheus
-        public static readonly Interval[] Prometheus = GetIntervals(2, 2, 2, 3, 1, 2);
+        public static readonly IEnumerable<Interval> Prometheus = GetIntervals(2, 2, 2, 3, 1, 2);

         // prometheus neopolitan
-        public static readonly Interval[] PrometheusNeopolitan = GetIntervals(1, 3, 2, 3, 1, 2);
+        public static readonly IEnumerable<Interval> PrometheusNeopolitan = GetIntervals(1, 3, 2, 3, 1, 2);

         // purvi raga
-        public static readonly Interval[] PurviRaga = GetIntervals(1, 3, 1, 1, 1, 1, 3, 1);
+        public static readonly IEnumerable<Interval> PurviRaga = GetIntervals(1, 3, 1, 1, 1, 1, 3, 1);

         // ritusen
-        public static readonly Interval[] Ritusen = GetIntervals(2, 3, 2, 2, 3);
+        public static readonly IEnumerable<Interval> Ritusen = GetIntervals(2, 3, 2, 2, 3);

         // romanian minor
-        public static readonly Interval[] RomanianMinor = GetIntervals(2, 1, 3, 1, 2, 1, 2);
+        public static readonly IEnumerable<Interval> RomanianMinor = GetIntervals(2, 1, 3, 1, 2, 1, 2);

         // scriabin
-        public static readonly Interval[] Scriabin = GetIntervals(1, 3, 3, 2, 3);
+        public static readonly IEnumerable<Interval> Scriabin = GetIntervals(1, 3, 3, 2, 3);

         // six tone symmetric
-        public static readonly Interval[] SixToneSymmetric = GetIntervals(1, 3, 1, 3, 1, 3);
+        public static readonly IEnumerable<Interval> SixToneSymmetric = GetIntervals(1, 3, 1, 3, 1, 3);

         // spanish
-        public static readonly Interval[] Spanish = GetIntervals(1, 3, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> Spanish = GetIntervals(1, 3, 1, 2, 1, 2, 2);

         // spanish heptatonic
-        public static readonly Interval[] SpanishHeptatonic = GetIntervals(1, 2, 1, 1, 2, 1, 2, 2);
+        public static readonly IEnumerable<Interval> SpanishHeptatonic = GetIntervals(1, 2, 1, 1, 2, 1, 2, 2);

         // super locrian
-        public static readonly Interval[] SuperLocrian = GetIntervals(1, 2, 1, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> SuperLocrian = GetIntervals(1, 2, 1, 2, 2, 2, 2);

         // super locrian pentatonic
-        public static readonly Interval[] SuperLocrianPentatonic = GetIntervals(3, 1, 2, 4, 2);
+        public static readonly IEnumerable<Interval> SuperLocrianPentatonic = GetIntervals(3, 1, 2, 4, 2);

         // todi raga
-        public static readonly Interval[] TodiRaga = GetIntervals(1, 2, 3, 1, 1, 3, 1);
+        public static readonly IEnumerable<Interval> TodiRaga = GetIntervals(1, 2, 3, 1, 1, 3, 1);

         // vietnamese 1
-        public static readonly Interval[] Vietnamese1 = GetIntervals(3, 2, 2, 1, 4);
+        public static readonly IEnumerable<Interval> Vietnamese1 = GetIntervals(3, 2, 2, 1, 4);

         // vietnamese 2
-        public static readonly Interval[] Vietnamese2 = GetIntervals(3, 2, 2, 3, 2);
+        public static readonly IEnumerable<Interval> Vietnamese2 = GetIntervals(3, 2, 2, 3, 2);

         // whole tone
-        public static readonly Interval[] WholeTone = GetIntervals(2, 2, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> WholeTone = GetIntervals(2, 2, 2, 2, 2, 2);

         // whole tone pentatonic
-        public static readonly Interval[] WholeTonePentatonic = GetIntervals(4, 2, 2, 2, 2);
+        public static readonly IEnumerable<Interval> WholeTonePentatonic = GetIntervals(4, 2, 2, 2, 2);

         #endregion

         #region Methods

-        private static Interval[] GetIntervals(params int[] intervalsInHalfSteps)
+        private static IEnumerable<Interval> GetIntervals(params int[] intervalsInHalfSteps)
         {
             return intervalsInHalfSteps.Select(i => Interval.FromHalfSteps(i))
                                        .ToArray();


Formatting tweak

Formatting tweak

--- Dsl/CustomCode/Validation/NavigationDiagram.cs
+++ Dsl/CustomCode/Validation/NavigationDiagram.cs
@@ -72,9 +72,9 @@
 		private void ValidateRoute(ValidationContext context, List<Dialog> dialogs)
 		{
 			var q = (from d in dialogs
-					from s in d.States
-					where s.Route != s.State.Route
-					select s.State).Distinct();
+					 from s in d.States
+					 where s.Route != s.State.Route
+					 select s.State).Distinct();
 			foreach (var s in q)
 			{
 				context.LogMessage(string.Format(Messages.StateRouteInvalid, s.Key), "StateRouteInvalid", s);


Include previous visit when inserting rows. Better insert/update checking.

--- EDDIVAPlugin/EDDIStarSystemSqLiteRepository.cs
+++ EDDIVAPlugin/EDDIStarSystemSqLiteRepository.cs
@@ -25,9 +25,10 @@
                      , name
                      , totalvisits
                      , lastvisit
+                     , previousvisit
                      , starsystem
                      , starsystemlastupdated)
-                    VALUES(@eliteid, @eddbid, @name, @totalvisits, @lastvisit, @starsystem, @starsystemlastupdated)";
+                    VALUES(@eliteid, @eddbid, @name, @totalvisits, @lastvisit, @previousvisit, @starsystem, @starsystemlastupdated)";
         private static string UPDATE_SQL = @"
                     UPDATE starsystems
                     SET eliteid = @eliteid
@@ -94,11 +95,12 @@
         public void SaveEDDIStarSystem(EDDIStarSystem eddiStarSystem)
         {
             if (!File.Exists(DbFile)) CreateDatabase();
-
+
             using (var con = SimpleDbConnection())
             {
                 con.Open();
-                if (eddiStarSystem.TotalVisits == 1)
+
+                if (GetEDDIStarSystem(eddiStarSystem.Name) == null)
                 {
                     using (var cmd = new SQLiteCommand(con))
                     {
@@ -109,6 +111,7 @@
                         cmd.Parameters.AddWithValue("@name",eddiStarSystem.Name);
                         cmd.Parameters.AddWithValue("@totalvisits", eddiStarSystem.TotalVisits);
                         cmd.Parameters.AddWithValue("@lastvisit", eddiStarSystem.LastVisit);
+                        cmd.Parameters.AddWithValue("@previousvisit", eddiStarSystem.PreviousVisit);
                         cmd.Parameters.AddWithValue("@starsystem", JsonConvert.SerializeObject(eddiStarSystem.StarSystem));
                         cmd.Parameters.AddWithValue("@starsystemlastupdated", eddiStarSystem.StarSystemLastUpdated);
                         cmd.ExecuteNonQuery();


WOOOOOHOOOOO MODERN SEARCH

WOOOOOHOOOOO MODERN SEARCH

--- EngineLayer/ModernSearch/ModernSearchEngine.cs
+++ EngineLayer/ModernSearch/ModernSearchEngine.cs
@@ -168,7 +168,7 @@
             for (int i = 1; i < spectrum.MassSpectrum.Size; i++)
             {
                 double experimentalPeakInDaltons = spectrum.MassSpectrum[i].Mz - Constants.protonMass;
-                if (CommonParameters.ProductMassTolerance.Within(experimentalPeakInDaltons, previousExperimentalPeakInDaltons))
+                if (CommonParameters.ProductMassTolerance.Within(previousExperimentalPeakInDaltons, experimentalPeakInDaltons))
                 {
                     previousTheAdd += spectrum.MassSpectrum[i].Intensity / spectrum.TotalIonCurrent; //open to debate, currently sum intensities of all peaks within tolerance like it was low res
                 }
@@ -189,43 +189,61 @@
             if (addCompIons)
             {
                 //okay, we're not actually adding in complementary m/z peaks, we're doing a shortcut and just straight up adding the mass assuming that they're z=1
-                List<IMzPeak> experimentalPeaks = new List<IMzPeak>();
-                //If HCD
-                if (lp.Contains(ProductType.B) || lp.Contains(ProductType.Y))
+                bool HCD = lp.Contains(ProductType.B) || lp.Contains(ProductType.Y) ? true : false;
+                bool ETD = lp.Contains(ProductType.C) || lp.Contains(ProductType.Zdot) ? true : false;
+                IMzPeak[][] complimentaryPeaks = new IMzPeak[2][];
+
+                if (HCD)
+                {
+                    complimentaryPeaks[0] = new IMzPeak[spectrum.MassSpectrum.Size];
                     for (int i = 0; i < spectrum.MassSpectrum.Size; i++)
-                        experimentalPeaks.Add(new MzPeak((thePrecursorMass - spectrum.MassSpectrum[i].Mz + Constants.protonMass), (spectrum.MassSpectrum[i].Intensity)));
-
-                //If ETD
-                if (lp.Contains(ProductType.C) || lp.Contains(ProductType.Zdot))
+                        complimentaryPeaks[0][i] = new MzPeak((thePrecursorMass - spectrum.MassSpectrum[i].Mz + Constants.protonMass), (spectrum.MassSpectrum[i].Intensity));
+                }
+
+                if (ETD)
+                {
+                    complimentaryPeaks[1] = new IMzPeak[spectrum.MassSpectrum.Size];
                     for (int i = 0; i < spectrum.MassSpectrum.Size; i++)
-                        experimentalPeaks.Add(new MzPeak((thePrecursorMass - spectrum.MassSpectrum[i].Mz + Constants.protonMass * 2), (spectrum.MassSpectrum[i].Intensity)));
-
-                IMzPeak[] sortedPeaksMZ = experimentalPeaks.OrderBy(x => x.Mz).ToArray();
-                //propogation of error from precursor mass and complementary product mass
-                //IMPLEMENT AbsoluteTolerance expandedFragmentTolerance = new AbsoluteTolerance(Math.Sqrt(Math.Pow(CommonParameters.ProductMassTolerance.Value, 2) + Math.Pow(thePrecursorMass / 1000000 * precursorTolerance.Value, 2)));
-                previousTheAdd = 1 + sortedPeaksMZ[0].Intensity / spectrum.TotalIonCurrent;
-                //we already subtracted that proton, so don't add it again (unit test should break if you do!)
-                previousExperimentalPeakInDaltons = sortedPeaksMZ[0].Mz;
-                previousMinRange = CommonParameters.ProductMassTolerance.GetMinimumValue(previousExperimentalPeakInDaltons);
-                for (int i = 1; i < sortedPeaksMZ.Length; i++)
-                {
-                    //we already subtracted that proton when making comp ions, so don't add it again (unit test should break if you do!)
-                    double experimentalPeakInDaltons = sortedPeaksMZ[i].Mz;
-                    if (CommonParameters.ProductMassTolerance.Within(experimentalPeakInDaltons, previousExperimentalPeakInDaltons))
-                    {
-                        previousTheAdd += sortedPeaksMZ[i].Intensity / spectrum.TotalIonCurrent; //open to debate, currently sum intensities of all peaks within tolerance like it was low res
-                    }
-                    else
-                    {
-                        previousMaxRange = CommonParameters.ProductMassTolerance.GetMaximumValue(previousExperimentalPeakInDaltons);
+                        complimentaryPeaks[1][i] = new MzPeak((thePrecursorMass - spectrum.MassSpectrum[i].Mz + Constants.protonMass * 2), (spectrum.MassSpectrum[i].Intensity));
+                }
+
+                for (int fragmentationTypeIndex = 0; fragmentationTypeIndex < complimentaryPeaks.Length; fragmentationTypeIndex++)
+                {
+                    if (complimentaryPeaks[fragmentationTypeIndex] != null)
+                    {
+                        double massShiftNeeded = thePrecursorMass + (1 + fragmentationTypeIndex) * Constants.protonMass; //mass shift needed to reobtain the original product ion for calculating tolerance
+                        IMzPeak[] sortedPeaks = complimentaryPeaks[fragmentationTypeIndex].OrderBy(x => x.Mz).ToArray();
+                        //propogation of error from precursor mass and complementary product mass
+                        //IMPLEMENT AbsoluteTolerance expandedFragmentTolerance = new AbsoluteTolerance(Math.Sqrt(Math.Pow(CommonParameters.ProductMassTolerance.Value, 2) + Math.Pow(thePrecursorMass / 1000000 * precursorTolerance.Value, 2)));
+                        previousTheAdd = 1 + sortedPeaks[0].Intensity / spectrum.TotalIonCurrent;
+                        //we already subtracted that proton, so don't add it again (unit test should break if you do!)
+                        previousExperimentalPeakInDaltons = sortedPeaks[0].Mz;
+                        //need to use original tolerance since it's mass based.
+                        double previousOriginalMassInDaltons = massShiftNeeded - previousExperimentalPeakInDaltons;
+                        previousMinRange = previousExperimentalPeakInDaltons - previousOriginalMassInDaltons + CommonParameters.ProductMassTolerance.GetMinimumValue(previousOriginalMassInDaltons);
+                        for (int i = 1; i < sortedPeaks.Length; i++)
+                        {
+                            //we already subtracted that proton when making comp ions, so don't add it again (unit test should break if you do!)
+                            double experimentalPeakInDaltons = sortedPeaks[i].Mz;
+                            double originalMassInDaltons = massShiftNeeded - experimentalPeakInDaltons;
+                            if (CommonParameters.ProductMassTolerance.Within(previousOriginalMassInDaltons, originalMassInDaltons))
+                            {
+                                previousTheAdd += sortedPeaks[i].Intensity / spectrum.TotalIonCurrent; //open to debate, currently sum intensities of all peaks within tolerance like it was low res
+                            }
+                            else
+                            {
+                                previousMaxRange = previousExperimentalPeakInDaltons - previousOriginalMassInDaltons + CommonParameters.ProductMassTolerance.GetMaximumValue(previousOriginalMassInDaltons);
+                                FindPeakMatches(previousTheAdd, previousMinRange, previousMaxRange, peptideScores);
+                                previousTheAdd = 1 + sortedPeaks[i].Intensity / spectrum.TotalIonCurrent;
+                                previousMinRange = experimentalPeakInDaltons - originalMassInDaltons + CommonParameters.ProductMassTolerance.GetMinimumValue(originalMassInDaltons);
+                            }
+                            previousExperimentalPeakInDaltons = experimentalPeakInDaltons;
+                            previousOriginalMassInDaltons = massShiftNeeded - previousExperimentalPeakInDaltons;
+                        }
+                        previousMaxRange = previousExperimentalPeakInDaltons - previousOriginalMassInDaltons + CommonParameters.ProductMassTolerance.GetMaximumValue(previousOriginalMassInDaltons);
                         FindPeakMatches(previousTheAdd, previousMinRange, previousMaxRange, peptideScores);
-                        previousTheAdd = 1 + sortedPeaksMZ[i].Intensity / spectrum.TotalIonCurrent;
-                        previousMinRange = CommonParameters.ProductMassTolerance.GetMinimumValue(experimentalPeakInDaltons);
-                    }
-                    previousExperimentalPeakInDaltons = experimentalPeakInDaltons;
-                }
-                previousMaxRange = CommonParameters.ProductMassTolerance.GetMaximumValue(previousExperimentalPeakInDaltons);
-                FindPeakMatches(previousTheAdd, previousMinRange, previousMaxRange, peptideScores);
+                    }
+                }
             }
         }


Сhild data context closes extensions belonging to it.

--- Sources/Taijutsu.Infrastructure/Internal/DataContext.cs
+++ Sources/Taijutsu.Infrastructure/Internal/DataContext.cs
@@ -172,6 +172,7 @@
     {
         private readonly DataContext dataContext;
         private bool? completed;
+        private IDictionary<string, IDisposable> extension;

         public ChildDataContext(DataContext dataContext)
         {
@@ -226,6 +227,29 @@

         void IReadOnlyDataContext.Close()
         {
+            Exception lastExException = null;
+            if (extension != null)
+            {
+                foreach (var disposable in extension.Values)
+                {
+                    try
+                    {
+                        disposable.Dispose();
+                    }
+                    catch (Exception exception)
+                    {
+                        lastExException = exception;
+                        Trace.TraceWarning(exception.ToString());
+                    }
+                }
+            }
+
+            extension = null;
+
+            if (lastExException != null)
+            {
+                throw lastExException;
+            }
         }

         void IDisposable.Dispose()
@@ -236,9 +260,10 @@
             }
         }

+
         public virtual IDictionary<string, IDisposable> Extension
         {
-            get { return dataContext.Extension; }
+            get { return extension ?? (extension = new Dictionary<string, IDisposable>()); }
         }

         #endregion


Add support for emit-step.

Add support for emit-step.

--- ExRam.Gremlinq/Gremlin/GremlinQueryLanguage.cs
+++ ExRam.Gremlinq/Gremlin/GremlinQueryLanguage.cs
@@ -204,6 +204,12 @@
             return query
                 .E(ids)
                 .OfType<T>();
+        }
+
+        public static IGremlinQuery<T> Emit<T>(this IGremlinQuery<T> query)
+        {
+            return query
+                .AddStep<T>("emit");
         }

         public static IGremlinQuery<T> FilterWithLambda<T>(this IGremlinQuery<T> query, string lambda)


configurable Auto-rotation

configurable Auto-rotation

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

--- Source/lib/BarcodeReader.cs
+++ Source/lib/BarcodeReader.cs
@@ -228,6 +228,15 @@
          }
       }

+      /// <summary>
+      /// Gets or sets a value indicating whether the image should be automatically rotated.
+      /// Rotation is supported for 90, 180 and 270 degrees
+      /// </summary>
+      /// <value>
+      ///   <c>true</c> if image should be rotated; otherwise, <c>false</c>.
+      /// </value>
+      public bool AutoRotate { get; set; }
+
 #if !SILVERLIGHT
 #if !UNITY
       /// <summary>
@@ -364,8 +373,9 @@
          var binaryBitmap = new BinaryBitmap(binarizer);
          var multiformatReader = Reader as MultiFormatReader;
          var rotationCount = 0;
-
-         for (; rotationCount < 4; rotationCount++)
+         var rotationMaxCount = AutoRotate ? 4 : 1;
+
+         for (; rotationCount < rotationMaxCount; rotationCount++)
          {
             if (usePreviousState && multiformatReader != null)
             {
@@ -378,8 +388,10 @@
             }

             if (result != null ||
-                !luminanceSource.RotateSupported)
+                !luminanceSource.RotateSupported ||
+                !AutoRotate)
                break;
+
             binaryBitmap = new BinaryBitmap(CreateBinarizer(luminanceSource.rotateCounterClockwise()));
          }


added 104 as one of special case where we use fully qualified name for symbol in the error message (changeset 1350987)

--- Src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
+++ Src/Compilers/CSharp/Portable/Errors/MessageProvider.cs
@@ -73,7 +73,7 @@
         public override string ConvertSymbolToString(int errorCode, ISymbol symbol)
         {
             // show extra info for assembly if possible such as version, publictoken and etc
-            if (symbol.Kind == SymbolKind.Assembly || symbol.Kind == SymbolKind.Namespace)
+            if (symbol.Kind == SymbolKind.Assembly || symbol.Kind == SymbolKind.Namespace || errorCode == 0104)
             {
                 return symbol.ToString();
             }


Fixed a bug with replacing BRs with Ps.

Fixed a bug with replacing BRs with Ps.

--HG--
extra : convert_revision : abea6151098d5180cb6a6cb45e87a907eea17c8a

--- Src/NReadability/NReadability/NReadabilityTranscoder.cs
+++ Src/NReadability/NReadability/NReadabilityTranscoder.cs
@@ -631,7 +631,7 @@
       // TODO: optimize?
       string bodyInnerHtml = documentBody.GetInnerHtml();

-      bodyInnerHtml = _ReplaceDoubleBrsRegex.Replace(bodyInnerHtml, "

");
+      bodyInnerHtml = _ReplaceDoubleBrsRegex.Replace(bodyInnerHtml, "

");
       bodyInnerHtml = _ReplaceFontsRegex.Replace(bodyInnerHtml, "<$1span>");

       documentBody.SetInnerHtml(bodyInnerHtml);


add emptymailbox event

add emptymailbox event

--- Src/iFramework/Infrastructure/Mailboxes/Impl/Mailbox.cs
+++ Src/iFramework/Infrastructure/Mailboxes/Impl/Mailbox.cs
@@ -7,6 +7,8 @@
 {
     public class Mailbox
     {
+        public delegate void MessageEmptyHandler(Mailbox mailbox);
+
         private readonly int _batchCount;
         private readonly IProcessingMessageScheduler _scheduler;
         private volatile int _isHandlingMessage;
@@ -23,6 +25,7 @@

         internal ConcurrentQueue<Func<Task>> MessageQueue { get; }
         public string Key { get; }
+        public event MessageEmptyHandler OnMessageEmpty;

         public void EnqueueMessage(Func<Task> processing)
@@ -72,7 +75,7 @@
             }
             else
             {
-                //_handleMailboxEmpty?.Invoke(this);
+                OnMessageEmpty?.Invoke(this);
             }
         }


Added performance measurements

Added performance measurements


[ISSUE #33] One more pooling test to confirm that IPoolable instances get released.

--- StrangeIoC/scripts/strange/.tests/framework/TestPool.cs
+++ StrangeIoC/scripts/strange/.tests/framework/TestPool.cs
@@ -198,6 +198,28 @@
 			PoolException ex = Assert.Throws<PoolException> (testDelegate);
 			Assert.That (ex.type == PoolExceptionType.TYPE_MISMATCH);
 		}
+
+		[Test]
+		public void TestReleaseOfPoolable()
+		{
+			pool.Size = 4;
+			pool.Add (new PooledInstance ());
+			PooledInstance instance = pool.GetInstance () as PooledInstance;
+			instance.someValue = 42;
+			Assert.AreEqual (42, instance.someValue);
+			pool.ReturnInstance (instance);
+			Assert.AreEqual (0, instance.someValue);
+		}
+	}
+
+	class PooledInstance : IPoolable
+	{
+		public int someValue = 0;
+
+		public void Release ()
+		{
+			someValue = 0;
+		}
 	}
 }


Added pathTangent, profileTransformation and profiles[] properties to SpeckleExtrusion class

--- SpeckleCore/ModelObjects.cs
+++ SpeckleCore/ModelObjects.cs
@@ -754,6 +754,15 @@
     [Newtonsoft.Json.JsonProperty( "pathCurve", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
     public SpeckleObject PathCurve { get; set; }

+    [Newtonsoft.Json.JsonProperty("pathTangent", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+    public SpeckleObject PathTangent { get; set; }
+
+    [Newtonsoft.Json.JsonProperty("profileTransformation", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+    public Object ProfileTransformation { get; set; }
+
+    [Newtonsoft.Json.JsonProperty("profiles", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+    public List<SpeckleObject> Profiles { get; set; }
+
     [Newtonsoft.Json.JsonProperty( "length", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore )]
     public double? Length;


Fix alignments in 32 bits.

Fix alignments in 32 bits.

Change-Id: Ie8e78fea9924609b9fb285a25a68cd2d1b3672dc

--- kafka-sharp/kafka-sharp/Routing/ConsumerRouter.cs
+++ kafka-sharp/kafka-sharp/Routing/ConsumerRouter.cs
@@ -154,7 +154,7 @@
         public int MaxNumberOfOffsets;
     }

-    struct CommonAcknowledgement<TResponse> where TResponse : IMemoryStreamSerializable, new()
+    class CommonAcknowledgement<TResponse> where TResponse : IMemoryStreamSerializable, new()
     {
         public TResponse Response;
         public DateTime ReceivedDate;
@@ -280,8 +280,8 @@
         {
             public TaskCompletionSource<bool> CommitPromise;
             public string Topic;
+            public int Partition;
             public long Offset;
-            public int Partition;
         }

         [StructLayout(LayoutKind.Explicit)]
@@ -290,16 +290,16 @@
             [FieldOffset(0)]
             public CommonAcknowledgement<FetchResponse> FetchResponse;

-            [FieldOffset(8)]
+            [FieldOffset(0)]
             public CommonAcknowledgement<CommonResponse<OffsetPartitionResponse>> OffsetResponse;

-            [FieldOffset(8)]
+            [FieldOffset(0)]
             public IEnumerable<string> Subscription;

-            [FieldOffset(8)]
+            [FieldOffset(0)]
             public TopicOnOff Topic;

-            [FieldOffset(8)]
+            [FieldOffset(0)]
             public CommitMsg CommitMsg;
         }


Fixed issue that prevented user to add custom parameters to Message parameters.

--- Tweetinvi.Controllers/Messages/MessageQueryGenerator.cs
+++ Tweetinvi.Controllers/Messages/MessageQueryGenerator.cs
@@ -110,8 +110,13 @@
                 return null;
             }

-            string identifierParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(recipient);
-            return GetPublishMessageFormattedQuery(messageText, identifierParameter);
+            var identifierParameter = _userQueryParameterGenerator.GenerateIdOrScreenNameParameter(recipient);
+
+            var query = GetPublishMessageFormattedQuery(messageText, identifierParameter);
+
+            query += _queryParameterGenerator.GenerateAdditionalRequestParameters(parameters.FormattedCustomQueryParameters);
+
+            return query;
         }

         private string GetPublishMessageFormattedQuery(string message, string userIdentifier)


ecs/entityManager: added a SetComponent(..)-Method to overwrite an exisitng componenttype with the specified one

--- Unity/Assets/GameFramework/Modules/ECS/EntityManager.cs
+++ Unity/Assets/GameFramework/Modules/ECS/EntityManager.cs
@@ -301,6 +301,29 @@
                 }
             }
             return null;
+        }
+
+        /// <summary>
+        /// Set the entities component for this type. A component of this type already added to this entity
+        /// will be removed beforehand
+        /// </summary>
+        /// <param name="entity"></param>
+        /// <param name="component"></param>
+        /// <returns></returns>
+        public IComponent SetComponent(UID entity, IComponent component) {
+            if (EntityExists(entity) && HasComponent(entity, component.GetType())) {
+                RemoveComponent(entity, (IComponent)GetComponent(entity, component.GetType()));
+            }
+
+                //component.Entity.SetID(entity.ID);
+            component.Entity = entity;
+            SetupComponentID(component);
+            _entities[entity].Add(component);
+            _EntityModified(entity);
+            //UnityEngine.Debug.Log("Added component " + component.GetType() + " to entity:" + entity.ID);
+            return component;
+
+
         }

         /// <summary>


bind moar

bind moar

--- src/csharp/emit-events.cs
+++ src/csharp/emit-events.cs
@@ -10,14 +10,34 @@

 public class Startup
 {
+
+  public Task<object> BindToVideoChannelChanges(Func<object, Task<object>> callback) {
+    var conversation = LyncClient.GetClient().ConversationManager.Conversations.FirstOrDefault();
+    var videoChannel = ((AVModality)conversation.Modalities[ModalityTypes.AudioVideo]).VideoChannel;
+
+    videoChannel.ActionAvailabilityChanged += (sender, e) => {
+      System.Console.WriteLine("emit-events:videoChannel:ActionAvailabilityChanged");
+      callback("videoChannel:ActionAvailabilityChanged:"+e.Action);
+      System.Console.WriteLine("emit-events:videoChannel:ActionAvailabilityChanged after callback");
+    };
+
+    return null;
+  }
+
   public Task<object> BindToAvModalityChanges(Func<object, Task<object>> callback) {
     var conversation = LyncClient.GetClient().ConversationManager.Conversations.FirstOrDefault();
     var avModality = ((AVModality)conversation.Modalities[ModalityTypes.AudioVideo]);
+    var videoChannelBound = false;

     avModality.ActionAvailabilityChanged += (sender, e) => {
       System.Console.WriteLine("emit-events:avModality:ActionAvailabilityChanged");
-      callback(e.Action);
+      callback("avModality:ActionAvailabilityChanged:"+e.Action);
       System.Console.WriteLine("emit-events:avModality:ActionAvailabilityChanged after callback");
+
+      if ( !videoChannelBound && ((AVModality)sender).CanInvoke(ModalityAction.Connect) ) {
+        videoChannelBound = true;
+        BindToVideoChannelChanges(callback);
+      }
     };

     return null;
@@ -30,7 +50,7 @@

     ConversationManager.ConversationAdded += (sender, e) => {
       System.Console.WriteLine("emit-events:ConversationAdded");
-      callback("Conversation:Added");
+      callback("ConversationManager:ConversationAdded");
       System.Console.WriteLine("emit-events:ConversationAdded after callback");

       BindToAvModalityChanges(callback);
@@ -38,7 +58,7 @@

     ConversationManager.ConversationRemoved += (sender, e) => {
       System.Console.WriteLine("emit-events:ConversationRemoved");
-      callback("Conversation:Removed");
+      callback("ConversationManager:ConversationRemoved");
       System.Console.WriteLine("emit-events:ConversationRemoved after callback");
     };