added remote functions for a BSAfile

added remote functions for a BSAfile

--- BSAFile.cs
+++ BSAFile.cs
@@ -21,9 +21,12 @@
         public bool IsCompressed { get; private set; }
         public byte[] Data { get; private set; }

+        private readonly FileRecord _rec;
+
         public BSAFile(string name, FileRecord baseRec, BinaryReader reader, bool resetStream = false)
         {
             this.Name = name;
+            this._rec = baseRec;

             bool compressBitSet = (baseRec.size & FLAG_COMPRESS) != 0;
             this.IsCompressed = DefaultCompressed ^ compressBitSet;
@@ -39,6 +42,11 @@
                 if (resetStream)
                     reader.BaseStream.Seek(streamPos, SeekOrigin.Begin);
             }
+        }
+
+        public void CheckFile(Action<FileRecord, byte[]> fileFunction)
+        {
+            fileFunction(_rec, Data);
         }

         private void ReadFileBlock(BinaryReader reader, uint size)
@@ -74,17 +82,6 @@
                 {
                     defStream.CopyTo(msDecompressed);
                 }
-                //using (var zlStream = new ZLibStream(msCompressed, CompressionMode.Decompress, true))
-                //{
-                //    //byte[] buf = new byte[0x1000];
-                //    //int bytesRead;
-                //    //while ((bytesRead = zlStream.Read(buf, 0, 0x1000)) > 0)
-                //    //    msDecompressed.Write(buf, 0, bytesRead);
-                //    //int zlB;
-                //    //while ((zlB = zlStream.ReadByte()) > 0)
-                //    //    msDecompressed.WriteByte((byte)zlB);
-                //    zlStream.CopyTo(msDecompressed);
-                //}

                 return msDecompressed.ToArray();
             }


修改 Vector2、Vector3 扩展方法注释

修改 Vector2、Vector3 扩展方法注释

--- Assets/GameFramework/Scripts/Runtime/Utility/UnityExtension.cs
+++ Assets/GameFramework/Scripts/Runtime/Utility/UnityExtension.cs
@@ -59,7 +59,7 @@
     }

     /// <summary>
-    /// 取 <see cref="UnityEngine.Vector3" /> 的 (x, z) 转换为 Vector2。
+    /// 取 <see cref="UnityEngine.Vector3" /> 的 (x, y, z) 转换为 <see cref="UnityEngine.Vector2" /> 的 (x, z)。
     /// </summary>
     /// <param name="vector3">要转换的 Vector3。</param>
     /// <returns>转换后的 Vector2。</returns>
@@ -69,7 +69,7 @@
     }

     /// <summary>
-    /// 取 <see cref="UnityEngine.Vector2" /> 的 (x, y) 和给定参数 y 转换为 Vector3。
+    /// 取 <see cref="UnityEngine.Vector2" /> 的 (x, y) 转换为 <see cref="UnityEngine.Vector3" /> 的 (x, 0, y)。
     /// </summary>
     /// <param name="vector2">要转换的 Vector2。</param>
     /// <returns>转换后的 Vector3。</returns>
@@ -79,7 +79,7 @@
     }

     /// <summary>
-    /// 取 <see cref="UnityEngine.Vector2" /> 的 (x, y) 和给定参数 y 转换为 Vector3。
+    /// 取 <see cref="UnityEngine.Vector2" /> 的 (x, y) 和给定参数 y 转换为 <see cref="UnityEngine.Vector3" /> 的 (x, 参数 y, y)。
     /// </summary>
     /// <param name="vector2">要转换的 Vector2。</param>
     /// <param name="y">Vector3 的 y 值。</param>


cleanup

cleanup

--- Assets/HappyFunTimes/HappyFunTimesCore/HFTConnectionManager.cs
+++ Assets/HappyFunTimes/HappyFunTimesCore/HFTConnectionManager.cs
@@ -48,20 +48,45 @@

         public void StartHappyFunTimes()
         {
-            StartConnection();
+            if (!m_started)
+            {
+                m_started = true;
+                m_hftManager.Start(m_options, m_gameObject);
+            }
         }

         public void StopHappyFunTimes()
         {
-            Cleanup();
-        }
+            if (m_started)
+            {
+                m_started = false;

-        void StartConnection()
-        {
-            if (!m_started)
-            {
-                m_started = true;
-                m_hftManager.Start(m_options, m_gameObject);
+                // This has to be done in 2 stages
+                // The issue is because things are async let's stay
+                // the GameServer disconnects. The server will then see
+                // the disconnection and report it (player disconnected, game disconected, etc...)
+                // so first we tell both "stop listening for messages/status changes" then
+                // we can actually disconnect them,
+                // Note this is mostly a matter of stopping superfulous messages in the console
+                if (m_server != null)
+                {
+                    m_server.StopListening();
+                }
+
+                if (m_hftManager != null)
+                {
+                    m_hftManager.StopListening();
+                }
+
+                if (m_server != null)
+                {
+                    m_server.Close();
+                }
+
+                if (m_hftManager != null)
+                {
+                    m_hftManager.Stop();
+                }
             }
         }

@@ -97,51 +122,6 @@
         {
         }

-        void Cleanup()
-        {
-            if (m_started)
-            {
-                m_started = false;
-
-                // This has to be done in 2 stages
-                // The issue is because things are async let's stay
-                // the GameServer disconnects. The server will then see
-                // the disconnection and report it (player disconnected, game disconected, etc...)
-                // so first we tell both "stop listening for messages/status changes" then
-                // we can actually disconnect them,
-                // Note this is mostly a matter of stopping superfulous messages in the console
-                if (m_server != null)
-                {
-                    m_server.StopListening();
-                }
-
-                if (m_hftManager != null)
-                {
-                    m_hftManager.StopListening();
-                }
-
-                if (m_server != null)
-                {
-                    m_server.Close();
-                }
-
-                if (m_hftManager != null)
-                {
-                    m_hftManager.Stop();
-                }
-            }
-        }
-
-        void OnDestroy()
-        {
-            Cleanup();
-        }
-
-        void OnApplicationExit()
-        {
-            Cleanup();
-        }
-
         private bool m_started;
         private GameObject m_gameObject;
         private GameServer m_server;


Fixes an issue where already paired controllers weren't firing a SourceDetected on app launch.

--- Assets/HoloToolkit/Input/Scripts/InputSources/GesturesInput.cs
+++ Assets/HoloToolkit/Input/Scripts/InputSources/GesturesInput.cs
@@ -210,6 +210,12 @@
                 StartGestureRecognizer();
             }

+            foreach (InteractionSourceState iss in InteractionManager.GetCurrentReading())
+            {
+                GetOrAddSourceData(iss.source);
+                InputManager.Instance.RaiseSourceDetected(this, iss.source.id);
+            }
+
             InteractionManager.SourceUpdated += InteractionManager_SourceUpdated;

             InteractionManager.SourceReleased += InteractionManager_SourceReleased;
@@ -217,8 +223,6 @@

             InteractionManager.SourceLost += InteractionManager_SourceLost;
             InteractionManager.SourceDetected += InteractionManager_SourceDetected;
-
-            // TODO: robertes: Should we use InteractionManager.GetCurrentReading() to get all sources currently available and synthesize a SourceDetected?
         }

         protected override void OnDisableAfterStart()
@@ -233,7 +237,12 @@
             InteractionManager.SourceLost -= InteractionManager_SourceLost;
             InteractionManager.SourceDetected -= InteractionManager_SourceDetected;

-            // TODO: robertes: Should we synthesize SourceLost for all outstanding sources and then clear our list?
+            foreach (InteractionSourceState iss in InteractionManager.GetCurrentReading())
+            {
+                // NOTE: We don't care whether the source ID previously existed or not, so we blindly call Remove:
+                sourceIdToData.Remove(iss.source.id);
+                InputManager.Instance.RaiseSourceLost(this, iss.source.id);
+            }

             base.OnDisableAfterStart();
         }
@@ -451,6 +460,8 @@
         {
             return (capability.IsSupported ? flagIfSupported : SupportedInputInfo.None);
         }
+
+        #endregion

         private void InteractionManager_SourceUpdated(InteractionManager.SourceEventArgs args)
         {


Removed Constructor Changes from ObjectElementAdapter.cs

--- Assets/HoloToolkit/Sharing/Scripts/SDK/ObjectElementAdapter.cs
+++ Assets/HoloToolkit/Sharing/Scripts/SDK/ObjectElementAdapter.cs
@@ -20,34 +20,9 @@
         public event System.Action<Element> ElementDeletedEvent;

         /// <summary>
-        /// The Object Elemet we're currently listening to.
+        /// Initializes a new instance of <see cref="ObjectElementAdapter"/>.
         /// </summary>
-        public ObjectElement ObjectElementRoot { get; private set; }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="ObjectElementAdapter"/> that creates a new Object Element and starts to listen to it.
-        /// </summary>
-        public ObjectElementAdapter()
-        {
-            ObjectElementRoot = new ObjectElement(new System.IntPtr(), true);
-
-            ObjectElementRoot.AddListener(this);
-
-            System.GC.Collect();
-        }
-
-        /// <summary>
-        /// Initializes a new instance of <see cref="ObjectElementAdapter"/> that allows a user to pass in a Object Element to listen to.
-        /// </summary>
-        /// <param name="objectElementRoot">Object Element we want to listen to.</param>
-        public ObjectElementAdapter(ObjectElement objectElementRoot)
-        {
-            ObjectElementRoot = objectElementRoot;
-
-            ObjectElementRoot.AddListener(this);
-
-            System.GC.Collect();
-        }
+        public ObjectElementAdapter() { }

         /// <summary>
         /// Throws the <see cref="IntChangedEvent"/>.
@@ -166,12 +141,5 @@
             }
             Profile.EndRange();
         }
-
-        public override void Dispose()
-        {
-            ObjectElementRoot.RemoveListener(this);
-            ObjectElementRoot = null;
-            base.Dispose();
-        }
     }
 }


fixing new character not having ready goal and stats bug

--- Assets/Scripts/UI/CharacterSelect/CharacterSelectController.cs
+++ Assets/Scripts/UI/CharacterSelect/CharacterSelectController.cs
@@ -6,6 +6,7 @@
 using TankArena.Utils;
 using TankArena.Models.Characters;
 using System;
+using TankArena.Models;

 namespace TankArena.UI.Characters
 {
@@ -131,6 +132,9 @@
 			player.Character = model;
 			player.CurrentTank = model.StartingTank;
 			player.CurrentStats = model.StartingStats;
+			player.PlayerStats = new PlayerStats();
+			player.CharacterGoal = (AbstractCharacterGoal)Activator.CreateInstance(model.CharacterGoalType);
+			player.CharacterGoal.Init(player.PlayerStats);

 			CurrentState.Instance.SetPlayer(player);


specifiedPartConventionTests: refactor tests to use conventionTests base class

--- Conifer.Tests/Conventions/SpecifiedPartRouteConventionTests.cs
+++ Conifer.Tests/Conventions/SpecifiedPartRouteConventionTests.cs
@@ -1,64 +1,62 @@
 using System.Collections.Generic;
 using System.Linq;
+using System.Web.Http;
 using Conifer.Conventions;
 using Shouldly;
 using Xunit;

 namespace Conifer.Tests.Conventions
 {
-	public class SpecifiedPartRouteConventionTests
+	public class SpecifiedPartRouteConventionTests : ConventionTests
 	{
-		private List<string> RunTest(string part)
-		{
-			var method = GetType().GetMethod("ToString");
-
-			var template = new TypedRouteBuilder(typeof(Controller), method);
-
-			var convention = new SpecifiedPartRouteConvention(part);
-			convention.Execute(template);
-
-			return template
-				.Parts
-				.Select(p => p.Value)
-				.ToList();
-		}
-
 		[Fact]
 		public void When_the_part_is_null()
 		{
-			RunTest(null).ShouldBeEmpty();
+			Convention = () => new SpecifiedPartRouteConvention(null);
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBeEmpty();
 		}

 		[Fact]
 		public void When_the_part_is_blank()
 		{
-			RunTest("").ShouldBeEmpty();
+			Convention = () => new SpecifiedPartRouteConvention("");
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBeEmpty();
 		}

 		[Fact]
 		public void When_the_part_is_whitespace()
 		{
-			RunTest("    ").ShouldBeEmpty();
+			Convention = () => new SpecifiedPartRouteConvention("    ");
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBeEmpty();
 		}

 		[Fact]
 		public void When_the_part_is_specified()
 		{
-			RunTest("testing").Single().ShouldBe("testing");
+			Convention = () => new SpecifiedPartRouteConvention("testing");
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBe("/testing");
 		}

 		[Fact]
 		public void When_the_part_starts_and_ends_with_a_slash()
 		{
-			RunTest("/test/").Single().ShouldBe("test");
+			Convention = () => new SpecifiedPartRouteConvention("/test/");
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBe("/test");
 		}

 		[Fact]
 		public void When_the_part_contains_a_slash()
 		{
-			RunTest("first/second").Single().ShouldBe("first/second");
+			Convention = () => new SpecifiedPartRouteConvention("first/second");
+			ExecuteConventionOn<Controller>();
+			Route.ShouldBe("/first/second");
 		}

-		private class Controller { }
+		private class Controller : ApiController { }
 	}
 }


Y (#3476)

Y (#3476)

--- Content.Server/GameObjects/EntitySystems/CargoConsoleSystem.cs
+++ Content.Server/GameObjects/EntitySystems/CargoConsoleSystem.cs
@@ -16,7 +16,7 @@
         /// <summary>
         /// How many points to give to every bank account every <see cref="Delay"/> seconds.
         /// </summary>
-        private const int PointIncrease = 20;
+        private const int PointIncrease = 150;

         /// <summary>
         /// Keeps track of how much time has elapsed since last balance increase.


Improve test coverage based on codecov.io results

--- Tvl.Collections.Trees.Test/SortedTreeListTest.cs
+++ Tvl.Collections.Trees.Test/SortedTreeListTest.cs
@@ -32,14 +32,70 @@
         }

         [Fact]
+        public void TestDefaultComparer()
+        {
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>().Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>().Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>().Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(Enumerable.Empty<object>()).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(Enumerable.Empty<int>()).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(Enumerable.Empty<IComparable>()).Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(comparer: null).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(comparer: null).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(comparer: null).Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(Enumerable.Empty<object>(), comparer: null).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(Enumerable.Empty<int>(), comparer: null).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(Enumerable.Empty<IComparable>(), comparer: null).Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(4).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(4).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(4).Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(4, comparer: null).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(4, comparer: null).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(4, comparer: null).Comparer);
+
+            Assert.Same(Comparer<object>.Default, new SortedTreeList<object>(4, Enumerable.Empty<object>(), comparer: null).Comparer);
+            Assert.Same(Comparer<int>.Default, new SortedTreeList<int>(4, Enumerable.Empty<int>(), comparer: null).Comparer);
+            Assert.Same(Comparer<IComparable>.Default, new SortedTreeList<IComparable>(4, Enumerable.Empty<IComparable>(), comparer: null).Comparer);
+        }
+
+        [Fact]
+        public void TestExplicitComparer()
+        {
+            var objComparer = new ComparisonComparer<object>((x, y) => 0);
+            var intComparer = new ComparisonComparer<int>((x, y) => 0);
+            var comparableComparer = new ComparisonComparer<IComparable>((x, y) => 0);
+
+            Assert.Same(objComparer, new SortedTreeList<object>(comparer: objComparer).Comparer);
+            Assert.Same(intComparer, new SortedTreeList<int>(comparer: intComparer).Comparer);
+            Assert.Same(comparableComparer, new SortedTreeList<IComparable>(comparer: comparableComparer).Comparer);
+
+            Assert.Same(objComparer, new SortedTreeList<object>(Enumerable.Empty<object>(), comparer: objComparer).Comparer);
+            Assert.Same(intComparer, new SortedTreeList<int>(Enumerable.Empty<int>(), comparer: intComparer).Comparer);
+            Assert.Same(comparableComparer, new SortedTreeList<IComparable>(Enumerable.Empty<IComparable>(), comparer: comparableComparer).Comparer);
+
+            Assert.Same(objComparer, new SortedTreeList<object>(4, comparer: objComparer).Comparer);
+            Assert.Same(intComparer, new SortedTreeList<int>(4, comparer: intComparer).Comparer);
+            Assert.Same(comparableComparer, new SortedTreeList<IComparable>(4, comparer: comparableComparer).Comparer);
+
+            Assert.Same(objComparer, new SortedTreeList<object>(4, Enumerable.Empty<object>(), comparer: objComparer).Comparer);
+            Assert.Same(intComparer, new SortedTreeList<int>(4, Enumerable.Empty<int>(), comparer: intComparer).Comparer);
+            Assert.Same(comparableComparer, new SortedTreeList<IComparable>(4, Enumerable.Empty<IComparable>(), comparer: comparableComparer).Comparer);
+        }
+
+        [Fact]
         public void TestIListInterface()
         {
-            TestIListInterfaceImpl(new SortedTreeList<int> { 600, 601 }, supportInsert: false, supportsNullValues: false);
-            TestIListInterfaceImpl(new SortedTreeList<int?> { 600, 601 }, supportInsert: false, supportsNullValues: true);
-            TestIListInterfaceImpl(new SortedTreeList<object> { 600, 601 }, supportInsert: false, supportsNullValues: true);
-        }
-
-        private static void TestIListInterfaceImpl(IList list, bool supportInsert, bool supportsNullValues)
+            TestIListInterfaceImpl(new SortedTreeList<int> { 600, 601 }, supportsNullValues: false);
+            TestIListInterfaceImpl(new SortedTreeList<int?> { 600, 601 }, supportsNullValues: true);
+            TestIListInterfaceImpl(new SortedTreeList<object> { 600, 601 }, supportsNullValues: true);
+        }
+
+        private static void TestIListInterfaceImpl(IList list, bool supportsNullValues)
         {
             Assert.False(list.IsFixedSize);
             Assert.False(list.IsReadOnly);
@@ -59,24 +115,14 @@
             Assert.Throws<ArgumentOutOfRangeException>(() => list[-1]);
             Assert.Throws<ArgumentOutOfRangeException>(() => list[list.Count]);

-            if (!supportInsert)
-            {
-                Assert.Throws<NotSupportedException>(() => list[-1] = 1);
-                Assert.Throws<NotSupportedException>(() => list[list.Count] = 1);
-                Assert.Throws<NotSupportedException>(() => list.Insert(-1, 602));
-                Assert.Throws<NotSupportedException>(() => list.Insert(list.Count + 1, 602));
-            }
+            Assert.Throws<NotSupportedException>(() => list[-1] = 1);
+            Assert.Throws<NotSupportedException>(() => list[list.Count] = 1);
+            Assert.Throws<NotSupportedException>(() => list.Insert(-1, 602));
+            Assert.Throws<NotSupportedException>(() => list.Insert(list.Count + 1, 602));

             Assert.NotEqual(list[1], list[0]);

-            if (supportInsert)
-            {
-                list.Insert(0, list[0]);
-            }
-            else
-            {
-                list.Add(list[0]);
-            }
+            list.Add(list[0]);

             Assert.Equal(list[1], list[0]);

@@ -105,21 +151,15 @@
             else
             {
                 // In the face of two errors, verify consistent
-                if (!supportInsert)
-                {
-                    Assert.Throws<NotSupportedException>(() => list[list.Count] = null);
-                    Assert.Throws<NotSupportedException>(() => list.Insert(-1, null));
-                }
+                Assert.Throws<NotSupportedException>(() => list[list.Count] = null);
+                Assert.Throws<NotSupportedException>(() => list.Insert(-1, null));

                 Assert.Throws<ArgumentNullException>(() => list.Add(null));
                 Assert.Throws<ArgumentException>(() => list.Add(new object()));

-                if (!supportInsert)
-                {
-                    Assert.Throws<NotSupportedException>(() => list[list.Count - 1] = null);
-                    Assert.Throws<NotSupportedException>(() => list[list.Count - 1] = new object());
-                    Assert.Throws<NotSupportedException>(() => list.Insert(0, new object()));
-                }
+                Assert.Throws<NotSupportedException>(() => list[list.Count - 1] = null);
+                Assert.Throws<NotSupportedException>(() => list[list.Count - 1] = new object());
+                Assert.Throws<NotSupportedException>(() => list.Insert(0, new object()));

                 Assert.Equal(list.Count, list.Add(602));
             }


Added user cancel and irrecoverable error detection to the retry mechanism

--- UninstallTools/Uninstaller/BulkUninstallEntry.cs
+++ UninstallTools/Uninstaller/BulkUninstallEntry.cs
@@ -5,14 +5,18 @@
 using System.Linq;
 using System.Threading;
 using Klocman.Extensions;
-using Klocman.Native;
-using Klocman.Tools;
 using UninstallTools.Properties;

 namespace UninstallTools.Uninstaller
 {
     public class BulkUninstallEntry
     {
+        private readonly object _operationLock = new object();
+
+        private bool _canRetry = true;
+
+        private SkipCurrentLevel _skipLevel = SkipCurrentLevel.None;
+
         internal BulkUninstallEntry(ApplicationUninstallerEntry uninstallerEntry, bool isSilent,
             UninstallStatus startingStatus)
         {
@@ -30,9 +34,6 @@

         public bool IsRunning { get; private set; }
         public bool Finished { get; private set; }
-
-        private SkipCurrentLevel _skipLevel = SkipCurrentLevel.None;
-        private readonly object _operationLock = new object();

         public void SkipWaiting(bool terminate)
         {
@@ -69,15 +70,13 @@
                 IsRunning = true;
             }

-            var worker = new Thread(UninstallThread) { Name = "RunBulkUninstall_Worker" };
+            var worker = new Thread(UninstallThread) {Name = "RunBulkUninstall_Worker"};
             worker.Start(new KeyValuePair<bool, bool>(preferQuiet, simulate));
         }

-        private bool _canRetry = true;
-
         private void UninstallThread(object parameters)
         {
-            var kvp = (KeyValuePair<bool, bool>)parameters;
+            var kvp = (KeyValuePair<bool, bool>) parameters;
             var preferQuiet = kvp.Key;
             var simulate = kvp.Value;
             Exception error = null;
@@ -111,17 +110,17 @@
                             try
                             {
                                 counters = (from process in childProcesses
-                                            let processName = process.ProcessName
-                                            let perfCounters = new[]
-                                            {
+                                    let processName = process.ProcessName
+                                    let perfCounters = new[]
+                                    {
                                         new PerformanceCounter("Process", "% Processor Time", processName, true),
                                         new PerformanceCounter("Process", "IO Data Bytes/sec", processName, true)
                                     }
-                                            select new KeyValuePair<PerformanceCounter[], CounterSample[]>(
-                                                perfCounters,
-                                                new[] { perfCounters[0].NextSample(), perfCounters[1].NextSample() }
-                                                // Important to enumerate them now, they will collect data when we sleep
-                                                )).ToList();
+                                    select new KeyValuePair<PerformanceCounter[], CounterSample[]>(
+                                        perfCounters,
+                                        new[] {perfCounters[0].NextSample(), perfCounters[1].NextSample()}
+                                        // Important to enumerate them now, they will collect data when we sleep
+                                        )).ToList();
                             }
                             catch
                             {
@@ -132,7 +131,8 @@

                         Thread.Sleep(1000);

-                        if (counters != null && UninstallerEntry.UninstallerKind != UninstallerType.Msiexec) //Has problems with Msiexec
+                        if (counters != null && UninstallerEntry.UninstallerKind != UninstallerType.Msiexec)
+                            //Has problems with Msiexec
                         {
                             try
                             {
@@ -183,8 +183,38 @@
                         var exitVar = uninstaller.ExitCode;
                         if (exitVar != 0)
                         {
-                            retry = true;
-                            throw new IOException(Localisation.UninstallError_UninstallerReturnedCode + exitVar);
+                            if (UninstallerEntry.UninstallerKind == UninstallerType.Msiexec && exitVar == 1602)
+                            {
+                                // 1602 ERROR_INSTALL_USEREXIT - The user has cancelled the installation.
+                                _skipLevel = SkipCurrentLevel.Skip;
+                            }
+                            else if (exitVar == -1073741510)
+                            {
+                                /* 3221225786 / 0xC000013A / -1073741510
+                                The application terminated as a result of a CTRL+C.
+                                Indicates that the application has been terminated either by user's
+                                keyboard input CTRL+C or CTRL+Break or closing command prompt window. */
+                                _skipLevel = SkipCurrentLevel.Terminate;
+                            }
+                            else
+                            {
+                                switch (exitVar)
+                                {
+                                    // The system cannot find the file specified. Indicates that the file can not be found in specified location.
+                                    case 2:
+                                    // The system cannot find the path specified. Indicates that the specified path can not be found.
+                                    case 3:
+                                    // Access is denied. Indicates that user has no access right to specified resource.
+                                    case 5:
+                                    // Program is not recognized as an internal or external command, operable program or batch file.
+                                    case 9009:
+                                        break;
+                                    default:
+                                        retry = true;
+                                        break;
+                                }
+                                throw new IOException(Localisation.UninstallError_UninstallerReturnedCode + exitVar);
+                            }
                         }
                     }
                 }


add system-flag for system if the system should run on fixed-time or dynamic according to delta-time

--- Unity/Assets/GameFramework/Modules/ECS/System.cs
+++ Unity/Assets/GameFramework/Modules/ECS/System.cs
@@ -186,6 +186,14 @@
         /// <returns></returns>
         protected virtual float SystemUpdateRate() {
             return 0;
+        }
+
+        /// <summary>
+        /// Calls the system according to at fixed realtime(unscaled) rate like specified in SystemUpdateRate() or scales with the delta-time
+        /// </summary>
+        /// <returns></returns>
+        protected virtual bool SystemFixedRate() {
+            return true;
         }

@@ -288,7 +296,7 @@
 #if ECS_PROFILING && UNITY_EDITOR
                 watchService.Restart();
 #endif
-                currentTimer += unscaled;
+                currentTimer += SystemFixedRate() ? unscaled : deltaTime;
                 currentUpdateDeltaTime += deltaTime;
                 //Process system components
                 if (currentTimer >= SystemUpdateRate()) {


プレイヤーにタックルした時にnullエラーが起きてた

プレイヤーにタックルした時にnullエラーが起きてた

--- UnityProject/Assets/Scripts/Battle/BulletBase.cs
+++ UnityProject/Assets/Scripts/Battle/BulletBase.cs
@@ -60,6 +60,9 @@

 	void LateUpdate()
 	{
+		if (trans == null) return;
+		if (this.gameObject == null) return;
+
 		if (trans.localPosition.x < -200 || trans.localPosition.x > 1500 )
 		{
 			Destroy (this.gameObject);


Refactor

Refactor

--- Core/OfficeDevPnP.Core/Framework/Graph/UnifiedGroupsUtility.cs
+++ Core/OfficeDevPnP.Core/Framework/Graph/UnifiedGroupsUtility.cs
@@ -179,8 +179,7 @@

                                             try
                                             {
-                                                groupLogoUpdated = UpdateUnifiedGroup(addedGroup.Id,
-                                                    accessToken, groupLogo: tempGroupLogo);
+                                                groupLogoUpdated = UpdateUnifiedGroup(addedGroup.Id, accessToken, groupLogo: tempGroupLogo);
                                             }
                                             catch
                                             {
@@ -232,38 +231,7 @@

                     if (owners != null && owners.Length > 0)
                     {
-                        // For each and every owner
-                        foreach (var o in owners)
-                        {
-                            // Search for the user object
-                            var ownerQuery = await graphClient.Users
-                                    .Request()
-                                    .Filter($"userPrincipalName eq '{o}'")
-                                    .GetAsync();
-
-                            var owner = ownerQuery.FirstOrDefault();
-
-                            if (owner != null)
-                            {
-                                try
-                                {
-                                    // And if any, add it to the collection of group's owners
-                                    await graphClient.Groups[addedGroup.Id].Owners.References.Request().AddAsync(owner);
-                                }
-                                catch (ServiceException ex)
-                                {
-                                    if (ex.Error.Code == "Request_BadRequest" &&
-                                        ex.Error.Message.Contains("added object references already exist"))
-                                    {
-                                        // Skip any already existing owner
-                                    }
-                                    else
-                                    {
-                                        throw ex;
-                                    }
-                                }
-                            }
-                        }
+                        await AddOwners(owners, graphClient, addedGroup);
                     }

                     #endregion
@@ -272,38 +240,7 @@

                     if (members != null && members.Length > 0)
                     {
-                        // For each and every owner
-                        foreach (var m in members)
-                        {
-                            // Search for the user object
-                            var memberQuery = await graphClient.Users
-                                    .Request()
-                                    .Filter($"userPrincipalName eq '{m}'")
-                                    .GetAsync();
-
-                            var member = memberQuery.FirstOrDefault();
-
-                            if (member != null)
-                            {
-                                try
-                                {
-                                    // And if any, add it to the collection of group's owners
-                                    await graphClient.Groups[addedGroup.Id].Members.References.Request().AddAsync(member);
-                                }
-                                catch (ServiceException ex)
-                                {
-                                    if (ex.Error.Code == "Request_BadRequest" &&
-                                        ex.Error.Message.Contains("added object references already exist"))
-                                    {
-                                        // Skip any already existing member
-                                    }
-                                    else
-                                    {
-                                        throw ex;
-                                    }
-                                }
-                            }
-                        }
+                        await AddMembers(members, graphClient, addedGroup);
                     }

                     #endregion


Dotnet: Clean only local buildable projects

--- produce/Modules/DotnetModule.cs
+++ produce/Modules/DotnetModule.cs
@@ -53,10 +53,8 @@
         dotnetSlnFile.Files.Take(1)
             .Select(f => f.Path)
             .Select(p => new VisualStudioSolution(p))
-            .SelectMany(sln => sln.ProjectReferences)
-            .Where(r => IsCSharpProject(r))
-            .Select(r => r.AbsoluteLocation)
-            .Where(p => PathExtensions.IsDescendantOf(p, repository.Path)));
+            .SelectMany(sln => FindLocalBuildableProjects(repository, sln))
+            .Select(r => r.AbsoluteLocation));
     graph.Dependency(dotnetSlnFile, dotnetProjPaths);

     // Project files
@@ -112,10 +110,14 @@
 }

-static bool
-IsCSharpProject(VisualStudioSolutionProjectReference r) =>
-    r.TypeId == VisualStudioProjectTypeIds.CSharp ||
-    r.TypeId == VisualStudioProjectTypeIds.CSharpNew;
+static IEnumerable<VisualStudioSolutionProjectReference>
+FindLocalBuildableProjects(ProduceRepository repository, VisualStudioSolution sln) =>
+    sln.ProjectReferences
+        .Where(r =>
+            r.TypeId == VisualStudioProjectTypeIds.CSharp ||
+            r.TypeId == VisualStudioProjectTypeIds.CSharpNew)
+        .Where(r => PathExtensions.IsDescendantOf(r.AbsoluteLocation, repository.Path))
+        .ToList();

 static void
@@ -125,24 +127,20 @@

     var sln = new VisualStudioSolution(slnPath);

-    var refs =
-        sln.ProjectReferences
-            .Where(r => IsCSharpProject(r))
-            .Where(r => PathExtensions.IsDescendantOf(r.AbsoluteLocation, repository.Path))
-            .ToList();
-
-    var frameworksByRef =
-        refs.ToDictionary(r => r, r => r.GetProject().AllTargetFrameworks.ToList());
+    var projs = FindLocalBuildableProjects(repository, sln);
+
+    var frameworksByProj =
+        projs.ToDictionary(p => p, p => p.GetProject().AllTargetFrameworks.ToList());

     var allFrameworks =
-        frameworksByRef.Values
+        frameworksByProj.Values
             .SelectMany(list => list)
             .Distinct();

     foreach (var framework in allFrameworks)
     {
-        var frameworkRefs = refs.Where(r => frameworksByRef[r].Contains(framework)).ToList();
-        Build(repository, sln, frameworkRefs, framework);
+        var projsTargetingThisFramework = projs.Where(p => frameworksByProj[p].Contains(framework)).ToList();
+        Build(repository, sln, projsTargetingThisFramework, framework);
     }
 }

@@ -151,14 +149,14 @@
 Build(
     ProduceRepository repository,
     VisualStudioSolution sln,
-    IList<VisualStudioSolutionProjectReference> refs,
+    IList<VisualStudioSolutionProjectReference> projs,
     string framework)
 {
     var msbuildArgs = new List<string>() {
         "/nr:false", $"/p:TargetFramework={framework}"
     };

-    msbuildArgs.AddRange(refs.Select(r => $"/t:{r.MSBuildTargetName}:Publish"));
+    msbuildArgs.AddRange(projs.Select(p => $"/t:{p.MSBuildTargetName}:Publish"));

     using (LogicalOperation.Start($"Building for {framework}"))
         Dotnet(repository, "msbuild", sln.Path, msbuildArgs.ToArray());
@@ -169,7 +167,18 @@
 Clean(ProduceRepository repository, string slnPath)
 {
     if (slnPath == null) return;
-    Dotnet(repository, "clean", slnPath);
+
+    var sln = new VisualStudioSolution(slnPath);
+
+    var projs = FindLocalBuildableProjects(repository, sln);
+
+    var msbuildArgs = new List<string>() {
+        "/nr:false",
+    };
+
+    msbuildArgs.AddRange(projs.Select(p => $"/t:{p.MSBuildTargetName}:Clean"));
+
+    Dotnet(repository, "msbuild", sln.Path, msbuildArgs.ToArray());
 }


corrected error message in apikey management

--- VisaCheckout/VisaHelper/REST/ApiKeyManagement.cs
+++ VisaCheckout/VisaHelper/REST/ApiKeyManagement.cs
@@ -67,7 +67,7 @@
         /// </summary>
         public void PrepareDeleteRequest()
         {
-            throw new NotSupportedException("The API does not support this.");
+            throw new NotSupportedException("The API does not yet support this.");
             QueryString = null;
             ContentString = null;
             Method = "DELETE";
@@ -107,7 +107,7 @@
         /// </summary>
         public void PrepareUpdateRequest()
         {
-            throw new NotSupportedException("The API does not support this.");
+            throw new NotSupportedException("The API does not yet support this.");
             Method = "POST";
             QueryString = null;
             ContentString = WriteOptionalJavascriptValue((ApiKeyManagement o) => o.Status);


Integrating new particle features into the basic emitter per-particle init

--- SimpleScene/Meshes/ParticleSystems/ParticleEmitters.cs
+++ SimpleScene/Meshes/ParticleSystems/ParticleEmitters.cs
@@ -73,6 +73,30 @@
             set { ColorComponentMin = ColorComponentMax = value; }
         }

+		protected float MassMin = c_defaultParticle.Mass;
+		protected float MassMax = c_defaultParticle.Mass;
+		protected float Mass {
+			set { MassMin = MassMax = value; }
+		}
+
+		protected float RotationalInnertiaMin = c_defaultParticle.RotationalInnertia;
+		protected float RotationalInnertiaMax = c_defaultParticle.RotationalInnertia;
+		protected float RotationalInnertia {
+			set { RotationalInnertiaMin = RotationalInnertiaMax = value; }
+		}
+
+		protected float DragMin = c_defaultParticle.Drag;
+		protected float DragMax = c_defaultParticle.Drag;
+		protected float Drag {
+			set { DragMin = DragMax = value; }
+		}
+
+		protected float RotationalDragMin = c_defaultParticle.RotationalDrag;
+		protected float RotationalDragMax = c_defaultParticle.RotationalDrag;
+		protected float RotationalDrag {
+			set { RotationalDragMin = RotationalDragMax = value; }
+		}
+
         public RectangleF[] SpriteRectangles = { c_defaultParticle.SpriteRect };
         public byte[] SpriteIndices = { c_defaultParticle.SpriteIndex };

@@ -154,6 +178,11 @@
             p.Vel.Z = Interpolate.Lerp(VelocityComponentMin.Z, VelocityComponentMax.Z, nextFloat());

             p.MasterScale = Interpolate.Lerp(MasterScaleMin, MasterScaleMax, nextFloat());
+
+			p.Mass = Interpolate.Lerp (MassMin, MassMax, nextFloat ());
+			p.RotationalInnertia = Interpolate.Lerp (RotationalInnertiaMin, RotationalInnertiaMax, nextFloat ());
+			p.Drag = Interpolate.Lerp (DragMin, DragMax, nextFloat ());
+			p.RotationalDrag = Interpolate.Lerp (RotationalDragMin, RotationalDragMax, nextFloat ());

             p.Color.R = Interpolate.Lerp(ColorComponentMin.R, ColorComponentMax.R, nextFloat());
             p.Color.G = Interpolate.Lerp(ColorComponentMin.G, ColorComponentMax.G, nextFloat());


Particle system optimization and possible bugfix

--- SimpleScene/Meshes/ParticleSystems/SSParticleSystem.cs
+++ SimpleScene/Meshes/ParticleSystems/SSParticleSystem.cs
@@ -154,9 +154,8 @@
                         }
                         if (i == m_activeBlockLength-1) {
                             // reduction in the active particles block
-                            while (p.Life <= 0f) {
+                            while (m_activeBlockLength > 0 && m_lives[m_activeBlockLength - 1] <= 0f) {
                                 --m_activeBlockLength;
-                                readParticle(m_activeBlockLength - 1, p);
                             }
                         }
                         --m_numParticles;


Expanded VisualHelper

Expanded VisualHelper

--- Vulcan.Wpf/Vulcan.Wpf.Core/Utils/VisualHelper.cs
+++ Vulcan.Wpf/Vulcan.Wpf.Core/Utils/VisualHelper.cs
@@ -10,6 +10,9 @@
 {
     public static class VisualHelper
     {
+        /// <summary>
+        /// Obtains the first descendent element that matches the type.
+        /// </summary>
         public static T FindVisualChild<T>(DependencyObject parent)
             where T : DependencyObject
         {
@@ -28,5 +31,158 @@

             return null;
         }
+
+        /// <summary>
+        /// Obtains the first ancestor element that matches the type.
+        /// </summary>
+        public static T FindVisualParent<T>(DependencyObject child)
+           where T : DependencyObject
+        {
+
+            DependencyObject parentObject = VisualTreeHelper.GetParent(child);
+
+            //we've reached the end of the tree
+            if (parentObject == null) return null;
+
+            //check if the parent matches the type we're looking for
+            T parent = parentObject as T;
+            if (parent != null)
+            {
+                return parent;
+            }
+            else
+            {
+                //use recursion to proceed with next level
+                return FindVisualParent<T>(parentObject);
+            }
+        }
+
+        /// <summary>
+        /// Obtains immediate children of the element.
+        /// </summary>
+        public static IEnumerable<DependencyObject> GetChildren(DependencyObject parent)
+        {
+            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
+                yield return VisualTreeHelper.GetChild(parent, i);
+        }
+
+        /// <summary>
+        /// Obtains immediate children of the provided object by examining the visual tree and filtering on element type
+        /// </summary>
+        public static IEnumerable<T> GetChildren<T>(DependencyObject parent)
+            where T : FrameworkElement
+        {
+            if (parent != null)
+            {
+                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(parent); i++)
+                {
+                    DependencyObject child = VisualTreeHelper.GetChild(parent, i);
+
+                    if (child != null && child is T)
+                        yield return (T)child;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Obtains children and their children and so on of the provided object by examining the visual tree.
+        /// </summary>
+        public static IEnumerable<DependencyObject> GetAllChildren(DependencyObject parent)
+        {
+            var childrenCount = VisualTreeHelper.GetChildrenCount(parent);
+
+            for (int i = 0; i < childrenCount; i++)
+            {
+                DependencyObject childElement = VisualTreeHelper.GetChild(parent, i);
+                yield return childElement;
+                foreach (var subChildElement in GetAllChildren(childElement).ToArray())
+                {
+                    yield return subChildElement;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Obtains children and their children and so on of the provided object by examining the visual tree and filtering on the element type
+        /// </summary>
+        public static IEnumerable<DependencyObject> GetAllChildren<T>(DependencyObject parent)
+            where T : DependencyObject
+        {
+            return GetAllChildren(parent).ToArray().Where(args => args is T);
+        }
+
+        /// <summary>
+        /// Obtains parents of the provided object by examining the visual tree.
+        /// </summary>
+        public static IEnumerable<DependencyObject> GetParents(DependencyObject element)
+        {
+            var parent = VisualTreeHelper.GetParent(element);
+
+            if (parent != null)
+            {
+                yield return parent;
+
+                foreach (var grandParent in GetParents(parent).ToArray())
+                {
+                    yield return grandParent;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Obtains parents of the provided object by examining the visual tree and filtering on the element type
+        /// </summary>
+        public static IEnumerable<DependencyObject> GetParents<T>(DependencyObject element)
+            where T : DependencyObject
+        {
+            return GetParents(element).ToArray().Where(args => args is T);
+        }
+
+        /// <summary>
+        /// Find element among immediate children by name.
+        /// </summary>
+        public static FrameworkElement FindName(DependencyObject reference, string name)
+        {
+            return FindName<FrameworkElement>(reference, name);
+        }
+
+        /// <summary>
+        /// Find element among immediate children by name and type
+        /// </summary>
+        public static T FindName<T>(DependencyObject reference, string name)
+            where T : FrameworkElement
+        {
+            if (string.IsNullOrEmpty(name))
+            {
+                throw new ArgumentNullException("name");
+            }
+
+            if (reference == null)
+            {
+                throw new ArgumentNullException("reference");
+            }
+
+            return FindNameInternal<T>(reference, name);
+        }
+
+        private static T FindNameInternal<T>(DependencyObject reference, string name)
+            where T : FrameworkElement
+        {
+            foreach (DependencyObject obj in GetChildren(reference))
+            {
+                T elem = obj as T;
+                if (elem != null && elem.Name == name)
+                {
+                    return elem;
+                }
+
+                elem = FindNameInternal<T>(obj, name);
+                if (elem != null)
+                {
+                    return elem;
+                }
+            }
+            return null;
+        }
     }
 }


Dont persist missiles to shard (#1499)

Dont persist missiles to shard (#1499)

Also adds logging to detect other missiles that are getting around the WeenieType check.

--- Source/ACE.Server/WorldObjects/WorldObject_Database.cs
+++ Source/ACE.Server/WorldObjects/WorldObject_Database.cs
@@ -131,16 +131,20 @@
             if (IsGenerator || Generator != null)
                 return false;

-            if (WeenieType == WeenieType.Ammunition || WeenieType == WeenieType.ProjectileSpell)
+            if (WeenieType == WeenieType.Missile || WeenieType == WeenieType.Ammunition || WeenieType == WeenieType.ProjectileSpell)
                 return false;

             if (WeenieType == WeenieType.Corpse && this is Corpse corpse && corpse.IsMonster)
                 return false;

-            // Missiles are unique. The only missiles that are decayable are ones that already exist in the database.
+            // Missiles are unique. The only missiles that are persistable are ones that already exist in the database.
+            // TODO: See if we can remove this check by catching the WeenieType above.
             var missile = Missile;
             if (missile.HasValue && missile.Value)
+            {
+                log.Warn($"Missile: WeenieClassId: {WeenieClassId}, Name: {Name}, WeenieType: {WeenieType}, detected in IsDynamicThatShouldPersistToShard() that wasn't caught by prior check.");
                 return false;
+            }

             return true;
         }


think todo

think todo

--- WPFHexaEditor.Control/Core/Bytes/ByteProvider.cs
+++ WPFHexaEditor.Control/Core/Bytes/ByteProvider.cs
@@ -759,6 +759,11 @@
             sb.AppendLine();
             sb.AppendLine();

+            //TODO : integrate VB.NET and change function name to CopyToClipboard_Language and enum CStyleLanguage to CodeLanguage
+            //TODO : Add this... sample
+            //string sData = "½D'è×..ísü.;.×ÄÀß0Ij..à."
+            //string sDataHexa = "bd 44 27 e8 d7 84 1e"
+
             switch (language)
             {
                 case CStyleLanguage.CSharp:


The version enrichment now works across all "full" clients.

--- Source/Clients/Extras/Enrichments/VersionEnrichment.cs
+++ Source/Clients/Extras/Enrichments/VersionEnrichment.cs
@@ -1,6 +1,4 @@
 using System;
-using System.Collections.Generic;
-using System.Diagnostics;
 using System.Linq;
 using System.Reflection;
 using Exceptionless.Extras;
@@ -26,10 +24,7 @@
             _checkedForVersion = true;
             string version = null;
             try {
-                var v = GetVersionFromLoadedAssemblies();
-                version = GetVersionFromAssembly(Assembly.GetEntryAssembly());
-                if (String.IsNullOrEmpty(version))
-                    version = GetVersionFromStackTrace();
+                version = GetVersionFromLoadedAssemblies();
             } catch (Exception) {}

             if (String.IsNullOrEmpty(version))
@@ -76,32 +71,5 @@

             return null;
         }
-
-        private string GetVersionFromStackTrace() {
-            var trace = new StackTrace(false);
-            for (int i = 0; i < trace.FrameCount; i++) {
-                StackFrame frame = trace.GetFrame(i);
-                MethodBase methodBase = frame.GetMethod();
-                Type type = methodBase.DeclaringType;
-                if (type == null)
-                    continue;
-
-                if (type.Assembly.IsDynamic || type.Assembly == typeof(ExceptionlessClient).Assembly || type.Assembly == GetType().Assembly || type.Assembly == typeof(object).Assembly)
-                    continue;
-
-                if (String.IsNullOrEmpty(type.Assembly.FullName) || type.Assembly.FullName.StartsWith("System.") || type.Assembly.FullName.StartsWith("Microsoft."))
-                    continue;
-
-                string company = type.Assembly.GetCompany();
-                if (!String.IsNullOrEmpty(company) && (String.Equals(company, "Exceptionless", StringComparison.OrdinalIgnoreCase) || String.Equals(company, "Microsoft Corporation", StringComparison.OrdinalIgnoreCase)))
-                    continue;
-
-                string version = GetVersionFromAssembly(type.Assembly);
-                if (!String.IsNullOrEmpty(version))
-                    return version;
-            }
-
-            return null;
-        }
     }
 }


Update WalletWasabi/WebClients/PayJoin/PayjoinClient.cs

Co-Authored-By: yahiheb <1ef907ec03476373b9c05d7f089a7d2fed4d8ea8@users.noreply.github.com>

--- WalletWasabi/WebClients/PayJoin/PayjoinClient.cs
+++ WalletWasabi/WebClients/PayJoin/PayjoinClient.cs
@@ -218,7 +218,7 @@
 				var overPaying = sentAfter - sentBefore;
 				if (!newPSBT.TryGetEstimatedFeeRate(out var newFeeRate) || !newPSBT.TryGetVirtualSize(out var newVirtualSize))
 				{
-					throw new PayjoinSenderException("The payjoin receiver did not included UTXO information to calculate fee correctly");
+					throw new PayjoinSenderException("The payjoin receiver did not include UTXO information to calculate fee correctly");
 				}

 				var additionalFee = newPSBT.GetFee() - originalFee;


Ilustrate tag helper bug

Ilustrate tag helper bug

--- samples/Samples.AspNetCore/Views/Shared/_Layout.cshtml
+++ samples/Samples.AspNetCore/Views/Shared/_Layout.cshtml
@@ -1,5 +1,5 @@
 @using StackExchange.Profiling;
-@addTagHelper "*, MiniProfiler.AspNetCore.Mvc"
+@addTagHelper *, MiniProfiler.AspNetCore.Mvc
 <!DOCTYPE html>
 <html>
 <head>


guarding against null customAttributeBuilder

--- Source/FakeItEasy/Creation/DefaultFakeCreatorFacade.cs
+++ Source/FakeItEasy/Creation/DefaultFakeCreatorFacade.cs
@@ -110,7 +110,10 @@

             public IFakeOptionsBuilder<T> WithAdditionalAttributes(IEnumerable<CustomAttributeBuilder> customAttributeBuilders)
             {
+                Guard.AgainstNull(customAttributeBuilders, "customAttributeBuilders");
+
                 this.Options.AdditionalAttributes = customAttributeBuilders;
+
                 return this;
             }


Update web control to reflect changed usage

--- Web/UI/Controls/Communication/AlphanumericSMS.cs
+++ Web/UI/Controls/Communication/AlphanumericSMS.cs
@@ -149,8 +149,8 @@

             cbAppendUserInfo = new RockCheckBox();
             cbAppendUserInfo.ID = string.Format("cbAppendUserInfo_{0}", this.ID);
-            cbAppendUserInfo.Label = "Add contact information to message?";
-            cbAppendUserInfo.Help = "Append your message with name and phone number to allow receipients to contact you?";
+            cbAppendUserInfo.Label = "Add organisation footer to message?";
+            cbAppendUserInfo.Help = "Append your message with your organisation's custom mesage or just the name of your organisation?";
             cbAppendUserInfo.Checked = true;
             Controls.Add(cbAppendUserInfo);


gdfgfd

gdfgfd

--- WebApplication1/Controllers/AccountController.cs
+++ WebApplication1/Controllers/AccountController.cs
@@ -20,7 +20,6 @@

         private string _msg;
         private string _msg1;
-        private dfhbjkd;

         public AccountController()
         {


Login and register redirect to home

Login and register redirect to home

--- Source/Keysme.Web/Controllers/MVC/AccountController.cs
+++ Source/Keysme.Web/Controllers/MVC/AccountController.cs
@@ -97,7 +97,7 @@
             switch (result)
             {
                 case SignInStatus.Success:
-                    return this.RedirectToLocal(returnUrl);
+                    return this.RedirectToLocal(returnUrl ?? "/Home/Index");
                 case SignInStatus.LockedOut:
                     return this.View("Lockout");
                 case SignInStatus.RequiresVerification:
@@ -193,7 +193,7 @@
                     // var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: Request.Url.Scheme);
                     // await UserManager.SendEmailAsync(user.Id, "Confirm your account", "Please confirm your account by clicking here");

-                    return this.RedirectToAction("Index", "Landing");
+                    return this.RedirectToAction("Index", "Home");
                 }
                 this.AddErrors(result);
             }


Add recent comments

Add recent comments

--- Webs/WilliamsonFamily.Web/Views/Blog/List.cshtml
+++ Webs/WilliamsonFamily.Web/Views/Blog/List.cshtml
@@ -1,157 +1,165 @@
-@model WilliamsonFamily.Web.Models.Blog.BlogListModel
-@{
-	ViewBag.Title = Model.Author.FirstName + "'s Blog";
-}
-
-@section ExtraHeader
-{
-	<link rel="alternate" type="application/rss+xml" title="@Model.Author.FirstName RSS Feed" href="http://www.williamsonfamily.com@(Url.Action("Feed", new { user = Model.Author.UrlName }))" />
-}
-
-@section HeaderImage
-{
-    @if (Model.Author.FirstName == "Bekah")
-    {
-

-

-                Bekah's Blog
-
-
-

-

-			    Oregon Adventure
-

-

-    }
-    else
-    {
-

-
-
-
-

-    }
-}
-
-

-

-				@*<%--
<%= Html.Encode(Model.Author.FirstName) %>'s Blog
--%>
-				<%--
Popular Tags: Life, Baby, Politics
--%>*@
-

-
-		@foreach (var item in Model.BlogEntries)
-  {
-

-
@Html.ActionLink(item.Title, "Detail", new { title = item.Slug })

-

-					Posted @item.DatePublished.Value.FriendlyDate()

-					Posted by @item.AuthorName
-

-

-					@Html.Raw(item.Entry)
-

-						@if (!string.IsNullOrEmpty(item.Tags))
-      {
-							@Html.Raw("Tags: ") @item.Tags

-      }
-

-						Comment Now
-

-

-

-  }
-
-		 @if (Model.PageCount > 1)
-   {
-

-

-					@Html.Raw(Html.RenderPager(Model.PageCount, Model.PageIndex, Url.Action("list")))
-

-

-

-   }
-
-

-
-

-

-				@if (Model.Author.FirstName.ToLower() == "sam and michele")
-    {
-

-
About Us

-
Hi! We're Sam and Michele. We have a beautiful new baby boy, Luke. Welcome to our little spot in the world.

-

-    }
-    else
-    {
-

-
I'm living in Oregon for four months. No, it won't be a hunter/gatherer society. Yes, I do rely on wood-stove heat.

-

-
Here are my stories.

-

-    }
-
-				@{Html.RenderPartial("~/Views/Blog/BlogSidebarList.cshtml", Model.BlogTitles);}
-			   @*<%--

-
Tags

-

-
Nec metus sed donec

-
Magna lacus bibendum mauris

-
Velit semper nisi molestie

-
Eget tempor eget nonummy

-
Nec metus sed donec

-

-

-

-
Date

-

-
Nec metus sed donec

-
Magna lacus bibendum mauris

-
Velit semper nisi molestie

-
Eget tempor eget nonummy

-

-

-

-
Twitter

-

-
Nec metus sed donec

-
Magna lacus bibendum mauris

-
Velit semper nisi molestie

-
Eget tempor eget nonummy

-

-
--%>*@
-

-

-
-

-
-@section ScriptSection
-{
-
-}
-
-@*@section AnalyticsSection
-{
-
+@model WilliamsonFamily.Web.Models.Blog.BlogListModel
+@{
+	ViewBag.Title = Model.Author.FirstName + "'s Blog";
+}
+
+@section ExtraHeader
+{
+	<link rel="alternate" type="application/rss+xml" title="@Model.Author.FirstName RSS Feed" href="http://www.williamsonfamily.com@(Url.Action("Feed", new { user = Model.Author.UrlName }))" />
+}
+
+@section HeaderImage
+{
+    @if (Model.Author.FirstName == "Bekah")
+    {
+

+

+                Bekah's Blog
+
+
+

+

+			    Oregon Adventure
+

+

+    }
+    else
+    {
+

+
+
+
+

+    }
+}
+
+

+

+				@*<%--
<%= Html.Encode(Model.Author.FirstName) %>'s Blog
--%>
+				<%--
Popular Tags: Life, Baby, Politics
--%>*@
+

+
+		@foreach (var item in Model.BlogEntries)
+  {
+

+
@Html.ActionLink(item.Title, "Detail", new { title = item.Slug })

+

+					Posted @item.DatePublished.Value.FriendlyDate()

+					Posted by @item.AuthorName
+

+

+					@Html.Raw(item.Entry)
+

+						@if (!string.IsNullOrEmpty(item.Tags))
+      {
+							@Html.Raw("Tags: ") @item.Tags

+      }
+

+						Comment Now
+

+

+

+  }
+
+		 @if (Model.PageCount > 1)
+   {
+

+

+					@Html.Raw(Html.RenderPager(Model.PageCount, Model.PageIndex, Url.Action("list")))
+

+

+

+   }
+
+

+
+

+

+				@if (Model.Author.FirstName.ToLower() == "sam and michele")
+    {
+

+
About Us

+
Hi! We're Sam and Michele. We have a beautiful new baby boy, Luke. Welcome to our little spot in the world.

+

+    }
+    else
+    {
+

+
I'm living in Oregon for four months. No, it won't be a hunter/gatherer society. Yes, I do rely on wood-stove heat.

+

+
Here are my stories.

+

+    }
+
+				@{Html.RenderPartial("~/Views/Blog/BlogSidebarList.cshtml", Model.BlogTitles);}
+
+

+

+
Recent Comments

+
+

+					@*Powered by Disqus*@
+

+			   @*<%--

+
Tags

+

+
Nec metus sed donec

+
Magna lacus bibendum mauris

+
Velit semper nisi molestie

+
Eget tempor eget nonummy

+
Nec metus sed donec

+

+

+

+
Date

+

+
Nec metus sed donec

+
Magna lacus bibendum mauris

+
Velit semper nisi molestie

+
Eget tempor eget nonummy

+

+

+

+
Twitter

+

+
Nec metus sed donec

+
Magna lacus bibendum mauris

+
Velit semper nisi molestie

+
Eget tempor eget nonummy

+

+
--%>*@
+

+

+
+

+
+@section ScriptSection
+{
+
+}
+
+@*@section AnalyticsSection
+{
+
 }*@


GSF.InstallerActions: Applied a saftey check to GetPropertyValue function.

--- Source/Libraries/GSF.InstallerActions/CustomActions.cs
+++ Source/Libraries/GSF.InstallerActions/CustomActions.cs
@@ -428,7 +428,7 @@
                 }
                 catch (Exception ex)
                 {
-                    // This right is only needed for updating system clock, so its treat as a warning
+                    // This right is only needed for updating system clock, so its treated as a warning
                     logger.Log(EventLogEntryType.Warning, ex);
                 }
             }
@@ -852,10 +852,7 @@

         // Optionally port specification can include interface, e.g.: 127.0.0.1:8005 or +:8181,
         // when only a port is specified, "+" is assumed meaning bind to all interfaces
-        private static string GetEndPoint(string servicePort)
-        {
-            return servicePort.IndexOf(':') == -1 ? $"+:{servicePort}" : servicePort;
-        }
+        private static string GetEndPoint(string servicePort) => servicePort.IndexOf(':') == -1 ? $"+:{servicePort}" : servicePort;

         // Create an http namespace reservation
         private static void AddHttpNamespaceReservation(string serviceAccount, string endPoint)
@@ -907,7 +904,17 @@
             if (session.CustomActionData.TryGetValue(name, out string value))
                 return value;

-            return !string.IsNullOrEmpty(session[name]) ? session[name] : session[name.ToUpper()];
+            try
+            {
+                return !string.IsNullOrEmpty(session[name]) ? session[name] : session[name.ToUpper()];
+            }
+            catch (Exception ex)
+            {
+                Logger logger = new Logger(session);
+                logger.Log(EventLogEntryType.Warning, ex);
+            }
+
+            return null;
         }

         // Method to determine whether the custom action is immediate


Revert changes

Revert changes

--- Source/Miruken/Register/ServiceCollectionExtensions.cs
+++ Source/Miruken/Register/ServiceCollectionExtensions.cs
@@ -126,11 +126,6 @@
             services.AddSingleton<PassThroughRouter>();
             services.AddSingleton<Scheduler>();

-            services.AddSingleton(typeof(ServiceFactory<>.Instance));
-            services.AddSingleton(typeof(ServiceFactory<>.Transient));
-            services.AddSingleton(typeof(ServiceFactory<>.Singleton));
-            services.AddSingleton(typeof(ServiceFactory<>.Scoped));
-
             return services;
         }


Updated copyright

Updated copyright

--- WorldModel/WorldModel/Properties/AssemblyInfo.cs
+++ WorldModel/WorldModel/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Alex Warren")]
 [assembly: AssemblyProduct("Quest")]
-[assembly: AssemblyCopyright("Copyright © 2016 Alex Warren")]
+[assembly: AssemblyCopyright("Copyright © 2017 Andy Joel - full copyright and license information at https://github.com/textadventures/quest/blob/master/LICENSE")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]

@@ -32,6 +32,6 @@
 // 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("5.6.*")]
+[assembly: AssemblyVersion("5.7.*")]

 [assembly: InternalsVisibleTo("WorldModelTests")]


Update IAntimalwareScanner.cs

Update IAntimalwareScanner.cs

--- TIKSN.Core/Security/Antimalware/IAntimalwareScanner.cs
+++ TIKSN.Core/Security/Antimalware/IAntimalwareScanner.cs
@@ -6,4 +6,4 @@

         AntimalwareScanResult ScanString(string @string, string contentName);
     }
-}+}


webusr

webusr

--- Terradue.Tep/Terradue/Tep/WebServer/User/WebUserTep.cs
+++ Terradue.Tep/Terradue/Tep/WebServer/User/WebUserTep.cs
@@ -177,7 +177,7 @@
         /// <param name="context">Context.</param>
 		public UserTep ToEntity(IfyContext context, UserTep input) {
 			UserTep user = (input == null ? new UserTep(context) : input);
-			base.ToEntity(context, user);
+			user = (UserTep)base.ToEntity(context, user);

             return user;
         }


needed to add one more operator needed in other project.

--- TessellationAndVoxelizationGeometryLibrary/2D/Point.cs
+++ TessellationAndVoxelizationGeometryLibrary/2D/Point.cs
@@ -90,6 +90,14 @@
         {
             return new[] { a.X + b.X, a.Y + b.Y };
         }
+        public static double[] operator -(PointLight a, double[] b)
+        {
+            return new[] { a.X - b[0], a.Y - b[1] };
+        }
+        public static double[] operator +(PointLight a, double[] b)
+        {
+            return new[] { a.X + b[0], a.Y + b[1] };
+        }

     }


FinishPortal.cs Deleted Update

FinishPortal.cs Deleted Update

Deleted the Update function from FinishPortal script. It wasn't needed.

--- UnityProject/Assets/Scripts/MapScripts/FinishPortal.cs
+++ UnityProject/Assets/Scripts/MapScripts/FinishPortal.cs
@@ -23,10 +23,7 @@
         GameUtilities.FindGame(ref OwningGame);
     }

-    // Update is called once per frame
-    void Update() {
-
-    }
+

     void SetCollectablesLeft()
     {


Fixed issue where adds and deletes were not handled correctly.

--- VCSJones.FiddlerScriptCSharp/ScriptCSharpRepository.cs
+++ VCSJones.FiddlerScriptCSharp/ScriptCSharpRepository.cs
@@ -19,40 +19,55 @@
             _watcher = new FileSystemWatcher(path, _filter);
             FirstTimeInitialization();
             Observable.FromEventPattern<FileSystemEventArgs>(_watcher, nameof(_watcher.Changed))
-                .Throttle(TimeSpan.FromMilliseconds(250))
-                .Subscribe(_watcher_Changed);
+                .Concat(Observable.FromEventPattern<FileSystemEventArgs>(_watcher, nameof(_watcher.Created)))
+                .Throttle(TimeSpan.FromMilliseconds(200))
+                .Subscribe(_watcher_Event);
+            _watcher.Deleted += _watcher_Deleted;
+            _watcher.NotifyFilter = NotifyFilters.CreationTime | NotifyFilters.LastWrite | NotifyFilters.FileName | NotifyFilters.CreationTime;
             _watcher.EnableRaisingEvents = true;
         }

-        private void _watcher_Changed(EventPattern<FileSystemEventArgs> args)
-        {
-            var e = args.EventArgs;
-            switch(e.ChangeType)
-            {
+        private void _watcher_Deleted(object sender, FileSystemEventArgs e)
+        {
+            lock (_sync)
+            {
+                FiddlerApplication.Log.LogString($"Removing script file \"{e.FullPath}\".");
+                _activeScripts.Remove(e.FullPath);
+            }
+        }
+
+        private void _watcher_Event(EventPattern<FileSystemEventArgs> args)
+        {
+            switch (args.EventArgs.ChangeType)
+            {
+                case WatcherChangeTypes.Changed:
+                    lock (_sync)
+                    {
+                        if (_activeScripts.ContainsKey(args.EventArgs.FullPath))
+                        {
+                            FiddlerApplication.Log.LogString($"Re-initializing script file \"{args.EventArgs.FullPath}\".");
+                            _activeScripts[args.EventArgs.FullPath].Initialize();
+                        }
+                        else
+                        {
+                            FiddlerApplication.Log.LogString($"Initializing new script file \"{args.EventArgs.FullPath}\".");
+                            var script = new FiddlerCSharpScript(args.EventArgs.FullPath);
+                            script.Initialize();
+                            _activeScripts.Add(args.EventArgs.FullPath, script);
+                        }
+                    }
+                    break;
                 case WatcherChangeTypes.Created:
                     lock (_sync)
                     {
-                        FiddlerApplication.Log.LogString($"Initializing new script file \"{e.FullPath}\".");
-                        var script = new FiddlerCSharpScript(e.FullPath);
+                        FiddlerApplication.Log.LogString($"Initializing new script file \"{args.EventArgs.FullPath}\".");
+                        var script = new FiddlerCSharpScript(args.EventArgs.FullPath);
                         script.Initialize();
-                        _activeScripts.Add(e.FullPath, script);
+                        _activeScripts.Add(args.EventArgs.FullPath, script);
                     }
                     break;
-                case WatcherChangeTypes.Changed:
-                    lock (_sync)
-                    {
-                        FiddlerApplication.Log.LogString($"Re-initializing script file \"{e.FullPath}\".");
-                        _activeScripts[e.FullPath]?.Initialize();
-                    }
-                    break;
-                case WatcherChangeTypes.Deleted:
-                    lock (_sync)
-                    {
-                        FiddlerApplication.Log.LogString($"Removing script file \"{e.FullPath}\".");
-                        _activeScripts.Remove(e.FullPath);
-                    }
-                    break;
-            }
+            }
+
         }

         private static void ExecuteSafely(Action action)


[API] Update Json tests to reflect change to IEnumerable

--- Zermelo/Zermelo.API.Tests/Services/JsonServiceTests.cs
+++ Zermelo/Zermelo.API.Tests/Services/JsonServiceTests.cs
@@ -15,14 +15,14 @@
         public void ShouldDeserializeDataInResponeData()
         {
             var sut = new JsonService();
-            ObservableCollection<TestClass> expected = new ObservableCollection<TestClass>
+            List<TestClass> expected = new List<TestClass>
             {
                 new TestClass(5),
                 new TestClass(3)
             };
             string testData = "{ \"response\": { \"data\": [ { \"Number\": 5 }, { \"Number\": 3 } ] } }";

-            ObservableCollection<TestClass> result = sut.DeserializeCollection<TestClass>(testData);
+            List<TestClass> result = sut.DeserializeCollection<TestClass>(testData).ToList();

             Assert.Equal(expected.Count, result.Count);
             for (int i = 0; i < expected.Count; i++)


Fix UpdateSoftBody.

Fix UpdateSoftBody.

--- demos/Generic/DemoFramework/Graphics/Xna/MeshFactory.cs
+++ demos/Generic/DemoFramework/Graphics/Xna/MeshFactory.cs
@@ -564,9 +564,7 @@

             if (faces.Count != 0)
             {
-                shapeData.VertexCount = faces.Count * 3;
-
-                Vector3[] vectors = new Vector3[shapeData.VertexCount * 2];
+                Vector3[] vectors = new Vector3[3 * faces.Count * 2];
                 int v = 0;

                 int i;
@@ -594,8 +592,6 @@

                 if (tetraCount != 0)
                 {
-                    shapeData.VertexCount = tetraCount * 12;
-
                     Vector3[] vectors = new Vector3[tetraCount * 24];
                     int v = 0;

@@ -649,7 +645,6 @@
                 {
                     AlignedLinkArray links = softBody.Links;
                     int linkCount = links.Count;
-                    shapeData.VertexCount = linkCount * 2;

                     Vector3[] vectors = new Vector3[linkCount * 4];


Add winner text background to increase contrast

--- osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerResultsScreen.cs
+++ osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerResultsScreen.cs
@@ -6,7 +6,10 @@
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
 using osu.Framework.Graphics;
+using osu.Framework.Graphics.Colour;
+using osu.Framework.Graphics.Containers;
 using osu.Framework.Graphics.Effects;
+using osu.Framework.Graphics.Shapes;
 using osu.Game.Graphics;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Localisation;
@@ -22,6 +25,7 @@
     {
         private readonly SortedDictionary<int, BindableInt> teamScores;

+        private Container winnerBackground;
         private Drawable winnerText;

         public MultiplayerResultsScreen(ScoreInfo score, long roomId, PlaylistItem playlistItem, SortedDictionary<int, BindableInt> teamScores)
@@ -36,6 +40,8 @@
         [BackgroundDependencyLoader]
         private void load()
         {
+            const float winner_background_half_height = 250;
+
             ScorePanelList.Anchor = ScorePanelList.Origin = Anchor.TopCentre;
             ScorePanelList.Scale = new Vector2(0.9f);
             ScorePanelList.Y = 75;
@@ -58,6 +64,32 @@
                         Origin = Anchor.TopCentre,
                         Team1Score = { BindTarget = redScore },
                         Team2Score = { BindTarget = blueScore },
+                    },
+                    winnerBackground = new Container
+                    {
+                        RelativeSizeAxes = Axes.Both,
+                        Anchor = Anchor.Centre,
+                        Origin = Anchor.Centre,
+                        Alpha = 0,
+                        Children = new[]
+                        {
+                            new Box
+                            {
+                                RelativeSizeAxes = Axes.X,
+                                Height = winner_background_half_height,
+                                Anchor = Anchor.Centre,
+                                Origin = Anchor.BottomCentre,
+                                Colour = ColourInfo.GradientVertical(Colour4.Black.Opacity(0), Colour4.Black.Opacity(0.4f))
+                            },
+                            new Box
+                            {
+                                RelativeSizeAxes = Axes.X,
+                                Height = winner_background_half_height,
+                                Anchor = Anchor.Centre,
+                                Origin = Anchor.TopCentre,
+                                Colour = ColourInfo.GradientVertical(Colour4.Black.Opacity(0.4f), Colour4.Black.Opacity(0))
+                            }
+                        }
                     },
                     (winnerText = new OsuSpriteText
                     {
@@ -83,7 +115,10 @@

             using (BeginDelayedSequence(300))
             {
-                winnerText.FadeInFromZero(600, Easing.InQuint);
+                const double fade_in_duration = 600;
+
+                winnerText.FadeInFromZero(fade_in_duration, Easing.InQuint);
+                winnerBackground.FadeInFromZero(fade_in_duration, Easing.InQuint);

                 winnerText
                     .ScaleTo(10)
@@ -91,6 +126,7 @@
                     .Then()
                     .ScaleTo(1.02f, 1600, Easing.OutQuint)
                     .FadeOut(5000, Easing.InQuad);
+                winnerBackground.Delay(2200).FadeOut(2000);
             }
         }
     }


refactor: 为集合结果进行包装处理。 :end:

refactor: 为集合结果进行包装处理。 :end:

--- src/Data/DataAccessBase.cs
+++ src/Data/DataAccessBase.cs
@@ -179,7 +179,7 @@
 			outParameters = context.OutParameters;

 			//返回最终的结果
-			return context.Result as IEnumerable<T>;
+			return this.ToEnumerable<T>(context.Result);
 		}

 		public object ExecuteScalar(string name, IDictionary<string, object> inParameters, object state = null, Func<DataExecuteContextBase, bool> executing = null, Action<DataExecuteContextBase> executed = null)
@@ -1186,7 +1186,7 @@
 				selected(context);

 			//返回最终的结果
-			return context.Result as IEnumerable<T>;
+			return this.ToEnumerable<T>(context.Result);
 		}

 		protected abstract void OnSelect(DataSelectContextBase context);
@@ -1401,6 +1401,17 @@
 			}
 		}

+		private IEnumerable<T> ToEnumerable<T>(object result)
+		{
+			if(result == null)
+				System.Linq.Enumerable.Empty<T>();
+
+			if(result is IEnumerable<T> items)
+				return items;
+
+			return new ResultEnumerable<T>(result);
+		}
+
 		private static DataDictionary GetDataDictionary(object data)
 		{
 			if(data == null)
@@ -1428,5 +1439,66 @@
 			}
 		}
 		#endregion
+
+		#region 嵌套子类
+		private class ResultEnumerable<T> : IEnumerable<T>
+		{
+			private readonly IEnumerable _items;
+
+			public ResultEnumerable(object result)
+			{
+				if(result == null)
+					throw new ArgumentNullException(nameof(result));
+
+				if(result is IEnumerable)
+					_items = (IEnumerable)result;
+				else
+				{
+					_items = Array.CreateInstance(result.GetType(), 1);
+					((Array)_items).SetValue(result, 0);
+				}
+			}
+
+			public IEnumerator<T> GetEnumerator()
+			{
+				return new Enumerator(_items.GetEnumerator());
+			}
+
+			IEnumerator IEnumerable.GetEnumerator()
+			{
+				return new Enumerator(_items.GetEnumerator());
+			}
+
+			public class Enumerator : IEnumerator<T>
+			{
+				private readonly IEnumerator _iterator;
+
+				public Enumerator(IEnumerator iterator)
+				{
+					_iterator = iterator;
+				}
+
+				public T Current => (T)System.Convert.ChangeType(_iterator.Current, typeof(T));
+
+				object IEnumerator.Current => _iterator.Current;
+
+				public void Dispose()
+				{
+					if(_iterator is IDisposable disposable)
+						disposable.Dispose();
+				}
+
+				public bool MoveNext()
+				{
+					return _iterator.MoveNext();
+				}
+
+				public void Reset()
+				{
+					_iterator.Reset();
+				}
+			}
+		}
+		#endregion
 	}
 }


Update

Update

--- Assets/Main.cs
+++ Assets/Main.cs
@@ -16,15 +16,15 @@
 	// Update is called once per frame
 	public void Update () {
 		if (Input.GetKeyDown (KeyCode.H))
-			this.socket.SendString ("Hi how are you?");
+			this.socket.BroadcastToNeighbors ("Hi how are you?");
 		else if (Input.GetKeyDown (KeyCode.G))
-			this.socket.SendString ("I'm good!");
+			this.socket.BroadcastToNeighbors ("I'm good!");
 		else if (Input.GetKeyDown (KeyCode.Y))
-			this.socket.SendString ("And you?");
+			this.socket.BroadcastToNeighbors ("And you?");
 		else if (Input.GetKeyDown (KeyCode.A))
-			this.socket.SendString("Awesome!!");
+			this.socket.BroadcastToNeighbors("Awesome!!");
 		else if (Input.GetKeyDown (KeyCode.A))
-			this.socket.SendString("Pretty bad..");
+			this.socket.BroadcastToNeighbors("Pretty bad..");
 	}

     public void FixedUpdate() {


Remove errant background colour from some labels

--- renderdocui/Windows/PipelineState/GLPipelineStateViewer.Designer.cs
+++ renderdocui/Windows/PipelineState/GLPipelineStateViewer.Designer.cs
@@ -4372,7 +4372,6 @@
             //
             // depthBounds
             //
-            this.depthBounds.BackColor = System.Drawing.SystemColors.Control;
             this.tableLayoutPanel12.SetColumnSpan(this.depthBounds, 3);
             this.depthBounds.Dock = System.Windows.Forms.DockStyle.Fill;
             this.depthBounds.Font = new System.Drawing.Font("Tahoma", 12F);
@@ -4420,7 +4419,6 @@
             //
             // depthFunc
             //
-            this.depthFunc.BackColor = System.Drawing.SystemColors.Control;
             this.tableLayoutPanel12.SetColumnSpan(this.depthFunc, 3);
             this.depthFunc.Dock = System.Windows.Forms.DockStyle.Fill;
             this.depthFunc.Font = new System.Drawing.Font("Tahoma", 12F);


No logging on self hosted bots

No logging on self hosted bots

--- src/NadekoBot/NadekoBot.cs
+++ src/NadekoBot/NadekoBot.cs
@@ -67,8 +67,9 @@
                 TotalShards = Credentials.TotalShards,
                 ConnectionTimeout = int.MaxValue
             });
-
+#if GLOBAL_NADEKO
             Client.Log += Client_Log;
+#endif

             //initialize Services
             CommandService = new CommandService(new CommandServiceConfig() {


No csrf cookie in response to an OPTIONS request

--- src/Nancy/Security/Csrf.cs
+++ src/Nancy/Security/Csrf.cs
@@ -23,7 +23,7 @@
                 CsrfHookName,
                 context =>
                 {
-                    if (context.Response == null || context.Response.Cookies == null)
+                    if (context.Response == null || context.Response.Cookies == null || context.Request.Method.Equals("OPTIONS", StringComparison.OrdinalIgnoreCase))
                     {
                         return;
                     }


Added comment as suggested in code review

--- src/NodaTime/AnnualDate.cs
+++ src/NodaTime/AnnualDate.cs
@@ -37,6 +37,7 @@
         {
             // The year 2000 is a leap year, so this is fine for all valid dates.
             GregorianYearMonthDayCalculator.ValidateGregorianYearMonthDay(2000, month, day);
+            // See comment above for why this is using year 1, and why that's okay even for February 29th.
             value = new YearMonthDay(1, month, day);
         }


Responding to adding an expansion Kestrel

--- src/Orchard.Web/Program.cs
+++ src/Orchard.Web/Program.cs
@@ -9,14 +9,14 @@
         public static void Main(string[] args)
         {
             var host = new WebHostBuilder()
-                .UseServer("Microsoft.AspNetCore.Server.Kestrel")
+                .UseKestrel()
                 .UseDefaultHostingConfiguration(args)
                 .UseStartup<Startup>()
                 .Build();

             using (host)
             {
-                host.Start();
+                host.Run();

                 var orchardHost = new OrchardHost(host.Services, System.Console.In, System.Console.Out, args);
                 orchardHost.Run();


Revert "Added Normalize (#9)" (#10)

Revert "Added Normalize (#9)" (#10)

This reverts commit 6a5995346a78ff833b1fe67d033a19dfc4af9f5b.

--- src/OutputFormatOptions.cs
+++ src/OutputFormatOptions.cs
@@ -23,11 +23,6 @@
     /// </summary>
     public string AddComment { get; set; }

-    /// <summary>
-    /// Normalize output file.
-    /// </summary>
-    public bool Normalize { get; set; }
-

     /// <summary>
     /// Initializes a new instance of the <see cref="T:SoxSharp.OutputFormatOptions"/> class.
@@ -44,7 +39,7 @@
     /// <returns>String containing SoX command arguments.</returns>
     public override string ToString()
     {
-      List<string> outputOptions = new List<string>(5);
+      List<string> outputOptions = new List<string>(4);

       string baseStr = base.ToString();

@@ -60,9 +55,6 @@
       if (Comment != null)
         outputOptions.Add("--comment \"" + Comment + "\"");

-      if (Normalize)
-        outputOptions.Add("--norm");
-
       return string.Join(" ", outputOptions);
     }
   }


add xml comments

add xml comments

--- src/QbXml/QbXmlResponse.cs
+++ src/QbXml/QbXmlResponse.cs
@@ -25,6 +25,7 @@
         /// Parses a string and returns a QBXML object.
         /// </summary>
         /// <param name="response">XML.</param>
+        /// <param name="events">XmlDeserializationEvents that could be triggered while deserializing</param>
         /// <returns>QBXML object.</returns>
         public QBXML ParseResponseRaw(string response, XmlDeserializationEvents events = new XmlDeserializationEvents())
         {
@@ -38,6 +39,7 @@
         /// </summary>
         /// <typeparam name="T">Object to get.</typeparam>
         /// <param name="response">XML.</param>
+        /// <param name="events">XmlDeserializationEvents that could be triggered while deserializing</param>
         /// <returns>Object instance.</returns>
         public T GetSingleItemFromResponse<T>(string response, XmlDeserializationEvents events = new XmlDeserializationEvents())
             where T : class
@@ -50,6 +52,7 @@
         /// </summary>
         /// <typeparam name="T">Objects to get.</typeparam>
         /// <param name="response">XML.</param>
+        /// <param name="events">XmlDeserializationEvents that could be triggered while deserializing</param>
         /// <returns>Object instances.</returns>
         public IEnumerable<T> GetItemsFromResponse<T>(string response, XmlDeserializationEvents events = new XmlDeserializationEvents())
             where T : class
@@ -62,6 +65,7 @@
         /// </summary>
         /// <param name="response">XML.</param>
         /// <param name="type">Object to get.</param>
+        /// <param name="events">XmlDeserializationEvents that could be triggered while deserializing</param>
         /// <returns>Object instance.</returns>
         public object GetSingleItemFromResponse(string response, System.Type type, XmlDeserializationEvents events = new XmlDeserializationEvents())
         {
@@ -73,6 +77,7 @@
         /// </summary>
         /// <param name="response">XML.</param>
         /// <param name="type">Objects to get</param>
+        /// <param name="events">XmlDeserializationEvents that could be triggered while deserializing</param>
         /// <returns>Object instances.</returns>
         public IEnumerable<object> GetItemsFromResponse(string response, System.Type type, XmlDeserializationEvents events = new XmlDeserializationEvents())
         {


Enable BSD credentials by default

Enable BSD credentials by default

This doesn't seem to break on Linux, but if it causes trouble elsewhere,
we may need to find a different solution.

--- src/UnixNativeTransport.cs
+++ src/UnixNativeTransport.cs
@@ -1,6 +1,11 @@
 // Copyright 2006 Alp Toker <alp@atoker.com>
 // This software is made available under the MIT License
 // See COPYING for details
+
+//We send BSD-style credentials on all platforms
+//Doesn't seem to break Linux (but is redundant there)
+//This may turn out to be a bad idea
+#define HAVE_CMSGCRED

 using System;
 using System.IO;


Added TextureFont command and hints on how to colorize pixmap fonts.

--- src/Xwt.Sdl/FTGL#/Fonts.cs
+++ src/Xwt.Sdl/FTGL#/Fonts.cs
@@ -53,6 +53,13 @@
 	{
 		private const string nativeLibName = "ftgl.dll";

+		/*
+		 * To apply custom colors to Pixmap fonts, call the following methods:
+		 * glPixelTransferf(GL_RED_BIAS, -1.0f);
+		 * glPixelTransferf(GL_GREEN_BIAS, -1.0f);
+		 * glPixelTransferf(GL_BLUE_BIAS, -1.0f);
+		 */
+
 		/// <summary>
 		/// Create a specialised FTGLfont object for handling pixmap (grey scale) fonts.
 		/// </summary>
@@ -61,6 +68,10 @@
 		[DllImport(nativeLibName, EntryPoint = "ftglCreatePixmapFont", CallingConvention = CallingConvention.Cdecl)]
 		public static extern IntPtr CreatePixmapFont([In] [MarshalAs(UnmanagedType.LPStr)] string pathToTtf);

+		[DllImport(nativeLibName, EntryPoint = "ftglCreateTextureFont", CallingConvention = CallingConvention.Cdecl)]
+		public static extern IntPtr CreateTextureFont([In] [MarshalAs(UnmanagedType.LPStr)] string pathToTtf);
+
+
 		[DllImport(nativeLibName, EntryPoint = "ftglDestroyFont", CallingConvention = CallingConvention.Cdecl)]
 		public static extern void DestroyFont(IntPtr font);


Tweak to compile OK for compact frameworks.

--- src/Zip/ZipEntryFactory.cs
+++ src/Zip/ZipEntryFactory.cs
@@ -208,7 +208,11 @@
 					break;

 				case TimeSetting.CreateTimeUtc:
+#if COMPACT_FRAMEWORK_V10 || COMPACT_FRAMEWORK_V20
+					result.DateTime = fi.CreationTime.ToUniversalTime();
+#else
 					result.DateTime = fi.CreationTimeUtc;
+#endif
 					break;

 				case TimeSetting.LastAccessTime:
@@ -216,7 +220,11 @@
 					break;

 				case TimeSetting.LastAccessTimeUtc:
+#if COMPACT_FRAMEWORK_V10 || COMPACT_FRAMEWORK_V20
+					result.DateTime = fi.LastAccessTime.ToUniversalTime();
+#else
 					result.DateTime = fi.LastAccessTimeUtc;
+#endif
 					break;

 				case TimeSetting.LastWriteTime:
@@ -224,7 +232,11 @@
 					break;

 				case TimeSetting.LastWriteTimeUtc:
+#if COMPACT_FRAMEWORK_V10 || COMPACT_FRAMEWORK_V20
+					result.DateTime = fi.LastWriteTime.ToUniversalTime();
+#else
 					result.DateTime = fi.LastWriteTimeUtc;
+#endif
 					break;

 				case TimeSetting.Fixed:


Make output less verbose

Make output less verbose

--- Build/Build.cs
+++ Build/Build.cs
@@ -66,7 +66,7 @@
                     "Branch spec {branchspec} is a pull request. Adding build number {buildnumber}",
                     BranchSpec, BuildNumber);

-                SemVer = string.Join('.', GitVersion.SemVer.Split('.').Take(3).Union(new [] { BuildNumber }));
+                SemVer = string.Join('.', GitVersion.SemVer.Split('.').Take(3).Union(new[] { BuildNumber }));
             }

             Serilog.Log.Information("SemVer = {semver}", SemVer);
@@ -91,6 +91,7 @@
             DotNetBuild(s => s
                 .SetProjectFile(Solution)
                 .SetConfiguration("CI")
+                .EnableNoLogo()
                 .EnableNoRestore()
                 .SetAssemblyVersion(GitVersion.AssemblySemVer)
                 .SetFileVersion(GitVersion.AssemblySemFileVer)
@@ -178,6 +179,8 @@
                 .SetProject(Solution.Core.FluentAssertions)
                 .SetOutputDirectory(ArtifactsDirectory)
                 .SetConfiguration("Release")
+                .EnableNoLogo()
+                .EnableNoRestore()
                 .EnableContinuousIntegrationBuild() // Necessary for deterministic builds
                 .SetVersion(SemVer));
         });
@@ -187,7 +190,7 @@
         .OnlyWhenDynamic(() => IsTag)
         .Executes(() =>
         {
-            var packages = GlobFiles(ArtifactsDirectory, "*.nupkg");
+            IReadOnlyCollection<string> packages = GlobFiles(ArtifactsDirectory, "*.nupkg");

             Assert.NotEmpty(packages.ToList());

@@ -201,5 +204,4 @@
         });

     bool IsTag => BranchSpec != null && BranchSpec.Contains("refs/tags", StringComparison.InvariantCultureIgnoreCase);
-
 }


[AVCamBarcode] handle runtime session error


renaming

renaming

--- osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs
+++ osu.Desktop.VisualTests/Tests/TestCaseBeatmapDetails.cs
@@ -44,10 +44,10 @@
                 },
             });

-            AddRepeatStep("new retry/fail values", newRetryAndFailValues, 10);
+            AddRepeatStep("new fail values", newRetryAndFailValues, 10);
             AddStep("new ratings", () => details.Ratings = Enumerable.Range(1, 10));
-            AddStep("remove retries and fails", () => details.Retries = null );
-            AddStep("remove ratings", () => details.Ratings = null);
+            AddStep("remove fails", () => details.Fails = null );
+            AddStep("remove ratings", () => details.Ratings = null );
         }

         private int lastRange = 1;


Update TestCase

Update TestCase

--- osu.Framework.VisualTests/Tests/TestCaseDynamicDepth.cs
+++ osu.Framework.VisualTests/Tests/TestCaseDynamicDepth.cs
@@ -5,8 +5,8 @@
 using OpenTK.Graphics;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
+using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.Sprites;
-using osu.Framework.MathUtils;
 using osu.Framework.Testing;

 namespace osu.Framework.VisualTests.Tests


Reduce test range as to not hit spin cat

--- osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs
+++ osu.Game.Rulesets.Osu.Tests/TestSceneSpinnerRotation.cs
@@ -164,13 +164,13 @@
         {
             double estimatedSpm = 0;

-            addSeekStep(2500);
+            addSeekStep(1000);
             AddStep("retrieve spm", () => estimatedSpm = drawableSpinner.SpmCounter.SpinsPerMinute);

-            addSeekStep(5000);
+            addSeekStep(2000);
             AddAssert("spm still valid", () => Precision.AlmostEquals(drawableSpinner.SpmCounter.SpinsPerMinute, estimatedSpm, 1.0));

-            addSeekStep(2500);
+            addSeekStep(1000);
             AddAssert("spm still valid", () => Precision.AlmostEquals(drawableSpinner.SpmCounter.SpinsPerMinute, estimatedSpm, 1.0));
         }


Inherit `SearchTextBox` instead

Inherit `SearchTextBox` instead

--- osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs
+++ osu.Game/Graphics/UserInterface/ShearedSearchTextBox.cs
@@ -8,14 +8,11 @@
 using osu.Framework.Graphics.Shapes;
 using osu.Framework.Graphics.Sprites;
 using osu.Framework.Graphics.UserInterface;
-using osu.Framework.Input;
-using osu.Framework.Input.Events;
 using osu.Game.Graphics.Sprites;
 using osu.Game.Overlays;
 using osu.Game.Overlays.Mods;
 using osuTK;
 using osuTK.Graphics;
-using osuTK.Input;

 namespace osu.Game.Graphics.UserInterface
 {
@@ -113,9 +110,8 @@

         public override bool HandleNonPositionalInput => TextBox.HandleNonPositionalInput;

-        private class SearchTextBox : FocusedTextBox
+        private class InnerSearchTextBox : SearchTextBox
         {
-            protected virtual bool AllowCommit => false;

             [BackgroundDependencyLoader]
             private void load(OverlayColourProvider colourProvider)
@@ -136,58 +132,6 @@
                 AutoSizeAxes = Axes.Both,
                 Child = new OsuSpriteText { Text = c.ToString(), Font = OsuFont.GetFont(size: 20, weight: FontWeight.SemiBold) },
             };
-
-            public override bool OnPressed(KeyBindingPressEvent<PlatformAction> e)
-            {
-                switch (e.Action)
-                {
-                    case PlatformAction.MoveBackwardLine:
-                    case PlatformAction.MoveForwardLine:
-                    // Shift+delete is handled via PlatformAction on macOS. this is not so useful in the context of a SearchTextBox
-                    // as we do not allow arrow key navigation in the first place (ie. the caret should always be at the end of text)
-                    // Avoid handling it here to allow other components to potentially consume the shortcut.
-                    case PlatformAction.DeleteForwardChar:
-                        return false;
-                }
-
-                return base.OnPressed(e);
-            }
-
-            protected override bool OnKeyDown(KeyDownEvent e)
-            {
-                if (!e.ControlPressed && !e.ShiftPressed)
-                {
-                    switch (e.Key)
-                    {
-                        case Key.Left:
-                        case Key.Right:
-                        case Key.Up:
-                        case Key.Down:
-                            return false;
-                    }
-                }
-
-                if (!AllowCommit)
-                {
-                    switch (e.Key)
-                    {
-                        case Key.KeypadEnter:
-                        case Key.Enter:
-                            return false;
-                    }
-                }
-
-                if (e.ShiftPressed)
-                {
-                    switch (e.Key)
-                    {
-                        case Key.Delete:
-                            return false;
-                    }
-                }
-
-                return base.OnKeyDown(e);
-            }
         }
     }
 }


Fixing errors

Fixing errors

--- osu.Game/Overlays/KeyBinding/RestorableKeyBindingRow.cs
+++ osu.Game/Overlays/KeyBinding/RestorableKeyBindingRow.cs
@@ -41,6 +41,12 @@
             AutoSizeAxes = Axes.Y;
             Padding = new MarginPadding { Right = SettingsPanel.CONTENT_MARGINS };

+            KeyBindingRow = new KeyBindingRow(key, bindings.Where(b => ((int)b.Action).Equals((int)key)))
+            {
+                AllowMainMouseButtons = ruleset != null,
+                Defaults = defaults
+            };
+
             InternalChildren = new Drawable[]
             {
                 new RestoreDefaultValueButton<bool>
@@ -53,11 +59,7 @@
                     RelativeSizeAxes = Axes.X,
                     AutoSizeAxes = Axes.Y,
                     Padding = new MarginPadding { Left = SettingsPanel.CONTENT_MARGINS },
-                    Child = KeyBindingRow = new KeyBindingRow(key, bindings.Where(b => ((int)b.Action).Equals((int)key)))
-                    {
-                        AllowMainMouseButtons = ruleset != null,
-                        Defaults = defaults
-                    }
+                    Child = KeyBindingRow
                 },
             };
         }


Fixes an issue where RGB to HSL conversion produces an incorrect response for purple hues.


味方召喚調整

味方召喚調整

--- Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs
+++ Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs
@@ -10,7 +10,6 @@

 namespace Inferno.InfernoScripts.Parupunte.Scripts
 {
-    [ParupunteDebug(true)]
     class SpawnFriend :ParupunteScript
     {
         private ChaosModeWeapons weapons = new ChaosModeWeapons();
@@ -24,7 +23,7 @@

         public override void OnStart()
         {
-            ReduceCounter = new ReduceCounter(30 * 1000);
+            ReduceCounter = new ReduceCounter(20 * 1000);
             AddProgressBar(ReduceCounter);
             foreach (var i in Enumerable.Range(0,4))
             {
@@ -36,6 +35,13 @@
                 ParupunteEnd();
             });

+            this.UpdateAsObservable
+                .Where(_ => core.PlayerPed.IsDead)
+                .FirstOrDefault()
+                .Subscribe(_ =>
+                {
+                    ParupunteEnd();
+                });
         }

         protected override void OnFinished()


Mvc - CrudControllerBase - změna GetEntity z public na protected

--- JezekT.AspNetCore.Mvc/Controllers/CrudControllerBase.cs
+++ JezekT.AspNetCore.Mvc/Controllers/CrudControllerBase.cs
@@ -16,15 +16,22 @@
         protected IMapper Mapper { get; }

+        protected virtual async Task<T> GetEntity(TId id)
+        {
+            return await Service.GetByIdAsync(id);
+        }
+
+        protected virtual TViewModel GetViewModel(T obj)
+        {
+            return Mapper.Map<T, TViewModel>(obj);
+        }
+
+
         public virtual ActionResult Index()
         {
             return View();
         }

-        public virtual async Task<T> GetEntity(TId id)
-        {
-            return await Service.GetByIdAsync(id);
-        }

         public virtual async Task<IActionResult> Details(TId id)
         {
@@ -100,13 +107,7 @@
             return View(GetViewModel(await Service.GetByIdAsync(id)));
         }

-
-        protected virtual TViewModel GetViewModel(T obj)
-        {
-            return Mapper.Map<T, TViewModel>(obj);
-        }
-
-
+
         protected CrudControllerBase(ICrudService<T, TId> service, IMapper mapper)
         {
             if (service == null || mapper == null) throw new ArgumentNullException();


Explicitly seal Equals+GetHashCode

Explicitly seal Equals+GetHashCode

--- ValueUtils/ValueObject.cs
+++ ValueUtils/ValueObject.cs
@@ -29,11 +29,11 @@
                 throw new NotSupportedException("Value objects must be sealed.");
         }

-        public override bool Equals(object obj) { return obj is T && equalsFunc((T)this, (T)obj); }
+        public sealed override bool Equals(object obj) { return obj is T && equalsFunc((T)this, (T)obj); }

         public bool Equals(T obj) { return obj != null && equalsFunc((T)this, obj); }

-        public override int GetHashCode() { return hashFunc((T)this); }
+        public sealed override int GetHashCode() { return hashFunc((T)this); }

         public static bool operator !=(ValueObject<T> a, T b) {
             return (object)a != b