Use the GetTypeInfo() extension method.

Use the GetTypeInfo() extension method.

--- src/NUnitFramework/framework/Constraints/Constraint.cs
+++ src/NUnitFramework/framework/Constraints/Constraint.cs
@@ -22,8 +22,10 @@
 // ***********************************************************************

 using NUnit.Framework.Internal;
+using NUnit.Compatibility;
 using System.Collections;
 using System;
+using System.Reflection;

 namespace NUnit.Framework.Constraints
 {
@@ -56,7 +58,7 @@
             {
                 var type = this.GetType();
                 var displayName = type.Name;
-                if (type.IsGenericType)
+                if (type.GetTypeInfo().IsGenericType)
                     displayName = displayName.Substring(0, displayName.Length - 2);
                 if (displayName.EndsWith("Constraint", StringComparison.Ordinal))
                     displayName = displayName.Substring(0, displayName.Length - 10);


make bit mixing function to mix better

make bit mixing function to mix better

--- src/NonBlocking/ConcurrentDictionary/DictionaryImpl.cs
+++ src/NonBlocking/ConcurrentDictionary/DictionaryImpl.cs
@@ -77,11 +77,12 @@

         private static int MixAndMask(uint h, int lenMask)
         {
-            // Fast rotation combiner with fixed seed.
-            // In case if "rol 5" pattern is not recognized, do the bigger shift first (could be slower).
-            uint rol5 = (h >> 27) | (h << 5);
-            h = (rol5 + h) ^ 0xbeefbeef;
-
+            // smudge the bits a little
+            // using algo from: http://burtleburtle.net/bob/hash/integer.html
+            h ^= (h >> 4);
+            h += (h << 5);
+            h ^= (h >> 11);
+
             return (int)h & lenMask;
         }


Fix failing test on Linux

Fix failing test on Linux

--- src/Oocx.ACME.Tests/Serialization/RegistrationTests.cs
+++ src/Oocx.ACME.Tests/Serialization/RegistrationTests.cs
@@ -45,7 +45,7 @@
   ""agreement"": ""https://example.com/acme/terms"",
   ""authorizations"": ""https://example.com/acme/reg/1/authz"",
   ""certificates"": ""https://example.com/acme/reg/1/cert""
-}", json);
+}".Replace("\r\n", "\n"), json.Replace("\r\n", "\n"));

         }
     }


Rename Change email admin menu (#7897)

Rename Change email admin menu (#7897)

--- src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs
+++ src/OrchardCore.Modules/OrchardCore.Users/AdminMenu.cs
@@ -32,7 +32,7 @@
                             .LocalNav()
                          )
                         .Add(S["Settings"], settings => settings
-                            .Add(S["Login"], S["Login"].PrefixPosition(), login => login
+                            .Add(S["User Login"], S["User Login"].PrefixPosition(), login => login
                                 .Permission(Permissions.ManageUsers)
                                 .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = LoginSettingsDisplayDriver.GroupId })
                                 .LocalNav()
@@ -64,7 +64,7 @@
             builder
                 .Add(S["Security"], security => security
                     .Add(S["Settings"], settings => settings
-                        .Add(S["Email"], S["Email"].PrefixPosition(), registration => registration
+                        .Add(S["User Change email"], S["User Change email"].PrefixPosition(), registration => registration
                             .Permission(Permissions.ManageUsers)
                             .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ChangeEmailSettingsDisplayDriver.GroupId })
                             .LocalNav()
@@ -94,7 +94,7 @@
             builder
                 .Add(S["Security"], security => security
                     .Add(S["Settings"], settings => settings
-                        .Add(S["Registration"], S["Registration"].PrefixPosition(), registration => registration
+                        .Add(S["User Registration"], S["User Registration"].PrefixPosition(), registration => registration
                             .Permission(Permissions.ManageUsers)
                             .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = RegistrationSettingsDisplayDriver.GroupId })
                             .LocalNav()
@@ -124,7 +124,7 @@
             builder
                 .Add(S["Security"], security => security
                     .Add(S["Settings"], settings => settings
-                        .Add(S["Reset password"], S["Reset password"].PrefixPosition(), password => password
+                        .Add(S["User Reset password"], S["User Reset password"].PrefixPosition(), password => password
                             .Permission(Permissions.ManageUsers)
                             .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = ResetPasswordSettingsDisplayDriver.GroupId })
                             .LocalNav()


MakeNetworkServer force close from another thread

--- src/Platform.Network.ExtensibleServer/NetworkServer.cs
+++ src/Platform.Network.ExtensibleServer/NetworkServer.cs
@@ -92,13 +92,8 @@
 		{
 			if (taskState == TaskState.Stopped || taskState == TaskState.Finished || taskState == TaskState.Paused)
 			{
-				try
-				{
-					tcpListener.Stop();
-				}
-				catch
-				{
-				}
+				ActionUtils.IgnoreExceptions(tcpListener.Stop);
+				ActionUtils.IgnoreExceptions(tcpListener.Server.Close);
 			}

 			return base.RequestTaskState(taskState, timeout);


ColorFlashTween support Image now.

ColorFlashTween support Image now.

--- sources/Assets/Scripts/Utils/Tweens/ColorFlashTween.cs
+++ sources/Assets/Scripts/Utils/Tweens/ColorFlashTween.cs
@@ -1,10 +1,12 @@
 using UnityEngine;
+using UnityEngine.UI;

 namespace Assets.Scripts.Utils.Tweens
 {
     public class ColorFlashTween : TweenBase
     {
         private SpriteRenderer _spriteRenderer;
+        private Image _image;
         private Color _startColor;
         private Color _targetColor;

@@ -18,16 +20,26 @@
         protected override void OnStart()
         {
             _spriteRenderer = gameObject.GetComponent<SpriteRenderer>();
-            _startColor = _spriteRenderer.color;
+            if(_spriteRenderer != null)
+                _startColor = _spriteRenderer.color;
+
+            _image = gameObject.GetComponent<Image>();
+            if (_image != null)
+                _startColor = _image.color;
         }

         protected override void UpdateValue(float time)
         {
             time = EaseFunc(0f, 1f, time);
-            if (time <= 0.5f)
-                _spriteRenderer.color = Color.Lerp(_startColor, _targetColor, time*2);
-            else
-                _spriteRenderer.color = Color.Lerp(_targetColor, _startColor, (time - 0.5f)*2);
+            Color color = time <= 0.5f
+                ? Color.Lerp(_startColor, _targetColor, time*2)
+                : Color.Lerp(_targetColor, _startColor, (time - 0.5f)*2);
+
+            if (_spriteRenderer != null)
+                _spriteRenderer.color = color;
+
+            if (_image != null)
+                _image.color = color;
         }
     }
 }


Fix warning

Fix warning

--- UdpTool/MainForm.cs
+++ UdpTool/MainForm.cs
@@ -22,7 +22,7 @@
             // selected interface has ceased to exist
             if (udpClient != null)
             {
-                Close();
+                CloseUdpClient();
             }
         }

@@ -217,7 +217,7 @@
             }
         }

-        private void Close()
+        private void CloseUdpClient()
         {
             udpClient.Close();
             udpClient = null;
@@ -231,7 +231,7 @@

         private void close_Click(object sender, EventArgs e)
         {
-            Close();
+            CloseUdpClient();
         }
     }
 }


一旦全てのテストをコメントアウト

一旦全てのテストをコメントアウト

まずはコンストラクタ動作のみ確認するため。
実装ごとにコメントアウトをひとつづつ外していきます

--- UnitTest/UrlTest.cs
+++ UnitTest/UrlTest.cs
@@ -25,28 +25,28 @@
       var url = new Sdx.Web.Url("http://example.com/path/to/api?foo=bar&hoge=huga");

       //コンストラクタの解析が意図通りに行われているか、各部品ごとに確認
-      Assert.Equal("example.com", url.GetDomain());
-      Assert.Equal(Sdx.Web.Url.Protocol.Http, url.GetProtocol());
-      Assert.Equal("bar", url.GetParam("foo"));
-      Assert.Equal("huga", url.GetParam("hoge"));
-      Assert.Equal("/path/to/api", url.GetPath());
+      //Assert.Equal("example.com", url.GetDomain());
+      //Assert.Equal(Sdx.Web.Url.Protocol.Http, url.GetProtocol());
+      //Assert.Equal("bar", url.GetParam("foo"));
+      //Assert.Equal("huga", url.GetParam("hoge"));
+      //Assert.Equal("/path/to/api", url.GetPath());

       //新しくパラメータを追加した場合、正しくクエリが生成されているか
-      url.SetParam("key", "value");
-      Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());
+      //url.SetParam("key", "value");
+      //Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());

       //Setterではなくコンストラクタの引数にパラメータを渡した場合の挙動
       //オブジェクトが持つデータ自体は変わらないようにする
-      var param = new Dictionary<string, string>();
-      param["new"] = "newValue";
-      Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value&new=newValue", url.Build(param));
-      Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());
+      //var param = new Dictionary<string, string>();
+      //param["new"] = "newValue";
+      //Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value&new=newValue", url.Build(param));
+      //Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());

       //コンストラクタの引数に配列を渡した場合の挙動。指定したキーがクエリから除かれているようにする。
       //同じくオブジェクトが持つデータ自体が変わらないようにする
-      var array = new String[] { "key" };
-      Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga", url.Build(array));
-      Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());
+      //var array = new String[] { "key" };
+      //Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga", url.Build(array));
+      //Assert.Equal("http://example.com/path/to/api?foo=bar&hoge=huga&key=value", url.Build());
     }

     [Fact]


呼び出し元情報も出力するようにした。

呼び出し元情報も出力するようにした。

--- Util/ThreadDebug.cs
+++ Util/ThreadDebug.cs
@@ -1,44 +1,89 @@
 using System;
 using System.Diagnostics;
+using System.Runtime.CompilerServices;
 using System.Threading;

 namespace RucheHome.Util
 {
     /// <summary>
-    /// スレッドID付きのデバッグ出力を行う静的クラス。
+    /// スレッドID、呼び出し元情報付きのデバッグ出力を行う静的クラス。
     /// </summary>
     public static class ThreadDebug
     {
         /// <summary>
-        /// メッセージと改行をデバッグ出力する。
+        /// スレッドID、呼び出し元情報を付けてメッセージと改行をデバッグ出力する。
         /// </summary>
         /// <param name="message">メッセージ。</param>
+        /// <param name="member">
+        /// 呼び出し元メンバ名。 CallerMemberNameAttribute により自動設定される。
+        /// </param>
+        /// <param name="file">
+        /// 呼び出し元ファイル名。 CallerFilePathAttribute により自動設定される。
+        /// </param>
+        /// <param name="line">
+        /// 呼び出し元行番号。 CallerLineNumberAttribute により自動設定される。
+        /// </param>
         [Conditional("DEBUG")]
-        public static void WriteLine(string message)
+        public static void WriteLine(
+            string message,
+            [CallerMemberName] string member = "",
+            [CallerFilePath] string file = "",
+            [CallerLineNumber] int line = 0)
         {
-            var tid = @"[TID:" + Thread.CurrentThread.ManagedThreadId + @"] ";
-            Debug.WriteLine(tid + message);
+            var tid = @"[TID:" + Thread.CurrentThread.ManagedThreadId + @"]";
+            var caller = @"[" + member + @"@" + file + @":" + line + @"]";
+
+            var msg = message ?? "";
+            if (msg != "")
+            {
+                msg = " " + msg + " ";
+            }
+
+            Debug.WriteLine(tid + msg + caller);
         }

         /// <summary>
-        /// 値と改行をデバッグ出力する。
+        /// スレッドID、呼び出し元情報を付けて値と改行をデバッグ出力する。
         /// </summary>
         /// <param name="value">値。</param>
+        /// <param name="member">
+        /// 呼び出し元メンバ名。 CallerMemberNameAttribute により自動設定される。
+        /// </param>
+        /// <param name="file">
+        /// 呼び出し元ファイル名。 CallerFilePathAttribute により自動設定される。
+        /// </param>
+        /// <param name="line">
+        /// 呼び出し元行番号。 CallerLineNumberAttribute により自動設定される。
+        /// </param>
         [Conditional("DEBUG")]
-        public static void WriteLine(object value)
+        public static void WriteLine(
+            object value,
+            [CallerMemberName] string member = "",
+            [CallerFilePath] string file = "",
+            [CallerLineNumber] int line = 0)
         {
-            WriteLine(value?.ToString() ?? @"(null)");
+            WriteLine(value?.ToString() ?? @"(null)", member, file, line);
         }

         /// <summary>
-        /// フォーマット文字列と改行をデバッグ出力する。
+        /// スレッドID、呼び出し元情報と改行をデバッグ出力する。
         /// </summary>
-        /// <param name="format">フォーマット。</param>
-        /// <param name="args">パラメータ配列。</param>
+        /// <param name="member">
+        /// 呼び出し元メンバ名。 CallerMemberNameAttribute により自動設定される。
+        /// </param>
+        /// <param name="file">
+        /// 呼び出し元ファイル名。 CallerFilePathAttribute により自動設定される。
+        /// </param>
+        /// <param name="line">
+        /// 呼び出し元行番号。 CallerLineNumberAttribute により自動設定される。
+        /// </param>
         [Conditional("DEBUG")]
-        public static void WriteLine(string format, params object[] args)
+        public static void WriteLine(
+            [CallerMemberName] string member = "",
+            [CallerFilePath] string file = "",
+            [CallerLineNumber] int line = 0)
         {
-            WriteLine(string.Format(format, args));
+            WriteLine("", member, file, line);
         }
     }
 }


shift sky render to last of non-translucents


Removed debug logging

Removed debug logging

--- src/SFA.DAS.Commitments.Api/App_Start/ApiKeyHandler.cs
+++ src/SFA.DAS.Commitments.Api/App_Start/ApiKeyHandler.cs
@@ -39,25 +39,12 @@

                 var headerValue = request.Headers.GetValues(_apiKeyHeaderName).First();

-                Logger.Debug($"Selected header value: {headerValue}, Total Header count: {request.Headers.GetValues(_apiKeyHeaderName).Count()}");
-
-                foreach (var item in request.Headers.GetValues(_apiKeyHeaderName))
-                {
-                    Logger.Debug($"Auth Header Value: {item}");
-                }
-
-                Logger.Debug($"Secret: {_apiKeySecret}");
-                Logger.Debug($"HeaderName: {_apiKeyHeaderName}");
-                Logger.Debug($"ApiIssuer: {_apiIssuer}");
-                Logger.Debug($"_apiAudiences: {string.Join(",", _apiAudiences)}");
-
                 ValidateKeyAndSetPrincipal(headerValue);

                 return base.SendAsync(request, cancellationToken);
             }
             catch (Exception ex)
             {
-                Logger.Error(ex, "Failed authentication");
                 var invalidResponse = new HttpResponseMessage(HttpStatusCode.BadRequest) { ReasonPhrase = ex.GetType().Name };
                 var invalidTsc = new TaskCompletionSource<HttpResponseMessage>();
                 invalidTsc.SetResult(invalidResponse);


sorting

sorting

--- Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs
+++ Tests/Cosmos.TestRunner.Core/Engine.Helpers.cs
@@ -170,8 +170,8 @@
                 kernelFileName,
                 Assembly.Load(new AssemblyName("Cosmos.Core_Plugs")).Location,
                 Assembly.Load(new AssemblyName("Cosmos.Core_Asm")).Location,
-                Assembly.Load(new AssemblyName("Cosmos.Debug.Kernel.Plugs.Asm")).Location,
-                Assembly.Load(new AssemblyName("Cosmos.System_Plugs")).Location
+                Assembly.Load(new AssemblyName("Cosmos.System_Plugs")).Location,
+                Assembly.Load(new AssemblyName("Cosmos.Debug.Kernel.Plugs.Asm")).Location
             };

             var xArgs = new List<string>


Add missing token translations

Add missing token translations

--- VisualRust/Utils.cs
+++ VisualRust/Utils.cs
@@ -84,6 +84,8 @@
             { RustLexer.COMMENT, RustTokenTypes.COMMENT },
             { RustLexer.BLOCK_COMMENT, RustTokenTypes.COMMENT },
             { RustLexer.DOC_BLOCK_COMMENT, RustTokenTypes.DOC_COMMENT },
+            { RustLexer.QUESTION, RustTokenTypes.OP },
+            { RustLexer.UTF8_BOM, RustTokenTypes.WHITESPACE }
         };

         // These keywords are from rustc /src/libsyntax/parse/token.rs, module keywords


Added introduction link to the header of the generated files

--- GitHubServices/BusinessLogic/TagPageCreator/TagCollector.cs
+++ GitHubServices/BusinessLogic/TagPageCreator/TagCollector.cs
@@ -197,7 +197,7 @@
         {
             sb.AppendLine("# Code Quality & Readability");
             sb.AppendLine("*A site by Kasper B. Graversen*");
-            sb.AppendLine("
[[All categories]](https://github.com/kbilsted/CodeQualityAndReadability/blob/master/AllTags.md) [[All articles]](https://github.com/kbilsted/CodeQualityAndReadability/blob/master/AllArticles.md)");
+            sb.AppendLine("
[[Introduction]](https://github.com/kbilsted/CodeQualityAndReadability) [[All categories]](https://github.com/kbilsted/CodeQualityAndReadability/blob/master/AllTags.md) [[All articles]](https://github.com/kbilsted/CodeQualityAndReadability/blob/master/AllArticles.md)");

             sb.AppendLine();
         }


Small fix to reactions.

Small fix to reactions.

--- Homunculus/MarekMotykaBot/Services/MessageScannerService.cs
+++ Homunculus/MarekMotykaBot/Services/MessageScannerService.cs
@@ -87,7 +87,7 @@
 			if (!message.Author.IsBot)
 			{
 				await RemoveReactionAfterTriggerMissing(context, message, await AddReactionAfterTriggerWord(context, message, _marekFaceWords, "marekface"), "marekface");
-				await RemoveReactionAfterTriggerMissing(context, message, await AddReactionAfterTriggerWord(context, message, _marekFaceWords, "skeletor"), "skeletor");
+				await RemoveReactionAfterTriggerMissing(context, message, await AddReactionAfterTriggerWord(context, message, _skeletorWords, "skeletor"), "skeletor");
 				await RemoveReactionAfterTriggerMissing(context, message, await AddReactionAfterTriggerWord(context, message, _takeuchiWords, "takeuchi"), "takeuchi");
                 await RemoveReactionAfterTriggerMissing(context, message, await AddReactionAfterTriggerWord(context, message, _ziewaczWords, "ziewface"), "ziewface");
             }


Fixed timestamp of Marek's last message (UTC to local time).

--- Homunculus/MarekMotykaBot/Services/MessageScannerService.cs
+++ Homunculus/MarekMotykaBot/Services/MessageScannerService.cs
@@ -270,7 +270,7 @@
 				LastMarekMessage lastMessage = _serializer.LoadSingleFromFile<LastMarekMessage>("marekLastMessage.json");

 				lastMessage.MessageContent = message.Content;
-				lastMessage.DatePosted = message.Timestamp.DateTime;
+				lastMessage.DatePosted = message.Timestamp.DateTime.ToLocalTime();

 				_serializer.SaveSingleToFile("marekLastMessage.json", lastMessage);
 			}


Added questioning before exit + fixed minor bug when playing again after being hit (added isHit = false again)

--- TheGiraffeGame/TheGiraffeGame/StartingPoint.cs
+++ TheGiraffeGame/TheGiraffeGame/StartingPoint.cs
@@ -2,13 +2,13 @@
 {
     using System;
     using System.Collections.Generic;
+    using System.Diagnostics;
+    using System.IO;
     using System.Linq;
     using System.Text;
     using System.Threading;
-    using System.Diagnostics;
-    using System.IO;
+
     using TheGiraffeGame;
-

     class StartingPoint
     {
@@ -130,13 +130,28 @@

         private static void Exit()
         {
-            Environment.Exit(0);
+            Console.Clear();
+            Console.SetCursorPosition(10, Console.WindowHeight / 2);
+            Console.CursorVisible = true;
+
+            Console.Write("Are you sure you want to exit the game (y/n)? ");
+
+            string answer = Console.ReadLine();
+            if (answer.ToLower() == "y" || answer.ToLower() == "yes")
+            {
+                Environment.Exit(0);
+            }
+            else
+            {
+                Console.CursorVisible = false;
+                ShowMenu();
+            }
         }

         private static void InteractiveMenu()
         {
             char arrowSymbol = '*';
-            int consoleCol= 23;
+            int consoleCol = 23;
             int consoleRow = 10;
             while (true)
             {
@@ -336,7 +351,7 @@
         {
             SetDefaultForegroundColor(defaultColor);
             Console.SetCursorPosition(45, 22);
-            Console.WriteLine(">>>  {0}  <<<",currentLevel);
+            Console.WriteLine(">>>  {0}  <<<", currentLevel);
             Console.SetCursorPosition(45, 23);
             Console.WriteLine(">>>  Score: {0}  <<<", score);
             Console.SetCursorPosition(45, 24);
@@ -391,6 +406,7 @@

                 if (isHit)
                 {
+                    isHit = false;
                     stopwatch.Stop();
                     EmptyParticlesList();
                     Console.Clear();
@@ -419,7 +435,7 @@
         private static void SaveScoreToTextFile()
         {
             //Saving the score to text file ->>>
-            Console.WriteLine("Your managed to stay alive for: {0}", timeAlive);
+            Console.WriteLine("You managed to stay alive for: {0}", timeAlive);
             Console.WriteLine(@"What is your name, you brave GiraffeWarrior? (score will be saved in TheGiraffeGame\bin\Debug directory)");
             playerName = Console.ReadLine();

@@ -431,7 +447,7 @@

             Console.WriteLine(@"Your score has been saved on your TheGiraffeGame\bin\Debug directory - {0}.txt", playerName);

-//            Thread.Sleep(2000);
+            //            Thread.Sleep(2000);
         }

         private static void SetDefaultForegroundColor(string color)


Fixed indenting

Fixed indenting

--- Tools/Schema.NET.Tool/SchemaSourceGenerator.cs
+++ Tools/Schema.NET.Tool/SchemaSourceGenerator.cs
@@ -26,10 +26,10 @@
             var schemaService = new SchemaService(
                 new IClassOverride[]
                 {
-                        new AddQueryInputPropertyToSearchAction(),
-                        new AddTextTypeToActionTarget(),
-                        new AddNumberTypeToMediaObjectHeightAndWidth(),
-                        new RenameEventProperty(),
+                    new AddQueryInputPropertyToSearchAction(),
+                    new AddTextTypeToActionTarget(),
+                    new AddNumberTypeToMediaObjectHeightAndWidth(),
+                    new RenameEventProperty(),
                 },
                 Array.Empty<IEnumerationOverride>(),
                 schemaRepository,


Update ResizableBuffer.cs

Update ResizableBuffer.cs

Removed lock around the isDisposed property getter. The field is volatile boolean.

--- ToolsAndLibraries/Utilities/ResizableBuffer.cs
+++ ToolsAndLibraries/Utilities/ResizableBuffer.cs
@@ -140,10 +140,7 @@
         {
             get
             {
-                lock (this.syncRoot)
-                {
-                    return this.isDisposed;
-                }
+                return this.isDisposed;
             }
         }


Исправлен Model.User, не проходивший тест

--- VkNet/Model/User.cs
+++ VkNet/Model/User.cs
@@ -822,6 +822,7 @@
 		/// <summary>
 		/// Полномочия руководителя (для Groups.GetMembers)
 		/// </summary>
+		[JsonConverter(typeof(SafetyEnumJsonConverter))]
 		public ManagerRole Role { get; set; }

 		#endregion


Round away thousandths when changing the time

--- TwitchPlaysAssembly/Src/UI/TwitchBombHandle.cs
+++ TwitchPlaysAssembly/Src/UI/TwitchBombHandle.cs
@@ -188,7 +188,8 @@
 							if (!valid) return null;
 						}

-						if (Math.Abs(time) < (1f / 60f)) break;
+						time = (float) Math.Round((decimal) time, 2, MidpointRounding.AwayFromZero);
+						if (Math.Abs(time) == 0) break;
 						if (negitive) time = -time;

 					    bombCommander.timerComponent.TimeRemaining = bombCommander.CurrentTimer + time;


Clean up leftover microsoft-pdb comments in leafkind.

--- src/AsmResolver.Symbols.Pdb/Leaves/CodeViewLeafKind.cs
+++ src/AsmResolver.Symbols.Pdb/Leaves/CodeViewLeafKind.cs
@@ -5,12 +5,12 @@
 /// </summary>
 public enum CodeViewLeafKind : ushort
 {
-#pragma warning disable CS1591
     /// <summary>
     /// This is not really a type defined in PDB spec, but is used to indicate simple types.
     /// </summary>
     SimpleType = 0xffff,

+#pragma warning disable CS1591
     Modifier16T = 0x0001,
     Pointer16T = 0x0002,
     Array16T = 0x0003,
@@ -29,12 +29,10 @@
     Nottran = 0x0010,
     DimArray16T = 0x0011,
     VftPath16T = 0x0012,
-    PreComp16T = 0x0013, // not referenced from symbol
-    EndPreComp = 0x0014, // not referenced from symbol
-    Oem16T = 0x0015, // oem definable type string
-    TypeServerSt = 0x0016, // not referenced from symbol
-
-    // leaf indices starting records but referenced only from type records
+    PreComp16T = 0x0013,
+    EndPreComp = 0x0014,
+    Oem16T = 0x0015,
+    TypeServerSt = 0x0016,

     Skip16T = 0x0200,
     ArgList16T = 0x0201,
@@ -65,8 +63,6 @@
     OneMethod16T = 0x040c,
     VFuncOff16T = 0x040d,

-// 32-bit type index versions of leaves, all have the 0x1000 bit set
-//
     Ti16Max = 0x1000,

     Modifier = 0x1001,
@@ -82,12 +78,10 @@
     BArray = 0x100b,
     DimArraySt = 0x100c,
     VftPath = 0x100d,
-    PreCompSt = 0x100e, // not referenced from symbol
-    Oem = 0x100f, // oem definable type string
-    AliasSt = 0x1010, // alias (typedef) type
-    Oem2 = 0x1011, // oem definable type string
-
-    // leaf indices starting records but referenced only from type records
+    PreCompSt = 0x100e,
+    Oem = 0x100f,
+    AliasSt = 0x1010,
+    Oem2 = 0x1011,

     Skip = 0x1200,
     ArgList = 0x1201,
@@ -118,11 +112,9 @@
     MemberModifySt = 0x140e,
     ManagedSt = 0x140f,

-    // Types w/ SZ names
-
     StMax = 0x1500,

-    TypeServer = 0x1501, // not referenced from symbol
+    TypeServer = 0x1501,
     Enumerate = 0x1502,
     Array = 0x1503,
     Class = 0x1504,
@@ -130,8 +122,8 @@
     Union = 0x1506,
     Enum = 0x1507,
     DimArray = 0x1508,
-    PreComp = 0x1509, // not referenced from symbol
-    Alias = 0x150a, // alias (typedef) type
+    PreComp = 0x1509,
+    Alias = 0x150a,
     DefArg = 0x150b,
     FriendFcn = 0x150c,
     Member = 0x150d,
@@ -144,7 +136,7 @@
     Managed = 0x1514,
     TypeServer2 = 0x1515,

-    StridedArray = 0x1516, // same as ARRAY, but with stride between adjacent elements
+    StridedArray = 0x1516,
     Hlsl = 0x1517,
     ModifierEx = 0x1518,
     Interface = 0x1519,
@@ -152,25 +144,22 @@
     Vector = 0x151b,
     Matrix = 0x151c,

-    VFTable = 0x151d, // a virtual function table
+    VFTable = 0x151d,
     EndOfLeafRecord = VFTable,

-    TypeLast, // one greater than the last type record
+    TypeLast,
     TypeMax = TypeLast - 1,

-    FuncId = 0x1601, // global func ID
-    MFuncId = 0x1602, // member func ID
-    Buildinfo = 0x1603, // build info: tool, version, command line, src/pdb file
-    SubstrList = 0x1604, // similar to ARGLIST, for list of sub strings
-    StringId = 0x1605, // string ID
-
-    UdtSrcLine = 0x1606, // source and line on where an UDT is defined
-    // only generated by compiler
-
-    UdtModSrcLine = 0x1607, // module, source and line on where an UDT is defined
-    // only generated by linker
-
-    IdLast, // one greater than the last ID record
+    FuncId = 0x1601,
+    MFuncId = 0x1602,
+    Buildinfo = 0x1603,
+    SubstrList = 0x1604,
+    StringId = 0x1605,
+
+    UdtSrcLine = 0x1606,
+    UdtModSrcLine = 0x1607,
+
+    IdLast,
     IdMax = IdLast - 1,

     Numeric = 0x8000,


Refactored HtmlHelperExtension.GetAssemblyVersion

Refactored HtmlHelperExtension.GetAssemblyVersion member to only return
the Major.Minor.Build values

--- Typeset.Web/Extensions/HtmlHelperExtensions.cs
+++ Typeset.Web/Extensions/HtmlHelperExtensions.cs
@@ -13,11 +13,12 @@
 {
     public static class HtmlHelperExtensions
     {
-        private static string AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
+        private static Version AssemblyVersion = Assembly.GetExecutingAssembly().GetName().Version;
+        private static string AssemblyVersionString = string.Format("{0}.{1}.{2}", AssemblyVersion.Major, AssemblyVersion.Minor, AssemblyVersion.Build);

         public static string GetAssemblyVersion(this HtmlHelper helper)
         {
-            return AssemblyVersion;
+            return AssemblyVersionString;
         }

         public static UrlHelper UrlHelper(this HtmlHelper helper)


Reverted 1 Contains to IndexOf as it was usnig IQueryable

--- UI.MVC4/Controllers/API/ItProjectController.cs
+++ UI.MVC4/Controllers/API/ItProjectController.cs
@@ -70,7 +70,7 @@
         {
             try
             {
-                var items = Repository.Get(x => x.Name.Contains(q) && x.OrganizationId == orgId);
+                var items = Repository.AsQueryable().Where(x => x.Name.IndexOf(q, StringComparison.OrdinalIgnoreCase) != -1 && x.OrganizationId == orgId);

                 return Ok(Map(items));
             }


新增註解

新增註解

新增註解

--- UartOscilloscope/CSharpFiles/UARTConnection.cs
+++ UartOscilloscope/CSharpFiles/UARTConnection.cs
@@ -136,7 +136,7 @@
 			UartComportConnected = NewUartComportConnected;						//	設定UartComportConnected
 		}                                                                       //	結束SetUartComportConnected方法
 		/// <summary>
-		///
+		/// GetUartComportConnected方法用於取得UartComportConnected狀態
 		/// </summary>
 		/// <returns></returns>
 		public bool GetUartComportConnected()									//	GetUartComportConnected方法，用以取得UartComportConnected狀態


Fjerner redirection helt pga. init

Fjerner redirection helt pga. init

--- Umbraco.DefaultDomains/DefaultDomainStartup.cs
+++ Umbraco.DefaultDomains/DefaultDomainStartup.cs
@@ -11,19 +11,20 @@
             base.ApplicationStarted(umbracoApplication, applicationContext);

             var modeString = ConfigurationManager.AppSettings["Umbraco.DefaultDomains.Mode"];
-            var mode = DefaultDomainMode.CanonicalHeader;
+            DefaultDomainMode mode;
             Enum.TryParse(modeString, out mode);

             if (mode == DefaultDomainMode.Redirect)
-                DefaultDomainRedirection.Register();
-            else
-                DefaultDomainCanonicalHeaders.Register(umbracoApplication, applicationContext);
+                throw new Exception("Vi bruker ikke Redirect lenger");
+                //DefaultDomainRedirection.Register();
+
+            DefaultDomainCanonicalHeaders.Register(umbracoApplication, applicationContext);
         }
     }

     public enum DefaultDomainMode
     {
-        Redirect,
-        CanonicalHeader
+        CanonicalHeader,
+        Redirect
     }
 }


Revert "Fixed grenades"

Revert "Fixed grenades"

This reverts commit dd9f3b38736a3649c5c67b3b96f8b0d4e1e397ca.


adding minor note on synchronization issues.

--- Unosquare.FFplayDotNet/MediaElement.Workers.cs
+++ Unosquare.FFplayDotNet/MediaElement.Workers.cs
@@ -338,6 +338,13 @@
                     if ((renderBlock[t].StartTime != LastRenderTime[t] || LastRenderTime[t] == TimeSpan.MinValue)
                         && clockPosition.Ticks >= renderBlock[t].StartTime.Ticks)
                     {
+                        // only render a secondary block if the primary block has been rendered first
+                        // otherwise, wait for the primary block to occur and skip rendering of secondary block.
+                        // TODO: still needs more logic for lip-sync quality sync :)
+                        var skewTime = TimeSpan.FromTicks(renderBlock[t].StartTime.Ticks - LastRenderTime[main].Ticks);
+                        if (t != main && IsPlaying && skewTime.TotalMilliseconds <= 0)
+                            continue;
+
                         // Record the render time
                         LastRenderTime[t] = renderBlock[t].StartTime;

@@ -380,7 +387,6 @@
                         HasMediaEnded = true;
                         RaiseMediaEndedEvent();
                     }
-
                 }
                 else
                 {


Camera behavior sets camera object.

Camera behavior sets camera object.

--- tutorials/using_components/main.cs
+++ tutorials/using_components/main.cs
@@ -12,7 +12,7 @@
 function CameraTemplate::onAdd(%inst) {
    %inst.owner.scopeToClient(%inst.client);
    %inst.scopeToClient(%inst.client);
-   %inst.client.setControlObject(%inst.owner);
+   %inst.client.setCameraObject(%inst.owner);
 }

 //-----------------------------------------------------------------------------


Update WebService1.asmx.cs

Update WebService1.asmx.cs

Added extra parameter reading in TransferFile method

--- WebService1.asmx.cs
+++ WebService1.asmx.cs
@@ -39,6 +39,8 @@
             HttpContext postedContext = HttpContext.Current;
             // Get other parameters in request using Params.Get
             String fileName = postedContext.Request.Params.Get("FileName");
+            String fileIdentifier = postedContext.Request.Params.Get("FileIdentifier");
+            String user = postedContext.Request.Params.Get("UserId");
             HttpFileCollection FilesInRequest = postedContext.Request.Files;

             for(int i = 0; i < FilesInRequest.AllKeys.Length; i++)


half is now half, not all

half is now half, not all

--- NadekoBot.Core/Common/TypeReaders/ShmartNumberTypeReader.cs
+++ NadekoBot.Core/Common/TypeReaders/ShmartNumberTypeReader.cs
@@ -58,7 +58,7 @@
                     args.Result = Cur;
                     break;
                 case "half":
-                    args.Result = Cur;
+                    args.Result = Cur / 2;
                     break;
                 case "max":
                     args.Result = Max;


Remove test collection after the document tests pass.

--- src/Arango/Arango.Tests/ArangoDocumentTests/ArangoDocumentTests.cs
+++ src/Arango/Arango.Tests/ArangoDocumentTests/ArangoDocumentTests.cs
@@ -1,11 +1,12 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using NUnit.Framework;
 using Arango.Client;

 namespace Arango.Tests.ArangoDocumentTests
 {
     [TestFixture()]
-    public class ArangoDocumentTests
+    public class ArangoDocumentTests : IDisposable
     {
         [Test()]
         public void Should_create_and_delete_document()
@@ -158,5 +159,10 @@

             Assert.AreEqual(false, exists);
         }
+
+        public void Dispose()
+        {
+            Database.DeleteTestCollection();
+        }
     }
 }


Localize test message

Localize test message

--- src/Arkivverket.Arkade/Core/Addml/Processes/AnalyseCountRecords.cs
+++ src/Arkivverket.Arkade/Core/Addml/Processes/AnalyseCountRecords.cs
@@ -42,7 +42,7 @@

         public void EndOfFile()
         {
-            _testRun.Add(new TestResult(ResultType.Success, new Location(_currentFlatFile.Definition.FileName), $"RecordCount {_numberRecords}."));
+            _testRun.Add(new TestResult(ResultType.Success, new Location(_currentFlatFile.Definition.FileName), _numberRecords + " " + Resources.Messages.Records));
         }

         public TestRun GetTestRun()


Fixed some goofed up test names

Fixed some goofed up test names

--- Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs
+++ Octokit.Tests/Reactive/ObservablePullRequestsClientTests.cs
@@ -16,7 +16,7 @@
         public class TheGetMethod
         {
             [Fact]
-            public void GetsFromClientIssueMilestone()
+            public void GetsFromClientRepositoryPullRequest()
             {
                 var gitHubClient = Substitute.For<IGitHubClient>();
                 var client = new ObservablePullRequestsClient(gitHubClient);
@@ -41,7 +41,7 @@
         public class TheGetForRepositoryMethod
         {
             [Fact]
-            public void ReturnsEveryPageOfMilestones()
+            public void ReturnsEveryPageOfPullRequests()
             {
                 var firstPageUrl = new Uri("repos/fake/repo/pulls", UriKind.Relative);
                 var secondPageUrl = new Uri("https://example.com/page/2");
@@ -154,7 +154,7 @@
         public class TheCreateMethod
         {
             [Fact]
-            public void CreatesFromClientIssueMilestone()
+            public void CreatesFromClientRepositoryPullRequest()
             {
                 var newPullRequest = new NewPullRequest("some title");
                 var gitHubClient = Substitute.For<IGitHubClient>();
@@ -187,7 +187,7 @@
         public class TheUpdateMethod
         {
             [Fact]
-            public void UpdatesClientIssueMilestone()
+            public void UpdatesClientRepositoryPullRequest()
             {
                 var pullRequestUpdate = new PullRequestUpdate();
                 var gitHubClient = Substitute.For<IGitHubClient>();


Add EntityController GetUrlsByUdis

Add EntityController GetUrlsByUdis

Enables loading multiple URLs in a single request for Media & Documents

--- src/Umbraco.Web/Editors/EntityController.cs
+++ src/Umbraco.Web/Editors/EntityController.cs
@@ -236,6 +236,55 @@
         }

         /// <summary>
+        /// Get entity URLs by UDIs
+        /// </summary>
+        /// <param name="ids">
+        /// A list of UDIs to lookup items by
+        /// </param>
+        /// <param name="culture">The culture to fetch the URL for</param>
+        /// <returns>Dictionary mapping Udi -> Url</returns>
+        /// <remarks>
+        /// We allow for POST because there could be quite a lot of Ids.
+        /// </remarks>
+        [HttpGet]
+        [HttpPost]
+        public IDictionary<Udi, string> GetUrlsByUdis([FromJsonPath] Udi[] ids, string culture = null)
+        {
+            if (ids == null)
+            {
+                throw new HttpResponseException(HttpStatusCode.NotFound);
+            }
+
+            if (ids.Length == 0)
+            {
+                return new Dictionary<Udi, string>();
+            }
+
+            // TODO: PMJ 2021-09-27 - Should GetUrl(Udi) exist as an extension method on UrlProvider/IUrlProvider (in v9)
+            string MediaOrDocumentUrl(Udi udi)
+            {
+                if (udi is not GuidUdi guidUdi)
+                {
+                    return null;
+                }
+
+                return guidUdi.EntityType switch
+                {
+                    Constants.UdiEntityType.Document => UmbracoContext.UrlProvider.GetUrl(guidUdi.Guid, culture: culture ?? ClientCulture()),
+                    // NOTE: If culture is passed here we get an empty string rather than a media item URL WAT
+                    Constants.UdiEntityType.Media => UmbracoContext.UrlProvider.GetMediaUrl(guidUdi.Guid, culture: null),
+                    _ => null
+                };
+            }
+
+            return ids
+                .Select(udi => new {
+                    Udi = udi,
+                    Url = MediaOrDocumentUrl(udi)
+                }).ToDictionary(x => x.Udi, x => x.Url);
+        }
+
+        /// <summary>
         /// Gets the URL of an entity
         /// </summary>
         /// <param name="id">Int id of the entity to fetch URL for</param>


updated PhoneIdServerice.cs for PhoneId API.

--- src/TeleSign.Services.PhoneId/PhoneIdService.cs
+++ src/TeleSign.Services.PhoneId/PhoneIdService.cs
@@ -207,14 +207,14 @@
         /// <param name="ucid"></param>
         /// <param name="phoneidParams"></param>
         /// <returns></returns>
-        public TSResponse PhoneId(string phoneNumber, String ucid, Dictionary<String, String> phoneidParams = null)
-        {
-            CheckArgument.NotNullOrEmpty(phoneNumber, "phoneNumber");
-            TSResponse response = new TSResponse();
-
-            try
-            {
-                response = this.PhoneId(phoneNumber, ucid, phoneidParams);
+        public TSResponse PhoneId(string phoneNumber, Dictionary<String, String> phoneidParams = null)
+        {
+            CheckArgument.NotNullOrEmpty(phoneNumber, "phoneNumber");
+            TSResponse response = new TSResponse();
+
+            try
+            {
+                response = this.PhoneIdRaw(phoneNumber, phoneidParams);
                 return response;
             }
             catch (Exception x)


Remove additional definition of ToolTipText property

--- src/TestCentric/components/Elements/ICommand.cs
+++ src/TestCentric/components/Elements/ICommand.cs
@@ -51,7 +51,5 @@
     public interface ICommand<T> : IViewElement
     {
         event CommandHandler<T> Execute;
-
-        string ToolTipText { get; set; }
     }
 }


fixes the config issue with unit tests

fixes the config issue with unit tests

--- src/Umbraco.Core/Configuration/UmbracoConfig.cs
+++ src/Umbraco.Core/Configuration/UmbracoConfig.cs
@@ -34,38 +34,19 @@
         {
             if (_umbracoSettings == null)
             {
-                var umbracoSettings = ConfigurationManager.GetSection("umbracoConfiguration/settings") as IUmbracoSettingsSection;
-                if (umbracoSettings == null)
-                {
-                    var ex = new ConfigurationErrorsException("Could not load the " + typeof (IUmbracoSettingsSection) + " from config file, ensure the web.config and umbracoSettings.config files are formatted correctly");
-                    LogHelper.Error<UmbracoConfig>("Could not load umbracoSettings.config", ex);
-                    throw ex;
-
-                }
+                var umbracoSettings = ConfigurationManager.GetSection("umbracoConfiguration/settings") as IUmbracoSettingsSection;
                 SetUmbracoSettings(umbracoSettings);
             }

             if (_baseRestExtensions == null)
             {
-                var baseRestExtensions = ConfigurationManager.GetSection("umbracoConfiguration/BaseRestExtensions") as IBaseRestSection;
-                if (baseRestExtensions == null)
-                {
-                    var ex = new ConfigurationErrorsException("Could not load the " + typeof(IBaseRestSection) + " from config file, ensure the web.config and BaseRestExtensions.config files are formatted correctly");
-                    LogHelper.Error<UmbracoConfig>("Could not load BaseRestExtensions.config", ex);
-                    throw ex;
-                }
+                var baseRestExtensions = ConfigurationManager.GetSection("umbracoConfiguration/BaseRestExtensions") as IBaseRestSection;
                 SetBaseRestExtensions(baseRestExtensions);
             }

             if (_dashboardSection == null)
             {
-                var dashboardConfig = ConfigurationManager.GetSection("umbracoConfiguration/dashBoard") as IDashboardSection;
-                if (dashboardConfig == null)
-                {
-                    var ex = new ConfigurationErrorsException("Could not load the " + typeof(IDashboardSection) + " from config file, ensure the web.config and Dashboard.config files are formatted correctly");
-                    LogHelper.Error<UmbracoConfig>("Could not load Dashboard.config", ex);
-                    throw ex;
-                }
+                var dashboardConfig = ConfigurationManager.GetSection("umbracoConfiguration/dashBoard") as IDashboardSection;
                 SetDashboardSettings(dashboardConfig);
             }
         }
@@ -92,6 +73,13 @@
         /// </summary>
         public IDashboardSection DashboardSettings()
         {
+            if (_dashboardSection == null)
+            {
+                var ex = new ConfigurationErrorsException("Could not load the " + typeof(IDashboardSection) + " from config file, ensure the web.config and Dashboard.config files are formatted correctly");
+                LogHelper.Error<UmbracoConfig>("Config error", ex);
+                throw ex;
+            }
+
             return _dashboardSection;
         }

@@ -112,6 +100,13 @@
         /// </summary>
         public IUmbracoSettingsSection UmbracoSettings()
         {
+            if (_umbracoSettings == null)
+            {
+                var ex = new ConfigurationErrorsException("Could not load the " + typeof (IUmbracoSettingsSection) + " from config file, ensure the web.config and umbracoSettings.config files are formatted correctly");
+                LogHelper.Error<UmbracoConfig>("Config error", ex);
+                throw ex;
+            }
+
             return _umbracoSettings;
         }

@@ -126,6 +121,13 @@
         /// </summary>
         public IBaseRestSection BaseRestExtensions()
         {
+            if (_baseRestExtensions == null)
+            {
+                var ex = new ConfigurationErrorsException("Could not load the " + typeof(IBaseRestSection) + " from config file, ensure the web.config and BaseRestExtensions.config files are formatted correctly");
+                LogHelper.Error<UmbracoConfig>("Config error", ex);
+                throw ex;
+            }
+
             return _baseRestExtensions;
         }


Fixes installer breaks with missing app_data/temp/installer folder

--- src/Umbraco.Web/Install/InstallStatusTracker.cs
+++ src/Umbraco.Web/Install/InstallStatusTracker.cs
@@ -37,11 +37,19 @@
         }

         public static void ClearFiles()
-        {
-            var files = Directory.GetFiles(IOHelper.MapPath("~/App_Data/TEMP/Install/"));
-            foreach (var f in files)
+        {
+            var dir = IOHelper.MapPath("~/App_Data/TEMP/Install/");
+            if (Directory.Exists(dir))
             {
-                File.Delete(f);
+                var files = Directory.GetFiles(dir);
+                foreach (var f in files)
+                {
+                    File.Delete(f);
+                }
+            }
+            else
+            {
+                Directory.CreateDirectory(dir);
             }
         }


Cambiato livello di Log a Info

Cambiato livello di Log a Info

--- src/backend/SO115App.Logging/LogConfigurator.cs
+++ src/backend/SO115App.Logging/LogConfigurator.cs
@@ -31,7 +31,7 @@
                 //.WriteTo.Trace()
                 //.MinimumLevel.Debug()
                 .ReadFrom.Configuration(configuration)
-                .MinimumLevel.Error()
+                .MinimumLevel.Information()
                 .CreateLogger();

             Log.Logger = log;


Reorganize lowering for switch on float/double/decimal as recommended in code review.

--- src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_PatternSwitchStatement.cs
+++ src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LocalRewriter_PatternSwitchStatement.cs
@@ -360,17 +360,29 @@
                 }

                 var rewrittenSections = switchSections.ToImmutableAndFree();
-
                 MethodSymbol stringEquality = null;
-                switch (byValue.Type.SpecialType)
-                {
+                if (underlyingSwitchType.SpecialType == SpecialType.System_String)
+                {
+                    LocalRewriter.EnsureStringHashFunction(rewrittenSections, _factory.Syntax);
+                    stringEquality = LocalRewriter.GetSpecialTypeMethod(_factory.Syntax, SpecialMember.System_String__op_Equality);
+                }
+
+                // The BoundSwitchStatement requires a constant target when there are no sections, so we accomodate that here.
+                var constantTarget = rewrittenSections.IsEmpty ? noValueMatches : null;
+                var switchStatement = new BoundSwitchStatement(
+                    _factory.Syntax, null, _factory.Convert(underlyingSwitchType, byValue.Expression),
+                    constantTarget,
+                    ImmutableArray<LocalSymbol>.Empty, ImmutableArray<LocalFunctionSymbol>.Empty,
+                    rewrittenSections, noValueMatches, stringEquality);
+                // The bound switch statement implicitly defines the label noValueMatches at the end, so we do not add it explicitly.
+
+                switch (underlyingSwitchType.SpecialType)
+                {
+                    case SpecialType.System_Boolean:
+                        // boolean switch is handled in LowerBooleanSwitch, not here.
+                        throw ExceptionUtilities.Unreachable;
+
                     case SpecialType.System_String:
-                        {
-                            LocalRewriter.EnsureStringHashFunction(rewrittenSections, _factory.Syntax);
-                            stringEquality = LocalRewriter.GetSpecialTypeMethod(_factory.Syntax, SpecialMember.System_String__op_Equality);
-                            goto case SpecialType.System_UInt32;
-                        }
-
                     case SpecialType.System_Byte:
                     case SpecialType.System_Char:
                     case SpecialType.System_Int16:
@@ -381,81 +393,86 @@
                     case SpecialType.System_UInt32:
                     case SpecialType.System_UInt64:
                         {
-                            // Emit requires a constant target when there are no sections, so we accomodate that here.
-                            // CONSIDER: can we get better code generated by giving a constant target more often here,
-                            // e.g. when the switch expression is a constant?
-                            var constantTarget = rewrittenSections.IsEmpty ? noValueMatches : null;
-                            var switchStatement = new BoundSwitchStatement(
-                                _factory.Syntax, null, _factory.Convert(underlyingSwitchType, byValue.Expression),
-                                constantTarget,
-                                ImmutableArray<LocalSymbol>.Empty, ImmutableArray<LocalFunctionSymbol>.Empty,
-                                rewrittenSections, noValueMatches, stringEquality);
+                            // emit knows how to efficiently generate code for these kinds of switches.
                             _loweredDecisionTree.Add(switchStatement);
-                            // The bound switch statement implicitly defines the label noValueMatches at the end, so we do not add it explicitly.
                             break;
                         }

                     default:
                         {
-                            if (byValue.Type.TypeKind == TypeKind.Enum)
-                            {
-                                goto case SpecialType.System_Int32;
-                            }
-
-                            // Here we handle "other" types, such as float, double, and decimal.
-                            // We compare the constant values using value.Equals(input), using ordinary
-                            // overload resolution. Note that we cannot and do not rely on switching
-                            // on the hash code, as it may not be consistent with the behavior of Equals;
-                            // see https://github.com/dotnet/coreclr/issues/6237. Also, the hash code is
-                            // not guaranteed to be the same on the compilation platform as the runtime
-                            // platform.
-                            // CONSIDER: can we improve the quality of the code using comparisons, like
-                            //           we do for other numeric types, by generating a series of tests
-                            //           that use divide-and-conquer to efficiently find a matching value?
-                            //           If so, we should use the BoundSwitchStatement and do that in emit.
-                            LabelSymbol nextLabel = null;
-                            foreach (var section in rewrittenSections)
-                            {
-                                foreach (var boundSwitchLabel in section.SwitchLabels)
-                                {
-                                    if (nextLabel != null)
-                                    {
-                                        _loweredDecisionTree.Add(_factory.Label(nextLabel));
-                                    }
-                                    nextLabel = _factory.GenerateLabel("failcase+" + section.SwitchLabels[0].ConstantValueOpt.Value);
-
-                                    Debug.Assert(boundSwitchLabel.ConstantValueOpt != null);
-                                    // generate (if (value.Equals(input)) goto label;
-                                    var literal = LocalRewriter.MakeLiteral(_factory.Syntax, boundSwitchLabel.ConstantValueOpt, byValue.Type);
-                                    var condition = _factory.InstanceCall(literal, "Equals", byValue.Expression);
-                                    if (!condition.HasErrors && condition.Type.SpecialType != SpecialType.System_Boolean)
-                                    {
-                                        var call = (BoundCall)condition;
-                                        // '{1} {0}' has the wrong return type
-                                        _factory.Diagnostics.Add(ErrorCode.ERR_BadRetType, boundSwitchLabel.Syntax.GetLocation(), call.Method, call.Type);
-                                    }
-
-                                    _loweredDecisionTree.Add(_factory.ConditionalGoto(condition, boundSwitchLabel.Label, true));
-                                    _loweredDecisionTree.Add(_factory.Goto(nextLabel));
-                                }
-
-                                foreach (var boundSwitchLabel in section.SwitchLabels)
-                                {
-                                    _loweredDecisionTree.Add(_factory.Label(boundSwitchLabel.Label));
-                                }
-
-                                _loweredDecisionTree.Add(_factory.Block(section.Statements));
-                                // this location should not be reachable.
-                            }
-
-                            Debug.Assert(nextLabel != null);
-                            _loweredDecisionTree.Add(_factory.Label(nextLabel));
-                            _loweredDecisionTree.Add(_factory.Label(noValueMatches));
+                            // other types, such as float, double, and decimal, are not currently
+                            // handled by emit and must be lowered here.
+                            _loweredDecisionTree.Add(LowerNonprimitiveSwitch(switchStatement));
                             break;
                         }
                 }

                 LowerDecisionTree(byValue.Expression, byValue.Default);
+            }
+
+            private BoundStatement LowerNonprimitiveSwitch(BoundSwitchStatement switchStatement)
+            {
+                // Here we handle "other" types, such as float, double, and decimal, by
+                // lowering the BoundSwitchStatement.
+                // We compare the constant values using value.Equals(input), using ordinary
+                // overload resolution. Note that we cannot and do not rely on switching
+                // on the hash code, as it may not be consistent with the behavior of Equals;
+                // see https://github.com/dotnet/coreclr/issues/6237. Also, the hash code is
+                // not guaranteed to be the same on the compilation platform as the runtime
+                // platform.
+                // CONSIDER: can we improve the quality of the code using comparisons, like
+                //           we do for other numeric types, by generating a series of tests
+                //           that use divide-and-conquer to efficiently find a matching value?
+                //           If so, we should use the BoundSwitchStatement and do that in emit.
+                //           Moreover, we should be able to use `==` rather than `.Equals`
+                //           for cases (such as non-NaN) where we know the result to be the same.
+                var rewrittenSections = switchStatement.SwitchSections;
+                var expression = switchStatement.Expression;
+                var noValueMatches = switchStatement.BreakLabel;
+                Debug.Assert(switchStatement.LoweredPreambleOpt == null);
+                Debug.Assert(switchStatement.InnerLocals.IsDefaultOrEmpty);
+                Debug.Assert(switchStatement.InnerLocalFunctions.IsDefaultOrEmpty);
+                Debug.Assert(switchStatement.StringEquality == null);
+                LabelSymbol nextLabel = null;
+                var builder = ArrayBuilder<BoundStatement>.GetInstance();
+                foreach (var section in rewrittenSections)
+                {
+                    foreach (var boundSwitchLabel in section.SwitchLabels)
+                    {
+                        if (nextLabel != null)
+                        {
+                            builder.Add(_factory.Label(nextLabel));
+                        }
+                        nextLabel = _factory.GenerateLabel("failcase+" + section.SwitchLabels[0].ConstantValueOpt.Value);
+
+                        Debug.Assert(boundSwitchLabel.ConstantValueOpt != null);
+                        // generate (if (value.Equals(input)) goto label;
+                        var literal = LocalRewriter.MakeLiteral(_factory.Syntax, boundSwitchLabel.ConstantValueOpt, expression.Type);
+                        var condition = _factory.InstanceCall(literal, "Equals", expression);
+                        if (!condition.HasErrors && condition.Type.SpecialType != SpecialType.System_Boolean)
+                        {
+                            var call = (BoundCall)condition;
+                            // '{1} {0}' has the wrong return type
+                            _factory.Diagnostics.Add(ErrorCode.ERR_BadRetType, boundSwitchLabel.Syntax.GetLocation(), call.Method, call.Type);
+                        }
+
+                        builder.Add(_factory.ConditionalGoto(condition, boundSwitchLabel.Label, true));
+                        builder.Add(_factory.Goto(nextLabel));
+                    }
+
+                    foreach (var boundSwitchLabel in section.SwitchLabels)
+                    {
+                        builder.Add(_factory.Label(boundSwitchLabel.Label));
+                    }
+
+                    builder.Add(_factory.Block(section.Statements));
+                    // this location should not be reachable.
+                }
+
+                Debug.Assert(nextLabel != null);
+                builder.Add(_factory.Label(nextLabel));
+                builder.Add(_factory.Label(noValueMatches));
+                return _factory.Block(builder.ToImmutableAndFree());
             }

             private void LowerBooleanSwitch(DecisionTree.ByValue byValue)


Add back unintentionally deleted comment

--- src/EditorFeatures/CSharpTest/RemoveUnusedParametersAndValues/RemoveUnusedParametersTests.cs
+++ src/EditorFeatures/CSharpTest/RemoveUnusedParametersAndValues/RemoveUnusedParametersTests.cs
@@ -367,6 +367,8 @@
         [Fact, Trait(Traits.Feature, Traits.Features.CodeActionsRemoveUnusedParameters)]
         public async Task UnusedInLambda_LambdaPassedAsArgument()
         {
+            // We bail out from unused value analysis when lambda is passed as argument.
+            // We should still report unused parameters.
             await TestDiagnosticsAsync(
 @"using System;


Fixed tests

Fixed tests

--- src/Foundation/SitecoreExtensions/Tests/Renderings/QueryableDatasourceRenderingModelTests.cs
+++ src/Foundation/SitecoreExtensions/Tests/Renderings/QueryableDatasourceRenderingModelTests.cs
@@ -10,6 +10,7 @@
   using Sitecore.FakeDb;
   using Sitecore.FakeDb.AutoFixture;
   using Sitecore.Foundation.SitecoreExtensions.Model;
+  using Sitecore.Foundation.SitecoreExtensions.Rendering;
   using Sitecore.Foundation.SitecoreExtensions.Tests.Common;
   using Sitecore.Mvc.Presentation;
   using Xunit;


admin / Tooltips in Posts

admin / Tooltips in Posts

--- samples/WebApp/Views/Blogifier/Admin/Custom/Index.cshtml
+++ samples/WebApp/Views/Blogifier/Admin/Custom/Index.cshtml
@@ -15,16 +15,14 @@
 }

-
         New

-            <button type="button" class="btn btn-secondary btn-icon"></button>
-            <button type="button" class="btn btn-secondary btn-icon"></button>
-            <button type="button" class="btn btn-secondary btn-icon"></button>
+            <button type="button" class="btn btn-secondary btn-icon" title="Delete"></button>
+            <button type="button" class="btn btn-secondary btn-icon" title="Publish"></button>
+            <button type="button" class="btn btn-secondary btn-icon" title="Unpublish"></button>

-

-            <button class="btn btn-secondary dropdown-toggle btn-icon" type="button" id="filtersDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
+            <button class="btn btn-secondary dropdown-toggle btn-icon" title="Filter" type="button" id="filtersDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">

             </button>

@@ -58,7 +56,6 @@
                 }

-
         <form action="~/admin" method="get" class="admin-toolbar-search float-right">
             <input type="search" name="search" class="form-control" placeholder="Search..." />
         </form>


* Allow for lowercase searching in standalone mode, when case sensitive search fails. This allows compability to libOMV bots, that always lowercase region names. * Uncertain if this should/could propagate to grids

--- OpenSim/Region/Communications/Local/LocalBackEndServices.cs
+++ OpenSim/Region/Communications/Local/LocalBackEndServices.cs
@@ -379,18 +379,32 @@

         public List<RegionInfo> RequestNamedRegions (string name, int maxNumber)
         {
+            List<RegionInfo> lowercase_regions = new List<RegionInfo>();
             List<RegionInfo> regions = new List<RegionInfo>();
             foreach (RegionInfo info in m_regions.Values)
             {
+                // Prioritizes exact match
                 if (info.RegionName.StartsWith(name))
                 {
                     regions.Add(info);
                     if (regions.Count >= maxNumber) break;
                 }
-            }
-
+                // But still saves lower case matches
+                else if (info.RegionName.ToLower().StartsWith(name))
+                {
+                    if (lowercase_regions.Count < maxNumber)
+                    {
+                        lowercase_regions.Add(info);
+                    }
+                }
+            }
+
+            // If no exact matches found, return lowercase matches (libOMV compatiblity)
+            if (regions.Count == 0 && lowercase_regions.Count != 0)
+            {
+                return lowercase_regions;
+            }
             return regions;
         }
-
     }
 }


In materials module, if a texture entry somehow has no default entry then don't try to extract materials data rather than throw an exception

--- OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
+++ OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs
@@ -216,7 +216,8 @@

             GetLegacyStoredMaterialsInPart(part);

-            GetStoredMaterialInFace(part, te.DefaultTexture);
+            if (te.DefaultTexture != null)
+                GetStoredMaterialInFace(part, te.DefaultTexture);

             foreach (Primitive.TextureEntryFace face in te.FaceTextures)
             {


Re enable --no-restore (#1336)

Re enable --no-restore (#1336)

--- test/IISExpress.FunctionalTests/InProcess/StartupTests.cs
+++ test/IISExpress.FunctionalTests/InProcess/StartupTests.cs
@@ -123,7 +123,6 @@
             deploymentParameters.ApplicationPublisher = null;
             // ReferenceTestTasks is workaround for https://github.com/dotnet/sdk/issues/2482
             deploymentParameters.AdditionalPublishParameters = "-p:RuntimeIdentifier=win7-x64 -p:UseAppHost=true -p:SelfContained=false -p:ReferenceTestTasks=false";
-            deploymentParameters.RestoreOnPublish = true;
             var deploymentResult = await DeployAsync(deploymentParameters);

             Assert.True(File.Exists(Path.Combine(deploymentResult.ContentRoot, "InProcessWebSite.exe")));


[Mac] Manually register assemblies for Xamarin.Mac

This patch allows for two main improvements:

* The entry assembly and its dependencies are no longer force-loaded
* We register assemblies that are not referenced by the entry assembly
  and are loaded later on by the app

--- Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs
+++ Xwt.XamMac/Xwt.Mac/NSApplicationInitializer.cs
@@ -24,7 +24,11 @@
 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 // THE SOFTWARE.

+using System;
+
 using AppKit;
+using Foundation;
+using ObjCRuntime;

 namespace Xwt.Mac
 {
@@ -36,13 +40,33 @@
 			if (System.Threading.Thread.GetData (ds) == null) {
 				System.Threading.Thread.SetData (ds, true);

-				// IgnoreMissingAssembliesDuringRegistration is only avalilable in Xamarin.Mac 3.4+
-				// Use reflection to not break builds with older Xamarin.Mac
-				var ignoreMissingAssemblies = typeof (NSApplication).GetField ("IgnoreMissingAssembliesDuringRegistration",
-				                                                               System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Static);
-				ignoreMissingAssemblies?.SetValue (null, true);
+				NSApplication.IgnoreMissingAssembliesDuringRegistration = true;
+
+				// Setup a registration handler that does not let Xamarin.Mac register assemblies by default.
+				Runtime.AssemblyRegistration += Runtime_AssemblyRegistration;
+
 				NSApplication.Init ();
+
+				// Register a callback when an assembly is loaded so it's registered in the xammac registrar.
+				AppDomain.CurrentDomain.AssemblyLoad += CurrentDomain_AssemblyLoad;
+
+				// Manually register all the currently loaded assemblies.
+				foreach (var assembly in AppDomain.CurrentDomain.GetAssemblies())
+                {
+					Runtime.RegisterAssembly(assembly);
+                }
 			}
+		}
+
+		private static void Runtime_AssemblyRegistration(object sender, AssemblyRegistrationEventArgs args)
+		{
+			// If we don't do this, Xamarin.Mac will forcefully load all the assemblies referenced from the app startup assembly.
+			args.Register = false;
+		}
+
+		private static void CurrentDomain_AssemblyLoad (object sender, AssemblyLoadEventArgs args)
+		{
+			Runtime.RegisterAssembly(args.LoadedAssembly);
 		}
 	}
 }


Add test for reading of content types

Add test for reading of content types

--- dotnet/Mammoth.Tests/DocumentConverterTests.cs
+++ dotnet/Mammoth.Tests/DocumentConverterTests.cs
@@ -34,7 +34,7 @@
         }

         [Fact]
-        public void simpleListIsConvertedToListElements()  {
+        public void SimpleListIsConvertedToListElements()  {
             AssertSuccessfulConversion(
                 ConvertToHtml("simple-list.docx"),
                 "

Apple

Banana

");
@@ -65,6 +65,17 @@
 				ConvertToHtml("external-picture.docx"),
 				"

");
 		}
+
+        // TODO: image warnings
+
+
+
+        [Fact]
+        public void ContentTypesAreRead() {
+            AssertSuccessfulConversion(
+                ConvertToHtml("tiny-picture-custom-content-type.docx"),
+                "

");
+        }

 		[Fact]
 		public void CanExtractRawTextFromFile() {


Just because

Just because

--- src/Skybrud.Social.LinkedIn/Properties/AssemblyInfo.cs
+++ src/Skybrud.Social.LinkedIn/Properties/AssemblyInfo.cs
@@ -31,6 +31,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("0.1.0.0")]
-[assembly: AssemblyInformationalVersion("0.1.0.0")]
+[assembly: AssemblyVersion("0.0.1.0")]
+[assembly: AssemblyInformationalVersion("0.0.1.0")]
 [assembly: AssemblyMetadata("StartDate", "2015-08-12")]


Fix application parameters.

Fix application parameters.

--- src/Bibliotheca.Server.Gateway.Api/Jobs/UploaderJob.cs
+++ src/Bibliotheca.Server.Gateway.Api/Jobs/UploaderJob.cs
@@ -7,6 +7,7 @@
 using Bibliotheca.Server.Gateway.Core.Services;
 using Microsoft.AspNetCore.Http;
 using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Options;

 namespace Bibliotheca.Server.Gateway.Api.Jobs
 {
@@ -46,7 +47,7 @@
             IProjectsService projectsService,
             ILogger<UploaderJob> logger,
             IHttpContextAccessor httpContextAccessor,
-            ApplicationParameters applicationParameters)
+            IOptions<ApplicationParameters> applicationParameters)
         {
             _documentsService = documentsService;
             _branchService = branchService;
@@ -54,7 +55,7 @@
             _projectsService = projectsService;
             _logger = logger;
             _httpContextAccessor = httpContextAccessor;
-            _applicationParameters = applicationParameters;
+            _applicationParameters = applicationParameters.Value;
         }

         /// <summary>


Updated BigByteArray.cs to 4.0.2 compatibility.

--- src/BoboBrowse.Net/BoboBrowse.Net/Util/BigByteArray.cs
+++ src/BoboBrowse.Net/BoboBrowse.Net/Util/BigByteArray.cs
@@ -17,7 +17,7 @@
 //* See the License for the specific language governing permissions and
 //* limitations under the License.

-// Version compatibility level: 3.2.0
+// Version compatibility level: 4.0.2
 namespace BoboBrowse.Net.Util
 {
     using BoboBrowse.Net.Support;
@@ -76,16 +76,6 @@
             }
             return DocIdSetIterator.NO_MORE_DOCS;
         }
-
-        public override sealed int FindValues(BitVector bitset, int docId, int maxId)
-	    {
-	        while(true)
-	        {
-	            if(bitset.Get(_array[docId >> SHIFT_SIZE][docId & MASK])) return docId;
-	            if(docId++ >= maxId) break;
-	        }
-	        return DocIdSetIterator.NO_MORE_DOCS;
-	    }

         public override sealed int FindValueRange(int minVal, int maxVal, int docId, int maxId)
         {


Flag to make sure GetAddrPayload is only sent once. (#1279)

* Flat to make sure GetAddrPayload is only sent once.

* Flag to make sure GetAddrPayload is only sent once.

* Typo

* Undo Typo - Visual Studio Spell Checker was set to English UK.  Now set to English UK.

* Correct casing for class level members.

--- src/Stratis.Bitcoin/P2P/PeerAddressManagerBehaviour.cs
+++ src/Stratis.Bitcoin/P2P/PeerAddressManagerBehaviour.cs
@@ -37,6 +37,11 @@
         /// </summary>
         public int PeersToDiscover { get; set; }

+        /// <summary>
+        /// Flag to make sure <see cref="GetAddrPayload"/> is only sent once.
+        /// </summary>
+        private bool sentAddress;
+
         public PeerAddressManagerBehaviour(IDateTimeProvider dateTimeProvider, IPeerAddressManager peerAddressManager)
         {
             Guard.NotNull(dateTimeProvider, nameof(dateTimeProvider));
@@ -66,11 +71,12 @@
             {
                 if ((this.Mode & PeerAddressManagerBehaviourMode.Advertise) != 0)
                 {
-                    if (message.Message.Payload is GetAddrPayload)
+                    if ((message.Message.Payload is GetAddrPayload) && (!this.sentAddress))
                     {
                         var endPoints = this.peerAddressManager.PeerSelector.SelectPeersForGetAddrPayload(1000).Select(p => p.Endpoint).ToArray();
                         var addressPayload = new AddrPayload(endPoints.Select(p => new NetworkAddress(p)).ToArray());
                         await peer.SendMessageAsync(addressPayload).ConfigureAwait(false);
+                        this.sentAddress = true;
                     }

                     if (message.Message.Payload is PingPayload ping || message.Message.Payload is PongPayload pong)


Added tests for sql-update and sql-delete (join)

--- src/FluentNHibernate.Testing/DomainModel/Mapping/JoinPartTester.cs
+++ src/FluentNHibernate.Testing/DomainModel/Mapping/JoinPartTester.cs
@@ -105,8 +105,24 @@
         public void JoinContainsAnSqlInsertElement()
         {
             new MappingTester<JoinTarget>()
-                .ForMapping(m => m.Join("myTable", t => t.SqlInsert("INSERT INTO myTable VALUES(?)")))
+                .ForMapping(m => m.Join("myTable", t => t.SqlInsert("INSERT INTO myTable VALUES(?)"))) // Now it's not important whether statement is correct or not.
                 .Element("class/join/sql-insert").Exists();
+        }
+
+        [Test]
+        public void JoinContainsAnSqlUpdateElement()
+        {
+            new MappingTester<JoinTarget>()
+                .ForMapping(m => m.Join("myTable", t => t.SqlUpdate("UPDATE myTable SET Name = ? WHERE Id = ?"))) // Now it's not important whether statement is correct or not.
+                .Element("class/join/sql-update").Exists();
+        }
+
+        [Test]
+        public void JoinContainsAnSqlDeleteElement()
+        {
+            new MappingTester<JoinTarget>()
+                .ForMapping(m => m.Join("myTable", t => t.SqlDelete("DELETE FROM myTable WHERE Id = ?"))) // Now it's not important whether statement is correct or not.
+                .Element("class/join/sql-delete").Exists();
         }

         private class JoinTarget


Do the same for jobbans

Do the same for jobbans

--- UnityProject/Assets/Scripts/Managers/PlayerList.Admin.cs
+++ UnityProject/Assets/Scripts/Managers/PlayerList.Admin.cs
@@ -901,7 +901,8 @@
 	public void ProcessJobBanRequest(string admin, string userToJobBan, string reason, bool isPerma, int banMinutes, JobType jobType, bool kickAfter = false, bool ghostAfter = false)
 	{
 		if (!adminUsers.Contains(admin)) return;
-
+
+		var admin = PlayerList.Instance.GetByUserID(admin);
 		var players = GetAllByUserID(userToJobBan);
 		if (players.Count != 0)
 		{
@@ -911,18 +912,18 @@

 				if (isPerma)
 				{
-					message = $"A job ban has been processed by {PlayerList.Instance.GetByUserID(admin).Username}: Username: {p.Username} Player: {p.Name} Job: {jobType} IsPerma: {isPerma} Time: {DateTime.Now}";
+					message = $"A job ban has been processed by {admin.Username}: Username: {p.Username} Player: {p.Name} Job: {jobType} IsPerma: {isPerma} Time: {DateTime.Now}";
 				}
 				else
 				{
-					message = $"A job ban has been processed by {PlayerList.Instance.GetByUserID(admin).Username}: Username: {p.Username} Player: {p.Name} Job: {jobType} BanMinutes: {banMinutes} Time: {DateTime.Now}";
+					message = $"A job ban has been processed by {admin.Username}: Username: {p.Username} Player: {p.Name} Job: {jobType} BanMinutes: {banMinutes} Time: {DateTime.Now}";
 				}

 				Logger.Log(message);

-				StartCoroutine(JobBanPlayer(p, reason, isPerma, banMinutes, jobType));
-
-				UIManager.Instance.adminChatWindows.adminToAdminChat.ServerAddChatRecord($"{PlayerList.Instance.GetByUserID(admin).Username}: job banned {p.Username} from {jobType}, IsPerma: {isPerma}, BanMinutes: {banMinutes}", null);
+				StartCoroutine(JobBanPlayer(p, reason, isPerma, banMinutes, jobType, admin));
+
+				UIManager.Instance.adminChatWindows.adminToAdminChat.ServerAddChatRecord($"{admin.Username}: job banned {p.Username} from {jobType}, IsPerma: {isPerma}, BanMinutes: {banMinutes}", null);

 				DiscordWebhookMessage.Instance.AddWebHookMessageToQueue(DiscordWebhookURLs.DiscordWebhookAdminLogURL, message + $"\nReason: {reason}", "");

@@ -948,7 +949,7 @@
 		}
 	}

-	IEnumerator JobBanPlayer(ConnectedPlayer connPlayer, string reason, bool isPermaBool, int banLengthInMinutes, JobType jobType)
+	IEnumerator JobBanPlayer(ConnectedPlayer connPlayer, string reason, bool isPermaBool, int banLengthInMinutes, JobType jobType,ConnectedPlayer admin = null)
 	{
 		if (jobBanList == null)
 		{
@@ -977,7 +978,9 @@
 				userName = connPlayer?.Username,
 				ipAddress = connPlayer?.Connection?.address,
 				clientId = connPlayer?.ClientId,
-				jobBanEntry = new List<JobBanEntry>()
+				jobBanEntry = new List<JobBanEntry>(),
+				adminId = admin?.UserId,
+				adminName = admin?.Username
 			});

 			jobBanPlayerEntry = jobBanList?.CheckForEntry(connPlayer.UserId, connPlayer.Connection.address, connPlayer.ClientId);


调试小程序MessageHandler

调试小程序MessageHandler

--- src/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Controllers/WxOpen/WxOpenController.cs
+++ src/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Controllers/WxOpen/WxOpenController.cs
@@ -23,7 +23,6 @@
         readonly Func<string> _getRandomFileName = () => DateTime.Now.ToString("yyyyMMdd-HHmmss") + Guid.NewGuid().ToString("n").Substring(0, 6);

-
         [HttpGet]
         [ActionName("Index")]
         public ActionResult Get(PostModel postModel, string echostr)
@@ -35,7 +34,7 @@
             else
             {
                 return Content("failed:" + postModel.Signature + "," + MP.CheckSignature.GetSignature(postModel.Timestamp, postModel.Nonce, Token) + "。" +
-                    "如果你在浏览器中看到这句话，说明此地址可以被作为微信公众账号后台的Url，请注意保持Token一致。");
+                    "如果你在浏览器中看到这句话，说明此地址可以被作为微信小程序后台的Url，请注意保持Token一致。");
             }
         }


Add ProductId parameter to StripePlanListOptions

--- src/Stripe.net/Services/Plans/StripePlanListOptions.cs
+++ src/Stripe.net/Services/Plans/StripePlanListOptions.cs
@@ -4,5 +4,13 @@
 {
     public class StripePlanListOptions : StripeListOptions
     {
+        [JsonProperty("created")]
+        public StripeDateFilter Created { get; set; }
+
+        /// <summary>
+        /// Only return plans for the given product.
+        /// </summary>
+        [JsonProperty("product")]
+        public string ProductId { get; set; }
     }
 }


update

update

--- src/FunBrainInfrastructure/Repositories/UserRepositoryHardCoded.cs
+++ src/FunBrainInfrastructure/Repositories/UserRepositoryHardCoded.cs
@@ -40,7 +40,11 @@

         public User Update(UserUpdate updateUser)
         {
-            throw new NotImplementedException();
+            var userToUpdate = _users.FirstOrDefault(user => user.Id == updateUser.Id);
+            userToUpdate.Name = updateUser.Name;
+            userToUpdate.Email = updateUser.Email;
+
+            return userToUpdate;
         }

         public bool Delete(int userId)


WP 8.1 client logic added

WP 8.1 client logic added

--- PushSharp-WP8/PushSharp.WindowsPhoneClient/MainPage.xaml.cs
+++ PushSharp-WP8/PushSharp.WindowsPhoneClient/MainPage.xaml.cs
@@ -1,10 +1,17 @@
 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Net;
 using System.Runtime.InteropServices.WindowsRuntime;
 using Windows.Foundation;
 using Windows.Foundation.Collections;
+using Windows.Networking.PushNotifications;
+using Windows.Security.Cryptography;
+using Windows.Security.Cryptography.Core;
+using Windows.Storage.Streams;
+using Windows.System.Profile;
 using Windows.UI.Xaml;
 using Windows.UI.Xaml.Controls;
 using Windows.UI.Xaml.Controls.Primitives;
@@ -12,6 +19,10 @@
 using Windows.UI.Xaml.Input;
 using Windows.UI.Xaml.Media;
 using Windows.UI.Xaml.Navigation;
+using Windows.Web.Http;
+using System.Windows;
+using Windows.UI.Popups;
+using System.Text;

 // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=391641

@@ -22,6 +33,7 @@
     /// </summary>
     public sealed partial class MainPage : Page
     {
+        private PushNotificationChannel channel = null;
         public MainPage()
         {
             this.InitializeComponent();
@@ -29,20 +41,80 @@
             this.NavigationCacheMode = NavigationCacheMode.Required;
         }

-        /// <summary>
-        /// Invoked when this page is about to be displayed in a Frame.
-        /// </summary>
-        /// <param name="e">Event data that describes how this page was reached.
-        /// This parameter is typically used to configure the page.</param>
-        protected override void OnNavigatedTo(NavigationEventArgs e)
+        void chnl_PushNotificationReceived(PushNotificationChannel sender, PushNotificationReceivedEventArgs args)
         {
-            // TODO: Prepare page for display here.
+            if (args.NotificationType == PushNotificationType.Toast)
+            {
+                channel.PushNotificationReceived += chnl_PushNotificationReceived;
+            }
+        }

-            // TODO: If your application contains multiple pages, ensure that you are
-            // handling the hardware Back button by registering for the
-            // Windows.Phone.UI.Input.HardwareButtons.BackPressed event.
-            // If you are using the NavigationHelper provided by some templates,
-            // this event is handled for you.
+        protected override async void OnNavigatedTo(NavigationEventArgs e)
+        {
+            try
+            {
+                //Windows Server registration
+                channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
+
+                Debug.WriteLine("Channel URI: " + channel.Uri.ToString());
+
+                int clientID = 1;
+                String registrationID = channel.Uri.ToString();
+                String registrationIDEncoded = EncodeUrl(registrationID);
+                String mobileDeviceOS = "wp8";
+                String mobileDeviceID = GetDeviceID();
+
+                //WebService string: app.mobendo.com / pushsharp / api / notification / device / register / CID / RID / MDOS / DID
+                String url = String.Format("https://app.mobendo.com/pushsharp/api/notification/device/register/{0}/{1}/{2}/{3}"
+                    , clientID
+                    , registrationIDEncoded
+                    , mobileDeviceOS
+                    , mobileDeviceID);
+
+                Windows.Web.Http.HttpClient oHttpClient = new Windows.Web.Http.HttpClient();
+                Uri uri = new Uri(url);
+
+                HttpRequestMessage mSent = new HttpRequestMessage(HttpMethod.Get, uri);
+                mSent.Headers.Authorization = new Windows.Web.Http.Headers.HttpCredentialsHeaderValue("BASIC", "ZGV2dWc6cHVzaHNoYXJw");
+
+                HttpResponseMessage mReceived = await oHttpClient.SendRequestAsync(mSent, HttpCompletionOption.ResponseContentRead);
+
+                if (mReceived.IsSuccessStatusCode)
+                {
+                    MessageDialog messageDialog = new MessageDialog("Register successful!");
+                    await messageDialog.ShowAsync();
+                }
+                else
+                {
+                    MessageDialog messageDialog = new MessageDialog("Register unsuccessful!");
+                    await messageDialog.ShowAsync();
+                }
+
+            }
+
+            catch (Exception ex)
+            {
+                // Could not create a channel.
+            }
+        }
+
+        private String GetDeviceID()
+        {
+            HardwareToken token = HardwareIdentification.GetPackageSpecificToken(null);
+            IBuffer hardwareId = token.Id;
+
+            byte[] hwIDBytes = hardwareId.ToArray();
+
+            String deviceID = hwIDBytes.Select(b => b.ToString()).Aggregate((b, next) => b + next);
+
+            return deviceID;
+        }
+
+        private String EncodeUrl(String input)
+        {
+            var bytes = Encoding.UTF8.GetBytes(input);
+            var base64 = Convert.ToBase64String(bytes);
+            return base64;
         }
     }
 }


avoid remove save button from the grid and added a saving script

--- Web/Areas/EarlyWarning/Views/GiftCertificate/Edit.cshtml
+++ Web/Areas/EarlyWarning/Views/GiftCertificate/Edit.cshtml
@@ -11,6 +11,7 @@
 @section Toolbar
 {

+

 }

@Html.Translate("Edit Gift Certificate")

@@ -154,12 +155,7 @@

                     @(Html.Kendo().Grid<GiftCertificateDetailsViewModel>()
            .Name("Grid")
-           .ToolBar(commands =>
-                        {
-                            commands.Create();
-                            commands.Save();
-                        })
-
+           .ToolBar(commands => commands.Create())
            .Editable(editing => editing.Mode(GridEditMode.InCell))
            .Columns(columns =>
                         {
@@ -206,7 +202,7 @@
     @*
*@


update some xmldoc :grin:

update some xmldoc :grin:

--- QueryBuilder.Tests/Infrastructure/TestCompilersContainer.cs
+++ QueryBuilder.Tests/Infrastructure/TestCompilersContainer.cs
@@ -7,6 +7,12 @@
 {
     public class TestCompilersContainer
     {
+        private static class Messages
+        {
+            public const string ERR_INVALID_ENGINECODE = "Engine code '{0}' is not valid";
+            public const string ERR_INVALID_ENGINECODES = "Invalid engine codes supplied '{0}'";
+        }
+
         protected readonly IDictionary<string, Compiler> Compilers = new Dictionary<string, Compiler>
         {
             [EngineCodes.Firebird] = new FirebirdCompiler(),
@@ -23,7 +29,7 @@
         }

         /// <summary>
-        /// Returns the compiler instance for the given <param name="engineCode"></param>
+        /// Returns a <see cref="Compiler"/> instance for the given engine code
         /// </summary>
         /// <param name="engineCode"></param>
         /// <returns></returns>
@@ -31,7 +37,7 @@
         {
             if (!Compilers.ContainsKey(engineCode))
             {
-                throw new InvalidOperationException($"Engine code '{engineCode}' is not valid");
+                throw new InvalidOperationException(string.Format(Messages.ERR_INVALID_ENGINECODE, engineCode));
             }

             return Compilers[engineCode];
@@ -50,7 +56,7 @@
         }

         /// <summary>
-        /// Compiles the query for the given <param name="engineCode"></param>
+        /// Compiles the <see cref="Query"/> against the given engine code
         /// </summary>
         /// <param name="engineCode"></param>
         /// <param name="query"></param>
@@ -61,6 +67,12 @@
             return compiler.Compile(query);
         }

+        /// <summary>
+        /// Compiles the <see cref="Query"/> against the given engine codes
+        /// </summary>
+        /// <param name="engineCodes"></param>
+        /// <param name="query"></param>
+        /// <returns></returns>
         public TestSqlResultContainer Compile(IEnumerable<string> engineCodes, Query query)
         {
             var codes = engineCodes.ToList();
@@ -72,14 +84,15 @@
             if (results.Count != codes.Count)
             {
                 var missingCodes = codes.Where(w => Compilers.All(a => a.Key != w));
-                throw new InvalidOperationException($"Invalid engine codes supplied '{string.Join(", ", missingCodes)}'");
+                var templateArg = string.Join(", ", missingCodes);
+                throw new InvalidOperationException(string.Format(Messages.ERR_INVALID_ENGINECODES, templateArg));
             }

             return new TestSqlResultContainer(results);
         }

         /// <summary>
-        /// Compiles the query for all known compilers
+        /// Compiles the <see cref="Query"/> against all <see cref="Compiler"/>s
         /// </summary>
         /// <param name="query"></param>
         /// <returns></returns>


Fixing organization fork error

Fixing organization fork error

--- src/GitHub.App/ViewModels/Dialog/ForkRepositoryExecuteViewModel.cs
+++ src/GitHub.App/ViewModels/Dialog/ForkRepositoryExecuteViewModel.cs
@@ -82,7 +82,7 @@
         {
             var newRepositoryFork = new NewRepositoryFork
             {
-                Organization = !DestinationAccount.IsUser ? DestinationRepository.Name : null
+                Organization = !DestinationAccount.IsUser ? DestinationAccount.Login : null
             };

             IRepositoryModel sourceRepository = SourceRepository;


Removed etxra definition on Extract due to bad copy/paste.

--- WmcSoft.Core/Collections/Generic/EnumerableExtensions.cs
+++ WmcSoft.Core/Collections/Generic/EnumerableExtensions.cs
@@ -295,12 +295,6 @@
                 return enumerator.Count;
             }
         }
-        public static int Extract<TSource>(this IEnumerable<TSource> source, out TSource value) {
-            using (var enumerator = new CountingEnumerator<TSource>(source)) {
-                value = (enumerator.MoveNext()) ? enumerator.Current : default(TSource);
-                return enumerator.Count;
-            }
-        }
         public static int Extract<TSource>(this IEnumerable<TSource> source, out TSource value1, out TSource value2) {
             using (var enumerator = new CountingEnumerator<TSource>(source)) {
                 value1 = (enumerator.MoveNext()) ? enumerator.Current : default(TSource);


Fixed another casting issue.

Fixed another casting issue.

Found one more casting issue that can occur when working with
attachments.

--- src/Couchbase.Lite.Shared/Revisions/UnsavedRevision.cs
+++ src/Couchbase.Lite.Shared/Revisions/UnsavedRevision.cs
@@ -70,7 +70,7 @@
         /// <param name="name">The attachment name.</param>
         internal void AddAttachment(Attachment attachment, string name)
         {
-            var attachments = (IDictionary<String, Object>)Properties.Get("_attachments");
+			var attachments = Properties.Get("_attachments").AsDictionary<string,object>();
             if (attachments == null)
             {
                 attachments = new Dictionary<String, Object>();


898: public

898: public

--- src/Tests/WinFormTestBed/YourImplementation/AppHost.cs
+++ src/Tests/WinFormTestBed/YourImplementation/AppHost.cs
@@ -87,7 +87,7 @@

-    class WinFormAppHost : AppHost
+    public class WinFormAppHost : AppHost
     {

         LayoutFarm.UI.UISurfaceViewportControl vw;


Switch to UI thread in ActiveRepositoriesChanged.

`IVSGitExt.ActiveRepositoriesChanged` isn't notified on the UI thread which breaks things. Switch to the main thread when refreshing due to a notification from this.

--- src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs
+++ src/GitHub.App/ViewModels/GitHubPane/PullRequestDetailViewModel.cs
@@ -10,6 +10,7 @@
 using GitHub.App;
 using GitHub.Extensions;
 using GitHub.Factories;
+using GitHub.Helpers;
 using GitHub.Logging;
 using GitHub.Models;
 using GitHub.Services;
@@ -493,7 +494,18 @@
             }
         }

-        void ActiveRepositoriesChanged() => Refresh().Forget();
+        async void ActiveRepositoriesChanged()
+        {
+            try
+            {
+                await ThreadingHelper.SwitchToMainThreadAsync();
+                await Refresh();
+            }
+            catch (Exception ex)
+            {
+                log.Error(ex, "Error refreshing in ActiveRepositoriesChanged.");
+            }
+        }

         void SubscribeOperationError(ReactiveCommand<Unit> command)
         {


user delete controller built

user delete controller built

--- ReceiptTracker/ReceiptTracker/Controllers/UserController.cs
+++ ReceiptTracker/ReceiptTracker/Controllers/UserController.cs
@@ -8,10 +8,11 @@

 namespace ReceiptTracker.Controllers
 {
+    [Route("api/user")]
     public class UserController : ApiController
     {

-        ReceiptRepository Repo = new ReceiptRepository();
+        ReceiptRepository _repo = new ReceiptRepository();

         // GET api/<controller>
         public IEnumerable<string> Get()
@@ -36,8 +37,12 @@
         }

         // DELETE api/<controller>/5
-        public void Delete(int id)
+        [HttpDelete]
+        //public void Delete(int id)
+        public IHttpActionResult Delete(int id)
         {
+            _repo.RemoveUser(id);
+            return Json("User Removed Succefully!");
         }
     }
 }


3.5.1.0 Branch
FileSystem.Detokenise.cs: Fix to support ANSI default encoding for input files.
Resolves #1158 (Support specifying file encoding for input files to Detokenise) reported by dwhearn on 15th December 2008

#1158      Support specifying file encoding for input files to Detokenise

--- Releases/3.5.1.0/Main3.5/Framework/FileSystem/Detokenise.cs
+++ Releases/3.5.1.0/Main3.5/Framework/FileSystem/Detokenise.cs
@@ -167,6 +167,8 @@
         {
             switch (enc)
             {
+                case "DEFAULT":
+                    return System.Text.Encoding.Default;
                 case "ASCII":
                     return System.Text.Encoding.ASCII;
                 case "Unicode":
@@ -180,6 +182,11 @@
                 case "BigEndianUnicode":
                     return System.Text.Encoding.BigEndianUnicode;
                 default:
+                    if (!string.IsNullOrEmpty(enc))
+                    {
+                        return Encoding.GetEncoding(enc);
+                    }
+
                     return null;
             }
         }
@@ -207,7 +214,7 @@
                 {
                     try
                     {
-                        this.fileEncoding = Encoding.GetEncoding(this.TextEncoding);
+                        this.fileEncoding = GetTextEncoding(this.TextEncoding);
                     }
                     catch (ArgumentException)
                     {
@@ -335,7 +342,7 @@

             // Open the file and attempt to read the encoding from the BOM
             string fileContent;
-            using (StreamReader streamReader = new StreamReader(file, true))
+            using (StreamReader streamReader = new StreamReader(file, this.fileEncoding, true))
             {
                 // Read the file.
                 fileContent = streamReader.ReadToEnd();


add null check for if browser is somehow null already before disposal

--- RelhaxModpack/RelhaxModpack/Automation/HtmlBrowserParser.cs
+++ RelhaxModpack/RelhaxModpack/Automation/HtmlBrowserParser.cs
@@ -93,8 +93,15 @@

         public void Dispose()
         {
-            BrowserManager.BrowserCreated -= this.BrowserCreated;
-            ((IDisposable)BrowserManager).Dispose();
+            if (BrowserManager != null)
+            {
+                BrowserManager.BrowserCreated -= this.BrowserCreated;
+                ((IDisposable)BrowserManager).Dispose();
+            }
+            else
+            {
+                Logging.Warning(LogOptions.MethodName, "BrowserManager is already null (is this the intent)?");
+            }
             ((IDisposable)cancellationTokenSource).Dispose();
         }
     }


fixing Content-Encoding header typo

fixing Content-Encoding header typo

--- src/EasyRpc.AspNetCore/Serializers/RawContentWriter.cs
+++ src/EasyRpc.AspNetCore/Serializers/RawContentWriter.cs
@@ -24,7 +24,7 @@

             if (contentEncoding != null)
             {
-                response.Headers.TryAdd("ContentEncoding", contentEncoding);
+                response.Headers.TryAdd("Content-Encoding", contentEncoding);
             }

             if (requestContext.Result is byte[] bytes)


Installer method still needs work

Installer method still needs work

--- src/Engine/MvcTurbine.Windsor/WindsorServiceLocator.cs
+++ src/Engine/MvcTurbine.Windsor/WindsorServiceLocator.cs
@@ -44,8 +44,8 @@
             var loadedAssemblies = AppDomain.CurrentDomain.GetAssemblies();
             var windsorInstallers = loadedAssemblies.SelectMany(T => T.GetTypes())
                 .Where(B => type.IsAssignableFrom(B) && B.GetConstructor(Type.EmptyTypes) != null)
-                .Select<IWindsorInstaller>(B => Activator.CreateInstance(B) as IWindsorInstaller);
-            return windsorInstallers;
+                .Select(B => Activator.CreateInstance(B) as IWindsorInstaller);
+            return windsorInstallers.ToArray(); ;
         }

         /// <summary>


Rethrow the exception in composition root.

--- Rock.Core/Rock.StaticDependencyInjection/CompositionRoot.cs
+++ Rock.Core/Rock.StaticDependencyInjection/CompositionRoot.cs
@@ -54,6 +54,7 @@
             catch (Exception ex)
             {
                 LibraryLogger.Log(ex, "Exception caught in static dependency injection.", "Rock.Core");
+                throw;
             }
         }