Add some error reporting to FrameBufferExt.

--- Drivers/AgateOTK/Legacy/FrameBufferExt.cs
+++ Drivers/AgateOTK/Legacy/FrameBufferExt.cs
@@ -38,9 +38,10 @@
 					InitializeFramebuffer(true, true);
 					return;
 				}
-				catch
+				catch (Exception e)
 				{
 					Trace.WriteLine("Failed to create FBO with both depth and stencil buffers.");
+					Trace.WriteLine(e.Message);
 				}
 			}
 			if (sDepthSupported)
@@ -129,8 +130,18 @@
 			FramebufferErrorCode code =
 				GL.Ext.CheckFramebufferStatus(FramebufferTarget.Framebuffer);

+			GL.Ext.BindFramebuffer(FramebufferTarget.FramebufferExt, 0);
+
 			if (code != FramebufferErrorCode.FramebufferCompleteExt)
 			{
+				GL.Ext.DeleteFramebuffers(1, ref mFramebufferID);
+				GL.Ext.DeleteRenderbuffers(1, ref mDepthBuffer);
+				GL.Ext.DeleteRenderbuffers(1, ref mStencilBuffer);
+
+				mFramebufferID = 0;
+				mDepthBuffer = 0;
+				mStencilBuffer = 0;
+
 				throw new AgateException(
 					"Could not complete framebuffer object.  Received error code "
 					+ code.ToString());


Added fix to auto-set `--s3-ext-forcepathstyle` if the target is not an Amazon S3 provider

--- Duplicati/Library/Backend/S3/S3Backend.cs
+++ Duplicati/Library/Backend/S3/S3Backend.cs
@@ -257,7 +257,12 @@
             if (m_prefix.Length != 0 && !m_prefix.EndsWith("/"))
                 m_prefix += "/";

-            m_wrapper = new S3Wrapper(awsID, awsKey, locationConstraint, host, storageClass, useSSL, options);
+            // Auto-disable dns lookup for non AWS configurations
+            var hasForcePathStyle = options.ContainsKey("s3-ext-forcepathstyle");
+            if (!hasForcePathStyle && !DEFAULT_S3_LOCATION_BASED_HOSTS.Any(x => string.Equals(x.Value, host, StringComparison.OrdinalIgnoreCase)) && !string.Equals(host, "s3.amazonaws.com", StringComparison.OrdinalIgnoreCase))
+                options["s3-ext-forcepathstyle"] = "true";
+
+			m_wrapper = new S3Wrapper(awsID, awsKey, locationConstraint, host, storageClass, useSSL, options);
         }

         public static bool IsValidHostname(string bucketname)


Switch orderby on recent unverified matches.

--- ChallengeBoard/Controllers/MatchesController.cs
+++ ChallengeBoard/Controllers/MatchesController.cs
@@ -39,7 +39,7 @@
                 Viewer = userProfile != null ? board.Competitors.FindCompetitorByProfileId(userProfile.UserId) : null,

                 UnVerified = _repository.Matches.Where(m => !m.Verified && !m.Rejected && m.Board.BoardId == boardId)
-                                        .OrderBy(m => m.VerificationDeadline)
+                                        .OrderByDescending(m => m.VerificationDeadline)
                                         .Take(300), // Limit for now.  > 300 pending should be rare.  TODO load more on demand.
                 Verified =
                     _repository.Matches.Where(m => (m.Verified || m.Rejected) && m.Board.BoardId == boardId)


Add missing try/catch to Windows.Storage.ApplicationData calls.

--- EarTrumpet/UI/Services/SettingsService.cs
+++ EarTrumpet/UI/Services/SettingsService.cs
@@ -1,6 +1,7 @@
 using EarTrumpet.Extensions;
 using Microsoft.Win32;
 using System;
+using System.Diagnostics;
 using System.IO;
 using System.Windows.Forms;
 using System.Xml;
@@ -62,11 +63,19 @@

         static string ReadSetting(string key)
         {
-            string ret;
+            string ret = null;

             if (App.Current.HasIdentity())
             {
-                ret = (string)Windows.Storage.ApplicationData.Current.LocalSettings.Values[key];
+                try
+                {
+                    ret = (string)Windows.Storage.ApplicationData.Current.LocalSettings.Values[key];
+                }
+                catch (Exception ex)
+                {
+                    Trace.TraceError($"{ex}");
+                    return ret;
+                }
             }
             else
             {
@@ -109,7 +118,15 @@
         {
             if (App.Current.HasIdentity())
             {
-                Windows.Storage.ApplicationData.Current.LocalSettings.Values[key] = value;
+                try
+                {
+                    Windows.Storage.ApplicationData.Current.LocalSettings.Values[key] = value;
+                }
+                catch (Exception ex)
+                {
+                    Trace.TraceError($"{ex}");
+                    // Windows Bug: Windows Storage APIs are not yet available.
+                }
             }
             else
             {


Upping version.

Upping version.

--- EasyAssertions/Properties/AssemblyInfo.cs
+++ EasyAssertions/Properties/AssemblyInfo.cs
@@ -32,8 +32,8 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.4.1")]
-[assembly: AssemblyFileVersion("0.4.1")]
+[assembly: AssemblyVersion("0.5.0")]
+[assembly: AssemblyFileVersion("0.5.0")]

 [assembly: InternalsVisibleTo("EasyAssertions.UnitTests, PublicKey=00240000048000009400000006020000002400005253413100040000010001009732fe341bc1ad"
                                                                 + "7a67eaaca1b9b54ae7d12db0412bc105070e6b4bbd04a3daf59e6be85604cb63535301a7dba305"


Fixed build.

Fixed build.

--- Editor/AGXUnityEditor/InspectorGUISkin.cs
+++ Editor/AGXUnityEditor/InspectorGUISkin.cs
@@ -64,7 +64,7 @@
 #if UNITY_2019_3_OR_NEWER
                                                                       18.0f );
 #else
-                                                                      16.0f )
+                                                                      16.0f );
 #endif

     /// <summary>


CodeMaid reorganise and cleanup LookupTests.cs

--- ClosedXML_Tests/Excel/CalcEngine/LookupTests.cs
+++ ClosedXML_Tests/Excel/CalcEngine/LookupTests.cs
@@ -1,3 +1,4 @@
+// Keep this file CodeMaid organised and cleaned
 using ClosedXML.Excel;
 using ClosedXML.Excel.CalcEngine.Exceptions;
 using NUnit.Framework;
@@ -10,18 +11,20 @@
     {
         private XLWorkbook workbook;

+        #region Setup and teardown
+
+        [OneTimeTearDown]
+        public void Dispose()
+        {
+            workbook.Dispose();
+        }
+
         [SetUp]
         public void Init()
         {
             // Make sure tests run on a deterministic culture
             System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
             workbook = SetupWorkbook();
-        }
-
-        [OneTimeTearDown]
-        public void Dispose()
-        {
-            workbook.Dispose();
         }

         private XLWorkbook SetupWorkbook()
@@ -82,12 +85,29 @@
             return wb;
         }

+        #endregion Setup and teardown
+
         [Test]
         public void Hlookup()
         {
             // Range lookup false
             var value = workbook.Evaluate(@"=HLOOKUP(""Total"",Data!$B$2:$I$71,4,FALSE)");
             Assert.AreEqual(179.64, value);
+        }
+
+        [Test]
+        public void Hyperlink()
+        {
+            XLHyperlink hl;
+            hl = XLWorkbook.EvaluateExpr("HYPERLINK(\"http://github.com/ClosedXML/ClosedXML\")") as XLHyperlink;
+            Assert.IsNotNull(hl);
+            Assert.AreEqual("http://github.com/ClosedXML/ClosedXML", hl.ExternalAddress.ToString());
+            Assert.AreEqual(string.Empty, hl.Tooltip);
+
+            hl = XLWorkbook.EvaluateExpr("HYPERLINK(\"mailto:jsmith@github.com\", \"jsmith@github.com\")") as XLHyperlink;
+            Assert.IsNotNull(hl);
+            Assert.AreEqual("mailto:jsmith@github.com", hl.ExternalAddress.ToString());
+            Assert.AreEqual("jsmith@github.com", hl.Tooltip);
         }

         [Test]
@@ -133,20 +153,5 @@

             Assert.Throws<CellReferenceException>(() => workbook.Evaluate(@"=VLOOKUP(20,Data!$B$2:$I$71,9,FALSE)"));
         }
-
-        [Test]
-        public void Hyperlink()
-        {
-            XLHyperlink hl;
-            hl = XLWorkbook.EvaluateExpr("HYPERLINK(\"http://github.com/ClosedXML/ClosedXML\")") as XLHyperlink;
-            Assert.IsNotNull(hl);
-            Assert.AreEqual("http://github.com/ClosedXML/ClosedXML", hl.ExternalAddress.ToString());
-            Assert.AreEqual(string.Empty, hl.Tooltip);
-
-            hl = XLWorkbook.EvaluateExpr("HYPERLINK(\"mailto:jsmith@github.com\", \"jsmith@github.com\")") as XLHyperlink;
-            Assert.IsNotNull(hl);
-            Assert.AreEqual("mailto:jsmith@github.com", hl.ExternalAddress.ToString());
-            Assert.AreEqual("jsmith@github.com", hl.Tooltip);
-        }
     }
 }


Moving order dependent code.

Moving order dependent code.

Moving keyword order dependent code to the constructor to make variable
order initialization more explicit.

--- ExpressionEvaluator/ExpressionKeywords.cs
+++ ExpressionEvaluator/ExpressionKeywords.cs
@@ -9,89 +9,103 @@
 {
     public static class ExpressionKeywords
     {
-        static public readonly Dictionary<string, IVariable> Constants = new Dictionary<string, IVariable>()
+        static public readonly Dictionary<string, IVariable> Constants;
+
+        static public readonly List<Keyword> Keywords;
+
+        static public readonly List<string> Operators;
+
+        static public readonly List<string> Functions;
+
+        static public readonly List<string> StringGroupOperators;
+
+        static public readonly List<string> OpenGroupOperators;
+
+        static public readonly List<string> ClosingGroupOperators;
+
+        static public readonly List<string> GroupOperators;
+
+        static public readonly List<string> ConditionalOperators;
+
+        static ExpressionKeywords()
         {
-            {"null", new GenericVariable<object>("null") {Value = null}},
-            {"true", new GenericVariable<bool>("true") {Value = true}},
-            {"false", new GenericVariable<bool>("false") {Value = false}}
-        };
+            Constants = new Dictionary<string, IVariable>()
+            {
+                {"null", new GenericVariable<object>("null") {Value = null}},
+                {"true", new GenericVariable<bool>("true") {Value = true}},
+                {"false", new GenericVariable<bool>("false") {Value = false}}
+            };

-        static public readonly List<Keyword> Keywords = new List<Keyword>
-        {
-            new Or(10),
-
-            new And(20),
+            Keywords = new List<Keyword>
+            {
+                new Or(10),
+                new And(20),
+                new Equal(30),
+                new GreaterEqual(30),
+                new LesserEqual(30),
+                new GreaterThan(30),
+                new LesserThan(30),
+                new NotEqual(30),
+                new Addition(40),
+                new Subtraction(40),
+                new Multiplication(50),
+                new Division(50),
+                new Power(55),
+                new Absolute(60),
+                new Negate(60),
+                new NaturalLog(60),
+                new Sign(60),
+                new Now(60),
+                new Days(60),
+                new Hours(60),
+                new Minutes(60),
+                new Seconds(60),
+                new TotalDays(60),
+                new TotalHours(60),
+                new TotalMinutes(60),
+                new TotalSeconds(60),
+                new Contains(60),
+                new ToNumber(60),
+                new ToString(60),
+                new IsNumber(60),
+                new Substring(60),
+                new Length(60),
+                new Sum(60),
+                new Conditional("if", 70, 2, false, false),
+                new Conditional("elseif", 70, 2, false, false),
+                new Conditional("else", 70, 1, true, false),
+                new Grouping("Paranthesis", "(", ")"),
+                new Grouping("Curley Braces", "{", "}"),
+                new StringGrouping("String", "'"),
+            };

-            new Equal(30),
-            new GreaterEqual(30),
-            new LesserEqual(30),
-            new GreaterThan(30),
-            new LesserThan(30),
-            new NotEqual(30),
+            Operators = Keywords.OfType<Operator>()
+                .Select(x => x.Name)
+                .ToList();

-            new Addition(40),
-            new Subtraction(40),
+            Functions = Keywords.OfType<Function>()
+                .Select(x => x.Name)
+                .ToList();

-            new Multiplication(50),
-            new Division(50),
+            StringGroupOperators = Keywords.OfType<StringGrouping>()
+                .Select(x => x.Delimiter)
+                .ToList();

-            new Power(55),
+            OpenGroupOperators = Keywords.OfType<Grouping>()
+                .Select(x => x.Open)
+                .ToList();

-            new Absolute(60),
-            new Negate(60),
-            new NaturalLog(60),
-            new Sign(60),
-            new Now(60),
-            new Days(60),
-            new Hours(60),
-            new Minutes(60),
-            new Seconds(60),
-            new TotalDays(60),
-            new TotalHours(60),
-            new TotalMinutes(60),
-            new TotalSeconds(60),
-            new Contains(60),
-            new ToNumber(60),
-            new ToString(60),
-            new IsNumber(60),
-            new Substring(60),
-            new Length(60),
-            new Sum(60),
+            ClosingGroupOperators = Keywords.OfType<Grouping>()
+                .Select(x => x.Close)
+                .ToList();

-            new Conditional("if", 70, 2, false, false),
-            new Conditional("elseif", 70, 2, false, false),
-            new Conditional("else", 70, 1, true, false),
+            GroupOperators = ClosingGroupOperators.Union(OpenGroupOperators)
+                .ToList();

-            new Grouping("Paranthesis", "(", ")"),
-            new Grouping("Curley Braces", "{", "}"),
-            new StringGrouping("String", "'"),
-        };
-
-        static public readonly List<string> Operators
-            = Keywords.OfType<Operator>().Select(x => x.Name).ToList();
-
-        static public readonly List<string> Functions
-            = Keywords.OfType<Function>().Select(x => x.Name).ToList();
-
-        static public readonly List<string> StringGroupOperators =
-            Keywords.OfType<StringGrouping>()
-                .Select(x => x.Delimiter).ToList();
-
-        static public readonly List<string> OpenGroupOperators =
-            Keywords.OfType<Grouping>()
-                .Select(x => x.Open).ToList();
-
-        static public readonly List<string> ClosingGroupOperators =
-            Keywords.OfType<Grouping>()
-                .Select(x => x.Close).ToList();
-
-        static public readonly List<string> GroupOperators =
-            ClosingGroupOperators.Union(OpenGroupOperators).ToList();
-
-        static public readonly List<string> ConditionalOperators =
-            Keywords.OfType<Conditional>()
-                .Select(x => x.Name).ToList();
-
+            ConditionalOperators = Keywords.OfType<Conditional>()
+                .Select(x => x.Name)
+                .ToList();
+        }
         public static Grouping GetGroupingFromClose(string token)
         {
             return Keywords.OfType<Grouping>().Where(x => x.Close == token).Single();
@@ -148,4 +162,4 @@

     }
-}+}


Ugc.Editor visibility

Ugc.Editor visibility

--- Facepunch.Steamworks/Structs/UgcEditor.cs
+++ Facepunch.Steamworks/Structs/UgcEditor.cs
@@ -55,6 +55,11 @@
 		public Editor WithContent( System.IO.DirectoryInfo t ) { this.ContentFolder = t; return this; }
 		public Editor WithContent( string folderName ) { return WithContent( new System.IO.DirectoryInfo( folderName ) ); }

+		RemoteStoragePublishedFileVisibility? Visibility;
+
+		public Editor WithPublicVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Public; return this; }
+		public Editor WithFriendsOnlyVisibility() { Visibility = RemoteStoragePublishedFileVisibility.FriendsOnly; return this; }
+		public Editor WithPrivateVisibility() { Visibility = RemoteStoragePublishedFileVisibility.Private; return this; }

 		List<string> Tags;
 		public Editor WithTag( string tag )
@@ -112,6 +117,7 @@
 				if ( Language != null ) SteamUGC.Internal.SetItemUpdateLanguage( handle, Language );
 				if ( ContentFolder != null ) SteamUGC.Internal.SetItemContent( handle, ContentFolder.FullName );
 				if ( PreviewFile != null ) SteamUGC.Internal.SetItemPreview( handle, PreviewFile );
+				if ( Visibility.HasValue ) SteamUGC.Internal.SetItemVisibility( handle, Visibility.Value );
 				if ( Tags != null && Tags.Count > 0 )
 				{
 					using ( var a = SteamParamStringArray.From( Tags.ToArray() ) )


changes regex for stuffRemover

changes regex for stuffRemover

--- GitHubServices/BusinessLogic/TocParser.cs
+++ GitHubServices/BusinessLogic/TocParser.cs
@@ -1,123 +1,123 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text.RegularExpressions;
-
-namespace GitHubServices.Models
-{
-    public class TocEntry
-    {
-        public string Title, Level;
-    }
-
-    public class ContentReplacer
-    {
-        static string title = @"(T|t)able (O|o)f (C|c)ontent\s*(\r?\n)+";
-        static string tocline = @"(\s*\*[^\n]*\n)*";
-
-        static readonly Regex TocRex = new Regex(title + tocline, RegexOptions.Singleline | RegexOptions.Compiled);
-
-        public string TryReplaceToc(string content, string newToc)
-        {
-            var match = TocRex.Match(content);
-            if (!match.Success)
-                return null;
-
-            return content.Substring(0, match.Index)
-                + newToc
-                + content.Substring(match.Index + match.Length);
-        }
-    }
-
-    public class TocParser
-    {
-        static readonly Regex TocRex = new Regex("^(?<level>#+)( |\t)+(?<title>.*)", RegexOptions.Multiline | RegexOptions.Compiled);
-
-        public string MakeToc(string content)
-        {
-            var parsedToc = Parse(content);
-
-            var tocString = MarkDown(parsedToc);
-            return tocString;
-        }
-
-        string MarkDown(List<TocEntry> parsedToc)
-        {
-            var tocString = "Table of Content";
-            if (!parsedToc.Any())
-                return tocString;
-
-            var markdownedTocLines = parsedToc.Select(x => Markdowned(x));
-            tocString += Environment.NewLine + Environment.NewLine + string.Join(Environment.NewLine, markdownedTocLines)
-                         + Environment.NewLine;
-
-            return tocString;
-        }
-
-
-        List<TocEntry> Parse(string content)
-        {
-            var lines = content.Split(new[] { "\n", "\r" }, StringSplitOptions.RemoveEmptyEntries);
-
-            var tocLines =
-                lines.SkipWhile(x => !x.ToLower().Contains("table of content"))
-                .Skip(1)
-                .Select(x => x.Trim())
-                .Where(x => x.StartsWith("#"))
-                .ToArray();
-
-            var parsedToc =
-                tocLines.Select(x => TocRex.Match(x))
-                    .Select(x => new TocEntry()
-                    {
-                        Title = x.Groups["title"].Value,
-                        Level = x.Groups["level"].Value
-                    });
-            return parsedToc.ToList();
-        }
-
-        string MarkdownedGithub(TocEntry entry)
-        {
-            string space = entry.Level == "" ? "" : entry.Level.Replace("#", "  ").Substring(1);
-            var link = "#" + entry.Title
-                .Replace(".", "")
-                .Replace(",", "")
-                .Replace(":", "")
-                .Replace("!", "")
-                .Replace("/", "")
-                .Replace("\"", "")
-                .Replace("`", "")
-                .Replace("(", "")
-                .Replace(")", "")
-                .Trim()
-                .Replace(" ", "-")
-                .ToLowerInvariant();
-
-            return $"{space}* [{entry.Title}]({link})";
-        }
-
-        // for markdowndeep
-        string Markdowned(TocEntry entry)
-        {
-            Regex stuffRemover = new Regex("(`[^`]*`)|(\\d+)");
-            string space = entry.Level == "" ? "" : entry.Level.Replace("#", "  ").Substring(1);
-            var link = "#" + stuffRemover.Replace(entry.Title, x=> "")
-                .Replace(".", "")
-                .Replace("'", "")
-                .Replace(",", "")
-                .Replace(":", "")
-                .Replace("!", "")
-                .Replace("/", "")
-                .Replace("\"", "")
-                .Replace("`", "")
-                .Replace("(", "")
-                .Replace(")", "")
-                .Trim()
-                .Replace(" ", "-")
-                .ToLowerInvariant();
-
-            return $"{space}* [{entry.Title}]({link})";
-        }
-    }
-
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text.RegularExpressions;
+
+namespace GitHubServices.Models
+{
+    public class TocEntry
+    {
+        public string Title, Level;
+    }
+
+    public class ContentReplacer
+    {
+        static string title = @"(T|t)able (O|o)f (C|c)ontent\s*(\r?\n)+";
+        static string tocline = @"(\s*\*[^\n]*\n)*";
+
+        static readonly Regex TocRex = new Regex(title + tocline, RegexOptions.Singleline | RegexOptions.Compiled);
+
+        public string TryReplaceToc(string content, string newToc)
+        {
+            var match = TocRex.Match(content);
+            if (!match.Success)
+                return null;
+
+            return content.Substring(0, match.Index)
+                + newToc
+                + content.Substring(match.Index + match.Length);
+        }
+    }
+
+    public class TocParser
+    {
+        static readonly Regex TocRex = new Regex("^(?<level>#+)( |\t)+(?<title>.*)", RegexOptions.Multiline | RegexOptions.Compiled);
+
+        public string MakeToc(string content)
+        {
+            var parsedToc = Parse(content);
+
+            var tocString = MarkDown(parsedToc);
+            return tocString;
+        }
+
+        string MarkDown(List<TocEntry> parsedToc)
+        {
+            var tocString = "Table of Content";
+            if (!parsedToc.Any())
+                return tocString;
+
+            var markdownedTocLines = parsedToc.Select(x => Markdowned(x));
+            tocString += Environment.NewLine + Environment.NewLine + string.Join(Environment.NewLine, markdownedTocLines)
+                         + Environment.NewLine;
+
+            return tocString;
+        }
+
+
+        List<TocEntry> Parse(string content)
+        {
+            var lines = content.Split(new[] { "\n", "\r" }, StringSplitOptions.RemoveEmptyEntries);
+
+            var tocLines =
+                lines.SkipWhile(x => !x.ToLower().Contains("table of content"))
+                .Skip(1)
+                .Select(x => x.Trim())
+                .Where(x => x.StartsWith("#"))
+                .ToArray();
+
+            var parsedToc =
+                tocLines.Select(x => TocRex.Match(x))
+                    .Select(x => new TocEntry()
+                    {
+                        Title = x.Groups["title"].Value,
+                        Level = x.Groups["level"].Value
+                    });
+            return parsedToc.ToList();
+        }
+
+        string MarkdownedGithub(TocEntry entry)
+        {
+            string space = entry.Level == "" ? "" : entry.Level.Replace("#", "  ").Substring(1);
+            var link = "#" + entry.Title
+                .Replace(".", "")
+                .Replace(",", "")
+                .Replace(":", "")
+                .Replace("!", "")
+                .Replace("/", "")
+                .Replace("\"", "")
+                .Replace("`", "")
+                .Replace("(", "")
+                .Replace(")", "")
+                .Trim()
+                .Replace(" ", "-")
+                .ToLowerInvariant();
+
+            return $"{space}* [{entry.Title}]({link})";
+        }
+
+        // for markdowndeep
+        string Markdowned(TocEntry entry)
+        {
+            Regex stuffRemover = new Regex("(`[^`]+`)|(^\\d+([.]\\d*)*)", RegexOptions.Multiline);
+            string space = entry.Level == "" ? "" : entry.Level.Replace("#", "  ").Substring(1);
+            var link = "#" + stuffRemover.Replace(entry.Title, x=> "")
+                .Replace(".", "")
+                .Replace("'", "")
+                .Replace(",", "")
+                .Replace(":", "")
+                .Replace("!", "")
+                .Replace("/", "")
+                .Replace("\"", "")
+                .Replace("`", "")
+                .Replace("(", "")
+                .Replace(")", "")
+                .Trim()
+                .Replace(" ", "-")
+                .ToLowerInvariant();
+
+            return $"{space}* [{entry.Title}]({link})";
+        }
+    }
+
 }


add check if errors are empty in merge

add check if errors are empty in merge

--- Gu.State/Internals/Errors/ErrorBuilder.cs
+++ Gu.State/Internals/Errors/ErrorBuilder.cs
@@ -2,10 +2,8 @@
 {
     using System;
     using System.Collections;
-    using System.Collections.Generic;
     using System.Collections.Specialized;
     using System.ComponentModel;
-    using System.Linq;
     using System.Reflection;

     internal static partial class ErrorBuilder
@@ -44,6 +42,16 @@

             if (first.Type == other.Type)
             {
+                if (first.Errors.Count == 0)
+                {
+                    return other;
+                }
+
+                if (other.Errors.Count == 0)
+                {
+                    return first;
+                }
+
                 var errors = new MergedErrors(first.Errors, other.Errors);
                 return new TypeErrors(first.Type, errors);
             }


GA updated to v4

GA updated to v4

--- HaagsVertaler/Views/Shared/_Layout.cshtml
+++ HaagsVertaler/Views/Shared/_Layout.cshtml
@@ -106,18 +106,13 @@
 		}
 	</script>

+	<script async src="https://www.googletagmanager.com/gtag/js?id=314183999"></script>
 	<script>
-		(function (i, s, o, g, r, a, m) {
-			i['GoogleAnalyticsObject'] = r; i[r] = i[r] || function () {
-				(i[r].q = i[r].q || []).push(arguments)
-			}, i[r].l = 1 * new Date(); a = s.createElement(o),
-			m = s.getElementsByTagName(o)[0]; a.async = 1; a.src = g; m.parentNode.insertBefore(a, m)
-		})(window, document, 'script', '//www.google-analytics.com/analytics.js', 'ga');
+	  window.dataLayer = window.dataLayer || [];
+	  function gtag(){window.dataLayer.push(arguments);}
+	  gtag('js', new Date());

-		ga('create', 'UA-74264850-1', 'auto');
-		ga('set', 'anonymizeIp', true);
-		ga('send', 'pageview');
-
+	  gtag('config', '314183999');
 	</script>
 </body>
 </html>


Added next steps controller action after inviting team members

--- src/SFA.DAS.EAS.Web/Controllers/EmployerTeamController.cs
+++ src/SFA.DAS.EAS.Web/Controllers/EmployerTeamController.cs
@@ -85,7 +85,7 @@
                 };
                 AddFlashMessageToCookie(flashMessage);

-                return RedirectToAction("ViewTeam");
+                return RedirectToAction("NextSteps");
             }

@@ -98,7 +98,35 @@

             return View(errorResponse);
         }
-
+
+        [HttpGet]
+        [Route("invite/next")]
+        public ActionResult NextSteps(string hashedAccountId)
+        {
+            var model = new OrchestratorResponse<InviteTeamMemberNextStepsViewModel> { FlashMessage = GetFlashMessageViewModelFromCookie(), Data = new InviteTeamMemberNextStepsViewModel() };
+            return View(model);
+        }
+
+        [HttpPost]
+        [ValidateAntiForgeryToken]
+        [Route("invite/next")]
+        public ActionResult NextSteps(int? choice)
+        {
+            switch (choice ?? 0)
+            {
+                case 1: return RedirectToAction("Invite");
+                case 2: return RedirectToAction("ViewTeam");
+                case 3: return RedirectToAction("Index");
+                default:
+                    var model = new OrchestratorResponse<InviteTeamMemberNextStepsViewModel>
+                    {
+                        FlashMessage = GetFlashMessageViewModelFromCookie(),
+                        Data = new InviteTeamMemberNextStepsViewModel { ErrorMessage = "You must select an option to continue." }
+                    };
+                    return View(model); //No option entered
+            }
+        }
+
         [HttpGet]
         [Route("{invitationId}/cancel")]
         public async Task<ActionResult> Cancel(string email, string invitationId, string hashedAccountId)


Fixes #37

Fixes #37

--- src/ServiceBus.AttachmentPlugin/AzureStorageAttachment.cs
+++ src/ServiceBus.AttachmentPlugin/AzureStorageAttachment.cs
@@ -30,12 +30,12 @@

         public override async Task<Message> BeforeMessageSend(Message message)
         {
-            await InitializeClient().ConfigureAwait(false);
-
             if (!configuration.MessageMaxSizeReachedCriteria(message))
             {
                 return message;
             }
+
+            await InitializeClient().ConfigureAwait(false);

             var container = client.GetContainerReference(configuration.ContainerName);
             await container.CreateIfNotExistsAsync().ConfigureAwait(false);


Update src/ServiceBus.AttachmentPlugin/AzureStorageAttachment.cs

Co-authored-by: Sean Feldman <356539e745641272f0e1910dfb19156a388f5391@users.noreply.github.com>

--- src/ServiceBus.AttachmentPlugin/AzureStorageAttachment.cs
+++ src/ServiceBus.AttachmentPlugin/AzureStorageAttachment.cs
@@ -55,7 +55,9 @@
             {
                 // swallow in case a container SAS is used
                 if (exception.RequestInformation.HttpStatusCode != (int)System.Net.HttpStatusCode.Forbidden)
-                    throw exception;
+                {
+                    throw;
+                }
             }

             var blobName = configuration.BlobNameResolver(message);


patch(CSP): Add My Account to CSP

patch(CSP): Add My Account to CSP

--- src/StockportWebapp/Utils/ContentSecurityPolicyBuilder.cs
+++ src/StockportWebapp/Utils/ContentSecurityPolicyBuilder.cs
@@ -50,6 +50,7 @@
 				.AddSource("http://stage.midas-pps.tractivity.co.uk/")
 				.AddSource("*.cloudfront.net/butotv/live/", false, true)
 				.AddSource("https://www.facebook.com/")
+				.AddSource("https://myaccount.stockport.gov.uk")
 				.Finish());
 		}


Update StructuredLog as well

Update StructuredLog as well

--- src/StructuredLogger/BinaryLogger/BuildEventArgsWriter.cs
+++ src/StructuredLogger/BinaryLogger/BuildEventArgsWriter.cs
@@ -191,6 +191,7 @@
                 case ProjectStartedEventArgs projectStarted: Write(projectStarted); break;
                 case ProjectFinishedEventArgs projectFinished: Write(projectFinished); break;
                 case BuildStartedEventArgs buildStarted: Write(buildStarted); break;
+                case BuildFinishedEventArgs2 buildFinished2: Write(buildFinished2); break;
                 case BuildFinishedEventArgs buildFinished: Write(buildFinished); break;
                 case ProjectEvaluationStartedEventArgs projectEvaluationStarted: Write(projectEvaluationStarted); break;
                 case ProjectEvaluationFinishedEventArgs projectEvaluationFinished: Write(projectEvaluationFinished); break;
@@ -250,7 +251,14 @@
         {
             Write(BinaryLogRecordKind.BuildStarted);
             WriteBuildEventArgsFields(e);
-            Write(e.BuildEnvironment);
+            if (!string.IsNullOrEmpty(Environment.GetEnvironmentVariable("MSBUILDLOGALLENVIRONMENTVARIABLES")))
+            {
+                Write(e.BuildEnvironment);
+            }
+            else
+            {
+                Write(0);
+            }
         }

         private void Write(BuildFinishedEventArgs e)
@@ -258,6 +266,14 @@
             Write(BinaryLogRecordKind.BuildFinished);
             WriteBuildEventArgsFields(e);
             Write(e.Succeeded);
+        }
+
+        private void Write(BuildFinishedEventArgs2 e)
+        {
+            Write(BinaryLogRecordKind.BuildFinished);
+            WriteBuildEventArgsFields(e);
+            Write(e.Succeeded);
+            Write(e.EnvironmentVariables);
         }

         private void Write(ProjectEvaluationStartedEventArgs e)


Modify test to only try open file with vi not nano (#28997)

Fixes: #28668

--- src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
+++ src/System.Diagnostics.Process/tests/ProcessTests.Unix.cs
@@ -155,7 +155,7 @@
             }
         }

-        [Theory, InlineData("nano"), InlineData("vi")]
+        [Theory, InlineData("vi")]
         [PlatformSpecific(TestPlatforms.Linux)]
         [OuterLoop("Opens program")]
         public void ProcessStart_OpenFileOnLinux_UsesSpecifiedProgram(string programToOpenWith)
@@ -178,7 +178,7 @@
             }
         }

-        [Theory, InlineData("nano"), InlineData("vi")]
+        [Theory, InlineData("vi")]
         [PlatformSpecific(TestPlatforms.Linux)]
         [OuterLoop("Opens program")]
         public void ProcessStart_OpenFileOnLinux_UsesSpecifiedProgramUsingArgumentList(string programToOpenWith)
@@ -186,7 +186,7 @@
             if (IsProgramInstalled(programToOpenWith))
             {
                 string fileToOpen = GetTestFilePath() + ".txt";
-                File.WriteAllText(fileToOpen, $"{nameof(ProcessStart_OpenFileOnLinux_UsesSpecifiedProgram)}");
+                File.WriteAllText(fileToOpen, $"{nameof(ProcessStart_OpenFileOnLinux_UsesSpecifiedProgramUsingArgumentList)}");
                 ProcessStartInfo psi = new ProcessStartInfo(programToOpenWith);
                 psi.ArgumentList.Add(fileToOpen);
                 using (var px = Process.Start(psi))


Teste botão

Teste botão

--- src/TurboRango/TurboRango.Web/Views/Sorteios/Index.cshtml
+++ src/TurboRango/TurboRango.Web/Views/Sorteios/Index.cshtml
@@ -44,7 +44,7 @@

-                <input id="textinput" name="Reservar" type="submit" class="input-xlarge">
+                <input id="textinput" name="Reservar" type="submit" class="btn btn-success btn-lg">


fixed a bug with height and distance

fixed a bug with height and distance

--- OrbitTarget.cs
+++ OrbitTarget.cs
@@ -10,6 +10,7 @@
     public float HeightDamping = 1f;
     public float RotationDamping = 1f;
     public float LookDamping = 1f;
+    public float AutoOrbitSpeed = 0f;

     [SerializeField] private Transform _target;

@@ -19,6 +20,8 @@
         {
             return;
         }
+
+        TargetRotation += AutoOrbitSpeed*Time.deltaTime;

         var toMe = transform.position - _target.position;
         var currentDistance = toMe.magnitude;
@@ -30,8 +33,9 @@
         var newRotation = Mathf.LerpAngle(currentRotation, TargetRotation, Time.deltaTime*RotationDamping);

         var newRotationRads = newRotation*Mathf.Deg2Rad;
-        var newRotationDir = new Vector3(Mathf.Cos(newRotationRads), 0f, Mathf.Sin(newRotationRads));
-        transform.position = _target.position + newRotationDir.normalized*newDistance + Vector3.up*newHeight;
+        var newRotationDir = new Vector3(Mathf.Cos(newRotationRads), 0f, Mathf.Sin(newRotationRads)) * newDistance;
+        newRotationDir.y = newHeight;
+        transform.position = _target.position + newRotationDir.normalized*newDistance;

         var lookRotation = Quaternion.LookRotation(_target.position - transform.position);
         transform.rotation = Quaternion.Lerp(transform.rotation, lookRotation, Time.deltaTime*LookDamping);


Add more controller tests, cleanup commented code

--- src/UnitTests/GitHub.App/Controllers/UIControllerTests.cs
+++ src/UnitTests/GitHub.App/Controllers/UIControllerTests.cs
@@ -469,17 +469,18 @@
     public class PublishFlow : UIControllerTestBase
     {
         [Fact]
-        public void Flow()
-        {
-            var provider = Substitutes.GetFullyMockedServiceProvider();
-            var hosts = provider.GetRepositoryHosts();
-            var factory = SetupFactory(provider);
-            var cm = provider.GetConnectionManager();
-            var cons = new ObservableCollection<IConnection>();
-            cm.Connections.Returns(cons);
-
-            // simulate being logged in
-            cons.Add(SetupConnection(provider, hosts, hosts.GitHubHost));
+        public void FlowWithConnection()
+        {
+            var provider = Substitutes.GetFullyMockedServiceProvider();
+            var hosts = provider.GetRepositoryHosts();
+            var factory = SetupFactory(provider);
+            var cm = provider.GetConnectionManager();
+            var cons = new ObservableCollection<IConnection>();
+            cm.Connections.Returns(cons);
+            var connection = SetupConnection(provider, hosts, hosts.GitHubHost);
+
+            // simulate being logged in
+            cons.Add(connection);

             using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
             {
@@ -491,6 +492,43 @@
                     {
                         case 1:
                             Assert.IsAssignableFrom<IViewFor<IRepositoryPublishViewModel>>(uc);
+                            ((IUIProvider)provider).Received().AddService(uiController, connection);
+                            TriggerDone(uc);
+                            break;
+                    }
+                });
+
+                uiController.Start(connection);
+                Assert.Equal(1, count);
+                Assert.True(uiController.IsStopped);
+            }
+        }
+
+        [Fact]
+        public void FlowWithoutConnection()
+        {
+            var provider = Substitutes.GetFullyMockedServiceProvider();
+            var hosts = provider.GetRepositoryHosts();
+            var factory = SetupFactory(provider);
+            var cm = provider.GetConnectionManager();
+            var cons = new ObservableCollection<IConnection>();
+            cm.Connections.Returns(cons);
+            var connection = SetupConnection(provider, hosts, hosts.GitHubHost);
+
+            // simulate being logged in
+            cons.Add(connection);
+
+            using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
+            {
+                var count = 0;
+                var flow = uiController.SelectFlow(UIControllerFlow.Publish);
+                flow.Subscribe(uc =>
+                {
+                    switch (++count)
+                    {
+                        case 1:
+                            Assert.IsAssignableFrom<IViewFor<IRepositoryPublishViewModel>>(uc);
+                            ((IUIProvider)provider).Received().AddService(uiController, connection);
                             TriggerDone(uc);
                             break;
                     }
@@ -639,328 +677,4 @@
             }
         }
     }
-    //public class CloneFlow : UIControllerTestBase
-    //{
-    //    [Fact]
-    //    public void ShowingCloneDialogWhenLoggedInShowsCloneDialog()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var connection = provider.GetConnection();
-    //        connection.Login().Returns(Observable.Return(connection));
-    //        var cm = provider.GetConnectionManager();
-    //        cm.Connections.Returns(new ObservableCollection<IConnection> { connection });
-    //        var host = hosts.GitHubHost;
-    //        hosts.LookupHost(connection.HostAddress).Returns(host);
-    //        host.IsLoggedIn.Returns(true);
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var list = new List<IView>();
-    //            uiController.SelectFlow(UIControllerFlow.Clone)
-    //                .Subscribe(uc => list.Add(uc as IView),
-    //                            () =>
-    //                            {
-    //                                Assert.Equal(1, list.Count);
-    //                                Assert.IsAssignableFrom<IViewFor<IRepositoryCloneViewModel>>(list[0]);
-    //                            });
-    //            uiController.Start(connection);
-    //        }
-    //    }
-
-    //    [Fact]
-    //    public void PullRequestFlowWhenLoggedOut()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var cm = provider.GetConnectionManager();
-    //        var cons = new ObservableCollection<IConnection>();
-    //        cm.Connections.Returns(cons);
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            var list = new List<IView>();
-    //            var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
-    //            flow.Subscribe(uc =>
-    //                {
-    //                    switch (++count)
-    //                    {
-    //                        case 1:
-    //                            Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                            var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                            vm.Value.IsShowing.Returns(true);
-    //                            RaisePropertyChange(vm.Value, "IsShowing");
-    //                            break;
-    //                        case 2:
-    //                            Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
-    //                            var con = Substitutes.Connection;
-    //                            var host = Substitute.For<IRepositoryHost>();
-    //                            host.IsLoggedIn.Returns(true);
-    //                            con.HostAddress.Returns(HostAddress.GitHubDotComHostAddress);
-    //                            hosts.LookupHost(Args.HostAddress).Returns(host);
-    //                            cons.Add(con);
-    //                            var v = factory.GetView(GitHub.Exports.UIViewType.Login).Value;
-    //                            ((ReplaySubject<object>)v.Done).OnNext(null);
-    //                            break;
-    //                        case 3:
-    //                            Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
-    //                            ((ReplaySubject<object>)(uc as IHasDetailView).Open).OnNext(1);
-    //                            break;
-    //                        case 4:
-    //                            Assert.IsAssignableFrom<IViewFor<IPullRequestDetailViewModel>>(uc);
-    //                            ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                            break;
-    //                        case 5:
-    //                            Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
-    //                            ((ReplaySubject<object>)(uc as IHasCreationView).Create).OnNext(null);
-    //                            break;
-    //                        case 6:
-    //                            Assert.IsAssignableFrom<IViewFor<IPullRequestCreationViewModel>>(uc);
-    //                            uiController.Stop();
-    //                            break;
-    //                    }
-    //                });
-
-    //            uiController.Start(null);
-    //            Assert.Equal(6, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-    //    }
-
-    //    [Fact]
-    //    public void CloneDialogLoggedInWithoutConnection()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var cm = provider.GetConnectionManager();
-
-    //        // simulate being logged in
-    //        var host = hosts.GitHubHost;
-    //        var connection = SetupConnection(provider, hosts, host);
-    //        cm.Connections.Returns(new ObservableCollection<IConnection> { connection });
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            uiController.SelectFlow(UIControllerFlow.Clone)
-    //                .Subscribe(uc =>
-    //                    {
-    //                        switch (++count)
-    //                        {
-    //                            case 1:
-    //                                Assert.IsAssignableFrom<IViewFor<IRepositoryCloneViewModel>>(uc);
-    //                                ((IUIProvider)provider).Received().AddService(uiController, connection);
-    //                                uiController.Stop();
-    //                                break;
-    //                        }
-    //                    });
-    //            uiController.Start(null);
-    //            Assert.Equal(1, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-    //    }
-
-    //    [Fact]
-    //    public void GoingBackAndForthOnTheLoginFlow()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var cm = provider.GetConnectionManager();
-    //        var cons = new ObservableCollection<IConnection>();
-    //        cm.Connections.Returns(cons);
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            var list = new List<IView>();
-    //            var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
-    //            flow.Subscribe(uc =>
-    //            {
-    //                switch (++count)
-    //                {
-    //                    case 1:
-    //                    {
-    //                        Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                        var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                        vm.Value.IsShowing.Returns(true);
-    //                        RaisePropertyChange(vm.Value, "IsShowing");
-    //                    }
-    //                    break;
-    //                    case 2:
-    //                    {
-    //                        Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
-    //                        var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                        vm.Value.IsShowing.Returns(false);
-    //                        RaisePropertyChange(vm.Value, "IsShowing");
-    //                        ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                    }
-    //                    break;
-    //                    case 3:
-    //                    {
-    //                        Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                        var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                        vm.Value.IsShowing.Returns(true);
-    //                        RaisePropertyChange(vm.Value, "IsShowing");
-    //                    }
-    //                    break;
-    //                    case 4:
-    //                    {
-    //                        Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
-    //                        uiController.Stop();
-    //                    }
-    //                    break;
-    //                }
-    //            });
-
-    //            uiController.Start(null);
-    //            Assert.Equal(4, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-    //    }
-
-    //    [Fact]
-    //    public void CancelingLoginStopsTheController()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var cm = provider.GetConnectionManager();
-    //        var cons = new ObservableCollection<IConnection>();
-    //        cm.Connections.Returns(cons);
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            var list = new List<IView>();
-    //            var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
-    //            flow.Subscribe(uc =>
-    //            {
-    //                switch (++count)
-    //                {
-    //                    case 1:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                            var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                            vm.Value.IsShowing.Returns(true);
-    //                            RaisePropertyChange(vm.Value, "IsShowing");
-    //                        }
-    //                        break;
-    //                    case 2:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
-    //                            var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                            vm.Value.IsShowing.Returns(false);
-    //                            RaisePropertyChange(vm.Value, "IsShowing");
-    //                            ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                        }
-    //                        break;
-    //                    case 3:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                            ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                        }
-    //                        break;
-    //                }
-    //            });
-
-    //            uiController.Start(null);
-    //            Assert.Equal(3, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            var list = new List<IView>();
-    //            var flow = uiController.SelectFlow(UIControllerFlow.Authentication);
-    //            flow.Subscribe(uc =>
-    //            {
-    //                switch (++count)
-    //                {
-    //                    case 1:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                            var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                            vm.Value.IsShowing.Returns(true);
-    //                            RaisePropertyChange(vm.Value, "IsShowing");
-    //                        }
-    //                        break;
-    //                    case 2:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ITwoFactorDialogViewModel>>(uc);
-    //                            var vm = factory.GetViewModel(GitHub.Exports.UIViewType.TwoFactor);
-    //                            vm.Value.IsShowing.Returns(false);
-    //                            RaisePropertyChange(vm.Value, "IsShowing");
-    //                            ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                        }
-    //                        break;
-    //                    case 3:
-    //                        {
-    //                            Assert.IsAssignableFrom<IViewFor<ILoginControlViewModel>>(uc);
-    //                            ((ReplaySubject<object>)(uc as IView).Cancel).OnNext(null);
-    //                        }
-    //                        break;
-    //                }
-    //            });
-
-    //            uiController.Start(null);
-    //            Assert.Equal(3, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-    //    }
-
-    //    [Fact]
-    //    public void PullRequestFlowBackAndForth()
-    //    {
-    //        var provider = Substitutes.GetFullyMockedServiceProvider();
-    //        var hosts = provider.GetRepositoryHosts();
-    //        var factory = SetupFactory(provider);
-    //        var connection = provider.GetConnection();
-    //        connection.Login().Returns(Observable.Return(connection));
-    //        var cm = provider.GetConnectionManager();
-    //        cm.Connections.Returns(new ObservableCollection<IConnection> { connection });
-    //        var host = hosts.GitHubHost;
-    //        hosts.LookupHost(connection.HostAddress).Returns(host);
-    //        host.IsLoggedIn.Returns(true);
-
-    //        using (var uiController = new UIController((IUIProvider)provider, hosts, factory, cm))
-    //        {
-    //            var count = 0;
-    //            var list = new List<IView>();
-    //            var flow = uiController.SelectFlow(UIControllerFlow.PullRequests);
-    //            flow.Subscribe(uc =>
-    //            {
-    //                switch (++count)
-    //                {
-    //                    case 1:
-    //                        Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
-    //                        ((ReplaySubject<object>)(uc as IHasDetailView).Open).OnNext(1);
-    //                        break;
-    //                    case 2:
-    //                        Assert.IsAssignableFrom<IViewFor<IPullRequestDetailViewModel>>(uc);
-    //                        ((ReplaySubject<object>)(uc as IView).Done).OnNext(null);
-    //                        break;
-    //                    case 3:
-    //                        Assert.IsAssignableFrom<IViewFor<IPullRequestListViewModel>>(uc);
-    //                        ((ReplaySubject<object>)(uc as IHasDetailView).Open).OnNext(1);
-    //                        break;
-    //                    case 4:
-    //                        Assert.IsAssignableFrom<IViewFor<IPullRequestDetailViewModel>>(uc);
-    //                        uiController.Stop();
-    //                        break;
-    //                }
-    //            });
-
-    //            uiController.Start(null);
-    //            Assert.Equal(4, count);
-    //            Assert.True(uiController.IsStopped);
-    //        }
-    //    }
-
-    //}
 }


inline method

inline method

--- src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
+++ src/VisualStudio/Core/Impl/RoslynVisualStudioWorkspace.cs
@@ -88,37 +88,6 @@
             return new InvisibleEditor(ServiceProvider.GlobalProvider, textDocument.FilePath, GetHierarchy(documentId.ProjectId), needsSave, needsUndoDisabled);
         }

-        private static bool TryResolveSymbol(
-            ISymbol symbol,
-            Project project,
-            CancellationToken cancellationToken,
-            [NotNullWhen(returnValue: true)] out ISymbol? resolvedSymbol,
-            [NotNullWhen(returnValue: true)] out Project? resolvedProject)
-        {
-            resolvedSymbol = null;
-            resolvedProject = null;
-
-            var currentProject = project.Solution.Workspace.CurrentSolution.GetProject(project.Id);
-            if (currentProject == null)
-            {
-                return false;
-            }
-
-            var symbolId = SymbolKey.Create(symbol, cancellationToken);
-            var currentCompilation = currentProject.GetRequiredCompilationAsync(cancellationToken).WaitAndGetResult(cancellationToken);
-            var symbolInfo = symbolId.Resolve(currentCompilation, cancellationToken: cancellationToken);
-
-            if (symbolInfo.Symbol == null)
-            {
-                return false;
-            }
-
-            resolvedSymbol = symbolInfo.Symbol;
-            resolvedProject = currentProject;
-
-            return true;
-        }
-
         [Obsolete("Use TryGoToDefinitionAsync instead", error: true)]
         public override bool TryGoToDefinition(ISymbol symbol, Project project, CancellationToken cancellationToken)
             => _threadingContext.JoinableTaskFactory.Run(() => TryGoToDefinitionAsync(symbol, project, cancellationToken));
@@ -126,14 +95,18 @@
         public override async Task<bool> TryGoToDefinitionAsync(
             ISymbol symbol, Project project, CancellationToken cancellationToken)
         {
-            if (!TryResolveSymbol(symbol, project, cancellationToken,
-                    out var searchSymbol, out var searchProject))
-            {
+            var currentProject = project.Solution.Workspace.CurrentSolution.GetProject(project.Id);
+            if (currentProject == null)
                 return false;
-            }
+
+            var symbolId = SymbolKey.Create(symbol, cancellationToken);
+            var currentCompilation = await currentProject.GetRequiredCompilationAsync(cancellationToken).ConfigureAwait(false);
+            var symbolInfo = symbolId.Resolve(currentCompilation, cancellationToken: cancellationToken);
+            if (symbolInfo.Symbol == null)
+                return false;

             return await GoToDefinitionHelpers.TryGoToDefinitionAsync(
-                searchSymbol, searchProject.Solution,
+                symbolInfo.Symbol, currentProject.Solution,
                 _threadingContext, _streamingPresenter.Value, cancellationToken).ConfigureAwait(false);
         }


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/WebSocketFrame.cs
+++ websocket-sharp/WebSocketFrame.cs
@@ -662,13 +662,16 @@
     )
     {
       var exactLen = frame.ExactPayloadLength;
+
       if (exactLen > PayloadData.MaxLength) {
         var msg = "A frame has too long payload length.";
+
         throw new WebSocketException (CloseStatusCode.TooBig, msg);
       }

       if (exactLen == 0) {
         frame._payloadData = PayloadData.Empty;
+
         return frame;
       }

@@ -679,10 +682,12 @@

       if (bytes.LongLength != len) {
         var msg = "The payload data of a frame could not be read.";
+
         throw new WebSocketException (msg);
       }

       frame._payloadData = new PayloadData (bytes, len);
+
       return frame;
     }


More tests

More tests

--- Anagrams.Test/DictionaryCacheTest.cs
+++ Anagrams.Test/DictionaryCacheTest.cs
@@ -87,6 +87,17 @@
 			Assert.IsTrue(anagrams.Contains("silent"));
 			Assert.IsTrue(anagrams.Contains("listen"));
 		}
+
+		[Test]
+		public void AnagramSearchTest1()
+		{
+			var reader = new MockReader { Strings = new string[]
+			{ "silent", "listen", "boaster", "reason", "kinship", "fresher" } };
+			DictionaryCache.Reader = reader;
+			IEnumerable<string> anagrams = DictionaryCache.GetInstance().GetAnagrams("refresh");
+			Assert.AreEqual(anagrams.Count(), 1);
+			Assert.IsTrue(anagrams.Contains("fresher"));
+		}
 	}

 	class MockReader : IDictionaryReader


Update application version.

Update application version.

--- ApiTester/Properties/AssemblyInfo.cs
+++ ApiTester/Properties/AssemblyInfo.cs
@@ -32,6 +32,6 @@
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0")]
-[assembly: AssemblyFileVersion("1.0.0.1")]
+[assembly: AssemblyFileVersion("1.0.0.2")]
 [assembly: AssemblyInformationalVersion("1.0 Development")]


Fix unresolved cref

Fix unresolved cref

--- Pidgin/Unit.cs
+++ Pidgin/Unit.cs
@@ -2,7 +2,7 @@
 {
     /// <summary>
     /// An uninteresting type with only one value (<see cref="Unit.Value"/>) and no fields.
-    /// Like <see cref="System.Void"/>, but valid as a type parameter
+    /// Like <c>void</c>, but valid as a type parameter
     /// </summary>
     public sealed class Unit
     {
@@ -12,4 +12,4 @@
         /// </summary>
         public static Unit Value { get; } = new Unit();
     }
-}+}


Fixed my shit. Sorry guys. For realzies this time.

--- Assets/Scripts/Chawactews!/Player.cs
+++ Assets/Scripts/Chawactews!/Player.cs
@@ -2,19 +2,19 @@
 using System.Collections;

 public class Player : MonoBehaviour {
-	int skill { get; private set; }
-	int health { get; private set; }
-	int rep { get; private set; }
-	int money { get; private set; }
+	public int skill { get; private set; }
+	public int health { get; private set; }
+	public int rep { get; private set; }
+	public int money { get; private set; }

 	// Use this for initialization
-	void Start () {
+	public void Start () {

 	}

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

 	}

@@ -22,7 +22,7 @@
 	/// Increments the skill by the passed int.
 	/// </summary>
 	/// <param name="n">Amount to increment. Cannot be negative.</param>
-	void incrementSkill(int n)
+	public void incrementSkill(int n)
 	{
 		if (n < 0)
 			return;
@@ -35,7 +35,7 @@
 	/// Decrements the skill by the passed int.
 	/// </summary>
 	/// <param name="n">Amount to decrement. Cannot be negative.</param>
-	void decrementSkill(int n)
+	public void decrementSkill(int n)
 	{
 		if (n < 0)
 			return;
@@ -48,7 +48,7 @@
 	/// Increments the health.
 	/// </summary>
 	/// <param name="n">Amount to increment. Cannot be negative.</param>
-	void incrementHealth(int n)
+	public void incrementHealth(int n)
 	{
 		if (n < 0)
 			return;
@@ -61,7 +61,7 @@
 	/// Decrements the health.
 	/// </summary>
 	/// <param name="n">Amount to decrement. Cannot be negative</param>
-	void decrementHealth(int n)
+	public void decrementHealth(int n)
 	{
 		if (n < 0)
 			return;
@@ -73,9 +73,9 @@
 	/// <summary>
 	/// Sets the health to the maximum amount.
 	/// </summary>
-	void fillHealth()
+	public void fillHealth()
 	{
-		health = Constants.health.MAX_HEALTH;
+		health = (int) Constants.health.MAX_HEALTH;
 	}

 	/// <summary>
@@ -95,7 +95,7 @@
 	/// Decrements the money.
 	/// </summary>
 	/// <param name="n">Amount to decrement. Cannot be negative.</param>
-	void decrementMoney(int n)
+	public void decrementMoney(int n)
 	{
 		if (n < 0)
 			return;
@@ -108,7 +108,7 @@
 	/// Increments the rep.
 	/// </summary>
 	/// <param name="n">Amount to increment. Cannot be negative.</param>
-	void incrementRep(int n)
+	public void incrementRep(int n)
 	{
 		if (n < 0)
 			return;
@@ -121,7 +121,7 @@
 	/// Decrements the rep.
 	/// </summary>
 	/// <param name="n">Amount to decrement. Cannot be negative.</param>
-	void decrementRep(int n)
+	public void decrementRep(int n)
 	{
 		if (n < 0)
 			return;


Added IsNextTo and operator-

Added IsNextTo and operator-

--- Assets/Scripts/Library/IntVector2.cs
+++ Assets/Scripts/Library/IntVector2.cs
@@ -13,6 +13,16 @@
     public IntVector2(int x, int y) {
         this.x = x;
         this.y = y;
+    }
+
+    public bool IsNextTo(IntVector2 pos) {
+        if (x == pos.x) {
+            return Math.Abs(y - pos.y) == 1;
+        }
+        else if (y == pos.y) {
+            return Math.Abs(x - pos.x) == 1;
+        }
+        return false;
     }

     public override string ToString() {
@@ -50,4 +60,11 @@
     public static bool operator!=(IntVector2 a, IntVector2 b) {
         return !(a == b);
     }
+
+    public static IntVector2 operator-(IntVector2 a, IntVector2 b) {
+        return new IntVector2(
+            a.x - b.x,
+            a.y - b.y
+        );
+    }
 }


Completed Button Machine for machine interaction

--- Assets/Scripts/MachineInteraction.cs
+++ Assets/Scripts/MachineInteraction.cs
@@ -5,7 +5,7 @@
 public class MachineInteraction : MonoBehaviour {

     private GameColor color;
-    private GameObject currentItem;
+    private ItemInteraction currentItem;
     private CharacterItemInteraction currentPlayer;
     private int pushCount;
     private const int COUNT_LIMIT = 20;
@@ -27,10 +27,10 @@
         }
 	}

-    bool Interact (CharacterItemInteraction playerCII, GameObject obj) {
+    bool Interact (CharacterItemInteraction playerCII, ItemInteraction item) {
         if (playerCII.color == color) {
-            if (obj != null) {
-                currentItem = obj;
+            if (item != null) {
+                currentItem = item;
                 currentPlayer = playerCII;
                 pushCount = 0;
                 return true;


created swipe gesture;

created swipe gesture;

--- Assets/tanit/Scripts/DataReceiver.cs
+++ Assets/tanit/Scripts/DataReceiver.cs
@@ -1,6 +1,7 @@
 using Leap;
 using UnityEngine;
 using System.Collections;
+using System.Collections.Generic;

 public class DataReceiver : MonoBehaviour
 {
@@ -10,7 +11,9 @@
     public Controller m_leapController;

     private WWW satelliteData;
-    private Transform currentSatellite;
+    private int currentSatelliteIndex = 0;
+    private int maxSatelliteIndex = -1;
+    private List<Transform> satellites;
     private const float DURATION_FOR_VALID_CIRCLE_GESTURE = 0.6f;

     enum Mode
@@ -25,6 +28,7 @@
         StartNewDownload();
         m_leapController = new Controller();
         m_leapController.EnableGesture(Gesture.GestureType.TYPECIRCLE);
+        satellites = new List<Transform>();
 	}

     void StartNewDownload()
@@ -59,11 +63,19 @@
                     Transform newSat =
                         Instantiate(sat, satPos + earthScale, Quaternion.identity) as Transform;
                     newSat.GetComponent<SatelliteMover>().speed = 100 * satVel;
-                    currentSatellite = newSat;
+                    newSat.name = satName;
+                    satellites.Add(newSat);
+                    if (maxSatelliteIndex == -1)
+                        currentSatelliteIndex++;
+                }
+                if (maxSatelliteIndex == -1)
+                {
+                    currentSatelliteIndex--;
+                    maxSatelliteIndex = currentSatelliteIndex;
                 }

-                transform.position = currentSatellite.position;
-                transform.parent = currentSatellite;
+                transform.position = satellites[currentSatelliteIndex].position;
+                transform.parent = satellites[currentSatelliteIndex];

                 Invoke("StartNewDownload", 60);
             }
@@ -126,4 +138,15 @@
         }
         Debug.Log("Switching mode!");
     }
+
+    public void GoToNextSatellite()
+    {
+        if (currentSatelliteIndex >= maxSatelliteIndex)
+        {
+            currentSatelliteIndex = 0;
+        }
+
+        transform.position = satellites[currentSatelliteIndex++].position;
+        transform.parent = satellites[currentSatelliteIndex++];
+    }
 }


--- Asterisk.2013/Asterisk.NET/Helper.cs
+++ Asterisk.2013/Asterisk.NET/Helper.cs
@@ -754,6 +754,10 @@
             int hash, hashEvent;

             eventType = attributes["event"].ToLower(CultureInfo);
+            if (eventType == "queuememberpause") //temporary fix for Asterisk 13 pause QueueMemberPause
+            {
+                eventType = "queuememberpaused";
+            }
             // Remove Event tail from event name (ex. JabberEvent)
             if (eventType.EndsWith("event"))
                 eventType = eventType.Substring(0, eventType.Length - 5);


Fix tests

Fix tests

--- BTCPayServer.Tests/SeleniumTester.cs
+++ BTCPayServer.Tests/SeleniumTester.cs
@@ -327,7 +327,7 @@

         internal void AssertAccessDenied()
         {
-            Assert.Contains("Access denied</h", Driver.PageSource);
+            Assert.DoesNotContain("- Denied</h", Driver.PageSource);
         }

         public void GoToHome()


Pass value into SetProperty.

Pass value into SetProperty.

--- BillTender/Families/Models/Member.cs
+++ BillTender/Families/Models/Member.cs
@@ -23,7 +23,7 @@
         public string Role
         {
             get { return GetProperty<string>(); }
-            set { SetProperty<string>(); }
+            set { SetProperty<string>(value); }
         }
     }
 }


fix warning

fix warning

--- BitSharp.Core/Domain/BlockElement.cs
+++ BitSharp.Core/Domain/BlockElement.cs
@@ -50,7 +50,7 @@
             return new BlockElement(Pair(this, right), pruned: true);
         }

-        public BlockElement PairWithSelf()
+        public new BlockElement PairWithSelf()
         {
             if (!this.pruned)
                 throw new InvalidOperationException();


Changed config test to rely on env variables for gateway server.

--- Braintree.Tests/ConfigurationTest.cs
+++ Braintree.Tests/ConfigurationTest.cs
@@ -17,7 +17,11 @@
             Configuration.PublicKey = "integration_public_key";
             Configuration.PrivateKey = "integration_private_key";

-            Assert.AreEqual("http://localhost:3000/merchants/integration_merchant_id", Configuration.BaseMerchantURL());
+            var host = System.Environment.GetEnvironmentVariable("GATEWAY_HOST") ?? "localhost";
+            var port = System.Environment.GetEnvironmentVariable("GATEWAY_PORT") ?? "3000";
+            var expected = String.Format("http://{0}:{1}/merchants/integration_merchant_id", host, port);
+
+            Assert.AreEqual(expected, Configuration.BaseMerchantURL());
         }

         [Test]


updated Property name to not include Utc

--- src/core/Akka/Actor/Scheduler/DedicatedThreadScheduler.cs
+++ src/core/Akka/Actor/Scheduler/DedicatedThreadScheduler.cs
@@ -32,7 +32,7 @@
                     while(_workQueue.TryDequeue(out work))
                     {
                         //has work already expired?
-                        if (work.UtcTickExpires < now)
+                        if (work.TickExpires < now)
                         {
                             work.Action();
                         }
@@ -49,7 +49,7 @@
                         allWork = new List<ScheduledWork>();
                         foreach (var bufferedWork in tmp)
                         {
-                            if (bufferedWork.UtcTickExpires < now)
+                            if (bufferedWork.TickExpires < now)
                             {
                                 bufferedWork.Action();
                             }
@@ -147,15 +147,15 @@

     public class ScheduledWork
     {
-        public ScheduledWork(long utcTickExpires, Action action,CancellationToken token)
+        public ScheduledWork(long tickExpires, Action action,CancellationToken token)
         {
-            UtcTickExpires = utcTickExpires;
+            TickExpires = tickExpires;
             Action = action;
             Token = token;
         }

         public CancellationToken Token { get; set; }
-        public long UtcTickExpires { get; set; }
+        public long TickExpires { get; set; }
         public Action Action { get; set; }
     }
 }


Update Program.cs

Update Program.cs

--- CefSharp.WinForms.Example/Program.cs
+++ CefSharp.WinForms.Example/Program.cs
@@ -21,8 +21,6 @@
                                 "please make sure you compile in `Release` mode.", "Warning");
             }
 #endif
-            //坑爹呢 .NET4.5编译的项目啊  让XP怎么办呢？
-            //自己来编译源码吧 哎  又是C++

             const bool multiThreadedMessageLoop = true;
             CefExample.Init(false, multiThreadedMessageLoop: multiThreadedMessageLoop);


simplified and streamlined name comparisons

--- Cogs.Publishers/CsSchemaPublisher.cs
+++ Cogs.Publishers/CsSchemaPublisher.cs
@@ -23,6 +23,10 @@
         /// boolean to determine whether to replace existing or not
         /// </summary>
         public bool Overwrite { get; set; }
+        /// <summary>
+        /// dictionary for translating names to c# datatype representations
+        /// </summary>
+        private Dictionary<string, string> Translator { get; set; }

         public void Publish(CogsModel model)
         {
@@ -38,6 +42,7 @@

             Directory.CreateDirectory(TargetDirectory);

+            InitializeDictionary();
             //get the project name
             var projName = "cogsBurger";

@@ -118,7 +123,7 @@
                             newClass.Append("$##[ExclusiveRange(" + prop.MinExclusive + ", " + prop.MaxExclusive + ")]");
                         }
                     }
-                    prop.DataTypeName = SetDataTypeName(prop.DataTypeName);
+                    if (Translator.ContainsKey(prop.DataTypeName)) { prop.DataTypeName = Translator[prop.DataTypeName]; }
                     // if there can be at most one, create an instance variable
                     if (!prop.MaxCardinality.Equals("n") && Int32.Parse(prop.MaxCardinality) == 1)
                     {
@@ -133,30 +138,32 @@
             }
         }

-        // takes a data type name string and translates to a c# data structure representation name string
-        private string SetDataTypeName(string dataType)
+
+        // initialize the Translator dictionary
+        private void InitializeDictionary()
         {
-            if (string.Equals(dataType, "boolean", StringComparison.OrdinalIgnoreCase)) { return "bool"; }
-            if (string.Equals(dataType, "integer", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "string", StringComparison.OrdinalIgnoreCase)) { return "string"; }
-            if (string.Equals(dataType, "language", StringComparison.OrdinalIgnoreCase)) { return "string"; }
-            if (string.Equals(dataType, "duration", StringComparison.OrdinalIgnoreCase)) { return "TimeSpan"; }
-            if (string.Equals(dataType, "dateTime", StringComparison.OrdinalIgnoreCase)) { return "DateTimeOffset"; }
-            if (string.Equals(dataType, "time", StringComparison.OrdinalIgnoreCase)) { return "DateTimeOffset"; }
-            if (string.Equals(dataType, "date", StringComparison.OrdinalIgnoreCase)) { return "DateTimeOffset"; }
-            if (string.Equals(dataType, "gYearMonth", StringComparison.OrdinalIgnoreCase)) { return "Tuple<int, int>"; }
-            if (string.Equals(dataType, "gYear", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "gYearDay", StringComparison.OrdinalIgnoreCase)) { return "Tuple<int, int>"; }
-            if (string.Equals(dataType, "gDay", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "gMonth", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "anyURI", StringComparison.OrdinalIgnoreCase)) { return "Uri"; }
-            if (string.Equals(dataType, "nonPositiveInteger", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "negativeInteger", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "nonNegativeInteger", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "unsignedLong", StringComparison.OrdinalIgnoreCase)) { return "ulong"; }
-            if (string.Equals(dataType, "positiveInteger", StringComparison.OrdinalIgnoreCase)) { return "int"; }
-            if (string.Equals(dataType, "cogsDate", StringComparison.OrdinalIgnoreCase)) { return "CogsDate"; }
-            return dataType;
+            Translator = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
+            {
+                { "boolean", "bool" },
+                { "integer", "int" },
+                { "language", "string" },
+                { "duration", "TimeSpan" },
+                { "dateTime", "DateTimeOffset" },
+                { "time", "DateTimeOffset" },
+                { "date", "DateTimeOffset" },
+                { "gYearMonth", "Tuple<int, int>" },
+                { "gYear", "int" },
+                { "gYearDay", "Tuple<int, int>" },
+                { "gDay", "int" },
+                { "gMonth", "int" },
+                { "anyURI", "Uri" },
+                { "nonPositiveInteger", "int" },
+                { "negativeInteger", "int" },
+                { "nonNegativeInteger", "int" },
+                { "unsignedLong", "ulong" },
+                { "positiveInteger", "int" },
+                { "cogsDate", "CogsDate" }
+            };
         }
     }
 }


SecurityManager adds Forex with Subscription type of QuoteBar

--- Common/Securities/SecurityManager.cs
+++ Common/Securities/SecurityManager.cs
@@ -468,7 +468,7 @@
             var symbolProperties = symbolPropertiesDatabase.GetSymbolProperties(symbol.ID.Market, symbol, symbol.ID.SecurityType, defaultQuoteCurrency);

             var type = resolution == Resolution.Tick ? typeof(Tick) : typeof(TradeBar);
-            if (symbol.ID.SecurityType == SecurityType.Option && resolution != Resolution.Tick)
+            if (symbol.ID.SecurityType == SecurityType.Forex && resolution != Resolution.Tick)
             {
                 type = typeof(QuoteBar);
             }


Remove and comment code.

Remove and comment code.

--- SchemaTests.cs
+++ SchemaTests.cs
@@ -12,15 +12,11 @@

 namespace Dasher.Schemata
 {
-    // TODO test XML writing
-    // TODO implement FromXml
-
-    // TODO test individual IEquatable implementations using matrix
-    // TODO test all new interface methods
     // TODO support recursive types
     // TODO reflect integral conversions supported by dasher
     // TODO test writing empty message to complex with all-default values

+/*
     [Flags]
     internal enum CompatabilityLevel
     {
@@ -33,6 +29,7 @@
         AllowMakingNullable,
         Lenient // = AllowExtraFieldsOnComplex | AllowFewerMembersInEnum | AllowFewerMembersInUnion | AllowLosslessTypeConversion
     }
+*/

     public enum EnumAbc { A, B, C }
     public enum EnumAbcd { A, B, C, D }


-reworded 2 effects

-reworded 2 effects

--- SpellParser.cs
+++ SpellParser.cs
@@ -1222,9 +1222,9 @@
                 case 380:
                     return String.Format("Knockback for {0} and up for {1}", value, base2);
                 case 381:
-                    return "Call of Hero";
+                    return String.Format("Summon Target to {0} in Front", value);
                 case 382:
-                    return String.Format("Inhibit Buff Effect: {0}", Spell.FormatEnum((SpellEffect)base2));
+                    return String.Format("Inhibit Effect: {0}", Spell.FormatEnum((SpellEffect)base2));
                 case 383:
                     return String.Format("Cast on Spell Use: [Spell {0}] Chance: {1}%", base2, base1 / 10);
                 case 385:


Remove redundant call to SetAllUsers

Remove redundant call to SetAllUsers

--- Src/Program.cs
+++ Src/Program.cs
@@ -186,12 +186,12 @@
                 UninstallSilent(identifier);

                 var perMachine = false;
-                if(installableExtension.Header.AllUsers != perMachine)
+                if (installableExtension.Header.AllUsers != perMachine)
                 {
                     Console.Write(string.Format("Changing `AllUsers` to {0} ... ", perMachine));
                     SetAllUsers(installableExtension, perMachine);
                 }
-                SetAllUsers(installableExtension, perMachine);
+
                 _extensionManager.Install(installableExtension, perMachine);

                 var installedExtension = _extensionManager.GetInstalledExtension(identifier);


Remove todo (fixed)

Remove todo (fixed)

Fixed todo concerning room url parsing

--- Tools/Tools.cs
+++ Tools/Tools.cs
@@ -191,7 +191,6 @@
         /// <param name="id">The unparsed identifier of the room.</param>
         /// <returns>A parsed room id</returns>

-        // TODO: fix this function (as it parses regular sized custom open world urls incorrectly)
         public static string ParseUrl(string id)
         {
             // If it matches any type of URL and has 13 characters at the end, return the last 13 characters.


Small cleanup.

Small cleanup.

Signed-off-by: V10lator <fd1911a80a45064cec08d87c592168c9000a1489@myway.de>

--- UltimateCam.cs
+++ UltimateCam.cs
@@ -41,7 +41,7 @@
 				if (active) {
 					Utility.ObjectBelowMouseInfo result = default(Utility.ObjectBelowMouseInfo);
 					Ray ray = _cam.ScreenPointToRay (Input.mousePosition);
-					result.hitDistance = 3.40282347E+38f;
+					result.hitDistance = float.MaxValue;
 					result.hitObject = null;
 					GameObject gameObject = Collisions.Instance.checkSelectables(ray, out result.hitDistance);
 					if (gameObject != null)
@@ -54,9 +54,7 @@
 							result.hitLayerMask = 1 << component.gameObject.layer;
 						}
 						else
-						{
-							result.hitDistance = 3.40282347E+38f;
-						}
+							result.hitDistance = float.MaxValue;
 					}
 					GameController.Instance.enableVisibleMouseColliders();
 					RaycastHit[] array = Physics.RaycastAll(ray, result.hitDistance, LayerMasks.MOUSECOLLIDERS | LayerMasks.TERRAIN);


Updated version number to 0.0.30 for release.

--- VersionInfo.cs
+++ VersionInfo.cs
@@ -13,6 +13,6 @@
 // An odd patch number is a development version, an even patch number is
 // a relased version.

-[assembly: AssemblyVersion("0.0.29")]
-[assembly: AssemblyFileVersion("0.0.29")]
-[assembly: AssemblyInformationalVersion("0.0.29")]
+[assembly: AssemblyVersion("0.0.30")]
+[assembly: AssemblyFileVersion("0.0.30")]
+[assembly: AssemblyInformationalVersion("0.0.30")]


Finish port

Finish port

--- War/War/War.cs
+++ War/War/War.cs
@@ -12,6 +12,8 @@
         /// C# version of War (pg 178)
         ///  - Ported from original program in book (MITS Altair BASIC)
         ///  - Output and algorithms are identical to original
+        ///  - Basic C# constructs used, e.g. array rather than list
+        ///  - No LINQ used
         ///  - Comments show original variable names (where useful)
         ///
         /// C# version created by Sean Sexton, 18 Sep 2017
@@ -116,7 +118,72 @@
         /// <param name="deck">Shuffled deck</param>
         static void Play(int[] deck)
         {
+            int nextCard = 0;   // P
+            int compScore = 0;  // A1
+            int plyrScore = 0;  // B1

+            bool keepPlaying = true;
+
+            while (keepPlaying)
+            {
+                keepPlaying = TakeTurn(deck, ref nextCard, ref compScore, ref plyrScore);
+            }
+
+            if (nextCard > 50)
+            {
+                Console.Write("\n\n");
+                Console.WriteLine($"YOU HAVE RUN OUT OF CARDS.  FINAL SCORE:  YOU-- {plyrScore} ; COMPUTER-- {compScore}");
+            }
+
+            Console.WriteLine("THANKS FOR PLAYING.  IT WAS FUN.");
+        }
+
+        static bool TakeTurn(int[] deck, ref int nextCard, ref int compScore, ref int plyrScore)
+        {
+            int plyrCard = deck[nextCard++];     // M1
+            int compCard = deck[nextCard++];     // M2
+
+            Console.WriteLine($"\nYOU: {cardData[plyrCard],-9}COMPUTER: {cardData[compCard]}");
+
+            int plyrValue =  (int) (((float)plyrCard + 0.5F) / 4.0F);   // M1
+            int compValue = (int) (((float)compCard + 0.5F) / 4.0F);    // M2
+
+            if (compValue > plyrValue)
+            {
+                compScore++;
+                Console.WriteLine($"COMPUTER WINS!!! YOU HAVE {plyrScore}  COMPUTER HAS {compScore}");
+            }
+            else if (compValue < plyrValue)
+            {
+                plyrScore++;
+                Console.WriteLine($"YOU WIN.  YOU HAVE {plyrScore}  COMPUTER HAS {compScore}");
+            }
+            else
+            {
+                Console.WriteLine($"TIE.  NO SCORE CHANGE.");
+            }
+
+            bool keepPlaying = false;
+            if (nextCard <= 50)
+            {
+                string cont;
+                do
+                {
+                    Console.Write("DO YOU WANT TO CONTINUE? ");
+                    cont = Console.ReadLine().ToLower();
+
+                    if (cont == "yes")
+                    {
+                        keepPlaying = true;
+                    }
+                    else if (cont != "no")
+                    {
+                        Console.Write("YES OR NO, PLEASE.  ");
+                    }
+                } while ((cont != "yes") && (cont != "no"));
+             }
+
+            return keepPlaying;
         }

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


Add further tests

Add further tests

--- osu.Framework.Tests/Visual/UserInterface/TestCaseScreenStack.cs
+++ osu.Framework.Tests/Visual/UserInterface/TestCaseScreenStack.cs
@@ -584,8 +584,34 @@
             AddStep("push slow", () => screen1.Push(screen2 = new TestScreenSlow()));
             AddStep("exit slow", () => screen2.Exit());
             AddStep("allow load", () => screen2.AllowLoad.Set());
-            AddUntilStep("wait for screen to load", () => screen2.LoadState >= LoadState.Ready);
-            AddAssert("basescreen did not recieve suspending", () => screen1.SuspendedTo == null);
+            AddUntilStep("wait for screen 2 to load", () => screen2.LoadState >= LoadState.Ready);
+            AddAssert("screen 1 did not receive suspending", () => screen1.SuspendedTo == null);
+            AddAssert("screen 1 did not receive resuming", () => screen1.ResumedFrom == null);
+        }
+
+        [Test]
+        public void TestInvalidPushDoesNotBlockImmediateSuspend()
+        {
+            TestScreen screen1 = null;
+            TestScreenSlow screen2 = null;
+
+            AddStep("override stack", () =>
+            {
+                // we can't use the [SetUp] screen stack as we need to change the ctor parameters.
+                Clear();
+                Add(stack = new ScreenStack(baseScreen = new TestScreen(), true)
+                {
+                    RelativeSizeAxes = Axes.Both
+                });
+            });
+
+            pushAndEnsureCurrent(() => screen1 = new TestScreen());
+            AddStep("push slow", () => screen1.Push(screen2 = new TestScreenSlow()));
+            AddStep("exit slow", () => screen2.Exit());
+            AddStep("allow load", () => screen2.AllowLoad.Set());
+            AddUntilStep("wait for screen 2 to load", () => screen2.LoadState >= LoadState.Ready);
+            AddAssert("screen 1 did receive suspending", () => screen1.SuspendedTo == screen2);
+            AddAssert("screen 1 did receive resumed", () => screen1.ResumedFrom == screen2);
         }

         /// <summary>


Add test coverage of preset soft deletion

--- osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs
+++ osu.Game.Tests/Visual/UserInterface/TestSceneModPresetColumn.cs
@@ -102,6 +102,44 @@
             AddUntilStep("4 panels visible", () => this.ChildrenOfType<ModPresetPanel>().Count() == 4);
         }

+        [Test]
+        public void TestSoftDeleteSupport()
+        {
+            AddStep("set osu! ruleset", () => Ruleset.Value = rulesets.GetRuleset(0));
+            AddStep("create content", () => Child = new Container
+            {
+                RelativeSizeAxes = Axes.Both,
+                Padding = new MarginPadding(30),
+                Child = new ModPresetColumn
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.Centre,
+                }
+            });
+            AddUntilStep("3 panels visible", () => this.ChildrenOfType<ModPresetPanel>().Count() == 3);
+
+            AddStep("soft delete preset", () => Realm.Write(r =>
+            {
+                var toSoftDelete = r.All<ModPreset>().Single(preset => preset.Name == "AR0");
+                toSoftDelete.DeletePending = true;
+            }));
+            AddUntilStep("2 panels visible", () => this.ChildrenOfType<ModPresetPanel>().Count() == 2);
+
+            AddStep("soft delete all presets", () => Realm.Write(r =>
+            {
+                foreach (var preset in r.All<ModPreset>())
+                    preset.DeletePending = true;
+            }));
+            AddUntilStep("no panels visible", () => this.ChildrenOfType<ModPresetPanel>().Count() == 0);
+
+            AddStep("undelete preset", () => Realm.Write(r =>
+            {
+                foreach (var preset in r.All<ModPreset>())
+                    preset.DeletePending = false;
+            }));
+            AddUntilStep("3 panels visible", () => this.ChildrenOfType<ModPresetPanel>().Count() == 3);
+        }
+
         private IEnumerable<ModPreset> createTestPresets() => new[]
         {
             new ModPreset


Re-adjust timespan conditions in `KeysPerSecondCalculator`

--- osu.Game/Screens/Play/HUD/KPSCounter/KeysPerSecondCalculator.cs
+++ osu.Game/Screens/Play/HUD/KPSCounter/KeysPerSecondCalculator.cs
@@ -93,7 +93,7 @@

             double span = 1000 * rate;
             double relativeTime = workingClock.CurrentTime - timestamp;
-            return relativeTime >= 0 && relativeTime <= span;
+            return relativeTime > 0 && relativeTime <= span;
         }

         ~KeysPerSecondCalculator()


修复 返回类型是list ，会输出系统内置属性问题

修复 返回类型是list ，会输出系统内置属性问题

--- plugins/dotNet/DopPlugin/DopPlugin/DocHandler/PostmanHandler.cs
+++ plugins/dotNet/DopPlugin/DopPlugin/DocHandler/PostmanHandler.cs
@@ -14,6 +14,12 @@
 {
     public class PostmanHandler
     {
+
+        ///// <summary>
+        ///// json 数据类型字典
+        ///// </summary>
+        //private Dictionary<string, string> jsonDataTypeDict = new Dictionary<string, string>();
+
         public Models.Postman ModelData;
         public string[] FilterNames { get; set; }

@@ -111,7 +117,9 @@
         {
             var result = new List<Postman.FieldModel>();

-            var reqProps = type.GetProperties();
+            var acutalType = GetActualType(type);
+
+           var reqProps = acutalType.GetProperties();
             foreach (var propInfo in reqProps)
             {
                 var fieldModel = new Models.Postman.FieldModel();
@@ -176,11 +184,6 @@
                 return type;
             }
         }
-
-        /// <summary>
-        /// json 数据类型字典
-        /// </summary>
-        private Dictionary<string, string> jsonDataTypeDict = new Dictionary<string, string>();

         private bool IsExistsChild(Type type)
         {


BUGFIX: use Enumerable.Empty to initialize empty method and property sigs.

--- src/AsmResolver.DotNet/Signatures/Types/GenericTypeActivator.cs
+++ src/AsmResolver.DotNet/Signatures/Types/GenericTypeActivator.cs
@@ -42,7 +42,7 @@
         /// <returns>The activated signature.</returns>
         public PropertySignature InstantiatePropertySignature(PropertySignature signature, GenericContext context)
         {
-            var result = new PropertySignature(signature.Attributes, signature.ReturnType, signature.ParameterTypes);
+            var result = new PropertySignature(signature.Attributes, signature.ReturnType, Enumerable.Empty<TypeSignature>());
             InstantiateMethodSignatureBase(signature, result, context);
             return result;
         }
@@ -56,7 +56,7 @@
         /// <returns>The activated signature.</returns>
         public MethodSignature InstantiateMethodSignature(MethodSignature signature, GenericContext context)
         {
-            var result = new MethodSignature(signature.Attributes, signature.ReturnType, signature.ParameterTypes);
+            var result = new MethodSignature(signature.Attributes, signature.ReturnType, Enumerable.Empty<TypeSignature>());
             InstantiateMethodSignatureBase(signature, result, context);
             result.GenericParameterCount = signature.GenericParameterCount;


Provide a better error message if type has no namespace, (Possible in F#)

--- src/Docu.Console/Documentation/Generators/NamespaceGenerator.cs
+++ src/Docu.Console/Documentation/Generators/NamespaceGenerator.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using Docu.Parsing.Model;

@@ -14,6 +15,11 @@

         public void Add(List<Namespace> namespaces, IDocumentationMember association)
         {
+            if (association.TargetType.Namespace == null)
+                throw new NullReferenceException(
+                    string.Format("There was no namespace found for {0}",
+                                  association.TargetType.AssemblyQualifiedName));
+
             var ns = Identifier.FromNamespace(association.TargetType.Namespace);

             if (!namespaces.Exists(x => x.IsIdentifiedBy(ns)))


Consolidate package reference parsing

Consolidate package reference parsing

--- src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs
+++ src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs
@@ -75,15 +75,7 @@
                                  + Hws + @"*,"
                                  + Hws + @"*(.*)""";

-            var matches = Regex.Matches(fileContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);
-
-            foreach (var match in matches.Cast<Match>())
-            {
-                var id = match.Groups[1].Value;
-                var version = match.Groups[2].Value;
-                var packageReference = new PackageReference(id, version, PackageOrigin.ReferenceDirective);
-                yield return packageReference;
-            }
+            return ReadPackageReferencesFromDirective(PackageOrigin.ReferenceDirective, pattern, fileContent);
         }

         private static IEnumerable<PackageReference> ReadPackageReferencesFromLoadDirective(string fileContent)
@@ -95,13 +87,19 @@
                                  + Hws + @"*,"
                                  + Hws + @"*(.*)""";

+            return ReadPackageReferencesFromDirective(PackageOrigin.LoadDirective, pattern, fileContent);
+        }
+
+        private static IEnumerable<PackageReference> ReadPackageReferencesFromDirective(PackageOrigin origin,
+            string pattern, string fileContent)
+        {
             var matches = Regex.Matches(fileContent, pattern, RegexOptions.IgnoreCase | RegexOptions.Multiline);

             foreach (var match in matches.Cast<Match>())
             {
                 var id = match.Groups[1].Value;
                 var version = match.Groups[2].Value;
-                var packageReference = new PackageReference(id, version, PackageOrigin.LoadDirective);
+                var packageReference = new PackageReference(id, version, origin);
                 yield return packageReference;
             }
         }


Add test with missing arg.

Add test with missing arg.

--- src/EditorFeatures/CSharpTest/TypeInferrer/TypeInferrerTests.cs
+++ src/EditorFeatures/CSharpTest/TypeInferrer/TypeInferrerTests.cs
@@ -3097,5 +3097,13 @@
             await TestInMethodAsync(
 @"(int, (string, bool)) x = (1, ("""", [|Goo()|]));", "global::System.Boolean", mode);
         }
+
+        [WorkItem(14277, "https://github.com/dotnet/roslyn/issues/14277")]
+        [Fact, Trait(Traits.Feature, Traits.Features.TypeInferenceService)]
+        public async Task TestValueInNestedTuple3()
+        {
+            await TestInMethodAsync(
+@"(int, string) x = (1, [||]);", "global::System.String", TestMode.Position);
+        }
     }
 }


CSharpTemplate.Statements now uses multiline editor

--- src/LearningSystem.AnswerHandlers.CSharp/CSharpAnswerHandler.cs
+++ src/LearningSystem.AnswerHandlers.CSharp/CSharpAnswerHandler.cs
@@ -59,7 +59,8 @@
         public string RenderInputHtml()
         {
             // todo: duplication
-            if (this.CodeTemplate == CSharpCodeTemplate.WholeProgram)
+            if (this.CodeTemplate == CSharpCodeTemplate.WholeProgram ||
+                this.CodeTemplate == CSharpCodeTemplate.Statements)
             {
                 return @"<textarea id='answer-input' name='answer-input' class='answer-input-textfield input-code'></textarea>";


Check IHttpMaxRequestBodySizeFeature.IsReadOnly (#379)

--- src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs
+++ src/Microsoft.AspNetCore.Server.IISIntegration/IISMiddleware.cs
@@ -77,7 +77,7 @@
             }

             var bodySizeFeature = httpContext.Features.Get<IHttpMaxRequestBodySizeFeature>();
-            if (bodySizeFeature != null)
+            if (bodySizeFeature != null && !bodySizeFeature.IsReadOnly)
             {
                 // IIS already limits this, no need to do it twice.
                 bodySizeFeature.MaxRequestBodySize = null;