add default argument.

add default argument.

--- src/Skia/Avalonia.Skia/PlatformRenderInterface.cs
+++ src/Skia/Avalonia.Skia/PlatformRenderInterface.cs
@@ -18,7 +18,7 @@

         private GRContext GrContext { get; }

-        public PlatformRenderInterface(ICustomSkiaGpu customSkiaGpu, long maxResourceBytes)
+        public PlatformRenderInterface(ICustomSkiaGpu customSkiaGpu, long maxResourceBytes = 100000000)
         {
             if (customSkiaGpu != null)
             {


Always cancel the whole flow if a subflow is cancelled

Fixes #336

--- src/GitHub.App/Controllers/UIController.cs
+++ src/GitHub.App/Controllers/UIController.cs
@@ -601,7 +601,7 @@
             ShutdownFlow(activeFlow);

             // if the auth was cancelled, we need to stop everything, otherwise we'll go into a loop
-            if (activeFlow == mainFlow || (activeFlow == UIControllerFlow.Authentication && !Success.Value))
+            if (activeFlow == mainFlow || !Success.Value)
                 stopping = true;

             Fire(Trigger.Next);


changed constnat (#2300)

changed constnat (#2300)

--- src/Stratis.Bitcoin/Consensus/ConsensusManager.cs
+++ src/Stratis.Bitcoin/Consensus/ConsensusManager.cs
@@ -32,7 +32,7 @@
         private const long ConsumptionThresholdBytes = MaxUnconsumedBlocksDataBytes / 10;

         /// The maximum amount of blocks that can be assigned to <see cref="IBlockPuller"/> at the same time.
-        private const int MaxBlocksToAskFromPuller = 30000;
+        private const int MaxBlocksToAskFromPuller = 10000;

         /// The minimum amount of slots that should be available to trigger asking block puller for blocks.
         private const int ConsumptionThresholdSlots = MaxBlocksToAskFromPuller / 10;


Don't collapse multiple evaluations of the same project.

Turns out projects can be evaluated more than once, so key the project evaluation not just by project path, but also by the evaluation ID.

This prevents us from collapsing multiple evaluations into one and avoids "losing" evaluation messages.

--- src/StructuredLogger/Construction/Construction.cs
+++ src/StructuredLogger/Construction/Construction.cs
@@ -385,15 +385,17 @@
                     {
                         EvaluationFolder = Build.GetOrCreateNodeWithName<Folder>(Intern("Evaluation"));

+                        var evaluationId = -e.BuildEventContext.ProjectContextId;
                         var projectName = Intern(projectEvaluationStarted.ProjectFile);
-                        var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(projectName);
+                        var nodeName = Intern(GetEvaluationProjectName(evaluationId, projectName));
+                        var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(nodeName);
                         if (project.ProjectFile == null)
                         {
                             project.ProjectFile = projectName;
                         }

                         // we stash the evaluation Id as a negative ProjectContextId
-                        project.Id = -e.BuildEventContext.ProjectContextId;
+                        project.Id = evaluationId;
                     }
                     else if (e is ProjectEvaluationFinishedEventArgs projectEvaluationFinished)
                     {
@@ -403,7 +405,8 @@
                         var profilerResult = projectEvaluationFinished.ProfilerResult;
                         if (profilerResult != null && projectName != null)
                         {
-                            var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(projectName);
+                            var nodeName = Intern(GetEvaluationProjectName(-projectEvaluationFinished.BuildEventContext.ProjectContextId, projectName));
+                            var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(nodeName);
                             ConstructProfilerResult(project, profilerResult.Value);
                         }
                     }
@@ -411,7 +414,8 @@
                     else if (e.GetType().Name == "ProjectEvaluationStartedEventArgs")
                     {
                         var projectName = Intern(Utilities.ParseQuotedSubstring(e.Message));
-                        var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(projectName);
+                        var nodeName = Intern(GetEvaluationProjectName(-e.BuildEventContext.ProjectContextId, projectName));
+                        var project = EvaluationFolder.GetOrCreateNodeWithName<Project>(nodeName);
                         project.Id = Reflector.GetEvaluationId(e.BuildEventContext);
                         if (project.ProjectFile == null)
                         {
@@ -424,6 +428,11 @@
             {
                 HandleException(ex);
             }
+        }
+
+        private static string GetEvaluationProjectName(int evaluationId, string projectName)
+        {
+            return projectName + " id:" + evaluationId;
         }

         private void ConstructProfilerResult(Project project, ProfilerResult profilerResult)


Fixes

Fixes

--- Luncher/Forms/ProfileForm.cs
+++ Luncher/Forms/ProfileForm.cs
@@ -49,35 +49,36 @@
                 var id = json["versions"][i]["id"].ToString();
                 var type = json["versions"][i]["type"].ToString();
                 list.Add(String.Format("{0} {1}", type, id));
+                var ritem = new RadListDataItem {Text = type + " " + id, Tag = id};
                 switch (type)
                 {
                     case "snapshot":
-                        if (useexperementbuilds) Versions.Items.Add(type + " " + id);
+                        if (useexperementbuilds) Versions.Items.Add(ritem);
                         break;
                     case "old_beta":
-                        if (usebetabuilds) Versions.Items.Add(type + " " + id);
+                        if (usebetabuilds) Versions.Items.Add(ritem);
                         break;
                     case "old_alpha":
-                        if (usealphabuilds) Versions.Items.Add(type + " " + id);
+                        if (usealphabuilds) Versions.Items.Add(ritem);
                         break;
                     case "release":
                         Versions.Items.Add(type + " " + id);
                         break;
                     default:
-                        if (useotherbuilds) Versions.Items.Add(type + " " + id);
-                        break;
-                }
-            }
-            foreach (var info in from b in Directory.GetDirectories(_minecraft + "\\versions\\")
-                let add =
-                    !(from a in list
-                        let splitted = a.Split(' ')
-                        where a.Contains(new DirectoryInfo(b).Name)
-                        select splitted).Any()
-                where add
-                select
-                    JObject.Parse(
-                        File.ReadAllText(String.Format("{0}/versions/{1}/{1}.json", Variables.McFolder, new DirectoryInfo(b).Name))))
+                        if (useotherbuilds) Versions.Items.Add(ritem);
+                        break;
+                }
+            }
+            foreach (var info in from b in Directory.GetDirectories(Variables.McVersions)
+                                 let add =
+                                     !(from a in list
+                                       let splitted = a.Split(' ')
+                                       where a.Contains(new DirectoryInfo(b).Name)
+                                       select splitted).Any()
+                                 where add
+                                 select
+                                     JObject.Parse(
+                                         File.ReadAllText(String.Format("{0}/versions/{1}/{1}.json", Variables.McFolder, new DirectoryInfo(b).Name))))
                 Versions.Items.Add(info["type"] + " " + info["id"]);
             try
             {
@@ -250,10 +251,9 @@
             Newprofilename = ProfileName.Text;
             var v1 = _locRm.GetString("uselastversion");
             if (v1 != null && !Versions.SelectedItem.Text.Contains(v1))
-            {
-                var lastversionid = Versions.SelectedItem.Text.Split(' ');
-                curprofile["lastVersionId"] = lastversionid[1];
-            }
+                curprofile["lastVersionId"] = (string) Versions.SelectedItem.Tag ??
+                                              (Versions.SelectedItem.Text.Replace(
+                                                  Versions.SelectedItem.Text.Split(' ')[0] + " ", String.Empty));
             else
             {
                 if (curprofile["lastVersionId"] != null)


cosmetics

cosmetics

--- src/IdentityModel.OidcClient/OidcClient.cs
+++ src/IdentityModel.OidcClient/OidcClient.cs
@@ -187,8 +187,10 @@
             if (accessToken.IsMissing()) throw new ArgumentNullException(nameof(accessToken));
             if (!_options.ProviderInformation.SupportsUserInfo) throw new InvalidOperationException("No userinfo endpoint specified");

-            var userInfoClient = new UserInfoClient(_options.ProviderInformation.UserInfoEndpoint, _options.BackchannelHandler);
-            userInfoClient.Timeout = _options.BackchannelTimeout;
+            var userInfoClient = new UserInfoClient(_options.ProviderInformation.UserInfoEndpoint, _options.BackchannelHandler)
+            {
+                Timeout = _options.BackchannelTimeout
+            };

             var userInfoResponse = await userInfoClient.GetAsync(accessToken);
             if (userInfoResponse.IsError)


Fix BinaryTreeRecursiveWalkerTests

Fix BinaryTreeRecursiveWalkerTests

--- UnitTest/AlgorithmsTests/BinaryTreeRecursiveWalkerTests.cs
+++ UnitTest/AlgorithmsTests/BinaryTreeRecursiveWalkerTests.cs
@@ -2,13 +2,14 @@
 using DataStructures.Trees;
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using Xunit;

 namespace UnitTest.AlgorithmsTests
 {
-    public class BinaryTreeRecursiveWalkerTests
+    public static class BinaryTreeRecursiveWalkerTests
     {
-        // Construct a Simple Binary Search Tree
+        // Construct a Simple Binary Search Tree
         private static readonly BSTNode<int> Root = new BSTNode<int>(10)
         {
             LeftChild = new BSTNode<int>(5)
@@ -85,7 +86,7 @@

             // Assert the fact that adding items POST-ORDER will result in [3, 7, 5, 13, 17, 15, 10]
             BinaryTreeRecursiveWalker.ForEach(Root, addToList, postOrder);
-            Assert.True(list.ToArray() == new[] { 3, 7, 5, 13, 17, 15, 10 },
+            Assert.True(list.SequenceEqual(new[] { 3, 7, 5, 13, 17, 15, 10 }),
                 "Wrong traversal, expected InOrder enumeration of tree!");
         }


Read cpu number only when it's available in Linux event

--- src/PerfView/OtherSources/Linux/LinuxPerfScriptEventParser.cs
+++ src/PerfView/OtherSources/Linux/LinuxPerfScriptEventParser.cs
@@ -346,9 +346,13 @@

                 // CPU
                 source.SkipWhiteSpace();
-                source.MoveNext(); // Move past the "["
-                int cpu = source.ReadInt();
-                source.MoveNext(); // Move past the "]"
+                int cpu = -1;
+                if (source.PeekString(1) == "[")
+                {
+                    source.MoveNext(); // Move past the "["
+                    cpu = source.ReadInt();
+                    source.MoveNext(); // Move past the "]"
+                }

                 // Time
                 source.SkipWhiteSpace();


cleanup

cleanup

--- src/ResinCore/Analysis/Tokenizer.cs
+++ src/ResinCore/Analysis/Tokenizer.cs
@@ -33,7 +33,6 @@
                     continue;
                 }

-                var w = value.Substring(start, length);
                 tokens.Add((start, length));
                 start += length + 1;
                 length = 0;


Update _Part_Checkout_Carrinho.cshtml

Update _Part_Checkout_Carrinho.cshtml

--- Views/Shared/Parts/Checkout/_Part_Checkout_Carrinho.cshtml
+++ Views/Shared/Parts/Checkout/_Part_Checkout_Carrinho.cshtml
@@ -44,5 +44,7 @@

             Voltar para o carrinho

+
+

-
+


Fix infinite object recursion

Fix infinite object recursion

Stops us recursing through the "OptionSet <-> Option" loop by stopping
after we encounter an object we've already serialized.

--- VotingApplication/VotingApplication.Web.Api/Global.asax.cs
+++ VotingApplication/VotingApplication.Web.Api/Global.asax.cs
@@ -6,6 +6,7 @@
 using System.Web.Mvc;
 using System.Web.Optimization;
 using System.Web.Routing;
+using Newtonsoft.Json;

 namespace VotingApplication.Web.Api
 {
@@ -18,6 +19,10 @@
             FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
             RouteConfig.RegisterRoutes(RouteTable.Routes);
             BundleConfig.RegisterBundles(BundleTable.Bundles);
+
+            // Fix the infinite recursion of Session.OptionSet.Options[0].OptionSets[0].Options[0].[...]
+            // by not populating the Option.OptionSets after already encountering Session.OptionSet
+            GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;
         }
     }
 }


Reenable test (#37594)

Reenable test (#37594)

--- src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs
+++ src/Servers/IIS/IIS/test/Common.FunctionalTests/HttpsTests.cs
@@ -57,7 +57,6 @@
         [ConditionalTheory]
         [MemberData(nameof(TestVariants))]
         [MinimumOSVersion(OperatingSystems.Windows, WindowsVersions.Win8)]
-        [MaximumOSVersion(OperatingSystems.Windows, WindowsVersions.Win10_20H2, SkipReason = "https://github.com/dotnet/aspnetcore/issues/29068")]
         public Task HttpsClientCert_GetCertInformation(TestVariant variant)
         {
             return ClientCertTest(variant, sendClientCert: true);


oracle substring support

oracle substring support

--- src/ServiceStack.OrmLite.Oracle/OracleSqlExpressionVisitor.cs
+++ src/ServiceStack.OrmLite.Oracle/OracleSqlExpressionVisitor.cs
@@ -1,130 +1,34 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
-using System.Collections.ObjectModel;
 using System.Linq.Expressions;
-using ServiceStack.OrmLite;

 namespace ServiceStack.OrmLite.Oracle
 {
 	public class OracleSqlExpressionVisitor<T>:SqlExpressionVisitor<T>
 	{
-        //protected override object VisitMethodCall(MethodCallExpression m)
-        //{
-        //    List<Object> args = this.VisitExpressionList(m.Arguments);
+        protected override object VisitColumnAccessMethod(MethodCallExpression m)
+        {
+            if (m.Method.Name == "Substring")
+            {
+                List<Object> args = this.VisitExpressionList(m.Arguments);
+                var quotedColName = Visit(m.Object);
+                var startIndex = Int32.Parse(args[0].ToString()) + 1;
+                if (args.Count == 2)
+                {
+                    var length = Int32.Parse(args[1].ToString());
+                    return new PartialSqlString(string.Format("subStr({0},{1},{2})",
+                                                              quotedColName,
+                                                              startIndex,
+                                                              length));
+                }

-        //    Object r;
-        //    if (m.Object != null)
-        //        r = Visit(m.Object);
-        //    else
-        //    {
-        //        r = args[0];
-        //        args.RemoveAt(0);
-        //    }
-
-        //    switch (m.Method.Name)
-        //    {
-        //        case "ToUpper":
-        //            return string.Format("upper({0})", r);
-        //        case "ToLower":
-        //            return string.Format("lower({0})", r);
-        //        case "StartsWith":
-        //            return string.Format("upper({0}) like '{1}%' ", r, RemoveQuote(args[0].ToString()).ToUpper());
-        //        case "EndsWith":
-        //            return string.Format("upper({0}) like '%{1}'", r, RemoveQuote(args[0].ToString()).ToUpper());
-        //        case "Contains":
-        //            return string.Format("upper({0}) like '%{1}%'", r, RemoveQuote(args[0].ToString()).ToUpper());
-        //        case "Substring":
-        //            var startIndex = Int32.Parse(args[0].ToString()) + 1;
-        //            if (args.Count == 2)
-        //            {
-        //                var length = Int32.Parse(args[1].ToString());
-        //                return string.Format("subStr({0},{1},{2})",
-        //                                 r,
-        //                                 startIndex,
-        //                                 length);
-        //            }
-        //            else
-        //                return string.Format("subStr({0},{1})",
-        //                                 r,
-        //                                 startIndex);
-
-        //        case "Ceiling":
-        //            return string.Format("{0}({1}{2})",
-        //                                 "Ceil",
-        //                                 r,
-        //                                 args.Count == 1 ? string.Format(",{0}", args[0]) : "");
-
-        //        case "Coalesce":
-        //            return string.Format("{0}({1}{2})",
-        //                                 m.Method.Name,
-        //                                 r,
-        //                                 args.Count == 1 ? string.Format(",{0}", args[0]) : "");
-        //        case "Round":
-        //        case "Floor":
-        //        case "Abs":
-        //        case "Sum":
-        //            return string.Format("{0}({1}{2})",
-        //                                 m.Method.Name,
-        //                                 r,
-        //                                 args.Count == 1 ? string.Format(",{0}", args[0]) : "");
-        //        case "Concat":
-        //            StringBuilder s = new StringBuilder();
-        //            foreach (Object e in args)
-        //            {
-        //                s.AppendFormat(" || {0}", e);
-        //            }
-        //            return string.Format("{0}{1}", r, s.ToString());
-
-        //        case "In":
-
-        //            var member = Expression.Convert(m.Arguments[1], typeof(object));
-        //            var lambda = Expression.Lambda<Func<object>>(member);
-        //            var getter = lambda.Compile();
-
-        //            var inArgs = getter() as object[];
-
-        //            StringBuilder sIn = new StringBuilder();
-        //            foreach (Object e in inArgs)
-        //            {
-        //                if (e.GetType().ToString() != "System.Collections.Generic.List`1[System.Object]")
-        //                {
-        //                    sIn.AppendFormat("{0}{1}",
-        //                                 sIn.Length > 0 ? "," : "",
-        //                                 OrmLiteConfig.DialectProvider.GetQuotedValue(e, e.GetType()));
-        //                }
-        //                else
-        //                {
-        //                    var listArgs = e as IList<Object>;
-        //                    foreach (Object el in listArgs)
-        //                    {
-        //                        sIn.AppendFormat("{0}{1}",
-        //                                 sIn.Length > 0 ? "," : "",
-        //                                 OrmLiteConfig.DialectProvider.GetQuotedValue(el, el.GetType()));
-        //                    }
-        //                }
-        //            }
-
-        //            return string.Format("{0} {1} ({2})", r, m.Method.Name, sIn.ToString());
-        //        case "Desc":
-        //            return string.Format("{0} DESC", r);
-        //        case "Alias":
-        //        case "As":
-        //            return string.Format("{0} As {1}", r,
-        //                OrmLiteConfig.DialectProvider.GetQuotedColumnName(RemoveQuoteFromAlias(RemoveQuote(args[0].ToString()))));
-        //        case "ToString":
-        //            return r.ToString();
-        //        default:
-        //            StringBuilder s2 = new StringBuilder();
-        //            foreach (Object e in args)
-        //            {
-        //                s2.AppendFormat(",{0}",
-        //                                OrmLiteConfig.DialectProvider.GetQuotedValue(e, e.GetType()));
-        //            }
-        //            return string.Format("{0}({1}{2})", m.Method.Name, r, s2.ToString());
-        //    }
-        //}
+                return new PartialSqlString(string.Format("subStr({0},{1})",
+                                                          quotedColName,
+                                                          startIndex));
+            }
+            return base.VisitColumnAccessMethod(m);
+        }

 		public override string LimitExpression{
 			get


public getters for MockHttpResponse StatusCode and StatusDescription

--- src/ServiceStack.ServiceInterface/Testing/MockHttpResponse.cs
+++ src/ServiceStack.ServiceInterface/Testing/MockHttpResponse.cs
@@ -13,8 +13,8 @@
         }

         public object OriginalResponse { get; private set; }
-        public int StatusCode { set; private get; }
-        public string StatusDescription { set; private get; }
+        public int StatusCode { set; get; }
+        public string StatusDescription { set; get; }
         public string ContentType { get; set; }

         public ICookies Cookies { get; set; }
@@ -28,7 +28,7 @@
         }

         public Stream OutputStream { get; private set; }
-
+
         public void Write(string text)
         {
         }


Use DoubleTappedEvent event

Use DoubleTappedEvent event

--- WalletWasabi.Gui/Behaviors/CommandOnDoubleClickBehavior.cs
+++ WalletWasabi.Gui/Behaviors/CommandOnDoubleClickBehavior.cs
@@ -13,12 +13,9 @@

 			base.OnAttached();

-			Disposables.Add(AssociatedObject.AddHandler(Control.PointerPressedEvent, (sender, e) =>
+			Disposables.Add(AssociatedObject.AddHandler(Control.DoubleTappedEvent, (sender, e) =>
 			{
-				if (e.ClickCount == 2)
-				{
-					e.Handled = ExecuteCommand();
-				}
+				e.Handled = ExecuteCommand();
 			}));
 		}


Remove unused member

Remove unused member

--- WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
+++ WalletWasabi.Gui/Tabs/WalletManager/LoadWalletViewModel.cs
@@ -244,13 +244,6 @@
 			SuccessMessage = "";
 		}

-		private void SetSuccessMessage(string message)
-		{
-			WarningMessage = "";
-			ValidationMessage = "";
-			SuccessMessage = message;
-		}
-
 		public void SetLoadButtonText()
 		{
 			if (IsHardwareBusy)


Have a single instance of the NonSymbolicDuplicator in the Executor. Apart from saving memory this will be used in the next commit to fix a bug.

--- src/Symbooglix/Executor/Executor.cs
+++ src/Symbooglix/Executor/Executor.cs
@@ -20,9 +20,11 @@
             UseConstantFolding = false;
             UseGotoLookAhead = true;
             this.TheSolver = solver;
+            this.Duplicator = new NonSymbolicDuplicator();
         }

         private IStateScheduler StateScheduler;
+        private NonSymbolicDuplicator Duplicator;
         public  ExecutionState CurrentState
         {
             get;
@@ -548,10 +550,9 @@
             var oldExprImplGlobals = CurrentState.GetCurrentStackFrame().Impl.GetOldExprVariables();
             if (oldExprImplGlobals.Count > 0)
             {
-                var duplicator = new NonSymbolicDuplicator();
                 foreach (var GV in oldExprImplGlobals)
                 {
-                    CurrentState.GetCurrentStackFrame().OldGlobals[GV] = (Expr) duplicator.Visit(CurrentState.GetInScopeVariableExpr(GV));
+                    CurrentState.GetCurrentStackFrame().OldGlobals[GV] = (Expr) Duplicator.Visit(CurrentState.GetInScopeVariableExpr(GV));
                 }
             }

@@ -652,10 +653,9 @@
             // Record any globals that will be used in OldExpr
             if (proc.GetOldExprVariables().Count > 0)
             {
-                var duplicator = new NonSymbolicDuplicator();
                 foreach (var GV in proc.GetOldExprVariables())
                 {
-                    CurrentState.GetCurrentStackFrame().OldGlobals[GV] = (Expr) duplicator.Visit(CurrentState.GetInScopeVariableExpr(GV));
+                    CurrentState.GetCurrentStackFrame().OldGlobals[GV] = (Expr) Duplicator.Visit(CurrentState.GetInScopeVariableExpr(GV));
                 }
             }


Payrolldatetimestamp will be set on new mailnotification when repeated for next month.

--- Mail/ConsoleMailerService.cs
+++ Mail/ConsoleMailerService.cs
@@ -68,7 +68,8 @@
                         {
                             DateTimestamp = newDateTime,
                             Notified = false,
-                            Repeat = true
+                            Repeat = true,
+                            PayRoleTimestamp = ToUnixTime(FromUnixTime(notification.PayRoleTimestamp).AddMonths(1))
                         });
                     }
                     notification.Notified = true;


Fixes attributes for test

Fixes attributes for test

--- src/Test/Properties/AssemblyInfo.cs
+++ src/Test/Properties/AssemblyInfo.cs
@@ -5,15 +5,15 @@
 // General Information about an assembly is controlled through the following
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("Test")]
-[assembly: AssemblyTrademark("")]
+//[assembly: AssemblyConfiguration("")]
+//[assembly: AssemblyCompany("")]
+//[assembly: AssemblyProduct("Test")]
+//[assembly: AssemblyTrademark("")]

 // Setting ComVisible to false makes the types in this assembly not visible
 // to COM components.  If you need to access a type in this assembly from
 // COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
+//[assembly: ComVisible(false)]

 // The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("640622de-c6d6-4877-b946-9c9a8ef13245")]
+//[assembly: Guid("640622de-c6d6-4877-b946-9c9a8ef13245")]


Avoid running analyzers on projects with a different language

--- src/Tools/AnalyzerRunner/Program.cs
+++ src/Tools/AnalyzerRunner/Program.cs
@@ -48,9 +48,9 @@
                 };

             var analyzers = GetDiagnosticAnalyzers(options.AnalyzerPath);
-            analyzers = FilterAnalyzers(analyzers, options).ToImmutableArray();
-
-            if (analyzers.Length == 0)
+            analyzers = FilterAnalyzers(analyzers, options);
+
+            if (!analyzers.Any(pair => pair.Value.Any()))
             {
                 WriteLine("No analyzers found", ConsoleColor.Red);
                 PrintHelp();
@@ -181,7 +181,7 @@
             }
         }

-        private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableArray<DiagnosticAnalyzer> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken)
+        private static async Task<DocumentAnalyzerPerformance> TestDocumentPerformanceAsync(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Project project, DocumentId documentId, Options analyzerOptionsInternal, CancellationToken cancellationToken)
         {
             // update the project compilation options
             var modifiedSpecificDiagnosticOptions = project.CompilationOptions.SpecificDiagnosticOptions
@@ -191,13 +191,18 @@
             var modifiedCompilationOptions = project.CompilationOptions.WithSpecificDiagnosticOptions(modifiedSpecificDiagnosticOptions);
             var processedProject = project.WithCompilationOptions(modifiedCompilationOptions);

+            if (!analyzers.TryGetValue(project.Language, out var languageAnalyzers))
+            {
+                languageAnalyzers = ImmutableArray<DiagnosticAnalyzer>.Empty;
+            }
+
             var stopwatch = Stopwatch.StartNew();
             for (int i = 0; i < analyzerOptionsInternal.TestDocumentIterations; i++)
             {
                 Compilation compilation = await processedProject.GetCompilationAsync(cancellationToken).ConfigureAwait(false);

                 var workspaceAnalyzerOptions = new WorkspaceAnalyzerOptions(project.AnalyzerOptions, project.Solution.Options, project.Solution);
-                CompilationWithAnalyzers compilationWithAnalyzers = compilation.WithAnalyzers(analyzers, new CompilationWithAnalyzersOptions(workspaceAnalyzerOptions, null, analyzerOptionsInternal.RunConcurrent, logAnalyzerExecutionTime: true, reportSuppressedDiagnostics: analyzerOptionsInternal.ReportSuppressedDiagnostics));
+                CompilationWithAnalyzers compilationWithAnalyzers = compilation.WithAnalyzers(languageAnalyzers, new CompilationWithAnalyzersOptions(workspaceAnalyzerOptions, null, analyzerOptionsInternal.RunConcurrent, logAnalyzerExecutionTime: true, reportSuppressedDiagnostics: analyzerOptionsInternal.ReportSuppressedDiagnostics));

                 SyntaxTree tree = await project.GetDocument(documentId).GetSyntaxTreeAsync(cancellationToken).ConfigureAwait(false);
                 await compilationWithAnalyzers.GetAnalyzerSyntaxDiagnosticsAsync(tree, cancellationToken).ConfigureAwait(false);
@@ -270,6 +275,13 @@
             return new Statistic(numberOfNodes, numberOfTokens, numberOfTrivia);
         }

+        private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> FilterAnalyzers(ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers, Options options)
+        {
+            return analyzers.ToImmutableDictionary(
+                pair => pair.Key,
+                pair => FilterAnalyzers(pair.Value, options).ToImmutableArray());
+        }
+
         private static IEnumerable<DiagnosticAnalyzer> FilterAnalyzers(IEnumerable<DiagnosticAnalyzer> analyzers, Options options)
         {
             var analyzerTypes = new HashSet<Type>();
@@ -300,7 +312,7 @@
             }
         }

-        private static ImmutableArray<DiagnosticAnalyzer> GetDiagnosticAnalyzers(string path)
+        private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzers(string path)
         {
             if (File.Exists(path))
             {
@@ -308,22 +320,30 @@
             }
             else if (Directory.Exists(path))
             {
-                return Directory.GetFiles(path, "*.dll", SearchOption.AllDirectories).SelectMany(file => GetDiagnosticAnalyzersFromFile(file)).ToImmutableArray();
+                return Directory.GetFiles(path, "*.dll", SearchOption.AllDirectories)
+                    .SelectMany(file => GetDiagnosticAnalyzersFromFile(file))
+                    .ToLookup(analyzers => analyzers.Key, analyzers => analyzers.Value)
+                    .ToImmutableDictionary(
+                        group => group.Key,
+                        group => group.SelectMany(analyzer => analyzer).ToImmutableArray());
             }

             throw new InvalidDataException($"Cannot find {path}.");
         }

-        private static ImmutableArray<DiagnosticAnalyzer> GetDiagnosticAnalyzersFromFile(string path)
+        private static ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> GetDiagnosticAnalyzersFromFile(string path)
         {
             var analyzerReference = new AnalyzerFileReference(path, AssemblyLoader.Instance);
-            var analyzers = analyzerReference.GetAnalyzersForAllLanguages();
-            return analyzers;
+            var csharpAnalyzers = analyzerReference.GetAnalyzers(LanguageNames.CSharp);
+            var basicAnalyzers = analyzerReference.GetAnalyzers(LanguageNames.VisualBasic);
+            return ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>>.Empty
+                .Add(LanguageNames.CSharp, csharpAnalyzers)
+                .Add(LanguageNames.VisualBasic, basicAnalyzers);
         }

         private static async Task<ImmutableDictionary<ProjectId, AnalysisResult>> GetAnalysisResultAsync(
             Solution solution,
-            ImmutableArray<DiagnosticAnalyzer> analyzers,
+            ImmutableDictionary<string, ImmutableArray<DiagnosticAnalyzer>> analyzers,
             Options options,
             CancellationToken cancellationToken)
         {
@@ -343,10 +363,15 @@
                         continue;
                     }

+                    if (!analyzers.TryGetValue(project.Language, out var languageAnalyzers) || languageAnalyzers.IsEmpty)
+                    {
+                        continue;
+                    }
+
                     projectDiagnosticTasks.Add(new KeyValuePair<ProjectId, Task<AnalysisResult>>(
                         project.Id,
                         GetProjectAnalysisResultAsync(
-                            analyzers,
+                            languageAnalyzers,
                             project,
                             options,
                             cancellationToken)));


Changed UmbracoSettings back to internal, it should not be exposed atm

--- src/Umbraco.Core/Configuration/UmbracoSettings.cs
+++ src/Umbraco.Core/Configuration/UmbracoSettings.cs
@@ -27,7 +27,7 @@
 	/// <summary>
 	/// The UmbracoSettings Class contains general settings information for the entire Umbraco instance based on information from the /config/umbracoSettings.config file
 	/// </summary>
-	public class UmbracoSettings
+	internal class UmbracoSettings
 	{
         private static bool GetKeyValue(string key, bool defaultValue)
         {


IDataSource uses a generic IEnumerator

IDataSource uses a generic IEnumerator

--- MapReduceDojo/IDataSource.cs
+++ MapReduceDojo/IDataSource.cs
@@ -1,10 +1,11 @@
-using System.Collections;
+using System;
+using System.Collections.Generic;

 namespace MapReduceDojo
 {
     public interface IDataSource
     {
-        IEnumerator GetIterator();
+        IEnumerator<String> GetIterator();
         int Size();
     }
 }


Use already created client

Use already created client

--- src/UKParliData.BPTweets/Program.cs
+++ src/UKParliData.BPTweets/Program.cs
@@ -22,7 +22,7 @@
                 new Program(
                     new BPReader(ConfigurationManager.AppSettings["BPFeedUrl"]),
                     new TweetLog("log.txt"),
-                    new TwitterClient()
+                    client
                 ).Run();
             }
         }


Fixed bad fragment marker char.

Fixed bad fragment marker char.

--- src/UriBuilder.Fluent/TerribleDevUriExtensions.cs
+++ src/UriBuilder.Fluent/TerribleDevUriExtensions.cs
@@ -99,7 +99,7 @@
             {
                 valuesEnum = new string[0];
             }
-            var intitialValue = string.IsNullOrWhiteSpace(bld.Fragment) ? "" : $"{bld.Fragment.TrimStart('?')}&";
+            var intitialValue = string.IsNullOrWhiteSpace(bld.Fragment) ? "" : $"{bld.Fragment.TrimStart('#')}&";
             bld.Fragment = intitialValue.AppendKeyValue(key, valuesEnum);
             return bld;
         }


Disalbe StartInfo_TextFile_ShellExecute for NETFX (#29296)

--- src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
+++ src/System.Diagnostics.Process/tests/ProcessStartInfoTests.cs
@@ -985,8 +985,7 @@
                                                     nameof(PlatformDetection.IsNotWindows8x))] // https://github.com/dotnet/corefx/issues/20388
         [OuterLoop("Launches notepad")]
         [PlatformSpecific(TestPlatforms.Windows)]
-        // Re-enabling with extra diagnostic info
-        // [ActiveIssue("https://github.com/dotnet/corefx/issues/20388")]
+        [ActiveIssue("https://github.com/dotnet/corefx/issues/20388", TargetFrameworkMonikers.NetFramework)]
         // We don't have the ability yet for UseShellExecute in UAP
         [ActiveIssue("https://github.com/dotnet/corefx/issues/20204", TargetFrameworkMonikers.Uap | TargetFrameworkMonikers.UapAot)]
         public void StartInfo_TextFile_ShellExecute()


Excluding tests for silverlight

Excluding tests for silverlight

--- src/UnitTests/ConditionalMapping.cs
+++ src/UnitTests/ConditionalMapping.cs
@@ -142,7 +142,7 @@
             public class SkipAttribute : System.Attribute { }
         }

-
+#if !SILVERLIGHT
         public class When_configuring_a_map_to_ignore_all_properties_with_an_inaccessible_setter : AutoMapperSpecBase
         {
             private Destination _destination;
@@ -219,7 +219,6 @@
                 _destination.ScreenName.ShouldBeNull();
             }
         }
-

         public class When_configuring_a_reverse_map_to_ignore_all_source_properties_with_an_inaccessible_setter : AutoMapperSpecBase
         {
@@ -309,6 +308,6 @@
                 _source.Respect.ShouldEqual("R-E-S-P-E-C-T"); // justification: if the mapping works one way, it should work in reverse
             }
         }
-
+#endif
     }
 }


Removed repeated code in DecodeInteger and made methods internal

--- MaxMind.MaxMindDb/Decoder.cs
+++ MaxMind.MaxMindDb/Decoder.cs
@@ -441,14 +441,9 @@
         /// </summary>
         /// <param name="buffer">The buffer.</param>
         /// <returns></returns>
-        public static int DecodeInteger(byte[] buffer)
-        {
-            int integer = 0;
-            for (int i = 0; i < buffer.Length; i++)
-            {
-                integer = (integer << 8) | buffer[i];
-            }
-            return integer;
+        internal static int DecodeInteger(byte[] buffer)
+        {
+            return Decoder.DecodeInteger(0, buffer);
         }

         /// <summary>
@@ -457,7 +452,7 @@
         /// <param name="baseValue">The base value.</param>
         /// <param name="buffer">The buffer.</param>
         /// <returns></returns>
-        public static int DecodeInteger(int baseValue, byte[] buffer)
+        internal static int DecodeInteger(int baseValue, byte[] buffer)
         {
             int integer = baseValue;
             for (int i = 0; i < buffer.Length; i++)


fixed the indicator and signal csv reader

--- MidaxLib/ReaderConnection.cs
+++ MidaxLib/ReaderConnection.cs
@@ -117,14 +117,14 @@
         void readIndicatorData(List<CqlQuote> quotes, string[] values)
         {
             decimal? value = values.Length >= 2 ? (decimal)double.Parse(values[3]) : default(decimal?);
-            quotes.Add(new CqlQuote(values[1], DateTimeOffset.Parse(values[2]), values[1], value, value, 0));
+            quotes.Add(new CqlIndicator(values[1], DateTimeOffset.Parse(values[2]), values[1], value));
         }

         void readSignalData(List<CqlQuote> quotes, string[] values)
         {
-            decimal? value = (decimal)double.Parse(values[4]);
-            decimal? stockvalue = (decimal)double.Parse(values[5]);
-            quotes.Add(new CqlQuote(values[1], DateTimeOffset.Parse(values[2]), values[1], value, stockvalue, 0));
+            decimal value = (decimal)double.Parse(values[4]);
+            decimal stockvalue = (decimal)double.Parse(values[5]);
+            quotes.Add(new CqlSignal(values[1], DateTimeOffset.Parse(values[2]), values[1], (SIGNAL_CODE)value, stockvalue));
         }

         void readTradeData(List<Trade> trades, string[] values)


Lucene.Net.Search.BooleanQuery refactor: renamed private/internal fields camelCase

--- src/Lucene.Net.Core/Search/BooleanQuery.cs
+++ src/Lucene.Net.Core/Search/BooleanQuery.cs
@@ -207,7 +207,7 @@
         /// </summary>
         public class BooleanWeight : Weight
         {
-            private readonly BooleanQuery OuterInstance;
+            private readonly BooleanQuery outerInstance;

             /// <summary>
             /// The Similarity implementation. </summary>
@@ -215,13 +215,13 @@

             protected List<Weight> m_weights;
             protected int m_maxCoord; // num optional + num required
-            private readonly bool m_disableCoord;
+            private readonly bool disableCoord;

             public BooleanWeight(BooleanQuery outerInstance, IndexSearcher searcher, bool disableCoord)
             {
-                this.OuterInstance = outerInstance;
+                this.outerInstance = outerInstance;
                 this.m_similarity = searcher.Similarity;
-                this.m_disableCoord = disableCoord;
+                this.disableCoord = disableCoord;
                 m_weights = new List<Weight>(outerInstance.clauses.Count);
                 for (int i = 0; i < outerInstance.clauses.Count; i++)
                 {
@@ -249,7 +249,7 @@
             {
                 get
                 {
-                    return OuterInstance;
+                    return outerInstance;
                 }
             }

@@ -260,14 +260,14 @@
                 {
                     // call sumOfSquaredWeights for all clauses in case of side effects
                     float s = m_weights[i].GetValueForNormalization(); // sum sub weights
-                    if (!OuterInstance.clauses[i].IsProhibited)
+                    if (!outerInstance.clauses[i].IsProhibited)
                     {
                         // only add to sum for non-prohibited clauses
                         sum += s;
                     }
                 }

-                sum *= OuterInstance.Boost * OuterInstance.Boost; // boost each sub-weight
+                sum *= outerInstance.Boost * outerInstance.Boost; // boost each sub-weight

                 return sum;
             }
@@ -283,7 +283,7 @@

             public override void Normalize(float norm, float topLevelBoost)
             {
-                topLevelBoost *= OuterInstance.Boost; // incorporate boost
+                topLevelBoost *= outerInstance.Boost; // incorporate boost
                 foreach (Weight w in m_weights)
                 {
                     // normalize all clauses, (even if prohibited in case of side affects)
@@ -293,14 +293,14 @@

             public override Explanation Explain(AtomicReaderContext context, int doc)
             {
-                int minShouldMatch = OuterInstance.MinimumNumberShouldMatch;
+                int minShouldMatch = outerInstance.MinimumNumberShouldMatch;
                 ComplexExplanation sumExpl = new ComplexExplanation();
                 sumExpl.Description = "sum of:";
                 int coord = 0;
                 float sum = 0.0f;
                 bool fail = false;
                 int shouldMatchCount = 0;
-                IEnumerator<BooleanClause> cIter = OuterInstance.clauses.GetEnumerator();
+                IEnumerator<BooleanClause> cIter = outerInstance.clauses.GetEnumerator();
                 for (IEnumerator<Weight> wIter = m_weights.GetEnumerator(); wIter.MoveNext(); )
                 {
                     Weight w = wIter.Current;
@@ -363,7 +363,7 @@
                 sumExpl.Match = 0 < coord ? true : false;
                 sumExpl.Value = sum;

-                float coordFactor = m_disableCoord ? 1.0f : Coord(coord, m_maxCoord);
+                float coordFactor = disableCoord ? 1.0f : Coord(coord, m_maxCoord);
                 if (coordFactor == 1.0f)
                 {
                     return sumExpl; // eliminate wrapper
@@ -379,7 +379,7 @@

             public override BulkScorer BulkScorer(AtomicReaderContext context, bool scoreDocsInOrder, IBits acceptDocs)
             {
-                if (scoreDocsInOrder || OuterInstance.m_minNrShouldMatch > 1)
+                if (scoreDocsInOrder || outerInstance.m_minNrShouldMatch > 1)
                 {
                     // TODO: (LUCENE-4872) in some cases BooleanScorer may be faster for minNrShouldMatch
                     // but the same is even true of pure conjunctions...
@@ -388,7 +388,7 @@

                 IList<BulkScorer> prohibited = new List<BulkScorer>();
                 IList<BulkScorer> optional = new List<BulkScorer>();
-                IEnumerator<BooleanClause> cIter = OuterInstance.clauses.GetEnumerator();
+                IEnumerator<BooleanClause> cIter = outerInstance.clauses.GetEnumerator();
                 foreach (Weight w in m_weights)
                 {
                     cIter.MoveNext();
@@ -419,7 +419,7 @@
                 }

                 // Check if we can and should return a BooleanScorer
-                return new BooleanScorer(this, m_disableCoord, OuterInstance.m_minNrShouldMatch, optional, prohibited, m_maxCoord);
+                return new BooleanScorer(this, disableCoord, outerInstance.m_minNrShouldMatch, optional, prohibited, m_maxCoord);
             }

             public override Scorer Scorer(AtomicReaderContext context, IBits acceptDocs)
@@ -427,7 +427,7 @@
                 IList<Scorer> required = new List<Scorer>();
                 IList<Scorer> prohibited = new List<Scorer>();
                 IList<Scorer> optional = new List<Scorer>();
-                IEnumerator<BooleanClause> cIter = OuterInstance.clauses.GetEnumerator();
+                IEnumerator<BooleanClause> cIter = outerInstance.clauses.GetEnumerator();
                 foreach (Weight w in m_weights)
                 {
                     cIter.MoveNext();
@@ -459,7 +459,7 @@
                     // no required and optional clauses.
                     return null;
                 }
-                else if (optional.Count < OuterInstance.m_minNrShouldMatch)
+                else if (optional.Count < outerInstance.m_minNrShouldMatch)
                 {
                     // either >1 req scorer, or there are 0 req scorers and at least 1
                     // optional scorer. Therefore if there are not enough optional scorers
@@ -470,35 +470,35 @@
                 // simple conjunction
                 if (optional.Count == 0 && prohibited.Count == 0)
                 {
-                    float coord = m_disableCoord ? 1.0f : Coord(required.Count, m_maxCoord);
+                    float coord = disableCoord ? 1.0f : Coord(required.Count, m_maxCoord);
                     return new ConjunctionScorer(this, required.ToArray(), coord);
                 }

                 // simple disjunction
-                if (required.Count == 0 && prohibited.Count == 0 && OuterInstance.m_minNrShouldMatch <= 1 && optional.Count > 1)
+                if (required.Count == 0 && prohibited.Count == 0 && outerInstance.m_minNrShouldMatch <= 1 && optional.Count > 1)
                 {
                     var coord = new float[optional.Count + 1];
                     for (int i = 0; i < coord.Length; i++)
                     {
-                        coord[i] = m_disableCoord ? 1.0f : Coord(i, m_maxCoord);
+                        coord[i] = disableCoord ? 1.0f : Coord(i, m_maxCoord);
                     }
                     return new DisjunctionSumScorer(this, optional.ToArray(), coord);
                 }

                 // Return a BooleanScorer2
-                return new BooleanScorer2(this, m_disableCoord, OuterInstance.m_minNrShouldMatch, required, prohibited, optional, m_maxCoord);
+                return new BooleanScorer2(this, disableCoord, outerInstance.m_minNrShouldMatch, required, prohibited, optional, m_maxCoord);
             }

             public override bool ScoresDocsOutOfOrder
             {
                 get
                 {
-                    if (OuterInstance.m_minNrShouldMatch > 1)
+                    if (outerInstance.m_minNrShouldMatch > 1)
                     {
                         // BS2 (in-order) will be used by scorer()
                         return false;
                     }
-                    foreach (BooleanClause c in OuterInstance.clauses)
+                    foreach (BooleanClause c in outerInstance.clauses)
                     {
                         if (c.IsRequired)
                         {


Fix off-by-one error in SignatureReader.ReadUTF8String()

If position + length was exactly buffer.Length we'd return an empty string instead of the correct value.

--- Mono.Cecil/AssemblyReader.cs
+++ Mono.Cecil/AssemblyReader.cs
@@ -3769,7 +3769,7 @@
 			if (length == 0)
 				return string.Empty;

-			if (position + length >= buffer.Length)
+			if (position + length > buffer.Length)
 				return string.Empty;

 			var @string = Encoding.UTF8.GetString (buffer, position, length);


Disable Task test that fails when run in bulk but passes individually in VS

--- src/XMakeTasks/UnitTests/GetSDKReference_Tests.cs
+++ src/XMakeTasks/UnitTests/GetSDKReference_Tests.cs
@@ -757,7 +757,7 @@
         /// Verify the correct reference files are found and that by default we do log the reference files
         /// added.
         /// </summary>
-        [Fact]
+        [Fact(Skip = "Test fails in xunit when multiple tests are run")]
         public void VerifyReferencesLoggedAmd64()
         {
             MockEngine engine = new MockEngine();


changed to use a different method for external storage GetStream method so as not to confuse the consumer

--- src/Media.Plugin.Abstractions/MediaFile.cs
+++ src/Media.Plugin.Abstractions/MediaFile.cs
@@ -62,16 +62,27 @@
         /// Get stream if available
         /// </summary>
         /// <returns></returns>
-        public Stream GetStream(bool forExternalStorage = false)
+        public Stream GetStream()
         {
             if (isDisposed)
                 throw new ObjectDisposedException(null);

-						if (forExternalStorage && streamGetterForExternalStorage != null)
-								return streamGetterForExternalStorage();
-						else
-            		return streamGetter();
+						return streamGetter();
         }
+
+				/// <summary>
+				/// Get stream with image orientation rotated if available. If not, then just GetStream()
+				/// </summary>
+				/// <returns></returns>
+				public Stream GetStreamWithImageRotatedForExternalStorage() {
+					if (isDisposed)
+						throw new ObjectDisposedException(null);
+
+					if (streamGetterForExternalStorage != null)
+						return streamGetterForExternalStorage();
+					else
+						return GetStream();
+				}

         /// <summary>
         ///


when path is seen, delete its other paths

--- Assets/Path.cs
+++ Assets/Path.cs
@@ -545,8 +545,13 @@
 	}

 	public void beSeen(long time) {
-		segments[insertNode(time)].unseen = false;
-		// TODO: delete all child paths made before time unseen
+		int seg = insertNode(time);
+		List<KeyValuePair<Segment, int>> seenUnits = new List<KeyValuePair<Segment, int>>();
+		segments[seg].unseen = false;
+		foreach (int unit in segments[seg].units) {
+			seenUnits.Add (new KeyValuePair<Segment, int>(segments[seg], unit));
+		}
+		if (!g.deleteOtherPaths (seenUnits)) throw new SystemException("failed to delete other paths of seen path");
 	}

 	/// <summary>


Moved UISwitch for booleanelement to the AccessoryView, best-practice according to Apple Docs. UISwitch is now more vertically aligned.

--- MonoTouch.Dialog/Elements.cs
+++ MonoTouch.Dialog/Elements.cs
@@ -182,7 +182,7 @@
 		public override UITableViewCell GetCell (UITableView tv)
 		{
 			if (sw == null){
-				sw = new UISwitch (new RectangleF (198, 12, 94, 27)){
+				sw = new UISwitch (){
 					BackgroundColor = UIColor.Clear,
 					Tag = 1,
 					On = Value
@@ -200,7 +200,7 @@
 				RemoveTag (cell, 1);

 			cell.TextLabel.Text = Caption;
-			cell.ContentView.AddSubview (sw);
+			cell.AccessoryView = sw;

 			return cell;
 		}


parallel port done

parallel port done

--- Assets/VLIO.cs
+++ Assets/VLIO.cs
@@ -69,7 +69,7 @@
     }
 }

-public class ParallelPort:Inpout
+public class ParallelPort : Inpout
 {
     public short address;
     private bool isdataoutput;
@@ -83,7 +83,7 @@
             isdataoutput = value;
         }
     }
-    public ParallelPort(short address=0x378,bool isdataoutput=true)
+    public ParallelPort(short address = 0x378, bool isdataoutput = true)
     {
         this.address = address;
         IsDataOutput = isdataoutput;
@@ -99,7 +99,7 @@
     }
     public byte InpByte(short address)
     {
-        var t =BitConverter.GetBytes(Inp(address));
+        var t = BitConverter.GetBytes(Inp(address));
         return t[0];
     }
     public byte InpByte()
@@ -107,7 +107,7 @@
         return InpByte(address);
     }

-    public void Out(short address,short data)
+    public void Out(short address, short data)
     {
         Out32(address, data);
     }
@@ -116,44 +116,43 @@
         Out(address, data);
     }

-    public void SetDataBit(short address=0x378,int bit=0,bool value=true)
+    public void SetDataBit(short address = 0x378, int bit = 0, bool value = true)
     {
         var t = value ? Math.Pow(2.0, bit) : 0;
         Out(address, (short)t);
     }
     public void SetDataBits(int[] bits, bool[] values, short address = 0x378)
     {
-        if(bits!=null&&values!=null)
-        {
-            var bs = bits.Distinct().ToArray();
-            var vs = values.Distinct().ToArray();
-            if (bs.Count() == vs.Count())
+        if (bits != null && values != null)
+        {
+            var bs = bits.Distinct().ToArray();
+            if (bs.Count() == values.Length)
             {
                 var t = 0.0;
                 for (var i = 0; i < bs.Count(); i++)
                 {
-                    t += vs[i] ? Math.Pow(2.0, bs[i]) : 0;
+                    t += values[i] ? Math.Pow(2.0, bs[i]) : 0;
                 }
                 Out(address, (short)t);
             }
         }
     }

-    public bool GetDataBit(short address=0x378,int bit=0)
+    public bool GetDataBit(short address = 0x378, int bit = 0)
     {
         var t = Convert.ToString(InpByte(address), 2).PadLeft(8, '0');
-        return t[7-bit] == '1' ? true : false;
-    }
-    public bool[] GetDataBits(int[] bits,short address=0x378)
+        return t[7 - bit] == '1' ? true : false;
+    }
+    public bool[] GetDataBits(int[] bits, short address = 0x378)
     {
         var vs = new List<bool>();
-        if(bits!=null)
-        {
-            var bs = bits.Distinct().ToArray();
-            if(bs.Count()!=0)
+        if (bits != null)
+        {
+            var bs = bits.Distinct().ToArray();
+            if (bs.Count() != 0)
             {
                 var t = Convert.ToString(InpByte(address), 2).PadLeft(8, '0');
-                foreach(var b in bs)
+                foreach (var b in bs)
                 {
                     vs.Add(t[7 - b] == '1' ? true : false);
                 }
@@ -162,25 +161,59 @@
         return vs.ToArray();
     }

-    public void Pulse(short address = 0x378, int bit = 0, double duration=0.001)
+    public void DataBitPulse(short address = 0x378, int bit = 0, double duration = 0.001)
     {
         var timer = new Timer();
         SetDataBit(address, bit);
         timer.Countdown(duration);
         SetDataBit(address, bit, false);
     }
-    void _Pulse(object p)
+    void _DataBitPulse(object p)
     {
         var param = (List<object>)p;
-        Pulse((short)param[0], (int)param[1], (double)param[2]);
-    }
-    public void ThreadPulse(short address = 0x378, int bit = 0, double duration = 0.001)
-    {
-        var t = new Thread(new ParameterizedThreadStart(_Pulse));
-        var o = new List<object>();
-        o.Add(address);
-        o.Add(bit);
-        o.Add(duration);
-        t.Start(o);
-    }
+        DataBitPulse((short)param[0], (int)param[1], (double)param[2]);
+    }
+    public void ThreadDataBitPulse(short address = 0x378, int bit = 0, double duration = 0.001)
+    {
+        var t = new Thread(new ParameterizedThreadStart(_DataBitPulse));
+        var p = new List<object>();
+        p.Add(address);
+        p.Add(bit);
+        p.Add(duration);
+        t.Start(p);
+    }
+
+    public void SDataBitsPulse(int[] bits, double[] durations, short address = 0x378)
+    {
+        if (bits != null && durations != null)
+        {
+            var bs = bits.Distinct().ToArray();
+            if (bs.Count() == durations.Length)
+            {
+                for (var i = 0; i < bs.Count(); i++)
+                {
+                    DataBitPulse(address, bs[i], durations[i]);
+                }
+            }
+        }
+    }
+    public void PDataBitsPulse(int[] bits, double[] durations, short address = 0x378)
+    {
+        if (bits != null && durations != null)
+        {
+            var bs = bits.Distinct().ToArray();
+            if (bs.Count() == durations.Length)
+            {
+                for (var i = 0; i < bs.Count(); i++)
+                {
+                    ThreadDataBitPulse(address, bs[i], durations[i]);
+                }
+            }
+        }
+    }
+}
+
+public class USB
+{
+
 }


Reacting to EF class renaming.

Reacting to EF class renaming.

--- src/MusicStore/Models/MusicStoreContext.cs
+++ src/MusicStore/Models/MusicStoreContext.cs
@@ -24,7 +24,7 @@
         public DbSet<CartItem> CartItems { get; set; }
         public DbSet<OrderDetail> OrderDetails { get; set; }

-        protected override void OnConfiguring(EntityConfigurationBuilder builder)
+        protected override void OnConfiguring(DbContextOptions builder)
         {
 #if NET45
             builder.SqlServerConnectionString(_configuration.Get("Data:DefaultConnection:ConnectionString"));


Fix bug

Fix bug

--- MyFavoriteQuotes/FormMain.cs
+++ MyFavoriteQuotes/FormMain.cs
@@ -2113,7 +2113,7 @@
         }
       }

-      textBoxDuplicate.Text += $"New quotes.xml file without duplicate has {_allQuotes.ListOfQuotes.Count} quotes";
+      textBoxDuplicate.Text += $"New quotes.xml file without duplicate has {allQuotesWithoutDuplicate.ListOfQuotes.Count} quotes";
     }
   }
 }


SelectionTests.cs: Tabify.

SelectionTests.cs: Tabify.

--- src/NHibernate.Test/Linq/SelectionTests.cs
+++ src/NHibernate.Test/Linq/SelectionTests.cs
@@ -75,61 +75,61 @@
 			Assert.IsTrue(list.All(u => u.RoleName == "Admin" || u.RoleName == "User" || String.IsNullOrEmpty(u.RoleName)));
 		}

-        [Test]
-        public void CanSelectNestedAnonymousTypeWithMultipleReferences()
-        {
-            var query = from user in db.Users
-                        select new
-                        {
-                            user.Name,
-                            Enums = new
-                            {
-                                user.Enum1,
-                                user.Enum2
-                            },
-                            RoleName = user.Role.Name,
-                            RoleIsActive = (bool?) user.Role.IsActive
-                        };
-
-            var list = query.ToList();
-            Assert.AreEqual(3, list.Count);
-
-            //assert role names -- to ensure that the correct values were used to invoke constructor
-            Assert.IsTrue(list.All(u => u.RoleName == "Admin" || u.RoleName == "User" || String.IsNullOrEmpty(u.RoleName)));
-        }
-
-        [Test]
-        public void CanSelectNestedAnonymousTypeWithComponentReference()
-        {
-            var query = from user in db.Users
-                        select new
-                        {
-                            user.Name,
-                            Enums = new
-                            {
-                                user.Enum1,
-                                user.Enum2
-                            },
-                            RoleName = user.Role.Name,
-                            ComponentProperty = user.Component.Property1
-                        };
-
-            var list = query.ToList();
-            Assert.AreEqual(3, list.Count);
-
-            //assert role names -- to ensure that the correct values were used to invoke constructor
-            Assert.IsTrue(list.All(u => u.RoleName == "Admin" || u.RoleName == "User" || String.IsNullOrEmpty(u.RoleName)));
-        }
-
-		[Test]
-        public void CanSelectNestedMemberInitExpression()
+		[Test]
+		public void CanSelectNestedAnonymousTypeWithMultipleReferences()
+		{
+			var query = from user in db.Users
+						select new
+						{
+							user.Name,
+							Enums = new
+							{
+								user.Enum1,
+								user.Enum2
+							},
+							RoleName = user.Role.Name,
+							RoleIsActive = (bool?) user.Role.IsActive
+						};
+
+			var list = query.ToList();
+			Assert.AreEqual(3, list.Count);
+
+			//assert role names -- to ensure that the correct values were used to invoke constructor
+			Assert.IsTrue(list.All(u => u.RoleName == "Admin" || u.RoleName == "User" || String.IsNullOrEmpty(u.RoleName)));
+		}
+
+		[Test]
+		public void CanSelectNestedAnonymousTypeWithComponentReference()
+		{
+			var query = from user in db.Users
+						select new
+						{
+							user.Name,
+							Enums = new
+							{
+								user.Enum1,
+								user.Enum2
+							},
+							RoleName = user.Role.Name,
+							ComponentProperty = user.Component.Property1
+						};
+
+			var list = query.ToList();
+			Assert.AreEqual(3, list.Count);
+
+			//assert role names -- to ensure that the correct values were used to invoke constructor
+			Assert.IsTrue(list.All(u => u.RoleName == "Admin" || u.RoleName == "User" || String.IsNullOrEmpty(u.RoleName)));
+		}
+
+		[Test]
+		public void CanSelectNestedMemberInitExpression()
 		{
 			var query = from user in db.Users
 						select new UserDto(user.Id, user.Name)
 						{
 							InvalidLoginAttempts = user.InvalidLoginAttempts,
 							Dto2 = new UserDto2
-							           {
+									   {
 								RegisteredAt = user.RegisteredAt,
 								Enum = user.Enum2
 							},
@@ -144,7 +144,7 @@
 		}

 		[Test]
-        public void CanSelectNestedMemberInitWithinNewExpression()
+		public void CanSelectNestedMemberInitWithinNewExpression()
 		{
 			var query = from user in db.Users
 						select new
@@ -152,7 +152,7 @@
 							user.Name,
 							user.InvalidLoginAttempts,
 							Dto = new UserDto2
-							          {
+									  {
 								RegisteredAt = user.RegisteredAt,
 								Enum = user.Enum2
 							},


React to DesignTimeHost rename

React to DesignTimeHost rename

Allows omnisharp to work with both older and newer versions of DNX

--- src/OmniSharp/Dnx/DesignTimeHostManager.cs
+++ src/OmniSharp/Dnx/DesignTimeHostManager.cs
@@ -34,6 +34,12 @@
                 }

                 int port = GetFreePort();
+
+                // TODO: This is for backcompat. Once the dust settles, and MS.Framework.DTH goes away, remove this.
+                var dthPath = Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Framework.DesignTimeHost", "Microsoft.Framework.DesignTimeHost.dll");
+                if (!File.Exists(dthPath))
+                  dthPath = Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Dnx.DesignTimeHost", "Microsoft.Dnx.DesignTimeHost.dll");
+
                 var psi = new ProcessStartInfo
                 {
                     FileName = _paths.Dnx ?? _paths.Klr,
@@ -41,7 +47,7 @@
                     UseShellExecute = false,
                     RedirectStandardError = true,
                     Arguments = string.Format(@"""{0}"" {1} {2} {3}",
-                                              Path.Combine(_paths.RuntimePath.Value, "bin", "lib", "Microsoft.Framework.DesignTimeHost", "Microsoft.Framework.DesignTimeHost.dll"),
+                                              dthPath,
                                               port,
                                               Process.GetCurrentProcess().Id,
                                               hostId),


Removing reference

Removing reference

--- src/Orchard/ContentManagement/XmlHelper.cs
+++ src/Orchard/ContentManagement/XmlHelper.cs
@@ -4,7 +4,6 @@
 using System.Linq.Expressions;
 using System.Xml;
 using System.Xml.Linq;
-using NHibernate.Util;
 using Orchard.Utility;

 namespace Orchard.ContentManagement {


json_encode() optional 3rd arg (not used yet)

--- src/Peachpie.Library/Serialization.Json.cs
+++ src/Peachpie.Library/Serialization.Json.cs
@@ -824,8 +824,18 @@

         #region json_encode, json_decode, json_last_error

-        public static PhpString json_encode(Context ctx, PhpValue value, JsonEncodeOptions options = JsonEncodeOptions.Default)
+        /// <summary>
+        /// Returns the JSON representation of a value.
+        /// </summary>
+        /// <param name="ctx"></param>
+        /// <param name="value">The value being encoded. Can be any type except a <see cref="PhpResource"/>.
+        /// All string data must be UTF-8 encoded.</param>
+        /// <param name="options"></param>
+        /// <param name="depth">Set the maximum depth. Must be greater than zero.</param>
+        public static PhpString json_encode(Context ctx, PhpValue value, JsonEncodeOptions options = JsonEncodeOptions.Default, int depth = 512)
         {
+            // TODO: depth
+
             return new PhpSerialization.JsonSerializer(encodeOptions: options).Serialize(ctx, value, default);
         }


dev test

dev test

--- src/Plivo/Utilities/ComparisonUtilities.cs
+++ src/Plivo/Utilities/ComparisonUtilities.cs
@@ -36,18 +36,7 @@
             foreach (KeyValuePair<string, JToken> sourcePair in source)
             {
                 if (sourcePair.Value.Type == JTokenType.Object)
-                {
-                    Console.WriteLine("StringUtilities.SnakeCaseToPascalCase(sourcePair.Key---");
-                    Console.WriteLine(StringUtilities.SnakeCaseToPascalCase(sourcePair.Key));
-                    if (StringUtilities.SnakeCaseToPascalCase(sourcePair.Key) == "Campaign" ){
-                        Console.WriteLine("snake-");
-                        Console.WriteLine(sourcePair.Key);
-                        Console.WriteLine(target.GetValue(sourcePair.Key));
-                        Console.WriteLine("pascal-");
-                        Console.WriteLine(StringUtilities.SnakeCaseToPascalCase(sourcePair.Key));
-                    }
-
-
+                {
                     if (target.GetValue(StringUtilities.SnakeCaseToPascalCase(sourcePair.Key)) == null)
                     {
                         returnString.Append("Key " + StringUtilities.SnakeCaseToPascalCase(sourcePair.Key)


Implement RunBash function

Implement RunBash function

--- src/Pomelo.NetCore.Node/Hubs/ProjectHub.cs
+++ src/Pomelo.NetCore.Node/Hubs/ProjectHub.cs
@@ -33,7 +33,41 @@
             }
         }

-        public object RunCommand(string projectName, string args, string projectPath)
+        public object RunBash()
+        {
+            var proc = new Process();
+            try
+            {
+                proc.StartInfo.UseShellExecute = true;
+                proc.StartInfo.RedirectStandardError = true;
+                proc.StartInfo.RedirectStandardOutput = true;
+                proc.StartInfo.RedirectStandardInput = true;
+                proc.StartInfo.CreateNoWindow = true;
+                proc.StartInfo.FileName = "bash";
+                proc.OutputDataReceived += (object sender, System.Diagnostics.DataReceivedEventArgs e) =>
+                {
+                    Clients.Group("process-" + ((Process)sender).Id).OnOutputDataReceived(proc.OutputSequence++, e.Data);
+                };
+                proc.ErrorDataReceived += (object sender, System.Diagnostics.DataReceivedEventArgs e) =>
+                {
+                    Clients.Group("process-" + ((Process)sender).Id).OnOutputDataReceived(proc.OutputSequence++, e.Data);
+                };
+                proc.Start();
+            }
+            catch (Exception ex)
+            {
+                return new { isSucceeded = false, msg = ex.ToString() };
+            }
+
+            ProcessPool.Add(proc);
+
+            // 将Caller加入process-id广播组
+            Groups.Add(Context.ConnectionId, "process-" + proc.Id);
+
+            return new { isSucceeded = true, pid = proc.Id };
+        }
+
+        public object RunCommand(string projectName, string args, string projectPath, bool useBash = false)
         {
             var proc = new Process();
             try


reduced memory scan range due to false positive, should probably figure this out

--- FFTools_MemoryManager.cs
+++ FFTools_MemoryManager.cs
@@ -52,7 +52,7 @@
         private int FISHBITE_BITE = 0x1;
         private const int GATHNODE_VIS = 0x0;
         private const int GATHNODE_INVIS = 0x80;
-        private const int GATHNODELIST_LENGTH = 0x4000;
+        private const int GATHNODELIST_LENGTH = 0x3500;

         // Address bases.
         private Process Proc = null;


Display a "Rendering tree..." message before starting to do layout.

This blocks the UI thread so it's better to show that it's rendering than show the previous step (Analyzing...) since it's no longer analyzing.

--- src/StructuredLogViewer/MainWindow.xaml.cs
+++ src/StructuredLogViewer/MainWindow.xaml.cs
@@ -4,6 +4,7 @@
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
+using System.Windows.Threading;
 using Microsoft.Build.Logging.StructuredLogger;
 using Microsoft.Win32;
 using Squirrel;
@@ -257,6 +258,9 @@
                 await System.Threading.Tasks.Task.Run(() => BuildAnalyzer.AnalyzeBuild(build));
             }

+            progress.ProgressText = "Rendering tree...";
+            await Dispatcher.InvokeAsync(() => { }, DispatcherPriority.Loaded); // let the progress message be rendered before we block the UI again
+
             DisplayBuild(build);
         }


Disallow opening read-only on Android API 15 and below to fix "EntryPointNotFoundException: sqlite3_db_readonly"

--- src/System.Data.SQLite/SQLiteConnection.cs
+++ src/System.Data.SQLite/SQLiteConnection.cs
@@ -95,9 +95,17 @@
 					NativeMethods.sqlite3_key(m_db, passwordBytes, passwordBytes.Length).ThrowOnError();
 				}

-				int isReadOnly = NativeMethods.sqlite3_db_readonly(m_db, "main");
-				if (isReadOnly == 1 && !connectionStringBuilder.ReadOnly)
-					throw new SQLiteException(SQLiteErrorCode.ReadOnly);
+				bool allowOpenReadOnly = true;
+#if MONOANDROID
+				// opening read-only throws "EntryPointNotFoundException: sqlite3_db_readonly" on Android API 15 and below (JellyBean is API 16)
+				allowOpenReadOnly = Android.OS.Build.VERSION.SdkInt >= Android.OS.BuildVersionCodes.JellyBean;
+#endif
+				if (allowOpenReadOnly)
+				{
+					int isReadOnly = NativeMethods.sqlite3_db_readonly(m_db, "main");
+					if (isReadOnly == 1 && !connectionStringBuilder.ReadOnly)
+						throw new SQLiteException(SQLiteErrorCode.ReadOnly);
+				}

 				if (connectionStringBuilder.CacheSize != 0)
 					this.ExecuteNonQuery("pragma cache_size={0}".FormatInvariant(connectionStringBuilder.CacheSize));


Fixes: U4-5208 RenderActionInvoker needs to be able to run async so needs to inherit from AsyncControllerActionInvoker

--- src/Umbraco.Web/Mvc/RenderActionInvoker.cs
+++ src/Umbraco.Web/Mvc/RenderActionInvoker.cs
@@ -1,12 +1,13 @@
 using System.Linq;
 using System.Web.Mvc;
+using System.Web.Mvc.Async;

 namespace Umbraco.Web.Mvc
 {
 	/// <summary>
 	/// Ensures that if an action for the Template name is not explicitly defined by a user, that the 'Index' action will execute
 	/// </summary>
-	public class RenderActionInvoker : ControllerActionInvoker
+    public class RenderActionInvoker : AsyncControllerActionInvoker
 	{

 		/// <summary>


update #build2018

update #build2018

--- src/WebSite/Views/Content/Build2018.cshtml
+++ src/WebSite/Views/Content/Build2018.cshtml
@@ -7,7 +7,24 @@

#video

-
+
+
+
+
About conference

+

+            Microsoft Build (often stylised as //build/) is an annual conference event held by Microsoft, aimed towards
+            software engineers and web developers using Windows, Windows Phone, Microsoft Azure and other Microsoft
+            technologies.

+            The 2018 Build conference is being held at the Washington State Convention Center in Downtown Seattle,
+            Washington May 7 to May 9, 2018. The price has increased $300 to $2495 for the 2018 conference.

+

+
Source: Wikipedia

         <a class="twitter-timeline"


ADDED: Comments, AddAll(), AddAllAsync()

Commented the class
Added an AddAll() and AddAllAsync() method to take in a generic list of objects to insert in a single transaction.

--- BaseService.cs
+++ BaseService.cs
@@ -5,72 +5,156 @@
 using System.Linq.Expressions;
 using System.Threading.Tasks;

-namespace com.youapp.data.services
+namespace com.yourapp.data.services
 {
     public class BaseService<TObject> where TObject : class
     {
         protected DataContext _context;

-        public BaseService(DataContext context)
+        /// <summary>
+        /// The contructor requires an open DataContext to work with
+        /// </summary>
+        /// <param name="context">An open DataContext</param>
+        public BaseGenericService(DataContext context)
         {
             _context = context;
         }
-
+        /// <summary>
+        /// Returns a single object with a primary key of the provided id
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="id">The primary key of the object to fetch</param>
+        /// <returns>A single object with the provided primary key or null</returns>
+        public TObject Get(int id)
+        {
+            return _context.Set<TObject>().Find(id);
+        }
+        /// <summary>
+        /// Returns a single object with a primary key of the provided id
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="id">The primary key of the object to fetch</param>
+        /// <returns>A single object with the provided primary key or null</returns>
+        public async Task<TObject> GetAsync(int id)
+        {
+            return await _context.Set<TObject>().FindAsync(id);
+        }
+        /// <summary>
+        /// Gets a collection of all objects in the database
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <returns>An ICollection of every object in the database</returns>
         public ICollection<TObject> GetAll()
         {
             return _context.Set<TObject>().ToList();
         }
-
+        /// <summary>
+        /// Gets a collection of all objects in the database
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <returns>An ICollection of every object in the database</returns>
         public async Task<ICollection<TObject>> GetAllAsync()
         {
             return await _context.Set<TObject>().ToListAsync();
         }
-
-        public TObject Get(int id)
-        {
-            return _context.Set<TObject>().Find(id);
-        }
-
-        public async Task<TObject> GetAsync(int id)
-        {
-            return await _context.Set<TObject>().FindAsync(id);
-        }
-
+        /// <summary>
+        /// Returns a single object which matches the provided expression
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="match">A Linq expression filter to find a single result</param>
+        /// <returns>A single object which matches the expression filter.
+        /// If more than one object is found or if zero are found, null is returned</returns>
         public TObject Find(Expression<Func<TObject, bool>> match)
         {
             return _context.Set<TObject>().SingleOrDefault(match);
         }
-
+        /// <summary>
+        /// Returns a single object which matches the provided expression
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="match">A Linq expression filter to find a single result</param>
+        /// <returns>A single object which matches the expression filter.
+        /// If more than one object is found or if zero are found, null is returned</returns>
         public async Task<TObject> FindAsync(Expression<Func<TObject, bool>> match)
         {
             return await _context.Set<TObject>().SingleOrDefaultAsync(match);
         }
-
+        /// <summary>
+        /// Returns a collection of objects which match the provided expression
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="match">A linq expression filter to find one or more results</param>
+        /// <returns>An ICollection of object which match the expression filter</returns>
         public ICollection<TObject> FindAll(Expression<Func<TObject, bool>> match)
         {
             return _context.Set<TObject>().Where(match).ToList();
         }
-
+        /// <summary>
+        /// Returns a collection of objects which match the provided expression
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="match">A linq expression filter to find one or more results</param>
+        /// <returns>An ICollection of object which match the expression filter</returns>
         public async Task<ICollection<TObject>> FindAllAsync(Expression<Func<TObject, bool>> match)
         {
             return await _context.Set<TObject>().Where(match).ToListAsync();
         }
-
+        /// <summary>
+        /// Inserts a single object to the database and commits the change
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="t">The object to insert</param>
+        /// <returns>The resulting object including its primary key after the insert</returns>
         public TObject Add(TObject t)
         {
             _context.Set<TObject>().Add(t);
             _context.SaveChanges();
             return t;
         }
-
+        /// <summary>
+        /// Inserts a single object to the database and commits the change
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="t">The object to insert</param>
+        /// <returns>The resulting object including its primary key after the insert</returns>
         public async Task<TObject> AddAsync(TObject t)
         {
             _context.Set<TObject>().Add(t);
             await _context.SaveChangesAsync();
             return t;
         }
-
-        public TObject Update(TObject updated,int key)
+        /// <summary>
+        /// Inserts a collection of objects into the database and commits the changes
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="tList">An IEnumerable list of objects to insert</param>
+        /// <returns>The IEnumerable resulting list of inserted objects including the primary keys</returns>
+        public IEnumerable<TObject> AddAll(IEnumerable<TObject> tList)
+        {
+            _context.Set<TObject>().AddRange(tList);
+            _context.SaveChanges();
+            return tList;
+        }
+        /// <summary>
+        /// Inserts a collection of objects into the database and commits the changes
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="tList">An IEnumerable list of objects to insert</param>
+        /// <returns>The IEnumerable resulting list of inserted objects including the primary keys</returns>
+        public async Task<IEnumerable<TObject>> AddAllAsync(IEnumerable<TObject> tList)
+        {
+            _context.Set<TObject>().AddRange(tList);
+            await _context.SaveChangesAsync();
+            return tList;
+        }
+        /// <summary>
+        /// Updates a single object based on the provided primary key and commits the change
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="updated">The updated object to apply to the database</param>
+        /// <param name="key">The primary key of the object to update</param>
+        /// <returns>The resulting updated object</returns>
+        public TObject Update(TObject updated, int key)
         {
             if (updated == null)
                 return null;
@@ -83,7 +167,13 @@
             }
             return existing;
         }
-
+        /// <summary>
+        /// Updates a single object based on the provided primary key and commits the change
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="updated">The updated object to apply to the database</param>
+        /// <param name="key">The primary key of the object to update</param>
+        /// <returns>The resulting updated object</returns>
         public async Task<TObject> UpdateAsync(TObject updated, int key)
         {
             if (updated == null)
@@ -97,24 +187,41 @@
             }
             return existing;
         }
-
+        /// <summary>
+        /// Deletes a single object from the database and commits the change
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <param name="t">The object to delete</param>
         public void Delete(TObject t)
         {
             _context.Set<TObject>().Remove(t);
             _context.SaveChanges();
         }
-
+        /// <summary>
+        /// Deletes a single object from the database and commits the change
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <param name="t">The object to delete</param>
         public async Task<int> DeleteAsync(TObject t)
         {
             _context.Set<TObject>().Remove(t);
             return await _context.SaveChangesAsync();
         }
-
+
+        /// <summary>
+        /// Gets the count of the number of objects in the databse
+        /// </summary>
+        /// <remarks>Synchronous</remarks>
+        /// <returns>The count of the number of objects</returns>
         public int Count()
         {
             return _context.Set<TObject>().Count();
         }
-
+        /// <summary>
+        /// Gets the count of the number of objects in the databse
+        /// </summary>
+        /// <remarks>Asynchronous</remarks>
+        /// <returns>The count of the number of objects</returns>
         public async Task<int> CountAsync()
         {
             return await _context.Set<TObject>().CountAsync();


Cleanup unused parameter bRestart in CCSequence.

--- src/actions/action_intervals/CCSequence.cs
+++ src/actions/action_intervals/CCSequence.cs
@@ -124,7 +124,6 @@

         public override void Update (float time)
         {
-            bool bRestart = false;
             int found;
             float new_t;

@@ -181,7 +180,7 @@

             // Last action found and it is done
-            if (found != last || bRestart)
+            if (found != last)
             {
                 actionStates [found] = (CCFiniteTimeActionState)actionSequences [found].StartAction (Target);
             }


Reduce cost of LocalPop when local queue empty

- Change LocalPop to be parameterless and return the IThreadPoolWorkItem rather than returning a bool and having the IThreadPoolWorkItem in an out arg.
- Refactor LocalPop slightly to have an inlineable upfront check for whether the local queue is empty, and only call the non-inlineable method if there's something that could potentially be popped

--- src/mscorlib/src/System/Threading/ThreadPool.cs
+++ src/mscorlib/src/System/Threading/ThreadPool.cs
@@ -212,13 +212,9 @@
                 // Fast path: check the tail. If equal, we can skip the lock.
                 if (m_array[(m_tailIndex - 1) & m_mask] == obj)
                 {
-                    IThreadPoolWorkItem unused;
-                    if (LocalPop(out unused))
-                    {
-                        Debug.Assert(unused == obj);
-                        return true;
-                    }
-                    return false;
+                    IThreadPoolWorkItem unused = LocalPop();
+                    Debug.Assert(unused == null || unused == obj);
+                    return unused != null;
                 }

                 // Else, do an O(N) search for the work item. The theory of work stealing and our
@@ -267,19 +263,20 @@
                 return false;
             }

+            public IThreadPoolWorkItem LocalPop() => m_headIndex < m_tailIndex ? LocalPopCore() : null;
+
             [SuppressMessage("Microsoft.Concurrency", "CA8001", Justification = "Reviewed for thread safety")]
-            public bool LocalPop(out IThreadPoolWorkItem obj)
+            private IThreadPoolWorkItem LocalPopCore()
             {
                 while (true)
                 {
-                    // Decrement the tail using a fence to ensure subsequent read doesn't come before.
                     int tail = m_tailIndex;
                     if (m_headIndex >= tail)
                     {
-                        obj = null;
-                        return false;
-                    }
-
+                        return null;
+                    }
+
+                    // Decrement the tail using a fence to ensure subsequent read doesn't come before.
                     tail -= 1;
                     Interlocked.Exchange(ref m_tailIndex, tail);

@@ -287,13 +284,13 @@
                     if (m_headIndex <= tail)
                     {
                         int idx = tail & m_mask;
-                        obj = Volatile.Read(ref m_array[idx]);
+                        IThreadPoolWorkItem obj = Volatile.Read(ref m_array[idx]);

                         // Check for nulls in the array.
                         if (obj == null) continue;

                         m_array[idx] = null;
-                        return true;
+                        return obj;
                     }
                     else
                     {
@@ -307,20 +304,19 @@
                             {
                                 // Element still available. Take it.
                                 int idx = tail & m_mask;
-                                obj = Volatile.Read(ref m_array[idx]);
+                                IThreadPoolWorkItem obj = Volatile.Read(ref m_array[idx]);

                                 // Check for nulls in the array.
                                 if (obj == null) continue;

                                 m_array[idx] = null;
-                                return true;
+                                return obj;
                             }
                             else
                             {
                                 // If we encountered a race condition and element was stolen, restore the tail.
                                 m_tailIndex = tail + 1;
-                                obj = null;
-                                return false;
+                                return null;
                             }
                         }
                         finally
@@ -468,7 +464,7 @@
             WorkStealingQueue localWsq = tl.workStealingQueue;
             IThreadPoolWorkItem callback;

-            if (!localWsq.LocalPop(out callback) && // first try the local queue
+            if ((callback = localWsq.LocalPop()) == null && // first try the local queue
                 !workItems.TryDequeue(out callback)) // then try the global queue
             {
                 // finally try to steal from another thread's local queue
@@ -680,7 +676,7 @@
                 if (null != workQueue)
                 {
                     IThreadPoolWorkItem cb;
-                    while (workStealingQueue.LocalPop(out cb))
+                    while ((cb = workStealingQueue.LocalPop()) != null)
                     {
                         Debug.Assert(null != cb);
                         workQueue.Enqueue(cb, forceGlobal: true);