fix look-ahead not handling exceptions

fix look-ahead not handling exceptions

--- BitSharp.Common/LookAhead.cs
+++ BitSharp.Common/LookAhead.cs
@@ -28,25 +28,16 @@
                 var readTimes = new List<DateTime>();
                 readTimes.Add(DateTime.UtcNow);

+                var exceptions = new ConcurrentBag<Exception>();
+
                 var lookAheadThread = new Thread(() =>
                 {
-                    // look-ahead loop
-                    var indexLocal = 0;
-                    var valuesLocal = values();
-                    foreach (var value in valuesLocal)
+                    try
                     {
-                        // cooperative loop
-                        if (internalCancelToken.IsCancellationRequested || (cancelToken != null && cancelToken.IsCancellationRequested))
-                        {
-                            return;
-                        }
-
-                        // store the result and notify
-                        results.TryAdd(indexLocal, value);
-                        resultWriteEvent.Set();
-
-                        // make sure look-ahead doesn't go too far ahead, based on calculated index above
-                        while (indexLocal > targetIndex[0])
+                        // look-ahead loop
+                        var indexLocal = 0;
+                        var valuesLocal = values();
+                        foreach (var value in valuesLocal)
                         {
                             // cooperative loop
                             if (internalCancelToken.IsCancellationRequested || (cancelToken != null && cancelToken.IsCancellationRequested))
@@ -54,16 +45,36 @@
                                 return;
                             }

-                            // wait for a result to be read
-                            resultReadEvent.WaitOne(TimeSpan.FromMilliseconds(10));
+                            // store the result and notify
+                            results.TryAdd(indexLocal, value);
+                            resultWriteEvent.Set();
+
+                            // make sure look-ahead doesn't go too far ahead, based on calculated index above
+                            while (indexLocal > targetIndex[0])
+                            {
+                                // cooperative loop
+                                if (internalCancelToken.IsCancellationRequested || (cancelToken != null && cancelToken.IsCancellationRequested))
+                                {
+                                    return;
+                                }
+
+                                // wait for a result to be read
+                                resultReadEvent.WaitOne(TimeSpan.FromMilliseconds(10));
+                            }
+
+                            indexLocal++;
                         }

-                        indexLocal++;
+                        // notify done
+                        finalCount = results.Count;
+                        resultWriteEvent.Set();
                     }
-
-                    // notify done
-                    finalCount = results.Count;
-                    resultWriteEvent.Set();
+                    catch (Exception e)
+                    {
+                        // notify the enumerator loop of any exceptions
+                        exceptions.Add(e);
+                        resultWriteEvent.Set();
+                    }
                 });

                 lookAheadThread.Start();
@@ -79,7 +90,7 @@

                         // unblock loook-ahead and wait for current result to be come available
                         resultReadEvent.Set();
-                        while (i >= results.Count && (finalCount == -1 || i < finalCount))
+                        while (i >= results.Count && (finalCount == -1 || i < finalCount) && exceptions.Count == 0)
                         {
                             // cooperative loop
                             if (cancelToken != null)
@@ -87,6 +98,10 @@

                             resultWriteEvent.WaitOne(TimeSpan.FromMilliseconds(10));
                         }
+
+                        // check if any exceptions occurred in the look-ahead loop
+                        if (exceptions.Count > 0)
+                            throw new AggregateException(exceptions);

                         // check if enumration is finished
                         if (finalCount != -1 && i >= finalCount)


No need for remembering if close has alredy been called

--- BudgetAnalyser/Shell.xaml.cs
+++ BudgetAnalyser/Shell.xaml.cs
@@ -1,6 +1,5 @@
 using System;
 using System.ComponentModel;
-using System.Diagnostics;
 using System.Windows;

 namespace BudgetAnalyser
@@ -10,7 +9,6 @@
     /// </summary>
     public partial class ShellWindow
     {
-        private bool closeHandled;
         private bool sizeHasBeenSet;

         public ShellWindow()
@@ -57,9 +55,8 @@
         {
             // While the application is closing using async tasks and the task factory is error prone.
             // Must wait for the ShellClosing method to complete before continueing to close.
-            if (Controller.HasUnsavedChanges && !this.closeHandled)
+            if (Controller.HasUnsavedChanges)
             {
-                this.closeHandled = true;
                 e.Cancel = true;
                 if (await Controller.ShellClosing())
                 {


Commenting

Commenting

--- notepad/Search.cs
+++ notepad/Search.cs
@@ -128,7 +128,7 @@
 		/// <summary>
 		/// Cycles through the matches of the Regex, adds the results to a list, then sets the default buttons, and selection of the textbox.
 		/// </summary>
-		/// <param name="match"></param>
+		/// <param name="match">MatchCollection containing the items which matched the Regex search</param>
 		private void FoundResults(MatchCollection match) {
 			var index = 0;
 			foreach (Match item in match) {


Add partial default interface method support (#27026)

--- src/tools/crossgen2/Common/Compiler/TypeExtensions.cs
+++ src/tools/crossgen2/Common/Compiler/TypeExtensions.cs
@@ -54,7 +54,7 @@
         public static bool RequiresInstArg(this MethodDesc method)
         {
             return method.IsSharedByGenericInstantiations &&
-                (method.HasInstantiation || method.Signature.IsStatic || method.ImplementationType.IsValueType);
+                (method.HasInstantiation || method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract));
         }

         /// <summary>
@@ -72,7 +72,7 @@
         /// </summary>
         public static bool RequiresInstMethodTableArg(this MethodDesc method)
         {
-            return (method.Signature.IsStatic || method.ImplementationType.IsValueType) &&
+            return (method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract)) &&
                 method.IsSharedByGenericInstantiations &&
                 !method.HasInstantiation;
         }
@@ -85,7 +85,8 @@
             return method.IsSharedByGenericInstantiations &&
                 !method.HasInstantiation &&
                 !method.Signature.IsStatic &&
-                !method.ImplementationType.IsValueType;
+                !method.ImplementationType.IsValueType &&
+                !(method.ImplementationType.IsInterface && !method.IsAbstract);
         }

         /// <summary>


Update _Layout.cshtml

Update _Layout.cshtml

--- test/Admin.Tabler.Hosting/Views/Shared/_Layout.cshtml
+++ test/Admin.Tabler.Hosting/Views/Shared/_Layout.cshtml
@@ -24,8 +24,8 @@

     <title>Hisar Tabler Hosting - @ViewData["Title"]</title>

-    <link href="http://cdn.basbakanlik.gov.tr/css/efe-tabler-all-2.1.5.min.css" rel="stylesheet" />
-    <link rel="stylesheet" href="http://cdn.basbakanlik.gov.tr/css/font-awesome.min.css">
+    <link href="http://cdn.netcorestack.com/css/efe-tabler-all-2.1.5.min.css" rel="stylesheet" />
+    <link rel="stylesheet" href="http://cdn.netcorestack.com/css/font-awesome.min.css">
     <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,400,400i,500,500i,600,600i,700,700i&subset=latin-ext">

     @RenderSection("Styles", required: false)


Fix Articles Controller Tests

Fix Articles Controller Tests

--- test/DancingGoat.Tests/Unit/ArticleControllerTests.cs
+++ test/DancingGoat.Tests/Unit/ArticleControllerTests.cs
@@ -7,7 +7,8 @@
 using CMS.Tests;

 using DancingGoat.Controllers;
-using DancingGoat.Infrastructure;
+using DancingGoat.Infrastructure;
+using DancingGoat.Models.Articles;
 using DancingGoat.Repositories;
 using DancingGoat.Tests.Extensions;

@@ -22,15 +23,14 @@
     {
         private ArticlesController mController;
         private Article mArticle;
-        private IOutputCacheDependencies mDependencies;
-        private string mDocumentName = "Article1";
-
+        private IOutputCacheDependencies mDependencies;
+        private const string ARTICLE_TITLE = "Article1";

         [SetUp]
         public void SetUp()
         {
-            Fake().DocumentType<Article>(Article.CLASS_NAME);
-            mArticle = TreeNode.New<Article>().With(a => a.DocumentName = mDocumentName);
+            Fake().DocumentType<Article>(Article.CLASS_NAME);
+            mArticle = TreeNode.New<Article>().With(a => a.Fields.Title = ARTICLE_TITLE);
             mDependencies = Substitute.For<IOutputCacheDependencies>();

             var repository = Substitute.For<IArticleRepository>();
@@ -52,8 +52,8 @@
         public void Show_WithExistingArticle_RendersDefaultViewWithCorrectModel()
         {
             mController.WithCallTo(c => c.Show(1, null))
-                .ShouldRenderDefaultView()
-                .WithModelMatchingCondition<Article>(x => x.DocumentName == mDocumentName);
+                .ShouldRenderDefaultView()
+                .WithModelMatchingCondition<ArticleViewModel>(x => x.Title == ARTICLE_TITLE);
         }


obsolete

obsolete

--- test/HarshPoint.Tests/Provisioning/ResolvableTests.cs
+++ test/HarshPoint.Tests/Provisioning/ResolvableTests.cs
@@ -9,6 +9,7 @@

 namespace HarshPoint.Tests.Provisioning
 {
+    [Obsolete]
     public class ResolvableTests : SharePointClientTest
     {
         public ResolvableTests(SharePointClientFixture fixture, ITestOutputHelper output)
@@ -179,6 +180,7 @@
             );
         }

+        [Obsolete]
         public class TestResolvable<T> : OldResolvable<T, HarshProvisionerContext, TestResolvable<T>>
         {
             public TestResolvable(params T[] results)
@@ -194,6 +196,7 @@
             }
         }

+        [Obsolete]
         public class NestedTestResolvable<T1, T2> : OldNestedResolvable<T1, T2, HarshProvisionerContext, NestedTestResolvable<T1, T2>>
         {
             public NestedTestResolvable(IResolveOld<T1> parent, Int32 count)


remove test duplicates

remove test duplicates

--- tests/NLog.UnitTests/Internal/ExceptionHelperTests.cs
+++ tests/NLog.UnitTests/Internal/ExceptionHelperTests.cs
@@ -104,9 +104,8 @@
         [InlineData("Error has been raised.", typeof(NLogConfigurationException), false, "Warn")]
         [InlineData("Error has been raised.", typeof(NLogConfigurationException), true, "Warn")]
         [InlineData("", typeof(ArgumentException), true, "Warn")]
-        [InlineData("Error has been raised.", typeof(ArgumentException), false, "Error")]
         [InlineData("", typeof(NLogConfigurationException), true, "Warn")]
-        [InlineData("Error has been raised.", typeof(NLogConfigurationException), false, "Warn")]
+
         public void MustBeRethrown_ShouldLog_exception_and_only_once(string text, Type exceptionType, bool logFirst, string levelText)
         {
             using (new InternalLoggerScope())


Better dump failure testing

Better dump failure testing

--- tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs
+++ tests/Tgstation.Server.Tests/Instance/WatchdogTest.cs
@@ -84,9 +84,15 @@
 			File.Delete(dumpFiles.Single());

 			KillDD(true);
-			var dumpTask = instanceClient.DreamDaemon.CreateDump(cancellationToken);
-			while (!dumpTask.IsCompleted)
-				KillDD(false);
+			Task<Job> dumpTask = null;
+			var killTask = Task.Run(() =>
+			{
+				while (dumpTask?.IsCompleted != true)
+					KillDD(false);
+			});
+
+			dumpTask = instanceClient.DreamDaemon.CreateDump(cancellationToken);
+			await killTask;
 			var job = await WaitForJob(await dumpTask, 20, true, null, cancellationToken);
 			Assert.IsTrue(job.ErrorCode == ErrorCode.DreamDaemonOffline || job.ErrorCode == ErrorCode.GCoreFailure, $"{job.ErrorCode}: {job.ExceptionDetails}");
 			await Task.Delay(TimeSpan.FromSeconds(20), cancellationToken);


change css

change css

--- vivianClothing/vivianClothing/Views/Home/Index.cshtml
+++ vivianClothing/vivianClothing/Views/Home/Index.cshtml
@@ -84,7 +84,7 @@

-
+

Example headline.

@@ -97,7 +97,7 @@
         @for (int i = 0; i < 3; i++)
         {

-
+

One more for good measure.

@@ -124,7 +124,7 @@

-
+

Example headline.

@@ -137,7 +137,7 @@
         @for (int i = 0; i < 3; i++)
         {

-
+

One more for good measure.


ItemPage does work properly now :-)

ItemPage does work properly now :-)

--- wallabag/wallabag.WindowsPhone/Views/ItemPage.xaml.cs
+++ wallabag/wallabag.WindowsPhone/Views/ItemPage.xaml.cs
@@ -70,7 +70,7 @@
             if (e.NavigationParameter != null)
             {
                 this._defaultViewModel = new ItemPageViewModel((ArticleViewModel)e.NavigationParameter);
-                this.webView.NavigateToString((((ItemPageViewModel)this.DataContext).Article).Content);
+                this.webView.NavigateToString((((ItemPageViewModel)this.defaultViewModel).Article).Content);
             }
         }


Added mutex to prevent multiple instances

--- FoxScreen/Program.cs
+++ FoxScreen/Program.cs
@@ -4,6 +4,9 @@
 using System.IO;
 using System.Linq;
 using System.Reflection;
+using System.Runtime.InteropServices;
+using System.Security.AccessControl;
+using System.Security.Principal;
 using System.Threading;
 using System.Threading.Tasks;
 using System.Windows.Forms;
@@ -17,6 +20,44 @@
         /// </summary>
         [STAThread]
         static void Main()
+        {
+            string mutexId = "Global\\foxScreenMutex";
+
+            using (var mutex = new Mutex(false, mutexId))
+            {
+                var allowEveryoneRule = new MutexAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), MutexRights.FullControl, AccessControlType.Allow);
+                var securitySettings = new MutexSecurity();
+                securitySettings.AddAccessRule(allowEveryoneRule);
+                mutex.SetAccessControl(securitySettings);
+
+                var hasHandle = false;
+                try
+                {
+                    try
+                    {
+                        hasHandle = mutex.WaitOne(1000, false);
+                        if (hasHandle == false)
+                        {
+                            MessageBox.Show("foxScreen is already running!", "foxScreen", MessageBoxButtons.OK, MessageBoxIcon.Error);
+                            return;
+                        }
+                    }
+                    catch (AbandonedMutexException)
+                    {
+                        hasHandle = true;
+                    }
+
+                    ActualMain();
+                }
+                finally
+                {
+                    if (hasHandle)
+                        mutex.ReleaseMutex();
+                }
+            }
+        }
+
+        private static void ActualMain()
         {
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);


Added GLDrawPoint, GLDrawHullLines and GLTriangleLines, renamed GLBounds to GLDrawBounds.

Added MeshCleaner addon to cleanup dynamic mehes each frame.
DrawMesh now uses Graphics.DrawMeshNow to instantly draw a mesh OnObjectRender
message.

--- GUI/GraphicsUtils.cs
+++ GUI/GraphicsUtils.cs
@@ -81,12 +81,31 @@
 		public static implicit operator Material(MaterialWrapper mw) { return mw.This; }
 	}

-	//adapted from MechJeb
+	[KSPAddon(KSPAddon.Startup.Instantly, false)]
+	class MeshCleaner : MonoBehaviour
+	{
+		void OnPostRender()
+		{
+			Utils.CleanMeshes();
+		}
+	}
+
 	public static partial class Utils
 	{
-		static MaterialWrapper gl_material = new MaterialWrapper("Particles/Additive");
-		static MaterialWrapper no_z_material = new MaterialWrapper("GUI/Text Shader");
-		static MaterialWrapper diffuse_material = new MaterialWrapper("Diffuse");
+		public static MaterialWrapper gl_material = new MaterialWrapper("Particles/Additive");
+		public static MaterialWrapper no_z_material = new MaterialWrapper("GUI/Text Shader");
+		public static MaterialWrapper diffuse_material = new MaterialWrapper("Diffuse");
+
+		static List<Mesh> meshes = new List<Mesh>();
+		public static void CleanMeshes()
+		{
+			if(meshes.Count > 0)
+			{
+				Log("Cleaning {} meshes.", meshes.Count);//debug
+				meshes.ForEach(Object.Destroy);
+				meshes.Clear();
+			}
+		}

 		public static void DrawMesh(Vector3[] edges, IEnumerable<int> tris, Transform t, Color c = default(Color), Material mat = null)
 		{
@@ -101,7 +120,9 @@
 			if(mat == null) mat = no_z_material.New;
 			mat.color = (c == default(Color))? Color.white : c;
 			//draw mesh in the world space
-			Graphics.DrawMesh(m, t.localToWorldMatrix, mat, 0);
+			mat.SetPass(0);
+			Graphics.DrawMeshNow(m, t.localToWorldMatrix);
+			meshes.Add(m);
 		}

 		public static void DrawMeshArrow(Vector3 ori, Vector3 dir, Transform T, Color c = default(Color))
@@ -143,7 +164,7 @@
 		public static void DrawPoint(Vector3 point, Transform T, Color c = default(Color))
 		{ DrawBounds(new Bounds(point, Vector3.one*0.1f), T, c); }

-		public static void DrawHull(ConvexHull3D h, Transform T, Color c = default(Color))
+		public static void DrawHull(ConvexHull3D h, Transform T, Color c = default(Color), Material mat = null)
 		{
 			var verts = new List<Vector3>(h.Faces.Count*3);
 			var tris  = new List<int>(h.Faces.Count*3);
@@ -152,7 +173,7 @@
 				verts.AddRange(f);
 				tris.AddRange(new []{0+tris.Count, 1+tris.Count, 2+tris.Count});
 			}
-			DrawMesh(verts.ToArray(), tris, T, c, diffuse_material.New);
+			DrawMesh(verts.ToArray(), tris, T, c, mat ?? diffuse_material.New);
 		}

 		static Camera GLBeginWorld(out float far)
@@ -170,6 +191,50 @@
 			return camera;
 		}

+		public static void GLLine(Vector3 ori, Vector3 end, Color c)
+		{
+			float far;
+			var camera = GLBeginWorld(out far);
+			if(MapView.MapIsEnabled)
+			{
+				ori = ScaledSpace.LocalToScaledSpace(ori);
+				end = ScaledSpace.LocalToScaledSpace(end);
+			}
+			GL.Begin(GL.LINES);
+			GL.Color(c);
+			GL.Vertex(ori);
+			GL.Vertex(end);
+			GL.End();
+			GL.PopMatrix();
+			camera.farClipPlane = far;
+		}
+
+		public static void GLVec(Vector3 ori, Vector3 vec, Color c)
+		{ GLLine(ori, ori+vec, c); }
+
+		public static void GLTriangleLines(Vector3[] worldVertices, Color c)
+		{
+			float far;
+			var camera = GLBeginWorld(out far);
+			if(MapView.MapIsEnabled)
+			{
+				worldVertices[0] = ScaledSpace.LocalToScaledSpace(worldVertices[0]);
+				worldVertices[1] = ScaledSpace.LocalToScaledSpace(worldVertices[1]);
+				worldVertices[2] = ScaledSpace.LocalToScaledSpace(worldVertices[2]);
+			}
+			GL.Begin(GL.LINES);
+			GL.Color(c);
+			GL.Vertex(worldVertices[0]);
+			GL.Vertex(worldVertices[1]);
+			GL.Vertex(worldVertices[1]);
+			GL.Vertex(worldVertices[2]);
+			GL.Vertex(worldVertices[2]);
+			GL.Vertex(worldVertices[0]);
+			GL.End();
+			GL.PopMatrix();
+			camera.farClipPlane = far;
+		}
+
 		public static void GLTriangleMap(Vector3d[] worldVertices, Color c)
 		{
 			float far;
@@ -198,45 +263,23 @@
 			camera.farClipPlane = far;
 		}

-		public static void GLLine(Vector3 ori, Vector3 end, Color c)
-		{
-			float far;
-			var camera = GLBeginWorld(out far);
-			if(MapView.MapIsEnabled)
-			{
-				ori = ScaledSpace.LocalToScaledSpace(ori);
-				end = ScaledSpace.LocalToScaledSpace(end);
-			}
-			GL.Begin(GL.LINES);
-			GL.Color(c);
-			GL.Vertex(ori);
-			GL.Vertex(end);
-			GL.End();
-			GL.PopMatrix();
-			camera.farClipPlane = far;
-		}
-
-		public static void GLVec(Vector3 ori, Vector3 vec, Color c)
-		{ GLLine(ori, ori+vec, c); }
-
-		//		edges[0] = new Vector3(min.x, min.y, min.z); //left-bottom-back
-		//		edges[1] = new Vector3(min.x, min.y, max.z); //left-bottom-front
-		//		edges[2] = new Vector3(min.x, max.y, min.z); //left-top-back
-		//		edges[3] = new Vector3(min.x, max.y, max.z); //left-top-front
-		//		edges[4] = new Vector3(max.x, min.y, min.z); //right-bottom-back
-		//		edges[5] = new Vector3(max.x, min.y, max.z); //right-bottom-front
-		//		edges[6] = new Vector3(max.x, max.y, min.z); //right-top-back
-		//		edges[7] = new Vector3(max.x, max.y, max.z); //right-top-front
-
 		static void gl_line(Vector3 ori, Vector3 end)
 		{ GL.Vertex(ori); GL.Vertex(end); }

-		public static void GLBounds(Bounds b, Transform T, Color col)
-		{
+		public static void GLDrawBounds(Bounds b, Transform T, Color col)
+		{
+			//		edges[0] = new Vector3(min.x, min.y, min.z); //left-bottom-back
+			//		edges[1] = new Vector3(min.x, min.y, max.z); //left-bottom-front
+			//		edges[2] = new Vector3(min.x, max.y, min.z); //left-top-back
+			//		edges[3] = new Vector3(min.x, max.y, max.z); //left-top-front
+			//		edges[4] = new Vector3(max.x, min.y, min.z); //right-bottom-back
+			//		edges[5] = new Vector3(max.x, min.y, max.z); //right-bottom-front
+			//		edges[6] = new Vector3(max.x, max.y, min.z); //right-top-back
+			//		edges[7] = new Vector3(max.x, max.y, max.z); //right-top-front
 			var c = Utils.BoundCorners(b);
 			for(int i = 0; i < 8; i++)
 			{
-				c[i] = T.TransformPoint(c[i]);
+				c[i] = T.TransformDirection(c[i])+T.position;
 				if(MapView.MapIsEnabled)
 					c[i] = ScaledSpace.LocalToScaledSpace(c[i]);
 			}
@@ -262,6 +305,20 @@
 			GL.PopMatrix();
 			camera.farClipPlane = far;
 		}
+
+		public static void GLDrawPoint(Vector3 point, Transform T, Color c = default(Color))
+		{ GLDrawBounds(new Bounds(point, Vector3.one*0.1f), T, c); }
+
+		public static void GLDrawHullLines(ConvexHull3D h, Transform T, Vector3 offset = default(Vector3), Color c = default(Color))
+		{
+			foreach(var f in h.Faces)
+			{
+				var verts = f.ToArray();
+				for(int i=0; i<verts.Length; i++)
+					verts[i] = T.TransformDirection(verts[i]-offset)+T.position;
+				GLTriangleLines(verts, c);
+			}
+		}
 	}
 }


(ByteArrayExt): methods made generic.

(ByteArrayExt): methods made generic.

--- GameRes/ByteArray.cs
+++ GameRes/ByteArray.cs
@@ -140,17 +140,17 @@

     public static class ByteArrayExt
     {
-        public static ushort ToUInt16 (this CowArray<byte> arr, int index)
+        public static ushort ToUInt16<TArray> (this TArray arr, int index) where TArray : IList<byte>
         {
             return (ushort)(arr[index] | arr[index+1] << 8);
         }

-        public static short ToInt16 (this CowArray<byte> arr, int index)
+        public static short ToInt16<TArray> (this TArray arr, int index) where TArray : IList<byte>
         {
             return (short)(arr[index] | arr[index+1] << 8);
         }

-        public static int ToInt24 (this CowArray<byte> arr, int index)
+        public static int ToInt24<TArray> (this TArray arr, int index) where TArray : IList<byte>
         {
             return arr[index] | arr[index+1] << 8 | arr[index+2] << 16;
         }
@@ -165,26 +165,29 @@
             return (int)ToUInt32 (arr, index);
         }

-        public static ulong ToUInt64 (this CowArray<byte> arr, int index)
+        public static ulong ToUInt64<TArray> (this TArray arr, int index) where TArray : IList<byte>
         {
             return (ulong)ToUInt32 (arr, index) | ((ulong)ToUInt32 (arr, index+4) << 32);
         }

-        public static long ToInt64 (this CowArray<byte> arr, int index)
+        public static long ToInt64<TArray> (this TArray arr, int index) where TArray : IList<byte>
         {
             return (long)ToUInt64 (arr, index);
         }

-        public static bool AsciiEqual (this CowArray<byte> arr, int index, string str)
+        public static bool AsciiEqual<TArray> (this TArray arr, int index, string str) where TArray : IList<byte>
         {
-            arr.Reclaim();
-            return Binary.AsciiEqual (arr.ToArray(), index, str);
+            if (arr.Length-index < str.Length)
+                return false;
+            for (int i = 0; i < str.Length; ++i)
+                if ((char)arr[index+i] != str[i])
+                    return false;
+            return true;
         }

-        public static bool AsciiEqual (this CowArray<byte> arr, string str)
+        public static bool AsciiEqual<TArray> (this TArray arr, string str) where TArray : IList<byte>
         {
-            arr.Reclaim();
-            return Binary.AsciiEqual (arr.ToArray(), str);
+            return arr.AsciiEqual (0, str);
         }

         public static string GetCString (this CowArray<byte> arr, int index, int length_limit)


Bugfix import: extra delimiters erased,

Bugfix import: extra delimiters erased,

--- Gui/DlgImportView.cs
+++ Gui/DlgImportView.cs
@@ -47,7 +47,7 @@
 			this.frmOptions = new Gtk.Frame( "<b>Options</b>" );
             ((Gtk.Label) this.frmOptions.LabelWidget ).UseMarkup = true;
 			this.lblDelimiter = new Gtk.Label( "Delimiter" );
-			this.cmbDelimiter = new Gtk.ComboBoxEntry( new string[]{ ";", "," } );
+			this.cmbDelimiter = new Gtk.ComboBoxEntry( new string[]{} );
 			this.cbFirstRowForHeaders = new Gtk.CheckButton( "First row is for headers" );
 			hBoxDelimiter.PackStart( this.lblDelimiter, false, false, 5 );
 			hBoxDelimiter.PackStart( this.cmbDelimiter, true, true, 5 );


Added property to change ZoneClass in DnsUpdateMessage

--- ARSoft.Tools.Net/Dns/DynamicUpdate/DnsUpdateMessage.cs
+++ ARSoft.Tools.Net/Dns/DynamicUpdate/DnsUpdateMessage.cs
@@ -70,6 +70,17 @@
 				if (String.IsNullOrEmpty(this.ZoneName))
 					throw new ArgumentException("Zone name must be provided", "message");
 				Questions[0].RecordType = value;
+			}
+		}
+
+		public RecordClass ZoneClass
+		{
+			get { return Questions.Count > 0 ? Questions[0].RecordClass : RecordClass.Any; }
+			set
+			{
+				if (String.IsNullOrEmpty(this.ZoneName))
+					throw new ArgumentException("Zone name must be provided", "message");
+				this.Questions[0].RecordClass = value;
 			}
 		}


refactoring

refactoring

--- AjaxControlToolkit/ExtenderBase/ScriptObjectBuilder.cs
+++ AjaxControlToolkit/ExtenderBase/ScriptObjectBuilder.cs
@@ -18,88 +18,60 @@
         public static IEnumerable<ScriptReference> GetScriptReferences(Type type) {
             // ScriptReference objects aren't immutable.  The AJAX core adds context to them, so we cant' reuse them.
             // Therefore, we track only ReferenceEntries internally and then convert them to NEW ScriptReference objects on-demand.
-            return GetScriptReferencesInternal(type, new Stack<Type>()).Select(entry => entry.ToScriptReference());
+            return GetScriptReferencesInternal(type, new HashSet<Type>()).Select(entry => entry.ToScriptReference());
         }

         public static IEnumerable<string> GetScriptNames(Type type) {
-            return GetScriptReferencesInternal(type, new Stack<Type>()).Select(entry => entry.ResourcePath);
+            return GetScriptReferencesInternal(type, new HashSet<Type>()).Select(entry => entry.ResourcePath);
         }

         // Gets the ScriptReferences for a Type and walks the Type's dependencies with circular-reference checking
-        private static List<ResourceEntry> GetScriptReferencesInternal(Type type, Stack<Type> typeReferenceStack) {
-            // Verify no circular references
-            if(typeReferenceStack.Contains(type)) {
+        private static List<ResourceEntry> GetScriptReferencesInternal(Type type, ICollection<Type> typeTrace) {
+            if(typeTrace.Contains(type))
                 throw new InvalidOperationException("Circular reference detected.");
-            }

             // Look for a cached set of references outside of the lock for perf.
-            //
-            List<ResourceEntry> entries;
-
-            if(_cache.TryGetValue(type, out entries)) {
-                return entries;
-            }
+            if(_cache.ContainsKey(type))
+                return _cache[type];

             // Track this type to prevent circular references
-            typeReferenceStack.Push(type);
+            typeTrace.Add(type);
             try {
                 lock(_sync) {
-                    // since we're inside the lock, check again just in case.
-                    //
-                    if(!_cache.TryGetValue(type, out entries)) {
-                        entries = new List<ResourceEntry>();
-
-                        // Get the required scripts by type
-                        List<RequiredScriptAttribute> requiredScripts = new List<RequiredScriptAttribute>();
-                        foreach(RequiredScriptAttribute attr in type.GetCustomAttributes(typeof(RequiredScriptAttribute), true)) {
-                            requiredScripts.Add(attr);
-                        }
-
-                        requiredScripts.Sort(delegate(RequiredScriptAttribute left, RequiredScriptAttribute right) { return left.LoadOrder.CompareTo(right.LoadOrder); });
-                        foreach(RequiredScriptAttribute attr in requiredScripts) {
-                            if(attr.ExtenderType != null) {
-                                // extrapolate dependent references and add them to the ref list.
-                                entries.AddRange(GetScriptReferencesInternal(attr.ExtenderType, typeReferenceStack));
-                            }
-                        }
-
-                        // Get the client script resource values for this type
-                        int order = 0;
-
-                        // create a new list so we can sort it independently.
-                        //
-                        List<ResourceEntry> newEntries = new List<ResourceEntry>();
-                        for(Type current = type; current != null && current != typeof(object); current = current.BaseType) {
-                            object[] attrs = Attribute.GetCustomAttributes(current, typeof(ClientScriptResourceAttribute), false);
-                            order -= attrs.Length;
-
-                            foreach(ClientScriptResourceAttribute attr in attrs) {
-                                ResourceEntry re = new ResourceEntry(attr.ResourcePath, current, order + attr.LoadOrder);
-
-                                // check for dups in the list.
-                                //
-                                if(!entries.Contains(re) && !newEntries.Contains(re)) {
-                                    newEntries.Add(re);
-                                }
-                            }
-                        }
-
-                        // sort the list and add it to the array.
-                        //
-                        newEntries.Sort(delegate(ResourceEntry l, ResourceEntry r) { return l.Order.CompareTo(r.Order); });
-                        entries.AddRange(newEntries);
-
-                        // Cache the reference list and return (but don't cache if this response is unusual for some reason)
-                        //
-
-                        _cache.Add(type, entries);
-                    }
-
-                    return entries;
+                    // double-checked lock pattern
+                    if(_cache.ContainsKey(type))
+                        return _cache[type];
+
+                    var requiredEntries = type.GetCustomAttributes(typeof(RequiredScriptAttribute), true)
+                        .Cast<RequiredScriptAttribute>()
+                        .Where(a => a.ExtenderType != null)
+                        .OrderBy(a => a.LoadOrder)
+                        .SelectMany(a => GetScriptReferencesInternal(a.ExtenderType, typeTrace));
+
+                    // create a new sequence so we can sort it independently
+                    var scriptEntries = Enumerable.Empty<ResourceEntry>();
+
+                    var current = type;
+                    var orderOffset = 0;
+                    while(current != typeof(object)) {
+                        var attrs = current.GetCustomAttributes(typeof(ClientScriptResourceAttribute), false);
+                        orderOffset -= attrs.Length;
+
+                        scriptEntries = scriptEntries.Concat(attrs
+                            .Cast<ClientScriptResourceAttribute>()
+                            .Select(a => new ResourceEntry(a.ResourcePath, current, orderOffset + a.LoadOrder))
+                            .ToList() // force evaluation because 'current' is mutable
+                        );
+
+                        current = current.BaseType;
+                    }
+
+                    var result = requiredEntries.Concat(scriptEntries.Distinct().OrderBy(e => e.Order)).ToList();
+                    _cache.Add(type, result);
+                    return result;
                 }
             } finally {
-                // Remove the type as further requests will get the cached reference
-                typeReferenceStack.Pop();
+                typeTrace.Remove(type);
             }
         }


Break some of Update's logic into it's own updateGraphicsFromPhysicsDial function for easier reading.

--- Assets/LeapMotion/Widgets/Scripts/Dial/DialGraphics.cs
+++ Assets/LeapMotion/Widgets/Scripts/Dial/DialGraphics.cs
@@ -238,10 +238,7 @@
 		}

 		void Update () {
-
-			Vector3 physicsRotation = new Vector3 (DialPhysics.localRotation.eulerAngles.y, 0f, 0f);
-			DialCenter.localEulerAngles = physicsRotation;
-			CurrentDialInt = parseDialInt (m_dialModeBase.CurrentStep);
+      updateGraphicsFromPhysicsDial ();

 			if(IsEngaged == true){
 				if(m_dataBinder != null){
@@ -254,6 +251,12 @@
 			}
 		}

+    private void updateGraphicsFromPhysicsDial() {
+      Vector3 physicsRotation = new Vector3 (DialPhysics.localRotation.eulerAngles.y, 0f, 0f);
+      DialCenter.localEulerAngles = physicsRotation;
+      CurrentDialInt = parseDialInt (m_dialModeBase.CurrentStep);
+    }
+
 		public void HilightDial () {
 			IsEngaged = true;


Load list of available characters in DeckGenerator

--- Assets/Scripts/HarryPotterUnity/Utils/DeckGenerator.cs
+++ Assets/Scripts/HarryPotterUnity/Utils/DeckGenerator.cs
@@ -22,9 +22,12 @@
                 }
         }

+        private static List<GenericCard> _startingCharacters;
+
         private static void LoadCardLibrary()
         {
             _cardLibrary = new List<GenericCard>();
+            _startingCharacters = new List<GenericCard>();

             var resources = Resources.LoadAll("Cards/");

@@ -37,7 +40,24 @@
                 }
                 var cardInfo = container.GetComponent<GenericCard>();
                 _cardLibrary.Add(cardInfo);
+
+                if (cardInfo.Type == GenericCard.CardType.Character)
+                {
+                    _startingCharacters.Add(cardInfo);
+                }
             }
+        }
+
+        public static GenericCard GetRandomStartingCharacter()
+        {
+            if(_startingCharacters == null) LoadCardLibrary();
+
+            if (_startingCharacters != null)
+            {
+                return _startingCharacters.Skip(Random.Range(0, _startingCharacters.Count - 1)).First();
+            }
+
+            throw new Exception("Starting Characters are not loaded!");
         }

         public static IEnumerable<GenericCard> GenerateDeck(List<LessonTypes> types)


Get formatted reference value for only sequence type or return name (#1051)

--- AutoRest/Generators/Ruby/Ruby/ClientModelExtensions.cs
+++ AutoRest/Generators/Ruby/Ruby/ClientModelExtensions.cs
@@ -180,7 +180,7 @@
             SequenceType sequence = parameter.Type as SequenceType;
             if (sequence == null)
             {
-                return parameter.Type.ToString(parameter.Name);
+                return parameter.Name;
             }

             PrimaryType primaryType = sequence.ElementType as PrimaryType;


Integrate tab shows label placeholders when using "latest" for FUNCTIONS_EXTENSION_VERSION. Fixes #566.

--- AzureFunctions/Controllers/AzureFunctionsController.cs
+++ AzureFunctions/Controllers/AzureFunctionsController.cs
@@ -58,9 +58,9 @@
             string sdkFolder = "";
             if (name != "en")
             {
-                if(name.Length == 2)
+                if (name.Length == 2)
                 {
-                    if (!_languageMap.TryGetValue(name,out portalFolder)) {
+                    if (!_languageMap.TryGetValue(name, out portalFolder)) {
                         portalFolder = name + "-" + name;
                         sdkFolder = name + "-" + name;
                     } else {
@@ -76,15 +76,29 @@

             List<string> resxFiles = new List<string>();
             var result = new JObject();
+            string templateResourcesPath;
+
             if (!string.IsNullOrEmpty(portalFolder) && !string.IsNullOrEmpty(sdkFolder))
             {
                 resxFiles.Add(Path.Combine(this._settings.ResourcesPortalPath.Replace(".Client", ""), portalFolder + "\\Resources.resx"));
-                resxFiles.Add(Path.Combine(this._settings.TemplatesPath, runtime + "\\Resources\\" + sdkFolder + "\\Resources.resx"));
+                templateResourcesPath = Path.Combine(this._settings.TemplatesPath, runtime + "\\Resources\\" + sdkFolder + "\\Resources.resx");
+                if (!File.Exists(templateResourcesPath))
+                {
+                    templateResourcesPath = Path.Combine(this._settings.TemplatesPath, "default\\Resources\\" + sdkFolder + "\\Resources.resx");
+                }
+                resxFiles.Add(templateResourcesPath);
                 result["lang"] = ConvertResxToJObject(resxFiles);
                 resxFiles.Clear();
             }
+
+            // Always add english strings
             resxFiles.Add(Path.Combine(this._settings.ResourcesPortalPath.Replace(".Client", ""), "Resources.resx"));
-            resxFiles.Add(Path.Combine(this._settings.TemplatesPath, runtime + "\\Resources\\Resources.resx"));
+
+            templateResourcesPath = Path.Combine(this._settings.TemplatesPath, runtime + "\\Resources\\Resources.resx");
+            if (!File.Exists(templateResourcesPath)) {
+                templateResourcesPath = Path.Combine(this._settings.TemplatesPath, "default\\Resources\\Resources.resx");
+            }
+            resxFiles.Add(templateResourcesPath);
             result["en"] = ConvertResxToJObject(resxFiles);

             return Request.CreateResponse(HttpStatusCode.OK, result);


Eval reminder already takes into consideration can login

--- Battery-Commander.Web/Jobs/EvaluationDueReminderJob.cs
+++ Battery-Commander.Web/Jobs/EvaluationDueReminderJob.cs
@@ -54,7 +54,6 @@
                     })
                     .GetAwaiter()
                     .GetResult()
-                    .Where(soldier => soldier.CanLogin)
                     .Select(soldier => soldier.GetEmails())
                     .SelectMany(email => email)
                     .ToList();


Fixed controller behavior

Fixed controller behavior

--- Bonfire.Analytics.Dto/Controllers/VisitorController.cs
+++ Bonfire.Analytics.Dto/Controllers/VisitorController.cs
@@ -20,7 +20,7 @@
         {
             Session.Abandon();

-            return Json("Done");
+            return Json("Done", JsonRequestBehavior.AllowGet);
         }
     }
 }


Refactor

Refactor

--- BotSample/EchoBotApi/Controllers/MessagesController.cs
+++ BotSample/EchoBotApi/Controllers/MessagesController.cs
@@ -19,24 +19,26 @@
         /// </summary>
         public async Task<HttpResponseMessage> Post([FromBody]Activity activity)
         {
-            if (activity.Type == ActivityTypes.Message)
-            {
-                var connector = new ConnectorClient(new Uri(activity.ServiceUrl));
+            if (activity.Type != ActivityTypes.Message)
+                return Request.CreateResponse(HttpStatusCode.OK);
+            if (string.IsNullOrWhiteSpace(activity.Text))
+                return Request.CreateResponse(HttpStatusCode.OK);

-                var text = $"You sent \"{activity.Text ?? "{null}"}\".";
+            var connector = new ConnectorClient(new Uri(activity.ServiceUrl));

-                // return our reply to the user
-                var reply = activity.CreateReply(text);
-                await connector.Conversations.ReplyToActivityAsync(reply);
-            }
-            else
-            {
-                HandleSystemMessage(activity);
-            }
+            var echoMessage = $"You sent \"{activity.Text}\".";
+            await Reply(connector, activity, echoMessage);
+
             return Request.CreateResponse(HttpStatusCode.OK);
         }

-        private Activity HandleSystemMessage(Activity message)
+        static async Task Reply(ConnectorClient connector, Activity activity, string message)
+        {
+            var reply = activity.CreateReply(message);
+            await connector.Conversations.ReplyToActivityAsync(reply);
+        }
+
+        Activity HandleSystemMessage(Activity message)
         {
             if (message.Type == ActivityTypes.DeleteUserData)
             {


--- BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
+++ BuildingCoder/BuildingCoder/Properties/AssemblyInfo.cs
@@ -291,6 +291,7 @@
 // 2019-02-14 2019.0.145.8 added CreateSweepWithMultipleLoops from https://forums.autodesk.com/t5/revit-api-forum/how-to-create-a-sweep-with-multiple-closed-loops-in-profile/m-p/8477617
 // 2019-02-26 2019.0.145.9 added GetPipesForSystemType from https://forums.autodesk.com/t5/revit-api-forum/filteredelementcollector-by-pipe-system-types/m-p/8620113
 // 2019-02-26 2019.0.145.10 implemented GetSpecificTitleBlockType for https://forums.autodesk.com/t5/revit-api-forum/insert-specific-title-block/m-p/8621988
+// 2019-03-02 2019.0.145.11 eliminated all deprecated API calls to achieve zero compilation warnings
 //
-[assembly: AssemblyVersion( "2019.0.145.10" )]
-[assembly: AssemblyFileVersion( "2019.0.145.10" )]
+[assembly: AssemblyVersion( "2019.0.145.11" )]
+[assembly: AssemblyFileVersion( "2019.0.145.11" )]


StructuralComparisons fix

StructuralComparisons fix

--- Core/System/Collections/StructuralComparisons.net35.cs
+++ Core/System/Collections/StructuralComparisons.net35.cs
@@ -1,6 +1,8 @@
 #if NET20 || NET30 || NET35

 using System.Collections.Generic;
+using System.Diagnostics;
+using System.Diagnostics.Contracts;
 using Theraot.Core;

 namespace System.Collections
@@ -44,7 +46,7 @@
                     return comparable.Equals(y, this);
                 }
                 var typeX = x.GetType();
-                var typeY = x.GetType();
+                var typeY = y.GetType();
                 if (typeX.IsArray && typeY.IsArray)
                 {
                     if (typeX.GetElementType() == typeY.GetElementType())
@@ -52,6 +54,11 @@
                         CheckRank(x, y, typeX, typeY);
                         var xLengthInfo = typeX.GetProperty("Length");
                         var yLengthInfo = typeY.GetProperty("Length");
+                        if (xLengthInfo == null || yLengthInfo == null)
+                        {
+                            // should never happen
+                            throw new ArgumentException("Valid arrays required");
+                        }
                         if ((int)xLengthInfo.GetValue(x, TypeHelper.EmptyObjects) != (int)yLengthInfo.GetValue(y, TypeHelper.EmptyObjects))
                         {
                             return false;
@@ -111,6 +118,11 @@
             {
                 var xRankInfo = typeX.GetProperty("Rank");
                 var yRankInfo = typeY.GetProperty("Rank");
+                if (xRankInfo == null || yRankInfo == null)
+                {
+                    // should never happen
+                    throw new ArgumentException("Valid arrays required");
+                }
                 if ((int)xRankInfo.GetValue(x, TypeHelper.EmptyObjects) != 1)
                 {
                     throw new ArgumentException("Only one-dimensional arrays are supported", "x");


Updated WeakDelegateSet

Updated WeakDelegateSet

--- Core/Theraot/Collections/ThreadSafe/WeakDelegateSet.cs
+++ Core/Theraot/Collections/ThreadSafe/WeakDelegateSet.cs
@@ -11,7 +11,7 @@
 namespace Theraot.Collections.ThreadSafe
 {
     [System.Diagnostics.DebuggerNonUserCode]
-    public sealed class WeakDelegateSet : WeakSetBucket<Delegate, WeakDelegateNeedle>
+    public sealed class WeakDelegateSet : WeakSet<Delegate, WeakDelegateNeedle>
     {
         private readonly Action<object[]> _invoke;

@@ -109,7 +109,7 @@
             return false;
         }

-        protected override WeakSetBucket<Delegate, WeakDelegateNeedle> OnClone()
+        protected override WeakSet<Delegate, WeakDelegateNeedle> OnClone()
         {
             return Clone();
         }


changed visibilty of class members

changed visibilty of class members

NEVER EXPOSE YOUR PRIVATE KEY.... are you insame that you make your private key public? When you add plugin support (I think you will) this will kill everything.

--- Craft.Net.Server/Packets/EncryptionKeyRequestPacket.cs
+++ Craft.Net.Server/Packets/EncryptionKeyRequestPacket.cs
@@ -7,8 +7,8 @@
 {
     public class EncryptionKeyRequestPacket : Packet
     {
-        public string AuthenticationHash;
-        public RSAParameters ServerKey;
+        private string AuthenticationHash;
+        private RSAParameters ServerKey;

         public EncryptionKeyRequestPacket()
         {


(build) Bump to latest Cake.Recipe

(build) Bump to latest Cake.Recipe

--- recipe.cake
+++ recipe.cake
@@ -1,4 +1,4 @@
-#load nuget:?package=Cake.Recipe&version=2.1.0
+#load nuget:?package=Cake.Recipe&version=2.2.0
 #tool nuget:https://api.nuget.org/v3/index.json?package=SignClient&version=0.9.0

 Environment.SetVariableNames();


Security. O H L C V fields marked as nullable.

--- BusinessEntities/Security.cs
+++ BusinessEntities/Security.cs
@@ -564,7 +564,7 @@
 			}
 		}

-		private decimal _openPrice;
+		private decimal? _openPrice;

 		/// <summary>
 		/// Первая цена сделки за сессию.
@@ -578,7 +578,7 @@
 		[PropertyOrder(11)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal OpenPrice
+		public decimal? OpenPrice
 		{
 			get { return _openPrice; }
 			set
@@ -591,7 +591,7 @@
 			}
 		}

-		private decimal _closePrice;
+		private decimal? _closePrice;

 		/// <summary>
 		/// Последняя цена сделки за предыдущую сессию.
@@ -605,7 +605,7 @@
 		[PropertyOrder(14)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal ClosePrice
+		public decimal? ClosePrice
 		{
 			get { return _closePrice; }
 			set
@@ -618,7 +618,7 @@
 			}
 		}

-		private decimal _lowPrice;
+		private decimal? _lowPrice;

 		/// <summary>
 		/// Наименьшая цена сделки за сессию.
@@ -632,7 +632,7 @@
 		[PropertyOrder(13)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal LowPrice
+		public decimal? LowPrice
 		{
 			get { return _lowPrice; }
 			set
@@ -645,7 +645,7 @@
 			}
 		}

-		private decimal _highPrice;
+		private decimal? _highPrice;

 		/// <summary>
 		/// Наивысшая цена сделки за сессию.
@@ -659,7 +659,7 @@
 		[PropertyOrder(12)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal HighPrice
+		public decimal? HighPrice
 		{
 			get { return _highPrice; }
 			set
@@ -822,7 +822,7 @@
 			}
 		}

-		private decimal _marginBuy;
+		private decimal? _marginBuy;

 		/// <summary>
 		/// Гарантийное обеспечение на покупку.
@@ -835,7 +835,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal MarginBuy
+		public decimal? MarginBuy
 		{
 			get { return _marginBuy; }
 			set
@@ -848,7 +848,7 @@
 			}
 		}

-		private decimal _marginSell;
+		private decimal? _marginSell;

 		/// <summary>
 		/// Гарантийное обеспечение на продажу.
@@ -861,7 +861,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal MarginSell
+		public decimal? MarginSell
 		{
 			get { return _marginSell; }
 			set
@@ -1179,7 +1179,7 @@
 			}
 		}

-		private decimal _bidsVolume;
+		private decimal? _bidsVolume;

 		/// <summary>
 		/// Суммарный объем во всех заявках на покупку.
@@ -1193,7 +1193,7 @@
 		[PropertyOrder(6)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal BidsVolume
+		public decimal? BidsVolume
 		{
 			get { return _bidsVolume; }
 			set
@@ -1203,7 +1203,7 @@
 			}
 		}

-		private int _bidsCount;
+		private int? _bidsCount;

 		/// <summary>
 		/// Количество заявок на покупку.
@@ -1217,7 +1217,7 @@
 		[PropertyOrder(8)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public int BidsCount
+		public int? BidsCount
 		{
 			get { return _bidsCount; }
 			set
@@ -1227,7 +1227,7 @@
 			}
 		}

-		private decimal _asksVolume;
+		private decimal? _asksVolume;

 		/// <summary>
 		/// Суммарный объем во всех заявках на продажу.
@@ -1241,7 +1241,7 @@
 		[PropertyOrder(7)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal AsksVolume
+		public decimal? AsksVolume
 		{
 			get { return _asksVolume; }
 			set
@@ -1251,7 +1251,7 @@
 			}
 		}

-		private int _asksCount;
+		private int? _asksCount;

 		/// <summary>
 		/// Количество заявок на продажу.
@@ -1265,7 +1265,7 @@
 		[PropertyOrder(9)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public int AsksCount
+		public int? AsksCount
 		{
 			get { return _asksCount; }
 			set
@@ -1275,7 +1275,7 @@
 			}
 		}

-		private int _tradesCount;
+		private int? _tradesCount;

 		/// <summary>
 		/// Количество сделок.
@@ -1289,7 +1289,7 @@
 		[PropertyOrder(10)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public int TradesCount
+		public int? TradesCount
 		{
 			get { return _tradesCount; }
 			set
@@ -1299,7 +1299,7 @@
 			}
 		}

-		private decimal _highBidPrice;
+		private decimal? _highBidPrice;

 		/// <summary>
 		/// Максимальный бид за сессию.
@@ -1313,7 +1313,7 @@
 		[PropertyOrder(4)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal HighBidPrice
+		public decimal? HighBidPrice
 		{
 			get { return _highBidPrice; }
 			set
@@ -1323,7 +1323,7 @@
 			}
 		}

-		private decimal _lowAskPrice;
+		private decimal? _lowAskPrice;

 		/// <summary>
 		/// Минимальный оффер за сессию.
@@ -1337,7 +1337,7 @@
 		[PropertyOrder(5)]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal LowAskPrice
+		public decimal? LowAskPrice
 		{
 			get { return _lowAskPrice; }
 			set
@@ -1347,7 +1347,7 @@
 			}
 		}

-		private decimal _yield;
+		private decimal? _yield;

 		/// <summary>
 		/// Доходность.
@@ -1360,7 +1360,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal Yield
+		public decimal? Yield
 		{
 			get { return _yield; }
 			set
@@ -1370,7 +1370,7 @@
 			}
 		}

-		private decimal _vwap;
+		private decimal? _vwap;

 		/// <summary>
 		/// Средневзвешенная цена.
@@ -1383,7 +1383,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal VWAP
+		public decimal? VWAP
 		{
 			get { return _vwap; }
 			set
@@ -1393,7 +1393,7 @@
 			}
 		}

-		private decimal _settlementPrice;
+		private decimal? _settlementPrice;

 		/// <summary>
 		/// Рассчетная цена.
@@ -1406,7 +1406,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal SettlementPrice
+		public decimal? SettlementPrice
 		{
 			get { return _settlementPrice; }
 			set
@@ -1416,7 +1416,7 @@
 			}
 		}

-		private decimal _averagePrice;
+		private decimal? _averagePrice;

 		/// <summary>
 		/// Средняя цена за сессию.
@@ -1429,7 +1429,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal AveragePrice
+		public decimal? AveragePrice
 		{
 			get { return _averagePrice; }
 			set
@@ -1439,7 +1439,7 @@
 			}
 		}

-		private decimal _volume;
+		private decimal? _volume;

 		/// <summary>
 		/// Объем за сессию.
@@ -1452,7 +1452,7 @@
 		[XmlIgnore]
 		[Browsable(false)]
 		//[Obsolete("Необходимо использовать метод IConnector.GetSecurityValue.")]
-		public decimal Volume
+		public decimal? Volume
 		{
 			get { return _volume; }
 			set


Add null check

Add null check

--- CSharpGameLibrary/Interop.cs
+++ CSharpGameLibrary/Interop.cs
@@ -66,6 +66,7 @@
         }

         public static T[] GetInternalArray<T>(List<T> list) {
+            if (list == null) return null;
             //returns the internal backing array
             return ListAccessor<T>.accessor(list);
         }


Fixed some bone problems and added a check for existing materials

--- Editor/Mesh2BPY.cs
+++ Editor/Mesh2BPY.cs
@@ -57,7 +57,8 @@
    		return (SkinnedMeshRenderer) meshTransform.GetComponentInChildren(typeof(SkinnedMeshRenderer));
 	}

-	private const string Version = "0.4";
+	private const string Version = "0.5";
+	private const int LineBreakLimit = 256;
 	private const string S = "    "; // indent space

 	private string meshName;
@@ -114,7 +115,7 @@
 		w.WriteLine(S + "me = bpy.data.meshes.new('" + meshName + "_mesh')");
 		w.WriteLine(S + "ob = bpy.data.objects.new('" + meshName + "', me)");
 		Vector3 pos = meshRenderer.transform.position;
-		w.WriteLine(S + "ob.location = (" + pos.x + "," + pos.z + "," + pos.y + ")");
+		w.WriteLine(S + "ob.location = (" + -pos.x + "," + -pos.z + "," + pos.y + ")");
 		w.WriteLine();
 		w.WriteLine(S + "# Link object to scene");
 		w.WriteLine(S + "scn = bpy.context.scene");
@@ -128,17 +129,21 @@
 		w.WriteLine();
 		w.WriteLine(S + "# Create materials and collect face indices");
 		w.WriteLine(S + "faces_all = []");
-		w.WriteLine(S + "images = []");
-		w.WriteLine(S + "for name, faces in faces_map.items():");
-		w.WriteLine(S + S + "image = load_image(name + '_diffuse.jpg', './', place_holder=True)");
-		w.WriteLine(S + S + "images.append(image)");
-		w.WriteLine(S + S + "texture = bpy.data.textures.new(name=name + '_diffuse',type='IMAGE')");
-		w.WriteLine(S + S + "texture.image = image");
-		w.WriteLine(S + S + "material = bpy.data.materials.new(name)");
-		w.WriteLine(S + S + "slot = material.texture_slots.add()");
-		w.WriteLine(S + S + "slot.texture = texture");
-		w.WriteLine(S + S + "slot.texture_coords = 'UV'");
-		w.WriteLine(S + S + "slot.use_map_color_diffuse = True");
+		w.WriteLine(S + "for name, faces in faces_map.items():");
+		w.WriteLine(S + S + "material = bpy.data.materials.get(name)");
+		w.WriteLine(S + S + "tex_name = name + '_diffuse'");
+		w.WriteLine(S + S + "tex_file = tex_name + '.jpg'");
+		w.WriteLine(S + S + "if material == None:");
+		w.WriteLine(S + S + S + "material = bpy.data.materials.new(name)");
+		w.WriteLine(S + S + S + "image = load_image(tex_file, './textures/', place_holder=True)");
+		w.WriteLine(S + S + S + "texture = bpy.data.textures.new(tex_name, 'IMAGE')");
+		w.WriteLine(S + S + S + "texture.image = image");
+		w.WriteLine(S + S + S + "slot = material.texture_slots.add()");
+		w.WriteLine(S + S + S + "slot.texture = texture");
+		w.WriteLine(S + S + S + "slot.texture_coords = 'UV'");
+		w.WriteLine(S + S + S + "slot.uv_layer = '" + meshName + "_uv'");
+		w.WriteLine(S + S + S + "slot.use_map_color_diffuse = True");
+		w.WriteLine();
 		w.WriteLine(S + S + "me.materials.append(material)");
 		w.WriteLine(S + S + "faces_all += faces");
 		w.WriteLine();
@@ -146,6 +151,14 @@
 		w.WriteLine(S + "me.tessfaces.add(len(faces_all))");
 		w.WriteLine(S + "me.tessfaces.foreach_set(\"vertices_raw\", unpack_list(faces_all))");
 		w.WriteLine(S + "me.tessfaces.foreach_set(\"use_smooth\", [True] * len(me.tessfaces))");
+		w.WriteLine();
+		w.WriteLine(S + "# Load UV");
+		w.WriteLine(S + "uvtex = me.tessface_uv_textures.new('" + meshName + "_uv')");
+		w.WriteLine(S + "for n, tf in enumerate(uv):");
+		w.WriteLine(S + S + "texdata = uvtex.data[n]");
+		w.WriteLine(S + S + "texdata.uv1 = tf[0]");
+		w.WriteLine(S + S + "texdata.uv2 = tf[1]");
+		w.WriteLine(S + S + "texdata.uv3 = tf[2]");
 		w.WriteLine();
 		w.WriteLine(S + "# Set face materials according to the mapping");
 		w.WriteLine(S + "mat_index = 0");
@@ -155,17 +168,6 @@
 		w.WriteLine(S + S + S + "me.tessfaces[i + face_index].material_index = mat_index");
 		w.WriteLine(S + S + "mat_index += 1");
 		w.WriteLine(S + S + "face_index += len(faces)");
-
-		w.WriteLine();
-		w.WriteLine(S + "# Load UV");
-		w.WriteLine(S + "uvtex = me.tessface_uv_textures.new('" + meshName + "_uv')");
-		w.WriteLine(S + "for n, tf in enumerate(uv):");
-		w.WriteLine(S + S + "texdata = uvtex.data[n]");
-		w.WriteLine(S + S + "texdata.uv1 = tf[0]");
-		w.WriteLine(S + S + "texdata.uv2 = tf[1]");
-		w.WriteLine(S + S + "texdata.uv3 = tf[2]");
-		w.WriteLine(S + S + "texdata.image = images[0]");
-
 		w.WriteLine();
 		w.WriteLine(S + "# Update mesh with new data");
 		w.WriteLine(S + "me.update(calc_edges=True)");
@@ -250,11 +252,13 @@
 		if (tail.childCount == 0)
 		{
 			Vector3 dir;
-
-			// FIXME: in Wild Skies, transforms starting with "hp_" seem to have
+			float dist = Math.Abs((tail.position - head.position).magnitude);
+
+			// check the distance so the head isn't at the same location as the tail
+			// FIXME: in Wild Skies, transforms starting with "hp" seem to have
 			// incorrect rotations, use the direction of the previous bone instead
 			// as a workaround
-			if (tail.name.StartsWith("hp_", true, null))
+			if (dist > 0.1f && tail.name.StartsWith("hp", true, null))
 				dir = (tail.position - head.position).normalized * 0.1f;
 			else
 				dir = tail.rotation * new Vector3(-1, 0, 0) * 0.2f;
@@ -283,8 +287,8 @@
 	{
 		string vname = FixBoneName(name);
 		w.WriteLine(S + vname + " = amt.edit_bones.new('" + name + "')");
-		w.WriteLine(S + vname + ".head = (" + hp.x + "," + hp.z + "," + hp.y + ")");
-		w.WriteLine(S + vname + ".tail = (" + tp.x + "," + tp.z + "," + tp.y + ")");
+		w.WriteLine(S + vname + ".head = (" + -hp.x + "," + -hp.z + "," + hp.y + ")");
+		w.WriteLine(S + vname + ".tail = (" + -tp.x + "," + -tp.z + "," + tp.y + ")");

 		if (parentName != null)
 		{
@@ -339,14 +343,9 @@

 	    	//This is sort of ugly - inverting x-component since we're in
 	    	//a different coordinate system than "everyone" is "used to".
-			w.Write("(" + vert.x + "," + vert.z + "," + vert.y + "),");
-
-			// new line after 3 verts
-			if ((i + 1) % 3 == 0)
-			{
-				w.WriteLine();
-				w.Write(S + S);
-			}
+			w.Write("(" + -vert.x + "," + -vert.z + "," + vert.y + "),");
+
+			WriteAutoLineBreak(i + 1);
 		}

 		w.WriteLine();
@@ -359,13 +358,9 @@
 		for (int i = 0; i < mesh.subMeshCount; i++)
 		{
 			Material material = mats[i];
-
-			if (material == null)
-				w.WriteLine(S + "faces['null'] = [");
-			else
-				w.WriteLine(S + "faces['" + material.name + "'] = [");
-
-
+			String matName = material == null ? "null" : material.name;
+
+			w.WriteLine(S + "faces['" + matName + "'] = [");
 			w.Write(S + S);

 			int[] triangles = mesh.GetTriangles(i);
@@ -373,38 +368,38 @@
 		    for (int j = 0, n = 1; j < triangles.Length; j += 3, n++)
 		    {
 				w.Write("(" + triangles[j] + "," + triangles[j + 1] + "," + triangles[j + 2] + ",0),");
-
-				// new line after 6 tris
-				if (n % 6 == 0)
-				{
-					w.WriteLine();
-					w.Write(S + S);
-				}
+
+				WriteAutoLineBreak(n);
 			}

 			w.WriteLine();
 			w.WriteLine(S + "]");
 			w.WriteLine();
 		}
+
+		w.WriteLine();

 		w.WriteLine(S + "# List of texture face UVs");
 		w.WriteLine(S + "uv = [");
-
-		for (int i = 0; i < tris.Length; i += 3)
-		{
-			w.Write(S + S + "[");
+		w.Write(S + S);
+
+		for (int i = 0, n = 1; i < tris.Length; i += 3, n++)
+		{
+			w.Write("[");
 			w.Write("(" + uvs[tris[i]].x + "," + uvs[tris[i]].y + "),");
 			w.Write("(" + uvs[tris[i + 1]].x + "," + uvs[tris[i + 1]].y + "),");
 			w.Write("(" + uvs[tris[i + 2]].x + "," + uvs[tris[i + 2]].y + ")");
 			w.Write("],");
-			w.WriteLine();
-		}
-
+
+			WriteAutoLineBreak(n);
+		}
+
+		w.WriteLine();
 		w.WriteLine(S + "]");
 		w.WriteLine();

 		w.WriteLine(S + "# List of vertex groups, in the form (vertex, weight)");
-		w.WriteLine(S + "vgroups = collections.OrderedDict()");
+		w.WriteLine(S + "vg = collections.OrderedDict()");

 	    for (int i = 0; i < bones.Length; i++)
 	    {
@@ -432,27 +427,13 @@

 			if (vweightList.Count > 0)
 			{
-				w.WriteLine(S + "vgroups['" + bones[i].name + "'] = [");
-				w.Write(S + S);
-
-				int n = 0;
+				w.Write(S + "vg['" + bones[i].name + "'] = [");
+
 				foreach (Dictionary<int, float> vweight in vweightList)
-				{
 					foreach(KeyValuePair<int, float> entry in vweight)
-					{
 						w.Write("(" + entry.Key + "," + entry.Value + "),");
-					}
-
-					// new line after 10 pairs
-					if (++n % 10 == 0)
-					{
-						w.WriteLine();
-						w.Write(S + S);
-					}
-				}
-
-				w.WriteLine();
-				w.WriteLine(S + "]");
+
+				w.WriteLine("]");
 			}
 			else
 			{
@@ -464,7 +445,7 @@

 		w.WriteLine(S + "ob = buildMesh(verts, faces, uv)");
 		w.WriteLine(S + "rig = buildArmature()");
-		w.WriteLine(S + "buildSkin(ob, rig, vgroups)");
+		w.WriteLine(S + "buildSkin(ob, rig, vg)");
 		w.WriteLine();
 	}

@@ -473,5 +454,14 @@
 		w.WriteLine("if __name__ == \"__main__\":");
 		w.WriteLine(S + "build()");
 	}
+
+	private void WriteAutoLineBreak(int n)
+	{
+		if (n % LineBreakLimit == 0)
+		{
+			w.WriteLine();
+			w.Write(S + S);
+		}
+	}
 }


Re-added GetComponentsInDescendants<T>

Re-added GetComponentsInDescendants<T>

This was actually removed by accident, the other commit wasn't. (woops)

--- Entities/Entity.cs
+++ Entities/Entity.cs
@@ -352,40 +352,6 @@
             return components.OfType<T>();
         }

-        public List<T> GetComponentsInChildren<T>() where T : IComponent
-        {
-            List<T> components = new List<T>();
-            Entity[] descendants = Children;
-
-            foreach (var child in descendants)
-            {
-                if (child.HasComponent<T>())
-                    components.Add(child.GetComponent<T>());
-            }
-
-            return components;
-        }
-
-        /// <summary>
-        /// Gets the components of the specified type in descendants
-        /// </summary>
-        /// <typeparam name="T"></typeparam>
-        /// <returns></returns>
-        public List<T> GetComponentsInDescendants<T>(bool includeParent = false) where T: IComponent
-        {
-            List<T> components = new List<T>();
-            Entity[] descendants = Children;
-
-            if (includeParent)
-                components.AddRange(GetComponents<T>());
-
-            foreach (var child in descendants)
-            {
-                components.AddRange(child.GetComponentsInDescendants<T>(true));
-            }
-
-            return components;
-        }

         /// <summary>
         /// Renders the entity and children of the entity
@@ -519,10 +485,8 @@
         /// </summary>
         internal void Init()
         {
-
-        }
-
-
+
+        }

         public override string ToString()
         {
@@ -536,6 +500,27 @@
         public override Entity CreateChild()
         {
             return new Entity(this);
+        }
+
+        /// <summary>
+        /// Gets the components of the specified type in descendants
+        /// </summary>
+        /// <typeparam name="T"></typeparam>
+        /// <returns></returns>
+        public List<T> GetComponentsInDescendants<T>(bool includeParent = false) where T : IComponent
+        {
+            List<T> components = new List<T>();
+            Entity[] descendants = Children;
+
+            if (includeParent)
+                components.AddRange(GetComponents<T>());
+
+            foreach (var child in descendants)
+            {
+                components.AddRange(child.GetComponentsInDescendants<T>(true));
+            }
+
+            return components;
         }

         /// <summary>


Moved Methods to Internal

Moved Methods to Internal

Moving the methods to be internal clarifies the use of the API.

--- Flipper/Flipper.cs
+++ Flipper/Flipper.cs
@@ -9,10 +9,10 @@
 {
     public class Feature
     {
-        public string Name { get; set; }
-        public List<string> Users { get; set; }
-        public List<string> Groups { get; set; }
-        public int Percentage { get; set; }
+        internal string Name { get; set; }
+        internal List<string> Users { get; set; }
+        internal List<string> Groups { get; set; }
+        internal int Percentage { get; set; }

         /// <summary>
@@ -30,7 +30,7 @@
         /// Adds a UserID to a feature
         /// </summary>
         /// <param name="userID">The userID to add</param>
-        public void AddUser(string userID)
+        internal void AddUser(string userID)
         {
             if (!Users.Contains(userID))
             {
@@ -42,7 +42,7 @@
         /// Removes a UserID from a feature
         /// </summary>
         /// <param name="userID">The UserID to remove</param>
-        public void RemoveUser(string userID)
+        internal void RemoveUser(string userID)
         {
             Users.Remove(userID);
         }
@@ -51,7 +51,7 @@
         /// Adds the group with the name to the feature
         /// </summary>
         /// <param name="group">The name of the group</param>
-        public void AddGroup(string group)
+        internal void AddGroup(string group)
         {
             if (!Groups.Contains(group))
             {
@@ -63,7 +63,7 @@
         /// Removes a group from the feature
         /// </summary>
         /// <param name="group">The name of the Group</param>
-        public void RemoveGroup(string group)
+        internal void RemoveGroup(string group)
         {
             Groups.Remove(group);
         }
@@ -71,7 +71,7 @@
         /// <summary>
         /// Clears all Groups, Users and sets the percentage to 0
         /// </summary>
-        public void Clear()
+        internal void Clear()
         {
             Groups.Clear();
             Users.Clear();
@@ -82,18 +82,33 @@
         /// Returns a bool indicating if the feature is active
         /// </summary>
         /// <param name="actuator">The actuator</param>
-        /// <param name="user">Optional User to check</param>
+        /// <param name="userID">Optional User to check</param>
         /// <returns>Bool indicating if the feature active</returns>
-        public bool IsActive(Actuator actuator, string user)
-        {
-            if (user == "")
+        internal bool IsActive(Actuator actuator, string userID)
+        {
+            if (userID == "")
             {
                 return Percentage == 100;
             }
             else
             {
-                return int.Parse(user) % 100 <= Percentage || Users.Contains(user) || actuator.UserInGroup(user, Groups);
-            }
+                return IsUserInPercentage(actuator, userID) || Users.Contains(userID) || actuator.UserInGroup(userID, Groups);
+            }
+        }
+
+        private bool IsUserInPercentage(Actuator actuator, string userID)
+        {
+            if (Percentage == 100)
+            {
+                return true;
+            }
+            else if (Percentage != 100 || Percentage != 0)
+            {
+                return int.Parse(userID) % 100 <= Percentage;
+            }
+
+            return false;
+
         }
     }

@@ -309,8 +324,8 @@
             using (var featureClient = client.As<Feature>())
             {

-                featureClient.Lists[String.Format("Flipper:Features")].Remove(feature);
-                featureClient.Lists[String.Format("Flipper:Features")].Add(feature);
+                featureClient.Lists["Flipper:Features"].Remove(feature);
+                featureClient.Lists["Flipper:Features"].Add(feature);
             }
         }


Basic +1

Basic +1

--- Gigas/EntitySet.cs
+++ Gigas/EntitySet.cs
@@ -5,8 +5,4 @@

 // Refresh with the menu item 'Tools/Gigas/Generate EntitySet.cs'

-using System;
-using System.Collections.Generic;
-using UnityEngine;
-
 public static class EntitySet { }


encodings

encodings

--- DbShell.Driver.Common/Utility/EncodingTypeConverter.cs
+++ DbShell.Driver.Common/Utility/EncodingTypeConverter.cs
@@ -9,6 +9,11 @@
     public class EncodingTypeConverter : TypeConverter
     {
         private static Dictionary<string, Encoding> _encodingByName = new Dictionary<string, Encoding>();
+
+        public static List<string> WebNames
+        {
+            get { return _encodingByName.Keys.ToList().Sorted(); }
+        }

         static EncodingTypeConverter()
         {


ZWJ sequence 検索時、ZWJ の位置を取っとく

ZWJ sequence 検索時、ZWJ の位置を取っとく

--- Demo/2021/EmojiData/RgiSequenceFinder/GraphemeBreak.cs
+++ Demo/2021/EmojiData/RgiSequenceFinder/GraphemeBreak.cs
@@ -60,7 +60,7 @@
             var (tagCount, tags) = TagSequence.FromFlagSequence(s);
             if (tagCount != 0) return new(tagCount, tags);

-            var count = IsZwjSequence(s);
+            var (count, zwjs) = IsZwjSequence(s);

             if (count == 0) return EmojiSequence.NotEmoji;
             else return new(EmojiSequenceType.Other, count);
@@ -160,10 +160,14 @@
         /// <see cref="GetEmojiSequence(ReadOnlySpan{char})"/> の主要処理。
         /// 「keycap と国旗を除けばだいぶシンプルになる」前提の Emoji ZWJ sequence 判定。
         /// </summary>
-        private static int IsZwjSequence(ReadOnlySpan<char> s)
+        private static (int count, Byte8 zwjPositions) IsZwjSequence(ReadOnlySpan<char> s)
         {
             // ZWJ シーケンス。
             var count = 0;
+            Byte8 zwjPositions = default;
+            var zwjIndex = 0;
+            var span = zwjPositions.AsSpan();
+
             while (true)
             {
                 var pict = IsPictgraphicEstimate(s);
@@ -185,13 +189,19 @@

                 if (s.Length >= 1 && s[0] == (char)0x200D)
                 {
+                    if(zwjIndex < span.Length)
+                    {
+                        span[zwjIndex] = (byte)count;
+                        ++zwjIndex;
+                    }
+
                     ++count;
                     s = s.Slice(1);
                 }
                 else break;
             }

-            return count;
+            return (count, zwjPositions);
         }
     }
 }


Added a field for style in MapInfo

Added a field for style in MapInfo

--- Mapsui/UI/MapInfo.cs
+++ Mapsui/UI/MapInfo.cs
@@ -11,9 +11,13 @@
         /// </summary>
         public ILayer Layer { get; set; }
         /// <summary>
-        ///  The feature touched but the user
+        ///  The feature touched by the user
         /// </summary>
         public IFeature Feature { get; set; }
+        /// <summary>
+        ///  The style of feature touched by the user
+        /// </summary>
+        public Styles.IStyle Style { get; set; }
         /// <summary>
         /// World position of the place the user touched
         /// </summary>


Add NdapiObject.MetaProperties

Add NdapiObject.MetaProperties

--- Ndapi/NdapiObject.cs
+++ Ndapi/NdapiObject.cs
@@ -140,6 +140,11 @@
         public NdapiMetaObject MetaObject => NdapiMetadata.GetMetaObjectFrom(GetType());

         /// <summary>
+        /// Gets a list of the available properties for the object type.
+        /// </summary>
+        public IEnumerable<NdapiMetaProperty> MetaProperties => MetaObject.AllProperties;
+
+        /// <summary>
         /// Gets the value of a string property.
         /// </summary>
         /// <param name="property">Property id.</param>


Add support for sysname type

Add support for sysname type

--- model/Column.cs
+++ model/Column.cs
@@ -90,7 +90,7 @@
 					case "uniqueidentifier":
 					case "geography":
 					case "xml":
-
+                    case "sysname":
 						return string.Format("[{0}] [{1}] {2} {3} {4} {5}", Name, Type, IsNullableText,
 							includeDefaultConstraint ? DefaultText : string.Empty, IdentityText, RowGuidColText);
 					case "binary":
@@ -110,7 +110,7 @@
 						return string.Format("[{0}] [{1}]({2},{3}) {4} {5}", Name, Type, Precision, Scale, IsNullableText,
 							includeDefaultConstraint ? DefaultText : string.Empty);
 					default:
-						throw new NotSupportedException("SQL data type " + Type + " is not supported.");
+						throw new NotSupportedException("Error scripting column " + Name + ". SQL data type " + Type + " is not supported.");
 				}
 			}
 			return string.Format("[{0}] AS {1}", Name, ComputedDefinition);


[Common] Forgot to update the base version number of the v1.0 branch

--- Common/CommonAssemblyInfo.cs
+++ Common/CommonAssemblyInfo.cs
@@ -53,8 +53,8 @@
 // AssemblyInformationalVersion is modified by the release procedure for any alpha/beta qualifications, and is used
 // in the 'product version' detail when inspecting an assembly, and also by "bam --version".
 // Semantic versioning (http://semver.org/) is used.
-[assembly: AssemblyVersion("1.0.4")]
-[assembly: AssemblyInformationalVersion("1.0.4")]
+[assembly: AssemblyVersion("1.0.5")]
+[assembly: AssemblyInformationalVersion("1.0.5")]

 // Because it exposes externally visible types.
 [assembly: CLSCompliant(true)]


Fix anti dump x64 compatibility

Fix anti dump x64 compatibility

--- Confuser.Runtime/AntiDump.cs
+++ Confuser.Runtime/AntiDump.cs
@@ -70,7 +70,7 @@
 				*(uint*)mdHdr = 0;
 				mdHdr += 12;
 				mdHdr += *(uint*)mdHdr;
-				mdHdr = (byte*)(((uint)mdHdr + 7) & ~3);
+				mdHdr = (byte*)(((ulong)mdHdr + 7) & ~3UL);
 				mdHdr += 2;
 				ushort numOfStream = *mdHdr;
 				mdHdr += 2;
@@ -198,7 +198,7 @@
 				*(uint*)mdHdrPtr = 0;
 				mdHdrPtr += 12;
 				mdHdrPtr += *(uint*)mdHdrPtr;
-				mdHdrPtr = (byte*)(((uint)mdHdrPtr + 7) & ~3);
+				mdHdrPtr = (byte*)(((ulong)mdHdrPtr + 7) & ~3UL);
 				mdHdrPtr += 2;
 				ushort numOfStream = *mdHdrPtr;
 				mdHdrPtr += 2;


Added option to supply the file set id to AppendFilesFromPreviousSet

--- Duplicati/Library/Main/Database/LocalBackupDatabase.cs
+++ Duplicati/Library/Main/Database/LocalBackupDatabase.cs
@@ -677,12 +677,17 @@

             base.Dispose();
         }
+
+        private long GetPreviousFilesetID(System.Data.IDbCommand cmd)
+        {
+            return GetPreviousFilesetID(cmd, OperationTimestamp, m_filesetId);
+        }

-        private long GetPreviousFilesetID(System.Data.IDbCommand cmd)
+        private long GetPreviousFilesetID(System.Data.IDbCommand cmd, DateTime timestamp, long filesetid)
         {
             long lastFilesetId = -1;

-            var lastIdObj = cmd.ExecuteScalar(@"SELECT ""ID"" FROM ""Fileset"" WHERE ""Timestamp"" < ? AND ""ID"" != ? ORDER BY ""Timestamp"" DESC ", OperationTimestamp, m_filesetId);
+            var lastIdObj = cmd.ExecuteScalar(@"SELECT ""ID"" FROM ""Fileset"" WHERE ""Timestamp"" < ? AND ""ID"" != ? ORDER BY ""Timestamp"" DESC ", timestamp.ToUniversalTime(), filesetid);
             if (lastIdObj != null && lastIdObj != DBNull.Value)
                 lastFilesetId = Convert.ToInt64(lastIdObj);

@@ -763,21 +768,25 @@
             }
         }

-
         public void AppendFilesFromPreviousSet(System.Data.IDbTransaction transaction, IEnumerable<string> deleted)
+        {
+            AppendFilesFromPreviousSet(transaction, deleted, m_filesetId, OperationTimestamp);
+        }
+
+        public void AppendFilesFromPreviousSet(System.Data.IDbTransaction transaction, IEnumerable<string> deleted, long filesetid, DateTime timestamp)
         {
             using(var cmd = m_connection.CreateCommand())
             using (var tr = new TemporaryTransactionWrapper(m_connection, transaction))
             {
-                long lastFilesetId = GetPreviousFilesetID(cmd);
+                long lastFilesetId = GetPreviousFilesetID(cmd, timestamp, filesetid);

                 cmd.Transaction = tr.Parent;
-                cmd.ExecuteNonQuery(@"INSERT INTO ""FilesetEntry"" (""FilesetID"", ""FileID"", ""Scantime"") SELECT ? AS ""FilesetID"", ""FileID"", ""Scantime"" FROM ""FilesetEntry"" WHERE ""FilesetID"" = ? AND ""FileID"" NOT IN (SELECT ""FileID"" FROM ""FilesetEntry"" WHERE ""FilesetID"" = ?) ", m_filesetId, lastFilesetId, m_filesetId);
+                cmd.ExecuteNonQuery(@"INSERT INTO ""FilesetEntry"" (""FilesetID"", ""FileID"", ""Scantime"") SELECT ? AS ""FilesetID"", ""FileID"", ""Scantime"" FROM ""FilesetEntry"" WHERE ""FilesetID"" = ? AND ""FileID"" NOT IN (SELECT ""FileID"" FROM ""FilesetEntry"" WHERE ""FilesetID"" = ?) ", filesetid, lastFilesetId, filesetid);

                 if (deleted != null)
                 {
                     cmd.CommandText = @"DELETE FROM ""FilesetEntry"" WHERE ""FilesetID"" = ? AND ""FileID"" IN (SELECT ""ID"" FROM ""File"" WHERE ""Path"" = ?) ";
-                    cmd.AddParameter(m_filesetId);
+                    cmd.AddParameter(filesetid);
                     cmd.AddParameter();

                     foreach (string s in deleted)


Don't record device infos automatically

Don't record device infos automatically

--- Espera/Espera.Core/Analytics/BuddyAnalyticsEndpoint.cs
+++ Espera/Espera.Core/Analytics/BuddyAnalyticsEndpoint.cs
@@ -14,7 +14,7 @@

         public BuddyAnalyticsEndpoint()
         {
-            this.client = new BuddyClient("Espera", "EC60C045-B432-44A6-A4E0-15B4BF607105");
+            this.client = new BuddyClient("Espera", "EC60C045-B432-44A6-A4E0-15B4BF607105", autoRecordDeviceInfo: false);
         }

         public Task AuthenticateUserAsync(string analyticsToken)


Mark as public

Mark as public

--- ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
+++ ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
@@ -40,7 +40,7 @@
             return output.ToString();
         }

-        static bool IsValueTupleType(TypeInfo typeInfo)
+        public static bool IsValueTupleType(TypeInfo typeInfo)
             => typeInfo.IsGenericType && !typeInfo.IsGenericTypeDefinition && typeInfo.Namespace == "System" && typeInfo.Name.StartsWith("ValueTuple`", StringComparison.Ordinal);

         string GetUnaliasedTypeName(Type type) {


Left off a @using !!

Left off a @using !!

Ooops. I think the demo page I modded will need the @using FormFactory.Attributes;

--- FormFactory.AspNetCore.Example/Views/Home/Index.cshtml
+++ FormFactory.AspNetCore.Example/Views/Home/Index.cshtml
@@ -5,7 +5,7 @@
 @using FormFactory.Example.Models.Examples
 @using FormFactory.AspMvc
 @using FormFactory
-
+@using FormFactory.Attributes;
 @{
     ViewBag.Title = "FormFactory Examples";
 }


Added unit test to demonstrate the problem fixed in my previous commit.

--- GitSharp.Tests/GitSharp.Core/Util/ExtensionsFixture.cs
+++ GitSharp.Tests/GitSharp.Core/Util/ExtensionsFixture.cs
@@ -1,70 +1,88 @@
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-using GitSharp.Core;
-using GitSharp.Core.Util;
-using NUnit.Framework;
-
-namespace GitSharp.Core.Tests.Util
-{
-    [TestFixture]
-    public class ExtensionsFixture
-    {
-        private string _extensionlessFilePath;
-
-        [TestFixtureSetUp]
-        public void InitFixtureContext()
-        {
-            _extensionlessFilePath = Path.Combine(Environment.CurrentDirectory, Guid.NewGuid().ToString());
-            File.WriteAllText(_extensionlessFilePath, "dummy");
-        }
-
-        [TestFixtureTearDown]
-        public void CleanUpFixtureContext()
-        {
-            File.Delete(_extensionlessFilePath);
-        }
-
-        [Test]
-        public void IsDirectory()
-        {
-            var filePath = Assembly.GetExecutingAssembly().Location;
-            var directoryPath = Environment.CurrentDirectory;
-
-            Assert.IsTrue(new FileInfo(directoryPath).IsDirectory());
-            Assert.IsTrue(new DirectoryInfo(directoryPath).IsDirectory());
-
-            Assert.IsFalse(new FileInfo(filePath).IsDirectory());
-            Assert.IsFalse(new DirectoryInfo(filePath).IsDirectory());
-
-            Assert.IsFalse(new DirectoryInfo(_extensionlessFilePath).IsDirectory());
-            Assert.IsFalse(new FileInfo(_extensionlessFilePath).IsDirectory());
-        }
-
-        [Test]
-        public void IsFile()
-        {
-            var filePath = Assembly.GetExecutingAssembly().Location;
-            var directoryPath = Environment.CurrentDirectory;
-
-            Assert.IsTrue(new FileInfo(filePath).IsFile());
-            Assert.IsTrue(new DirectoryInfo(filePath).IsFile());
-
-            Assert.IsFalse(new FileInfo(directoryPath).IsFile());
-            Assert.IsFalse(new DirectoryInfo(directoryPath).IsFile());
-
-            Assert.IsTrue(new DirectoryInfo(_extensionlessFilePath).IsFile());
-            Assert.IsTrue(new FileInfo(_extensionlessFilePath).IsFile());
-        }
-
-        [Test]
-        public void getCurrentTime()
-        {
-            Assert.AreEqual(new DateTimeOffset(2009, 08, 15, 20, 12, 58, 668, new TimeSpan(-3, -30, 0)), 1250379778668L.MillisToDateTimeOffset((int)new TimeSpan(-3, -30, 0).TotalMinutes));
-            Assert.AreEqual(new DateTime(2009, 08, 15, 23, 42, 58, 668), 1250379778668L.MillisToDateTime());
-        }
-    }
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Reflection;
+using System.Text;
+using GitSharp.Core;
+using GitSharp.Core.Util;
+using NUnit.Framework;
+
+namespace GitSharp.Core.Tests.Util
+{
+    [TestFixture]
+    public class ExtensionsFixture
+    {
+        private string _extensionlessFilePath;
+        private string _mkDirsPath;
+
+        [TestFixtureSetUp]
+        public void InitFixtureContext()
+        {
+            _extensionlessFilePath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
+            File.WriteAllText(_extensionlessFilePath, "dummy");
+
+            _mkDirsPath = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
+        }
+
+        [TestFixtureTearDown]
+        public void CleanUpFixtureContext()
+        {
+            File.Delete(_extensionlessFilePath);
+            Directory.Delete(_mkDirsPath, true);
+        }
+
+        [Test]
+        public void IsDirectory()
+        {
+            var filePath = Assembly.GetExecutingAssembly().Location;
+            var directoryPath = Environment.CurrentDirectory;
+
+            Assert.IsTrue(new FileInfo(directoryPath).IsDirectory());
+            Assert.IsTrue(new DirectoryInfo(directoryPath).IsDirectory());
+
+            Assert.IsFalse(new FileInfo(filePath).IsDirectory());
+            Assert.IsFalse(new DirectoryInfo(filePath).IsDirectory());
+
+            Assert.IsFalse(new DirectoryInfo(_extensionlessFilePath).IsDirectory());
+            Assert.IsFalse(new FileInfo(_extensionlessFilePath).IsDirectory());
+        }
+
+        [Test]
+        public void IsFile()
+        {
+            var filePath = Assembly.GetExecutingAssembly().Location;
+            var directoryPath = Environment.CurrentDirectory;
+
+            Assert.IsTrue(new FileInfo(filePath).IsFile());
+            Assert.IsTrue(new DirectoryInfo(filePath).IsFile());
+
+            Assert.IsFalse(new FileInfo(directoryPath).IsFile());
+            Assert.IsFalse(new DirectoryInfo(directoryPath).IsFile());
+
+            Assert.IsTrue(new DirectoryInfo(_extensionlessFilePath).IsFile());
+            Assert.IsTrue(new FileInfo(_extensionlessFilePath).IsFile());
+        }
+
+        [Test]
+        public void getCurrentTime()
+        {
+            Assert.AreEqual(new DateTimeOffset(2009, 08, 15, 20, 12, 58, 668, new TimeSpan(-3, -30, 0)), 1250379778668L.MillisToDateTimeOffset((int)new TimeSpan(-3, -30, 0).TotalMinutes));
+            Assert.AreEqual(new DateTime(2009, 08, 15, 23, 42, 58, 668), 1250379778668L.MillisToDateTime());
+        }
+
+        [Test]
+        public void MkDirs()
+        {
+            var dir = Path.Combine(_mkDirsPath, "subDir1/subDir2");
+
+            var dirInfo = new DirectoryInfo(dir);
+            Assert.IsFalse(dirInfo.Exists);
+
+            var ret = dirInfo.Mkdirs();
+
+            Assert.IsTrue(ret);
+            Assert.IsTrue(dirInfo.Exists);
+        }
+    }
 }


Graphics - Fixed exclusive full screen mode bug caused by the swap chain flag that allows tearing for windowed modes. When this flag is set in full screen mode, Direct3D throws an error. Added check for windowed mode before including the flag.

--- Gorgon/Gorgon.Graphics.Core/Targets/GorgonSwapChain.cs
+++ Gorgon/Gorgon.Graphics.Core/Targets/GorgonSwapChain.cs
@@ -1137,7 +1137,8 @@

             interval.ValidateRange(nameof(interval), 0, 4, true, true);

-            if ((_supportsTearing != 0) && (interval == 0) && (!IsInStandBy))
+            // The tearing flag is only supported by windowed mode. Fullscreen exclusive already has tearing by design.
+            if ((IsWindowed) && (_supportsTearing != 0) && (interval == 0) && (!IsInStandBy))
             {
                 flags |= PresentFlags.AllowTearing;
             }


Update TaskAssignmentFacts.cs

Update TaskAssignmentFacts.cs

attempt 2

--- Harvest.Net.Tests/ResourceFacts/TaskAssignmentFacts.cs
+++ Harvest.Net.Tests/ResourceFacts/TaskAssignmentFacts.cs
@@ -72,14 +72,14 @@
             Assert.NotEqual(_todelete.Billable, updated.Billable);
             Assert.Equal(false, _todelete.Billable);
             Assert.NotEqual(_todelete.HourlyRate, updated.HourlyRate);
-            Assert.Equal(1m, _todelete.HourlyRate);
+            Assert.Equal(null, _todelete.HourlyRate);

             // stuff didn't change
             Assert.Equal(_todelete.Id, updated.Id);
             Assert.Equal(projectId, updated.ProjectId);
             Assert.Equal(_todelete.TaskId, updated.TaskId);
             Assert.Equal(null, updated.Budget);
-            Assert.Equal(false, updated.Deactivated);
+            Assert.Equal(false, updated.Deactivated);
         }

         public void Dispose()


Delete Program.cs

Delete Program.cs

--- wpFila/Program.cs
+++ wpFila/Program.cs
@@ -1,19 +0,0 @@
-using System;
-using System.Windows.Forms;
-
-namespace wpFila
-{
-    static class Program
-    {
-        /// <summary>
-        /// The main entry point for the application.
-        /// </summary>
-        [STAThread]
-        static void Main()
-        {
-            Application.EnableVisualStyles();
-            Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new Form1());
-        }
-    }
-}


Renamed method to GetLiveSegmentTime

Renamed method to GetLiveSegmentTime

--- LiveSplit/LiveSplit.Core/Model/LiveSplitStateHelper.cs
+++ LiveSplit/LiveSplit.Core/Model/LiveSplitStateHelper.cs
@@ -68,7 +68,7 @@
         /// <param name="comparison">The comparison that you are comparing with.</param>
         /// <param name="method">The timing method that you are using.</param>
         /// <returns>Returns the length of the segment leading up to splitNumber, returning the live segment time if the split is not completed yet.</returns>
-        public static TimeSpan? GetCurrentSegmentTime(LiveSplitState state, int splitNumber, string comparison, TimingMethod method)
+        public static TimeSpan? GetLiveSegmentTime(LiveSplitState state, int splitNumber, string comparison, TimingMethod method)
         {
             return GetSegmentTimeOrSegmentDelta(state, splitNumber, true, true, comparison, method);
         }


Revise comments

Revise comments

--- MatterControlLib/ApplicationView/SettingsValidation.cs
+++ MatterControlLib/ApplicationView/SettingsValidation.cs
@@ -131,9 +131,10 @@

 				string[] startGCode = settings.GetValue(SettingsKey.start_gcode).Replace("\\n", "\n").Split('\n');

-				// Print recovery can only work with a manually leveled or software leveled bed. Hardware leveling does not work.
+				// Print recovery is incompatible with firmware leveling - ensure not enabled in startGCode
 				if (settings.GetValue<bool>(SettingsKey.recover_is_enabled))
 				{
+					// Ensure we don't have hardware leveling commands in the start gcode.
 					foreach (string startGCodeLine in startGCode)
 					{
 						if (startGCodeLine.StartsWith("G29"))
@@ -158,12 +159,12 @@
 					}
 				}

-				// If we have print leveling turned on then make sure we don't have any leveling commands in the start gcode.
 				var levelingEnabled = printer.Settings.GetValue<bool>(SettingsKey.print_leveling_enabled);
 				var levelingRequired = printer.Settings.GetValue<bool>(SettingsKey.print_leveling_required_to_print);

 				if (levelingEnabled || levelingRequired)
 				{
+					// Ensure we don't have hardware leveling commands in the start gcode.
 					foreach (string startGCodeLine in startGCode)
 					{
 						if (startGCodeLine.StartsWith("G29"))


up the version

up the version

--- Medidata.ZipkinTracerModule/Properties/AssemblyInfo.cs
+++ Medidata.ZipkinTracerModule/Properties/AssemblyInfo.cs
@@ -32,7 +32,7 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.0.1")]
-[assembly: AssemblyFileVersion("0.0.1")]
-[assembly: AssemblyInformationalVersion("0.0.1-alpha")]
+[assembly: AssemblyVersion("0.0.2")]
+[assembly: AssemblyFileVersion("0.0.2")]
+[assembly: AssemblyInformationalVersion("0.0.2-alpha")]
 [assembly: InternalsVisibleTo("Medidata.ZipkinTracerModule.Test")]


Minor fix to packet type usage in DFS.

Minor fix to packet type usage in DFS.

--- DistributedFileSystem/DFS.cs
+++ DistributedFileSystem/DFS.cs
@@ -350,7 +350,7 @@
                     //This links any existing local items and retrieves a list of all remote items
                     TCPConnection primaryServer = TCPConnection.GetConnection(new ConnectionInfo(linkTargetIP, linkTargetPort));

-                    DFSLinkRequest availableLinkTargetItems = primaryServer.SendReceiveObject<DFSLinkRequest, DFSLinkRequest>("DFS_ItemLinkRequest", "DFS_ItemLinkRequest", linkRequestTimeoutSecs * 1000, new DFSLinkRequest(AllLocalDFSItemsWithBuildTime(), false));
+                    DFSLinkRequest availableLinkTargetItems = primaryServer.SendReceiveObject<DFSLinkRequest, DFSLinkRequest>("DFS_ItemLinkRequest", "DFS_ItemLinkReply", linkRequestTimeoutSecs * 1000, new DFSLinkRequest(AllLocalDFSItemsWithBuildTime(), false));
                     if (DFS.loggingEnabled) DFS._DFSLogger.Trace("LinkModeWorker could link " + availableLinkTargetItems.AvailableItems.Count+ " items from target.");

                     if (LinkMode == DFSLinkMode.LinkAndRepeat)
@@ -1612,7 +1612,13 @@

                 //If this link request is from the original requester then we reply with our own items list
                 if (!linkRequestData.LinkRequestReply)
-                    connection.SendObject("DFS_ItemLinkRequest", new DFSLinkRequest(localItemKeys, true), nullCompressionSRO);
+                {
+                    //If a specific return packet type has been requested we use that
+                    if (packetHeader.RequestedReturnPacketType != null)
+                        connection.SendObject(packetHeader.RequestedReturnPacketType, new DFSLinkRequest(localItemKeys, true), nullCompressionSRO);
+                    else
+                        connection.SendObject("DFS_ItemLinkRequest", new DFSLinkRequest(localItemKeys, true), nullCompressionSRO);
+                }
             }
             catch (CommsException e)
             {


test: Update Personalization region (#790)

--- src/Algolia.Search.Test/BaseTest.cs
+++ src/Algolia.Search.Test/BaseTest.cs
@@ -48,7 +48,7 @@
         SearchClient2 = new SearchClient(configClient2);
         McmClient = new SearchClient(TestHelper.McmApplicationId, TestHelper.McmAdminKey);
         AnalyticsClient = new AnalyticsClient(TestHelper.ApplicationId1, TestHelper.AdminKey1);
-        PersonalizationClient = new PersonalizationClient(TestHelper.ApplicationId1, TestHelper.AdminKey1, "eu");
+        PersonalizationClient = new PersonalizationClient(TestHelper.ApplicationId1, TestHelper.AdminKey1, "us");
         DictionaryClient = new DictionaryClient(TestHelper.ApplicationId1, TestHelper.AdminKey1);
     }
 }


test change

test change

--- src/Avalonia.X11/X11TrayIconImpl.cs
+++ src/Avalonia.X11/X11TrayIconImpl.cs
@@ -9,7 +9,7 @@
 namespace Avalonia.X11
 {
    internal class X11TrayIconImpl : ITrayIconImpl
-    {
+   {

         private readonly DBusSysTray _dBusSysTray;
         private X11IconData lastIcon;


Make Bloom.Utils.LongPathAware methods safe for Linux (BL-11721)

--- src/BloomExe/Utils/LongPathAware.cs
+++ src/BloomExe/Utils/LongPathAware.cs
@@ -42,6 +42,10 @@
 			{
 				return path;
 			}
+			if (SIL.PlatformUtilities.Platform.IsLinux)
+			{
+				return path;
+			}
 			if (!GetIsPossiblyShortenedPath(path))
 			{
 				return path;
@@ -69,6 +73,7 @@
 		internal static bool GetIsPossiblyShortenedPath(string path)
 		{
 			if (path == null) return false;
+			if (SIL.PlatformUtilities.Platform.IsLinux) return false;
 			return path.Contains("~");
 		}


All tests pass.

All tests pass.

--- src/Common/Handlers/RetryHandler.cs
+++ src/Common/Handlers/RetryHandler.cs
@@ -64,11 +64,12 @@
                 }
             };

+            HttpResponseMessage responseMessage = null;
             try
             {
-                HttpResponseMessage response = await RetryPolicy.ExecuteAction(async () =>
+                await RetryPolicy.ExecuteAsync(async () =>
                     {
-                        var responseMessage = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);
+                        responseMessage = await base.SendAsync(request, cancellationToken).ConfigureAwait(false);

                         if (!responseMessage.IsSuccessStatusCode)
                         {
@@ -80,13 +81,20 @@
                         }

                         return responseMessage;
-                    });
+                    }, cancellationToken).ConfigureAwait(false);

-                return response;
+                return responseMessage;
             }
-            catch (HttpRequestException)
+            catch
             {
-                return responseMessage;
+                if (responseMessage != null)
+                {
+                    return responseMessage;
+                }
+                else
+                {
+                    throw;
+                }
             }
         }


Test for single degrader

Test for single degrader

--- src/DegradationMeisterTest/Tests.cs
+++ src/DegradationMeisterTest/Tests.cs
@@ -95,6 +95,38 @@
             Console.WriteLine("Rehealing Power Supply Failure...");
             monitorPowerSupply.MakeOk();
             GiveStatus();
+
+            Assert.That(_capabilitySystem.Current, Is.EqualTo(Capabilities.Full));
+        }
+        [Test]
+        public void TestSingleDegrader()
+        {
+            var degrader = new Degrader("All");
+            var monitorPowerSupply = new PowerSupplyMonitor(degrader);
+            _capabilityPowerSupply = new Capability(degrader, "Power Supply");
+
+            var monitorActuator = new ActuatorMonitor(degrader);
+            _capabilityActuator = new Capability(degrader, "Actuator");
+
+            _capabilitySystem = new Capability(degrader, "System");
+
+            degrader.AddDefaultRules(monitorPowerSupply.TotalFailure, _capabilityPowerSupply);
+            degrader.AddDefaultRules(monitorActuator.TotalFailure, _capabilityActuator);
+            degrader.AddDefaultRules(_capabilityPowerSupply, _capabilityActuator);
+            degrader.AddDefaultRules(_capabilityActuator, _capabilitySystem);
+
+            degrader.AddTrigger(_capabilitySystem,
+                x => Console.WriteLine($"- System: {Capabilities.Convert(x.Current)}"));
+
+            GiveStatus();
+            Console.WriteLine("Pass Power Supply...");
+            monitorPowerSupply.MakeOk();
+            GiveStatus();
+            Console.WriteLine("Pass Power Actuator...");
+            monitorActuator.MakeOk();
+            GiveStatus();
+
+            Assert.That(_capabilitySystem.Current, Is.EqualTo(Capabilities.Full));
         }

         [Test]


Update ViewModels.cs

Update ViewModels.cs

--- src/Draw2D/ViewModels/ViewModels.cs
+++ src/Draw2D/ViewModels/ViewModels.cs
@@ -3560,10 +3560,9 @@
         IPointShape GetNextPoint(IToolContext context, double x, double y, bool connect, double radius);
     }

-    public interface ICanvasContainer : IDirty, IDrawable, ISelectable, ICopyable
+    public interface ICanvasContainer : IBaseShape
     {
         IList<IBaseShape> Shapes { get; set; }
-        void GetPoints(IList<IPointShape> points);
     }

     public interface IContainerView : IDrawTarget, IHitTestable