Adding dedicated exception if accent color could not be detected

--- src/ControlzEx/Theming/ThemeManager.cs
+++ src/ControlzEx/Theming/ThemeManager.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
 namespace ControlzEx.Theming
 {
     using System;
@@ -1195,22 +1195,27 @@
                     baseColor ??= detectedTheme?.BaseColorScheme ?? BaseColorLight;
                 }

-                string? accentColor = null;
+                string? accentColor;
                 if (syncModeToUse.HasFlag(ThemeSyncMode.SyncWithAccent))
                 {
-                    accentColor = WindowsThemeHelper.GetWindowsAccentColor().ToString();
+                    accentColor = WindowsThemeHelper.GetWindowsAccentColor()?.ToString() ?? detectedTheme?.ColorScheme;
                 }
                 else
                 {
                     // If there was no detected Theme just use the windows accent color.
-                    accentColor ??= detectedTheme?.ColorScheme ?? WindowsThemeHelper.GetWindowsAccentColor().ToString();
+                    accentColor = detectedTheme?.ColorScheme ?? WindowsThemeHelper.GetWindowsAccentColor()?.ToString();
+                }
+
+                if (accentColor is null)
+                {
+                    throw new Exception("Accent color could not be detected.");
                 }

                 var isHighContrast = syncModeToUse.HasFlag(ThemeSyncMode.SyncWithHighContrast)
                                      && WindowsThemeHelper.IsHighContrastEnabled();

                 // Check if we previously generated a theme matching the desired settings
-                var theme = this.GetTheme(baseColor, accentColor!, isHighContrast)
+                var theme = this.GetTheme(baseColor, accentColor, isHighContrast)
                             ?? RuntimeThemeGenerator.Current.GenerateRuntimeThemeFromWindowsSettings(baseColor, isHighContrast, this.libraryThemeProvidersInternal);

                 // Only change the theme if it's not the current already


Allow specifying WebhookDeliveryData webhookid right away

--- BTCPayServer/HostedServices/WebhookNotificationManager.cs
+++ BTCPayServer/HostedServices/WebhookNotificationManager.cs
@@ -94,8 +94,7 @@
             if (webhookDelivery is null)
                 return null;
             var oldDeliveryBlob = webhookDelivery.Delivery.GetBlob();
-            var newDelivery = NewDelivery();
-            newDelivery.WebhookId = webhookDelivery.Webhook.Id;
+            var newDelivery = NewDelivery(webhookDelivery.Webhook.Id);
             var newDeliveryBlob = new WebhookDeliveryBlob();
             newDeliveryBlob.Request = oldDeliveryBlob.Request;
             var webhookEvent = newDeliveryBlob.ReadRequestAs<WebhookEvent>();
@@ -125,9 +124,7 @@

         public async Task TestWebhook(string storeId, string webhookId, WebhookEventType webhookEventType)
         {
-            var delivery = NewDelivery();
-            delivery.WebhookId = webhookId;
-
+            var delivery = NewDelivery(webhookId);
             var webhook = (await StoreRepository.GetWebhooks(storeId)).Where(w => w.Id == webhookId).FirstOrDefault();

             var channel = Channel.CreateUnbounded<WebhookDeliveryRequest>();
@@ -153,8 +150,7 @@
                         continue;
                     if (!ShouldDeliver(webhookEvent.Type, webhookBlob))
                         continue;
-                    Data.WebhookDeliveryData delivery = NewDelivery();
-                    delivery.WebhookId = webhook.Id;
+                    Data.WebhookDeliveryData delivery = NewDelivery(webhook.Id);
                     webhookEvent.InvoiceId = invoiceEvent.InvoiceId;
                     webhookEvent.StoreId = invoiceEvent.Invoice.StoreId;
                     webhookEvent.DeliveryId = delivery.Id;
@@ -353,12 +349,14 @@
             return bytes;
         }

-        private static Data.WebhookDeliveryData NewDelivery()
-        {
-            var delivery = new Data.WebhookDeliveryData();
-            delivery.Id = Encoders.Base58.EncodeData(RandomUtils.GetBytes(16));
-            delivery.Timestamp = DateTimeOffset.UtcNow;
-            return delivery;
+        private static Data.WebhookDeliveryData NewDelivery(string webhookId)
+        {
+            return new Data.WebhookDeliveryData
+            {
+                Id = Encoders.Base58.EncodeData(RandomUtils.GetBytes(16)),
+                Timestamp = DateTimeOffset.UtcNow,
+                WebhookId = webhookId
+            };
         }
     }
 }


LWDEV-3087: cleaned up set commissions method

--- src/MarginTrading.Services/SwapCommissionService.cs
+++ src/MarginTrading.Services/SwapCommissionService.cs
@@ -58,8 +58,8 @@
                     order.SwapCommission = accountAsset.SwapLong;
                     break;
                 case OrderDirection.Sell:
-                    order.OpenCommission = order.GetOrderType() == OrderDirection.Buy ? accountAsset.CommissionLong : accountAsset.CommissionShort;
-                    order.CloseCommission = order.GetOrderType() == OrderDirection.Buy ? accountAsset.CommissionShort : accountAsset.CommissionLong;
+                    order.OpenCommission = accountAsset.CommissionShort;
+                    order.CloseCommission = accountAsset.CommissionLong;
                     order.SwapCommission = accountAsset.SwapShort;
                     break;
             }


Allow handler injection from client code

--- src/Medidata.MAuth.Core/Options/MAuthOptionsBase.cs
+++ src/Medidata.MAuth.Core/Options/MAuthOptionsBase.cs
@@ -36,8 +36,7 @@

         /// <summary>
         /// Determines the message handler for the requests to the MAuth server.
-        /// This property is for testing purposes only.
         /// </summary>
-        internal HttpMessageHandler MAuthServerHandler { get; set; }
+        public HttpMessageHandler MAuthServerHandler { get; set; }
     }
 }


add space to switch-case statement in CommandValidationVisitor.UnresolvedCommandCouldSucceed

--- src/Microsoft.PowerShell.PSReadLine/BasicEditing.cs
+++ src/Microsoft.PowerShell.PSReadLine/BasicEditing.cs
@@ -428,8 +428,8 @@
                 {
                 // The following are debugger commands that should be accepted if we're debugging
                 // because the console host will interpret these commands directly.
-                case 's': case 'v': case 'o': case 'c': case 'q': case'k': case 'l':
-                case 'S': case 'V': case 'O': case 'C': case 'Q': case'K': case 'L':
+                case 's': case 'v': case 'o': case 'c': case 'q': case 'k': case 'l':
+                case 'S': case 'V': case 'O': case 'C': case 'Q': case 'K': case 'L':
                 case '?': case 'h': case 'H':
                     // Ideally we would check $PSDebugContext, but it is set at function
                     // scope, and because we're in a module, we can't find that variable


Use Dictionary instead of pure Reflection

--- CSharpFunctionalExtensions/ValueObject/EnumValueObject.cs
+++ CSharpFunctionalExtensions/ValueObject/EnumValueObject.cs
@@ -79,6 +79,8 @@
     public abstract class EnumValueObject<TEnumeration> : ValueObject
         where TEnumeration : EnumValueObject<TEnumeration>
     {
+        private static readonly Dictionary<string, TEnumeration> Enumerations = GetEnumerations().ToDictionary(e => e.Id);
+
         protected EnumValueObject(string id)
         {
             if (string.IsNullOrWhiteSpace(id))
@@ -89,7 +91,7 @@
             Id = id;
         }

-        public static IEnumerable<TEnumeration> All = GetEnumerations();
+        public static IEnumerable<TEnumeration> All = Enumerations.Values;

         public virtual string Id { get; protected set; }

@@ -125,7 +127,9 @@

         public static Maybe<TEnumeration> FromId(string id)
         {
-            return All.SingleOrDefault(p => p.Id == id);
+            return Enumerations.ContainsKey(id)
+                ? Enumerations[id]
+                : null;
         }

         public static bool Is(string possibleKey) => All.Select(e => e.Id).Contains(possibleKey);


ErrorCode

ErrorCode

--- CSharpGL/0Foundations/OpenGLAPI/Enumerations/ErrorCode.cs
+++ CSharpGL/0Foundations/OpenGLAPI/Enumerations/ErrorCode.cs
@@ -6,38 +6,43 @@
     public enum ErrorCode : uint
     {
         /// <summary>
-        ///
+        /// 自上次调用glGetError以来没有错误。
         /// </summary>
         NoError = OpenGL.GL_NO_ERROR,

         /// <summary>
-        ///
+        /// 枚举参数不合法。
         /// </summary>
         InvalidEnum = OpenGL.GL_INVALID_ENUM,

         /// <summary>
-        ///
+        /// 值参数不合法。
         /// </summary>
         InvalidValue = OpenGL.GL_INVALID_VALUE,

         /// <summary>
-        ///
+        /// 一个指令的状态对指令的参数不合法。
         /// </summary>
         InvalidOperation = OpenGL.GL_INVALID_OPERATION,

         /// <summary>
-        ///
+        /// 压栈操作造成栈上溢(Overflow)。
         /// </summary>
         StackOverflow = OpenGL.GL_STACK_OVERFLOW,

         /// <summary>
-        ///
+        /// 弹栈操作时栈在最低点（译注：即栈下溢(Underflow)）。
         /// </summary>
         StackUnderflow = OpenGL.GL_STACK_UNDERFLOW,

         /// <summary>
-        ///
+        /// 内存调用操作无法调用（足够的）内存。
         /// </summary>
         OutOfMemory = OpenGL.GL_OUT_OF_MEMORY,
+
+        /// <summary>
+        /// 读取或写入一个不完整的帧缓冲。
+        /// </summary>
+        InvalidFramebufferOperation = OpenGL.GL_INVALID_FRAMEBUFFER_OPERATION,
     }
 }


Missed change from previous commit

Missed change from previous commit

--- CarpoolPlanner.NotificationService/NotificationManager.cs
+++ CarpoolPlanner.NotificationService/NotificationManager.cs
@@ -273,14 +273,20 @@
                     Port = port,
                     EnableSsl = enableSsl
                 };
+                if (Program.Verbose)
+                    Console.WriteLine("Attempting to send e-mail...");
                 await smtpClient.SendMailAsync(
                     from: ConfigurationManager.AppSettings["EmailAddress"],
                     recipients: email,
                     subject: subject,
                     body: message);
+                if (Program.Verbose)
+                    Console.WriteLine("E-mail sent.");
             }
             catch (Exception ex)
             {
+                if (Program.Verbose)
+                    Console.WriteLine("Failed to send e-mail: " + ex.Message);
                 log.Error(string.Concat("Failed to send e-mail to ", email, ". ", ex.ToString()));
             }
         }
@@ -668,7 +674,10 @@
                         availableDrivers.RemoveAt(index);
                     }
                     foreach (UserTripInstance driver in removedDrivers)
+                    {
                         driver.CommuteMethod = CommuteMethod.NeedRide;
+                        driver.CanDriveIfNeeded = true;
+                    }
                     availableSeats -= removedDrivers.Count * subGroup.Key;
                     difference = availableSeats - requiredSeats;
                 };


uncommented capture in catch block

uncommented capture in catch block

--- src/MvcMusicStore.FunctionalTests/Framework/Page.cs
+++ src/MvcMusicStore.FunctionalTests/Framework/Page.cs
@@ -27,7 +27,7 @@
             }
             catch
             {
-                //Capture();
+                Capture();
                 throw;
             }
         }
@@ -41,7 +41,7 @@
             }
             catch
             {
-                //Capture();
+                Capture();
                 throw;
             }
         }


Retorna BadRequest caso o saque não for possível

--- src/Neblina.Api/Controllers/WithdrawalController.cs
+++ src/Neblina.Api/Controllers/WithdrawalController.cs
@@ -49,6 +49,10 @@
                 Amount = transaction.Amount
             };

+            var processed = _repos.Transactions.Get(transaction.TransactionId);
+            if (processed.Status != TransactionStatus.Successful)
+                return BadRequest(receipt);
+
             return Ok(receipt);
         }
     }


Much less intrusive support for DataContractSerializer.

--- src/Nimbus.InfrastructureContracts/NimbusMessage.cs
+++ src/Nimbus.InfrastructureContracts/NimbusMessage.cs
@@ -1,11 +1,10 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Runtime.Serialization;

 namespace Nimbus
 {
-    [DataContract]
+    [Serializable]
     public class NimbusMessage
     {
         protected NimbusMessage()
@@ -26,31 +25,14 @@
             Payload = payload;
         }

-        [DataMember]
         public Guid MessageId { get; protected set; }
-
-        [DataMember]
         public Guid CorrelationId { get; set; }
-
-        [DataMember]
         public string DestinationPath { get; protected set; }
-
-        [DataMember]
         public object Payload { get; protected set; }
-
-        [DataMember]
         public string ReplyTo { get; set; }
-
-        [DataMember]
         public DateTime ScheduledEnqueueTimeUtc { get; set; }
-
-        [DataMember]
         public DateTimeOffset ExpiresAfter { get; set; }
-
-        [DataMember]
         public DateTimeOffset[] DeliveryAttempts { get; set; }
-
-        [DataMember]
         public IDictionary<string, object> Properties { get; set; }

         public void RecordDeliveryAttempt(DateTimeOffset deliveryAttemptTimestamp)


Fixed stability of the kerbal reasigner

Fixed stability of the kerbal reasigner

--- Client/Systems/KerbalReassigner/KerbalReassignerSystem.cs
+++ Client/Systems/KerbalReassigner/KerbalReassignerSystem.cs
@@ -12,7 +12,7 @@
         private KerbalReassignerEvents KerbalReassignerEvents { get; } = new KerbalReassignerEvents();
         public Dictionary<Guid, List<string>> VesselToKerbal { get; } = new Dictionary<Guid, List<string>>();
         public Dictionary<string, Guid> KerbalToVessel { get; } = new Dictionary<string, Guid>();
-
+
         #region Base overrides

         public override void OnEnabled()
@@ -124,7 +124,7 @@
         #endregion

         #region Private methods
-
+
         //Better not use a bool for this and enforce the gender binary on xir!
         private static ProtoCrewMember.Gender GetKerbalGender(string kerbalName)
         {
@@ -152,12 +152,15 @@
                 if (trimmedName == "Valentina")
                     return ProtoCrewMember.Gender.Female;

-                if (femaleNames.Any(name => name == trimmedName))
+                if (femaleNames != null && femaleNames.Any(name => name == trimmedName))
                     return ProtoCrewMember.Gender.Female;

-                foreach (var prefixName in femaleNamesPrefix.Where(fp => trimmedName.StartsWith(fp)))
-                    if (femaleNamesPostfix.Any(postfixName => trimmedName == prefixName + postfixName))
-                        return ProtoCrewMember.Gender.Female;
+                if (femaleNamesPrefix != null && femaleNamesPostfix != null &&
+                    femaleNamesPrefix.Where(fp => trimmedName.StartsWith(fp))
+                        .Any(prefixName => femaleNamesPostfix.Any(postfixName => trimmedName == prefixName + postfixName)))
+                {
+                    return ProtoCrewMember.Gender.Female;
+                }
             }
             catch (Exception e)
             {


Remove another VsAppShell.Current

Remove another VsAppShell.Current

--- src/Package/Test/DataInspect/VariableRHostScript.cs
+++ src/Package/Test/DataInspect/VariableRHostScript.cs
@@ -38,7 +38,7 @@
                 var result = await frame.TryEvaluateAndDescribeAsync(rScript, properties, RValueRepresentations.Str());

                 var globalResult = await frame.TryEvaluateAndDescribeAsync("base::environment()", properties, RValueRepresentations.Str());
-                _globalEnv = new VariableViewModel(globalResult, VsAppShell.Current.Services);
+                _globalEnv = new VariableViewModel(globalResult, Services);

                 return result;
             } finally {


print_r doesn't print "internal" fields

print_r doesn't print "internal" fields

--- src/Peachpie.Runtime/Reflection/TypeMembersUtils.cs
+++ src/Peachpie.Runtime/Reflection/TypeMembersUtils.cs
@@ -68,7 +68,7 @@
             return EnumerateInstanceFields(instance,
                 (f, d) => FormatPropertyNameForPrint(f, d),
                 (k) => k.ToString(),
-                (f) => true);
+                (f) => (f.Attributes & (FieldAttributes.Assembly)) != FieldAttributes.Assembly); // ignore "internal" fields
         }

         static string FormatPropertyNameForPrint(FieldInfo f, PhpTypeInfo declarer)


bug fix for card query

bug fix for card query

--- src/PointingPoker/DataAccess/Queries/CardQueries.cs
+++ src/PointingPoker/DataAccess/Queries/CardQueries.cs
@@ -79,13 +79,13 @@
         {
             using (var conn = _connectionProvider.GetOpenPointingPokerConnection())
             {
-                var cards = conn.Query<Card>(
-                    @"select top 1 [Id], [Description] [CreatedBy], [IsPointingClosed], [TeamId], [DateCreated]
+                var card = conn.QueryFirstOrDefault<Card>(
+                    @"select top 1 [Id], [Description], [CreatedBy], [IsPointingClosed], [TeamId], [DateCreated]
                     from Cards
                     where [Id] = @cardId",
                     new { cardId });

-                return cards.FirstOrDefault();
+                return card;
             }
         }


Added constructor overload

Added constructor overload

--- src/Serilog.Sinks.Loggly/Sinks/Loggly/LogglySink.cs
+++ src/Serilog.Sinks.Loggly/Sinks/Loggly/LogglySink.cs
@@ -47,6 +47,16 @@
         /// </summary>
         /// <param name="batchSizeLimit">The maximum number of events to post in a single batch.</param>
         /// <param name="period">The time to wait between checking for event batches.</param>
+        ///  <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
+        public LogglySink(IFormatProvider formatProvider, int batchSizeLimit, TimeSpan period) : this(formatProvider, batchSizeLimit, period, null, null)
+        {
+        }
+
+        /// <summary>
+        /// Construct a sink that saves logs to the specified storage account. Properties are being send as data and the level is used as tag.
+        /// </summary>
+        /// <param name="batchSizeLimit">The maximum number of events to post in a single batch.</param>
+        /// <param name="period">The time to wait between checking for event batches.</param>
         ///  <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
         /// <param name="logglyConfig">Used to configure underlying LogglyClient programmaticaly. Otherwise use app.Config.</param>
         /// <param name="includes">Decides if the sink should include specific properties in the log message</param>


Disable broken HttpWebRequest timeout test (#23979)

The HttpWebRequest test,
Timeout_SetTenMillisecondsOnLoopback_ThrowsWebException, doesn't work
reliably. It's trying to test timeouts on requests but doesn't actually
create stable conditions with the loopback server (i.e. to make it slow
to respond).

#22627

--- src/System.Net.Requests/tests/HttpWebRequestTest.cs
+++ src/System.Net.Requests/tests/HttpWebRequestTest.cs
@@ -279,6 +279,7 @@
             Assert.Equal(int.MaxValue, request.Timeout);
         }

+        [ActiveIssue(22627)]
         [Fact]
         public async Task Timeout_SetTenMillisecondsOnLoopback_ThrowsWebException()
         {


Added additional assert for ShaderKind test

--- src/Tests/BlackRat.Shaders.Tests/ShaderKindTests.cs
+++ src/Tests/BlackRat.Shaders.Tests/ShaderKindTests.cs
@@ -26,6 +26,16 @@
                     Assert.Fail("ToShortKindString did not return a string for all possible ShaderKind values");
                 }
             }
+
+            try
+            {
+                var shortName = ((ShaderKind)560).ToShortKindString();
+                Assert.Fail("ToShortKindString failed to throw an InvalidOperationExcept for an invalid value");
+            }
+            catch(InvalidOperationException)
+            {
+
+            }
         }
     }
 }


U4-1441 - bugfix

U4-1441 - bugfix

--- src/Umbraco.Web/Routing/LookupByNotFoundHandlers.cs
+++ src/Umbraco.Web/Routing/LookupByNotFoundHandlers.cs
@@ -68,8 +68,8 @@
                         LogHelper.Debug<LookupByNotFoundHandlers>("Lookup '{0}' found node with id={1}.", () => lookup.GetType().FullName, () => docRequest.PublishedContent.Id);
                         if (docRequest.Is404)
                             LogHelper.Debug<LookupByNotFoundHandlers>("Lookup '{0}' set status to 404.", () => lookup.GetType().FullName);
-                        return;
                     }
+                    break;
                 }

                 // else it's a legacy handler, run


Fix NuGet name typo

Fix NuGet name typo

--- src/VisualStudio.Interop/Properties/AssemblyInfo.cs
+++ src/VisualStudio.Interop/Properties/AssemblyInfo.cs
@@ -1,7 +1,7 @@
 using System.Reflection;

 [assembly: AssemblyTitle("NuGet.VisualStudio.Interop")]
-[assembly: AssemblyDescription("Nuget/Visual Studio interop assembly")]
+[assembly: AssemblyDescription("NuGet/Visual Studio interop assembly")]

 // The version of this assembly should never be changed.
 [assembly: AssemblyVersion("1.0.0.0")]


Unregister workspace on Dispose

Unregister workspace on Dispose

--- src/Workspaces/Core/Portable/Workspace/Workspace.cs
+++ src/Workspaces/Core/Portable/Workspace/Workspace.cs
@@ -323,6 +323,7 @@
             }

             (_optionService as IWorkspaceOptionService)?.OnWorkspaceDisposed(this);
+            _optionService?.UnregisterWorkspace(this);
         }

         #region Host API


add more string manipulation methods

add more string manipulation methods

--- src/Yisoft.Framework/Extensions/StringExtensions.cs
+++ src/Yisoft.Framework/Extensions/StringExtensions.cs
@@ -315,5 +315,422 @@

 			return url;
 		}
+
+		public static bool HasText(this string str) { return !string.IsNullOrEmpty(str); }
+
+		public static string AssertHasText(this string str, string errorMessage)
+		{
+			if (str.HasText()) return str;
+
+			throw new ArgumentException(errorMessage);
+		}
+
+		public static bool Contains(this string source, string toCheck, StringComparison comp) { return source.IndexOf(toCheck, comp) >= 0; }
+
+		private static InvalidOperationException _NotFound(string str, char separator)
+		{
+			return new InvalidOperationException($"Separator '{separator}' not found in '{str}'");
+		}
+
+		private static InvalidOperationException _NotFound(string str, string separator)
+		{
+			return new InvalidOperationException($"Separator '{separator}' not found in '{str}'");
+		}
+
+		/// <summary>
+		/// get the substring before the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns></returns>
+		public static string Before(this string str, char separator)
+		{
+			var index = str.IndexOf(separator);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring before the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns></returns>
+		public static string Before(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			var index = str.IndexOf(separator, comparisonType);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring after the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns></returns>
+		public static string After(this string str, char separator)
+		{
+			var index = str.IndexOf(separator);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(index + 1);
+		}
+
+		/// <summary>
+		/// get the substring after the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns></returns>
+		public static string After(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			var index = str.IndexOf(separator, comparisonType);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(index + separator.Length);
+		}
+
+
+		/// <summary>
+		/// get the substring before the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring before the first occurence of the separator or null if not found</returns>
+		public static string TryBefore(this string str, char separator)
+		{
+			if (str == null) return null;
+
+			var index = str.IndexOf(separator);
+
+			return index == -1 ? null : str.Substring(0, index);
+		}
+
+
+		/// <summary>
+		/// get the substring before the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring before the first occurence of the separator or null if not found</returns>
+		public static string TryBefore(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (str == null) return null;
+
+			var index = str.IndexOf(separator, comparisonType);
+
+			return index == -1 ? null : str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring after the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring after the first occurence of the separator or null if not found</returns>
+		public static string TryAfter(this string str, char separator)
+		{
+			if (str == null) return null;
+
+			var index = str.IndexOf(separator);
+
+			return index == -1 ? null : str.Substring(index + 1);
+		}
+
+		/// <summary>
+		/// get the substring after the first occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring after the first occurence of the separator or null if not found</returns>
+		public static string TryAfter(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (str == null) return null;
+
+			var index = str.IndexOf(separator, comparisonType);
+
+			return index == -1 ? null : str.Substring(index + separator.Length);
+		}
+
+		/// <summary>
+		/// get the substring before the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring before the last occurence of the separator</returns>
+		public static string BeforeLast(this string str, char separator)
+		{
+			var index = str.LastIndexOf(separator);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring before the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring before the last occurence of the separator</returns>
+		public static string BeforeLast(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			var index = str.LastIndexOf(separator, comparisonType);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring after the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring after the last occurence of the separator</returns>
+		public static string AfterLast(this string str, char separator)
+		{
+			var index = str.LastIndexOf(separator);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(index + 1);
+		}
+
+		/// <summary>
+		/// get the substring after the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring after the last occurence of the separator</returns>
+		public static string AfterLast(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			var index = str.LastIndexOf(separator, comparisonType);
+
+			if (index == -1) throw _NotFound(str, separator);
+
+			return str.Substring(index + separator.Length);
+		}
+
+		/// <summary>
+		/// get the substring before the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring before the last occurence of the separator or null if not found</returns>
+		public static string TryBeforeLast(this string str, char separator)
+		{
+			if (str == null) return null;
+
+			var index = str.LastIndexOf(separator);
+
+			return index == -1 ? null : str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring before the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring before the last occurence of the separator or null if not found</returns>
+		public static string TryBeforeLast(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (str == null) return null;
+
+			var index = str.LastIndexOf(separator, comparisonType);
+
+			return index == -1 ? null : str.Substring(0, index);
+		}
+
+		/// <summary>
+		/// get the substring after the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <returns>the substring after the last occurence of the separator or null if not found</returns>
+		public static string TryAfterLast(this string str, char separator)
+		{
+			if (str == null) return null;
+
+			var index = str.LastIndexOf(separator);
+
+			return index == -1 ? null : str.Substring(index + 1);
+		}
+
+		/// <summary>
+		/// get the substring after the last occurence of the separator
+		/// </summary>
+		/// <param name="str"></param>
+		/// <param name="separator"></param>
+		/// <param name="comparisonType"></param>
+		/// <returns>the substring after the last occurence of the separator or null if not found</returns>
+		public static string TryAfterLast(this string str, string separator, StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (str == null) return null;
+
+			var index = str.LastIndexOf(separator, comparisonType);
+
+			return index == -1 ? null : str.Substring(index + separator.Length);
+		}
+
+		public static string Between(this string str,
+			string firstSeparator,
+			string secondSeparator = null,
+			StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (secondSeparator == null) secondSeparator = firstSeparator;
+
+			var start = str.IndexOf(firstSeparator, comparisonType);
+
+			if (start == -1) throw _NotFound(str, firstSeparator);
+
+			start = start + firstSeparator.Length;
+
+			var end = str.IndexOf(secondSeparator, start, comparisonType);
+
+			if (start == -1) throw _NotFound(str, secondSeparator);
+
+			return str.Substring(start, end - start);
+		}
+
+		public static string Between(this string str, char firstSeparator, char secondSeparator = (char) 0)
+		{
+			if (secondSeparator == 0) secondSeparator = firstSeparator;
+
+			var start = str.IndexOf(firstSeparator);
+
+			if (start == -1) throw _NotFound(str, firstSeparator);
+
+			start = start + 1;
+
+			var end = str.IndexOf(secondSeparator, start);
+
+			if (start == -1) throw _NotFound(str, secondSeparator);
+
+			return str.Substring(start, end - start);
+		}
+
+		public static string TryBetween(this string str,
+			string firstSeparator,
+			string secondSeparator = null,
+			StringComparison comparisonType = StringComparison.Ordinal)
+		{
+			if (secondSeparator == null) secondSeparator = firstSeparator;
+
+			var start = str.IndexOf(firstSeparator, comparisonType);
+
+			if (start == -1) return null;
+
+			start = start + 1;
+
+			var end = str.IndexOf(secondSeparator, start, comparisonType);
+
+			return start == -1 ? null : str.Substring(start, end - start);
+		}
+
+		public static string TryBetween(this string str, char firstSeparator, char secondSeparator = (char) 0)
+		{
+			if (secondSeparator == 0) secondSeparator = firstSeparator;
+
+			var start = str.IndexOf(firstSeparator);
+
+			if (start == -1) return null;
+
+			start = start + 1;
+
+			var end = str.IndexOf(secondSeparator, start);
+
+			return start == -1 ? null : str.Substring(start, end - start);
+		}
+
+		public static string Start(this string str, int numChars)
+		{
+			if (numChars > str.Length) throw new InvalidOperationException($"String '{str}' is too short");
+
+			return str.Substring(0, numChars);
+		}
+
+		public static string TryStart(this string str, int numChars)
+		{
+			if (str == null) return null;
+
+			return numChars > str.Length ? str : str.Substring(0, numChars);
+		}
+
+		public static string End(this string str, int numChars)
+		{
+			if (numChars > str.Length) throw new InvalidOperationException($"String '{str}' is too short");
+
+			return str.Substring(str.Length - numChars, numChars);
+		}
+
+		public static string TryEnd(this string str, int numChars)
+		{
+			if (str == null) return null;
+
+			return numChars > str.Length ? str : str.Substring(str.Length - numChars, numChars);
+		}
+
+		public static string RemoveStart(this string str, int numChars)
+		{
+			if (numChars > str.Length) throw new InvalidOperationException($"String '{str}' is too short");
+
+			return str.Substring(numChars);
+		}
+
+		public static string TryRemoveStart(this string str, int numChars) { return numChars > str.Length ? "" : str.Substring(numChars); }
+
+		public static string RemoveEnd(this string str, int numChars)
+		{
+			if (numChars > str.Length) throw new InvalidOperationException($"String '{str}' is too short");
+
+			return str.Substring(0, str.Length - numChars);
+		}
+
+		public static string TryRemoveEnd(this string str, int numChars) { return numChars > str.Length ? "" : str.Substring(0, str.Length - numChars); }
+
+		public static List<string> SplitInGroupsOf(this string str, int maxChars)
+		{
+			if (string.IsNullOrEmpty(str)) return new List<string>();
+
+			if (maxChars <= 0) throw new ArgumentOutOfRangeException($"{nameof(maxChars)} should be greater than 0");
+
+			var result = new List<string>();
+
+			for (var i = 0; i < str.Length; i += maxChars)
+			{
+				result.Add(i + maxChars < str.Length ? str.Substring(i, maxChars) : str.Substring(i));
+			}
+
+			return result;
+		}
+
+		public static string PadChopRight(this string str, int length)
+		{
+			str = str ?? "";
+
+			return str.Length > length ? str.Substring(0, length) : str.PadRight(length);
+		}
+
+		public static string PadChopLeft(this string str, int length)
+		{
+			str = str ?? "";
+
+			return str.Length > length ? str.Substring(str.Length - length, length) : str.PadLeft(length);
+		}
 	}
 }


Make Container's Remove virtual

Make Container's Remove virtual

--- osu.Framework/Graphics/Containers/Container.cs
+++ osu.Framework/Graphics/Containers/Container.cs
@@ -203,7 +203,7 @@
         /// <summary>
         /// Removes a given child from this container.
         /// </summary>
-        public bool Remove(T drawable)
+        public virtual bool Remove(T drawable)
         {
             if (Content != this)
                 return Content.Remove(drawable);


Rearrange and rename member

Rearrange and rename member

--- osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs
+++ osu.Game.Rulesets.Taiko/Mods/TaikoModHidden.cs
@@ -19,6 +19,16 @@
         public override string Description => @"Beats fade out before you hit them!";
         public override double ScoreMultiplier => 1.06;

+        [SettingSource("Fade-out Time", "The bigger this multiplier is, the sooner the notes will start fading out")]
+        public BindableNumber<double> FadeOutTimeMultiplier { get; } = new BindableDouble
+        {
+            MinValue = 0.5,
+            MaxValue = 1.5,
+            Default = 1.0,
+            Value = 1.0,
+            Precision = 0.01,
+        };
+
         /// <summary>
         /// In stable taiko, the hit position is 160, so the active playfield is essentially 160 pixels shorter
         /// than the actual screen width. The normalized playfield height is 480, so on a 4:3 screen the
@@ -31,16 +41,6 @@

         private BeatmapDifficulty difficulty;
         private ControlPointInfo controlPointInfo;
-
-        [SettingSource("Fade-out Time", "The bigger this multiplier is, the sooner the notes will start fading out")]
-        public BindableNumber<double> VisibilityMod { get; } = new BindableDouble
-        {
-            MinValue = 0.5,
-            MaxValue = 1.5,
-            Default = 1.0,
-            Value = 1.0,
-            Precision = 0.01,
-        };

         protected override void ApplyIncreasedVisibilityState(DrawableHitObject hitObject, ArmedState state)
         {
@@ -69,7 +69,7 @@
             }

             // I *think* it's like this because stable's default velocity multiplier is 1.4
-            var preempt = 14000 / MultiplierAt(hitObject.HitObject.StartTime) * VisibilityMod.Value;
+            var preempt = 14000 / MultiplierAt(hitObject.HitObject.StartTime) * FadeOutTimeMultiplier.Value;
             var start = hitObject.HitObject.StartTime - preempt * 0.6;
             var duration = preempt * 0.3;


Fix hold for menu button occasionally disappearing

--- osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
+++ osu.Game/Screens/Play/HUD/HoldForMenuButton.cs
@@ -77,7 +77,7 @@
                 Alpha = 1;
             else
                 Alpha = Interpolation.ValueAt(
-                    MathHelper.Clamp(Clock.ElapsedFrameTime, 0, 1000),
+                    MathHelper.Clamp(Clock.ElapsedFrameTime, 0, 200),
                     Alpha, MathHelper.Clamp(1 - positionalAdjust, 0.04f, 1), 0, 200, Easing.OutQuint);
         }


Alphabet recycle

Alphabet recycle

--- ColorMap/Algorithm/FloodFill/QueueFloodFillWithLetters.cs
+++ ColorMap/Algorithm/FloodFill/QueueFloodFillWithLetters.cs
@@ -80,10 +80,21 @@
                             }
                         }
                     }
+
+                    RecycleAlphabet();
                 }
             }

             return this;
+        }
+
+        private void RecycleAlphabet()
+        {
+            if (_alphabet.Count.Equals(0))
+            {
+                _alphabet.Clear();
+                _alphabet.AddRange(_wholeAlphabet);
+            }
         }


Remove problematic body code (#10783)

Remove problematic body code (#10783)

--- Content.Shared/Body/Components/SharedBodyPartComponent.cs
+++ Content.Shared/Body/Components/SharedBodyPartComponent.cs
@@ -257,9 +257,6 @@

         private void AddedToBody(SharedBodyComponent body)
         {
-            var transformComponent = _entMan.GetComponent<TransformComponent>(Owner);
-            transformComponent.LocalRotation = 0;
-            transformComponent.AttachParent(body.Owner);
             OnAddedToBody(body);

             foreach (var mechanism in _mechanisms)


(x) CTL-331 Fixed validation error synchronization in release mode

--- src/Catel.MVVM/Catel.MVVM.NET40/MVVM/ViewModels/ViewModelBase.cs
+++ src/Catel.MVVM/Catel.MVVM.NET40/MVVM/ViewModels/ViewModelBase.cs
@@ -1289,16 +1289,15 @@
                 ViewModelManager.RegisterModel(this, model);
             }

+            _modelsDirtyFlags[modelProperty] = false;
+            _modelErrorInfo[modelProperty] = new ModelErrorInfo(model);
+            _modelErrorInfo[modelProperty].Updated += OnModelErrorInfoUpdated;
+
             var modelAsINotifyPropertyChanged = model as INotifyPropertyChanged;
             if (modelAsINotifyPropertyChanged != null)
             {
                 modelAsINotifyPropertyChanged.PropertyChanged += OnModelPropertyChangedInternal;
             }
-
-            _modelsDirtyFlags[modelProperty] = false;
-            _modelErrorInfo[modelProperty] = new ModelErrorInfo(model);
-
-            _modelErrorInfo[modelProperty].Updated += OnModelErrorInfoUpdated;

             if (SupportIEditableObject)
             {
@@ -1339,7 +1338,6 @@
             if (_modelErrorInfo.ContainsKey(modelProperty))
             {
                 var modelErrorInfo = _modelErrorInfo[modelProperty];
-
                 modelErrorInfo.Updated -= OnModelErrorInfoUpdated;
                 modelErrorInfo.CleanUp();


Fix crash caused if missing icons (BGO #607822)

--- src/Core/Banshee.ThickClient/Banshee.Library.Gui/ImportDialog.cs
+++ src/Core/Banshee.ThickClient/Banshee.Library.Gui/ImportDialog.cs
@@ -165,7 +165,10 @@
                     }

                     if (source != null) {
-                        source_model.SetValue (iter, 0, GetIcon (source));
+                        var icon = GetIcon (source);
+                        if (icon != null) {
+                            source_model.SetValue (iter, 0, icon);
+                        }
                     }
                 }
             }


re-enable seed of FilterList.UpdatedDate and FilterList.PublishedDate

closes #544

--- src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs
+++ src/FilterLists.Data/Seed/Extensions/SeedFilterListsDbContext.cs
@@ -22,8 +22,11 @@
             await SeedOrUpdate<Software>(dbContext, dataPath);
             await SeedOrUpdate<Syntax>(dbContext, dataPath);
             await SeedOrUpdate<Tag>(dbContext, dataPath);
+
             await SeedOrUpdate<FilterList>(dbContext, dataPath);
             await SetDefaultLicenseIdAsync(dbContext);
+            await SeedFilterListDates(dbContext, dataPath);
+
             await SeedOrUpdate<FilterListLanguage>(dbContext, dataPath);
             await SeedOrUpdate<FilterListMaintainer>(dbContext, dataPath);
             await SeedOrUpdate<FilterListTag>(dbContext, dataPath);
@@ -167,5 +170,33 @@
             dbContext.UpdateRange(listsWithoutLicense);
             await dbContext.SaveChangesAsync();
         }
+
+        private static async Task SeedFilterListDates(DbContext dbContext, string dataPath)
+        {
+            var seed = GetSeed<FilterList>(dataPath);
+            var lists = dbContext.Set<FilterList>()
+                                 .ToList()
+                                 .Select(l =>
+                                 {
+                                     var seedList = seed.FirstOrDefault(s => s.Id == l.Id);
+                                     l.PublishedDate = seedList?.PublishedDate is DateTime seedPublishedDate
+                                         ? l.PublishedDate is DateTime currentPublishedDate
+                                             ? seedPublishedDate < currentPublishedDate
+                                                 ? seedPublishedDate
+                                                 : currentPublishedDate
+                                             : seedPublishedDate
+                                         : l.PublishedDate;
+                                     l.UpdatedDate = seedList?.UpdatedDate is DateTime seedUpdatedDate
+                                         ? l.UpdatedDate is DateTime currentUpdatedDate
+                                             ? seedUpdatedDate < currentUpdatedDate
+                                                 ? currentUpdatedDate
+                                                 : seedUpdatedDate
+                                             : seedUpdatedDate
+                                         : l.UpdatedDate;
+                                     return l;
+                                 });
+            dbContext.UpdateRange(lists);
+            await dbContext.SaveChangesAsync();
+        }
     }
 }


Add [Obsolete] to vbNewLine (#39753)

Add [Obsolete] to vbNewLine (#39753)

--- src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
+++ src/Microsoft.VisualBasic.Core/ref/Microsoft.VisualBasic.Core.cs
@@ -128,8 +128,8 @@
         public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRight = Microsoft.VisualBasic.MsgBoxStyle.MsgBoxRight;
         public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxRtlReading = Microsoft.VisualBasic.MsgBoxStyle.MsgBoxRtlReading;
         public const Microsoft.VisualBasic.MsgBoxStyle vbMsgBoxSetForeground = Microsoft.VisualBasic.MsgBoxStyle.MsgBoxSetForeground;
+        public const Microsoft.VisualBasic.VbStrConv vbNarrow = Microsoft.VisualBasic.VbStrConv.Narrow;
         [System.ObsoleteAttribute("For a carriage return and line feed, use vbCrLf.  For the current platform's newline, use System.Environment.NewLine.")]
-        public const Microsoft.VisualBasic.VbStrConv vbNarrow = Microsoft.VisualBasic.VbStrConv.Narrow;
         public const string vbNewLine = "\r\n";
         public const Microsoft.VisualBasic.MsgBoxResult vbNo = Microsoft.VisualBasic.MsgBoxResult.No;
         public const Microsoft.VisualBasic.FileAttribute vbNormal = Microsoft.VisualBasic.FileAttribute.Normal;


Updated the constructor check to skip any constructors with a parameter of type IPublishedValueFallback

IPublishedValueFallback isn't really injectable, so it makes sense to skip constructors with a parameter of type IPublishedValueFallback. This then also excludes all ModelsBuilder models.

--- src/Skybrud.ImagePicker/Controllers/Api/ImagePickerController.cs
+++ src/Skybrud.ImagePicker/Controllers/Api/ImagePickerController.cs
@@ -54,7 +54,7 @@
                         ParameterInfo[] parameters = constructor.GetParameters();

                         if (parameters.Length == 0) continue;
-                        if (parameters.Length > 1 && parameters.Skip(1).Any(x => x.ParameterType.IsValueType)) continue;
+                        if (parameters.Length > 1 && parameters.Skip(1).Any(x => !IsValidType(x))) continue;
                         if (isMediaPicker3) {
                             if (parameters[0].ParameterType != typeof(MediaWithCrops)) continue;
                         } else {
@@ -77,6 +77,14 @@

         #region Private helper methods

+        private static bool IsValidType(ParameterInfo parameter) {
+            return IsValidType(parameter.ParameterType);
+        }
+
+        private static bool IsValidType(Type type) {
+            return !type.IsValueType && type != typeof(IPublishedValueFallback);
+        }
+
         private static JObject Map(Type type) {

             JObject json = new JObject {


Added examples.

Added examples.

--- src/Workspaces/Core/Portable/PatternMatching/PatternMatchKind.cs
+++ src/Workspaces/Core/Portable/PatternMatching/PatternMatchKind.cs
@@ -26,39 +26,41 @@

         /// <summary>
         /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched humps in
-        /// the candidate.  The first hump in the pattern matched the first hump in the candidate string.
-        /// And there were no unmatched humps in the candidate between matched humps.
+        /// the candidate in order.  The first hump in the pattern matched the first hump in the candidate
+        /// string.  There were no unmatched humps in the candidate between matched humps.
         ///
         /// Examples: "CFP" matching "CodeFixProvider" as well as "CFP" matching "CodeFixProviderService".
         /// </summary>
         CamelCaseContiguousFromStart,

         /// <summary>
-        /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched humps in
-        /// the candidate.  The first hump in the pattern matched the first hump in the candidate string.
+        /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched some hump in
+        /// the candidate in order.  The first hump in the pattern matched the first hump in the candidate string.
         /// There was at least one hump in the candidate that was not matched that was between humps in the
         /// candidate that were matched.
         ///
-        /// Examples: "CPS" matching "CodeFixProviderService"
+        /// Examples: "CPS" matching "CodeFixProviderService".  Here 'Fix' was not matched, so the result was
+        /// not 'Contiguous'.
         /// </summary>
         CamelCaseFromStart,

         /// <summary>
         /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched humps in
-        /// the candidate.  The first hump in the pattern did not match the first hump in the candidate string.
-        /// There were no unmatched humps in the candidate between matched humps.
+        /// the candidate in order.  The first hump in the pattern did not match the first hump in the candidate
+        /// string.  There were no unmatched humps in the candidate between matched humps.
         ///
         /// Example: "FP" matching "CodeFixProviderService"
         /// </summary>
         CamelCaseContiguous,

         /// <summary>
-        /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched humps in
-        /// the candidate.  The first hump in the pattern did not match the first hump in the candidate string.
-        /// There was at least one hump in the candidate that was not matched that was between humps in the
-        /// candidate that were matched.
+        /// The pattern matched the CamelCased candidate string.  All humps in the pattern matched some hump in
+        /// the candidate in order.  The first hump in the pattern did not match the first hump in the candidate
+        /// string.  There was at least one hump in the candidate that was not matched that was between humps
+        /// in the candidate that were matched.
         ///
-        /// Example: "FS" matching "CodeFixProviderService"
+        /// Example: "FS" matching "CodeFixProviderService".  Because 'Code' was not matched, the match was not
+        /// a 'FromStart' match.  Because 'Provider' was not matched, the match was not a 'Contiguous' match.
         /// </summary>
         CamelCase,


More testing for partial methods (#44061)

--- src/Compilers/CSharp/Test/Symbol/Symbols/ExtendedPartialMethodsTests.cs
+++ src/Compilers/CSharp/Test/Symbol/Symbols/ExtendedPartialMethodsTests.cs
@@ -7,6 +7,7 @@
 using Microsoft.CodeAnalysis.CSharp.Symbols;
 using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
 using Microsoft.CodeAnalysis.Test.Utilities;
+using Roslyn.Test.Utilities;
 using Xunit;

 namespace Microsoft.CodeAnalysis.CSharp.UnitTests
@@ -578,6 +579,49 @@
     internal override void M1([AllowNull] string s1)
     {
     }
+}";
+            var comp = CreateCompilation(new[] { text1, AllowNullAttributeDefinition }, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics();
+        }
+
+        [Fact]
+        public void Virtual_AllowNull_05()
+        {
+            const string text1 = @"
+#nullable enable
+using System.Diagnostics.CodeAnalysis;
+
+partial class C
+{
+    internal virtual partial void M1([AllowNull] string s1, string s2);
+    internal virtual partial void M1(string s1, [AllowNull] string s2) { }
+}
+class D : C
+{
+    internal override void M1([AllowNull] string s1, [AllowNull] string s2)
+    {
+    }
+}";
+            var comp = CreateCompilation(new[] { text1, AllowNullAttributeDefinition }, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics();
+        }
+
+        [Fact]
+        public void Virtual_AllowNull_06()
+        {
+            const string text1 = @"
+#nullable enable
+using System.Diagnostics.CodeAnalysis;
+
+partial class C
+{
+    internal virtual partial void M1([AllowNull] string s1, string s2);
+    internal virtual partial void M1(string s1, [AllowNull] string s2) { }
+}
+partial class D : C
+{
+    internal override partial void M1(string s1, [AllowNull] string s2);
+    internal override partial void M1([AllowNull] string s1, string s2) { }
 }";
             var comp = CreateCompilation(new[] { text1, AllowNullAttributeDefinition }, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
             comp.VerifyDiagnostics();
@@ -680,6 +724,55 @@
         }

         [Fact]
+        public void Override_NoImpl()
+        {
+            const string text1 = @"
+class C
+{
+    internal virtual void M1() { }
+}
+
+partial class D : C
+{
+    internal override partial void M1();
+}";
+            var comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics(
+                // (9,36): error CS8793: Partial method 'D.M1()' must have an implementation part because it has accessibility modifiers.
+                //     internal override partial void M1();
+                Diagnostic(ErrorCode.ERR_PartialMethodWithAccessibilityModsMustHaveImplementation, "M1").WithArguments("D.M1()").WithLocation(9, 36)
+            );
+            var method = comp.GetMember<MethodSymbol>("D.M1");
+            Assert.Equal(comp.GetMember<MethodSymbol>("C.M1"), method.OverriddenMethod);
+        }
+
+        [Fact]
+        public void Override_NoImpl_NoAccessibility()
+        {
+            const string text1 = @"
+class C
+{
+    internal virtual void M1() { }
+}
+
+partial class D : C
+{
+    override partial void M1();
+}";
+            var comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics(
+                // (9,27): error CS8796: Partial method 'D.M1()' must have accessibility modifiers because it has a 'virtual', 'override', 'sealed', 'new', or 'extern' modifier.
+                //     override partial void M1();
+                Diagnostic(ErrorCode.ERR_PartialMethodWithExtendedModMustHaveAccessMods, "M1").WithArguments("D.M1()").WithLocation(9, 27),
+                // (9,27): error CS0507: 'D.M1()': cannot change access modifiers when overriding 'internal' inherited member 'C.M1()'
+                //     override partial void M1();
+                Diagnostic(ErrorCode.ERR_CantChangeAccessOnOverride, "M1").WithArguments("D.M1()", "internal", "C.M1()").WithLocation(9, 27)
+            );
+            var method = comp.GetMember<MethodSymbol>("D.M1");
+            Assert.Equal(comp.GetMember<MethodSymbol>("C.M1"), method.OverriddenMethod);
+        }
+
+        [Fact]
         public void Override_Mismatch_01()
         {
             const string text1 = @"
@@ -776,6 +869,27 @@
                 // (15,9): warning CS8602: Dereference of a possibly null reference.
                 //         s2.ToString(); // 2
                 Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s2").WithLocation(15, 9));
+        }
+
+        [Fact]
+        public void Override_GenericBase()
+        {
+            const string text1 = @"
+#nullable enable
+
+class C<T>
+{
+    internal virtual void M1(T t1) { }
+}
+partial class D : C<string>
+{
+    internal override partial void M1(string t1);
+    internal override partial void M1(string t1)
+    {
+    }
+}";
+            var comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics();
         }

         [Fact]
@@ -891,6 +1005,23 @@
         }

         [Fact]
+        public void NewVirtual_Reordered()
+        {
+            const string text1 = @"
+class C
+{
+    internal virtual void M1() { }
+}
+partial class D : C
+{
+    internal new virtual partial void M1();
+    internal virtual new partial void M1() { }
+}";
+            var comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics();
+        }
+
+        [Fact]
         public void Extern_LangVersion()
         {
             const string text1 = @"
@@ -914,6 +1045,32 @@

             comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
             comp.VerifyDiagnostics();
+        }
+
+        [Fact]
+        public void Extern_DuplicateMod()
+        {
+            const string text1 = @"
+using System.Runtime.InteropServices;
+
+partial class C
+{
+    internal static extern partial void M1();
+
+    [DllImport(""something.dll"")]
+    internal static extern partial void M1();
+}";
+            var comp = CreateCompilation(text1, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics(
+                // (6,41): error CS0759: No defining declaration found for implementing declaration of partial method 'C.M1()'
+                //     internal static extern partial void M1();
+                Diagnostic(ErrorCode.ERR_PartialMethodMustHaveLatent, "M1").WithArguments("C.M1()").WithLocation(6, 41),
+                // (9,41): error CS0757: A partial method may not have multiple implementing declarations
+                //     internal static extern partial void M1();
+                Diagnostic(ErrorCode.ERR_PartialMethodOnlyOneActual, "M1").WithLocation(9, 41),
+                // (9,41): error CS0111: Type 'C' already defines a member called 'M1' with the same parameter types
+                //     internal static extern partial void M1();
+                Diagnostic(ErrorCode.ERR_MemberAlreadyExists, "M1").WithArguments("M1", "C").WithLocation(9, 41));
         }

         [Fact]
@@ -994,7 +1151,14 @@
                 var type = module.ContainingAssembly.GetTypeByMetadataName("C");
                 var method = type.GetMember<MethodSymbol>("M1");

+                // note: we're opting to give the same answer for 'IsExtern' on both partial method declarations
+                // because 'IsExtern' is true when the method is round tripped from metadata.
                 Assert.True(method.IsExtern);
+                if (method.PartialImplementationPart is MethodSymbol implementation)
+                {
+                    Assert.True(method.IsPartialDefinition());
+                    Assert.True(implementation.IsExtern);
+                }

                 var importData = method.GetDllImportData();
                 Assert.NotNull(importData);
@@ -1028,9 +1192,6 @@

             var method = (MethodSymbol)comp.GetMembers("C.M1")[0];
             Assert.True(method.IsPartialDefinition());
-            // PROTOTYPE: it feels like both IsAsync/IsExtern should be shared between
-            // definition+implementation, or neither should.
-            // Currently IsExtern is shared but IsAsync is not.
             Assert.False(method.IsAsync);
             Assert.True(method.PartialImplementationPart.IsAsync);
         }
@@ -1055,9 +1216,6 @@

             var method = (MethodSymbol)comp.GetMembers("C.M1")[0];
             Assert.True(method.IsPartialDefinition());
-            // PROTOTYPE: it feels like both IsAsync/IsExtern should be shared between
-            // definition+implementation, or neither should.
-            // Currently IsExtern is shared but IsAsync is not.
             Assert.False(method.IsAsync);
             Assert.True(method.PartialImplementationPart.IsAsync);
         }
@@ -1090,9 +1248,6 @@

             var method = (MethodSymbol)verifier.Compilation.GetMembers("C.M1")[0];
             Assert.True(method.IsPartialDefinition());
-            // PROTOTYPE: it feels like both IsAsync/IsExtern should be shared between
-            // definition+implementation, or neither should.
-            // Currently IsExtern is shared but IsAsync is not.
             Assert.False(method.IsAsync);
             Assert.True(method.PartialImplementationPart.IsAsync);
         }
@@ -1172,6 +1327,32 @@
         }

         [Fact]
+        public void Async_07()
+        {
+            const string text = @"
+using System.Threading.Tasks;
+
+partial class C
+{
+    partial Task M();
+    async partial Task M()
+    {
+        await Task.Yield();
+    }
+}
+";
+
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics(
+                // (6,18): error CS8794: Partial method 'C.M()' must have accessibility modifiers because it has a non-void return type.
+                //     partial Task M();
+                Diagnostic(ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods, "M").WithArguments("C.M()").WithLocation(6, 18),
+                // (7,24): error CS8794: Partial method 'C.M()' must have accessibility modifiers because it has a non-void return type.
+                //     async partial Task M()
+                Diagnostic(ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods, "M").WithArguments("C.M()").WithLocation(7, 24));
+        }
+
+        [Fact]
         public void New_LangVersion()
         {
             const string text1 = @"
@@ -1470,6 +1651,155 @@
         }

         [Fact]
+        public void DefaultInterfaceImpl_NoImpl()
+        {
+            const string text = @"
+#nullable enable
+
+partial interface I
+{
+    internal partial void M(string s1);
+}
+";
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, targetFramework: TargetFramework.NetStandardLatest);
+            comp.VerifyDiagnostics(
+                // (6,27): error CS8793: Partial method 'I.M(string)' must have an implementation part because it has accessibility modifiers.
+                //     internal partial void M(string s1);
+                Diagnostic(ErrorCode.ERR_PartialMethodWithAccessibilityModsMustHaveImplementation, "M").WithArguments("I.M(string)").WithLocation(6, 27)
+            );
+        }
+
+        [Fact]
+        public void DefaultInterfaceImpl_01()
+        {
+            const string text = @"
+#nullable enable
+
+partial interface I
+{
+    internal partial void M(string s1);
+    internal partial void M(string s1) { }
+}
+";
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, targetFramework: TargetFramework.NetStandardLatest);
+            comp.VerifyDiagnostics(
+            );
+        }
+
+        [Fact]
+        public void DefaultInterfaceImpl_AllowNull_01()
+        {
+            const string text = @"
+#nullable enable
+using System.Diagnostics.CodeAnalysis;
+
+partial interface I
+{
+    public partial void M([AllowNull] string s1);
+    public partial void M(string s1)
+    {
+        _ = s1.ToString(); // 1
+    }
+}
+
+class C : I
+{
+    public void M(string s1) { }
+}
+";
+            // note that I.M is not virtual so C.M does not implement it
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, targetFramework: TargetFramework.NetStandardLatest);
+            comp.VerifyDiagnostics(
+                // (10,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s1.ToString();
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s1").WithLocation(10, 13)
+            );
+        }
+
+        [Fact]
+        public void DefaultInterfaceImpl_AllowNull_02()
+        {
+            const string text = @"
+#nullable enable
+using System.Diagnostics.CodeAnalysis;
+
+partial interface I
+{
+    public virtual partial void M([AllowNull] string s1, string s2);
+    public virtual partial void M(string s1, [AllowNull] string s2)
+    {
+        _ = s1.ToString(); // 1
+        _ = s2.ToString(); // 2
+    }
+}
+
+class C : I
+{
+    void I.M(string s1, string s2) { } // 3, 4
+}
+";
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, targetFramework: TargetFramework.NetStandardLatest);
+            comp.VerifyDiagnostics(
+                // (10,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s1.ToString(); // 1
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s1").WithLocation(10, 13),
+                // (11,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s2.ToString(); // 2
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s2").WithLocation(11, 13),
+                // (17,12): warning CS8769: Nullability of reference types in type of parameter 's1' doesn't match implemented member 'void I.M(string s1, string s2)' (possibly because of nullability attributes).
+                //     void I.M(string s1, string s2) { } // 3, 4
+                Diagnostic(ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation, "M").WithArguments("s1", "void I.M(string s1, string s2)").WithLocation(17, 12),
+                // (17,12): warning CS8769: Nullability of reference types in type of parameter 's2' doesn't match implemented member 'void I.M(string s1, string s2)' (possibly because of nullability attributes).
+                //     void I.M(string s1, string s2) { } // 3, 4
+                Diagnostic(ErrorCode.WRN_TopLevelNullabilityMismatchInParameterTypeOnExplicitImplementation, "M").WithArguments("s2", "void I.M(string s1, string s2)").WithLocation(17, 12)
+            );
+        }
+
+        [Fact]
+        public void DefaultInterfaceImpl_AllowNull_03()
+        {
+            const string text = @"
+#nullable enable
+using System.Diagnostics.CodeAnalysis;
+
+partial interface I
+{
+    public virtual partial void M([AllowNull] string s1, string s2);
+    public virtual partial void M(string s1, [AllowNull] string s2)
+    {
+        _ = s1.ToString(); // 1
+        _ = s2.ToString(); // 2
+    }
+}
+
+partial class C : I
+{
+    public partial void M(string s1, [AllowNull] string s2);
+    public partial void M([AllowNull] string s1, string s2)
+    {
+        _ = s1.ToString(); // 3
+        _ = s2.ToString(); // 4
+    }
+}
+";
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods, targetFramework: TargetFramework.NetStandardLatest);
+            comp.VerifyDiagnostics(
+                // (10,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s1.ToString(); // 1
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s1").WithLocation(10, 13),
+                // (11,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s2.ToString(); // 2
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s2").WithLocation(11, 13),
+                // (20,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s1.ToString(); // 3
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s1").WithLocation(20, 13),
+                // (21,13): warning CS8602: Dereference of a possibly null reference.
+                //         _ = s2.ToString(); // 4
+                Diagnostic(ErrorCode.WRN_NullReferenceReceiver, "s2").WithLocation(21, 13)
+            );
+        }
+
+        [Fact]
         public void ExplicitInterfaceImpl_01()
         {
             const string text = @"
@@ -1492,6 +1822,60 @@
                 // (10,20): error CS0754: A partial method may not explicitly implement an interface method
                 //     partial void I.M() { } // 2
                 Diagnostic(ErrorCode.ERR_PartialMethodNotExplicit, "M").WithLocation(10, 20));
+        }
+
+        [Fact]
+        public void ExplicitInterfaceImpl_02()
+        {
+            const string text = @"
+interface I
+{
+    int M();
+}
+
+partial class C : I
+{
+    partial int I.M();
+    partial int I.M() => 42;
+}
+";
+            var comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics(
+                // (9,19): error CS0754: A partial method may not explicitly implement an interface method
+                //     partial int I.M();
+                Diagnostic(ErrorCode.ERR_PartialMethodNotExplicit, "M").WithLocation(9, 19),
+                // (9,19): error CS8794: Partial method 'C.I.M()' must have accessibility modifiers because it has a non-void return type.
+                //     partial int I.M();
+                Diagnostic(ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods, "M").WithArguments("C.I.M()").WithLocation(9, 19),
+                // (10,19): error CS0754: A partial method may not explicitly implement an interface method
+                //     partial int I.M() => 42;
+                Diagnostic(ErrorCode.ERR_PartialMethodNotExplicit, "M").WithLocation(10, 19),
+                // (10,19): error CS8794: Partial method 'C.I.M()' must have accessibility modifiers because it has a non-void return type.
+                //     partial int I.M() => 42;
+                Diagnostic(ErrorCode.ERR_PartialMethodWithNonVoidReturnMustHaveAccessMods, "M").WithArguments("C.I.M()").WithLocation(10, 19));
+        }
+
+        [Fact]
+        public void InsideStruct()
+        {
+            const string text = @"
+partial struct S
+{
+    public partial int M();
+    public partial int M() => 42;
+}
+";
+            var comp = CreateCompilation(text);
+            comp.VerifyDiagnostics(
+                // (4,24): error CS8652: The feature 'extended partial methods' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
+                //     public partial int M();
+                Diagnostic(ErrorCode.ERR_FeatureInPreview, "M").WithArguments("extended partial methods").WithLocation(4, 24),
+                // (5,24): error CS8652: The feature 'extended partial methods' is currently in Preview and *unsupported*. To use Preview features, use the 'preview' language version.
+                //     public partial int M() => 42;
+                Diagnostic(ErrorCode.ERR_FeatureInPreview, "M").WithArguments("extended partial methods").WithLocation(5, 24));
+
+            comp = CreateCompilation(text, parseOptions: TestOptions.RegularWithExtendedPartialMethods);
+            comp.VerifyDiagnostics();
         }

         [Fact]


Time Slider: Fix summary doc comment

Time Slider: Fix summary doc comment

--- src/Esri.ArcGISRuntime.Toolkit/Shared/UI/Controls/TimeSlider/Tickbar.cs
+++ src/Esri.ArcGISRuntime.Toolkit/Shared/UI/Controls/TimeSlider/Tickbar.cs
@@ -318,9 +318,9 @@
         }

         /// <summary>
-        /// Gets or sets the tick mark positions
-        /// </summary>
-        /// <value>The tick mark positions.</value>
+        /// Gets or sets the data sources for the tick marks.  These can be bound to in the tick bar's tick templates.
+        /// </summary>
+        /// <value>The data source objects</value>
         public IEnumerable<object> TickmarkDataSources
         {
             get { return (IEnumerable<object>)GetValue(TickmarkDataSourcesProperty); }


Minor changes.

Minor changes.

--- src/FireworksNet/Algorithm/Implementation/ParallelFireworksAlgorithm.cs
+++ src/FireworksNet/Algorithm/Implementation/ParallelFireworksAlgorithm.cs
@@ -149,6 +149,7 @@
             }

             this.CalculateQualities(state.Fireworks);
+            this.exploder.RecalculateAmplitude(this.bestSolution, fireworkQualities);

             return state;
         }


Removed flaky test from build.

Removed flaky test from build.

--- src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs
+++ src/ResourceManager/Profile/Commands.Profile.Test/ProfileModuleTests.cs
@@ -20,7 +20,7 @@
 {
     public class ProfileModuleTests
     {
-        [Fact]
+        [Fact(Skip="Removed flaky test from CI.")]
         [Trait(Category.AcceptanceType, Category.CheckIn)]
         public void WarningOnIncompatibleVersions()
         {


Fix default shaper assignment

Fix default shaper assignment

--- src/SixLabors.Fonts/Tables/AdvancedTypographic/Shapers/DefaultShaper.cs
+++ src/SixLabors.Fonts/Tables/AdvancedTypographic/Shapers/DefaultShaper.cs
@@ -63,10 +63,20 @@
             this.AddFeature(collection, index, count, RvnrTag);

             // Add directional features.
-            this.AddFeature(collection, index, count, LtraTag);
-            this.AddFeature(collection, index, count, LtrmTag);
-            this.AddFeature(collection, index, count, RtlaTag);
-            this.AddFeature(collection, index, count, RtlmTag);
+            for (int i = index; i < count; i++)
+            {
+                GlyphShapingData shapingData = collection.GetGlyphShapingData(i);
+                if (shapingData.Direction == TextDirection.LeftToRight)
+                {
+                    this.AddFeature(collection, i, 1, LtraTag);
+                    this.AddFeature(collection, i, 1, LtrmTag);
+                }
+                else
+                {
+                    this.AddFeature(collection, i, 1, RtlaTag);
+                    this.AddFeature(collection, i, 1, RtlmTag);
+                }
+            }

             // Add common features.
             this.AddFeature(collection, index, count, CcmpTag);
@@ -84,7 +94,7 @@
             this.AddFeature(collection, index, count, KernTag);

             // Enable contextual fractions.
-            for (int i = 0; i < collection.Count; i++)
+            for (int i = index; i < count; i++)
             {
                 GlyphShapingData shapingData = collection.GetGlyphShapingData(i);
                 if (shapingData.CodePoint == FractionSlash || shapingData.CodePoint == Slash)


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Net/HttpListener.cs
+++ websocket-sharp/Net/HttpListener.cs
@@ -227,8 +227,8 @@
     ///   </para>
     ///   <para>
     ///   If this property is <see langword="null"/> or an empty string,
-    ///   the result of <c>System.Environment.GetFolderPath (
-    ///   <see cref="Environment.SpecialFolder.ApplicationData"/>)</c>
+    ///   the result of <c>System.Environment.GetFolderPath (<see
+    ///   cref="Environment.SpecialFolder.ApplicationData"/>)</c>
     ///   is used as the default path.
     ///   </para>
     /// </remarks>


Fixed response time not resetting properly

--- src/PowerPing/Ping.cs
+++ src/PowerPing/Ping.cs
@@ -415,7 +415,8 @@
                     cancelEvent.WaitOne(attrs.Interval);

                     // Make sure timer is stopped
-                    responseTimer.Stop();
+                    //responseTimer.Stop();
+                    responseTimer.Reset();
                 }
             }