Add tests

Add tests

--- src/Roslyn.Diagnostics.Analyzers/UnitTests/BlankLines/BlankLinesTests.cs
+++ src/Roslyn.Diagnostics.Analyzers/UnitTests/BlankLines/BlankLinesTests.cs
@@ -600,5 +600,121 @@
                 LanguageVersion = Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8,
             }.RunAsync();
         }
+
+        [Fact]
+        public async Task TestNoBlankLineAfterDocComment()
+        {
+            var code =
+@"
+/// <summary/>
+class C
+{
+}";
+
+            await new VerifyCS.Test()
+            {
+                TestCode = code,
+                FixedCode = code,
+            }.RunAsync();
+        }
+
+        [Fact]
+        public async Task TestOneBlankLineAfterDocComment()
+        {
+            var code =
+@"
+/// <summary/>
+
+class C
+{
+}";
+
+            await new VerifyCS.Test()
+            {
+                TestCode = code,
+                FixedCode = code,
+            }.RunAsync();
+        }
+
+        [Fact]
+        public async Task TestTwoBlankLineAfterDocComment()
+        {
+            var code =
+@"
+/// <summary/>
+[||]
+
+class C
+{
+}";
+            var fixedCode =
+@"
+/// <summary/>
+
+class C
+{
+}";
+
+            await new VerifyCS.Test()
+            {
+                TestCode = code,
+                FixedCode = fixedCode,
+            }.RunAsync();
+        }
+
+        [Fact]
+        public async Task TestThreeBlankLineAfterDocComment()
+        {
+            var code =
+@"
+/// <summary/>
+[||]
+
+
+class C
+{
+}";
+            var fixedCode =
+@"
+/// <summary/>
+
+class C
+{
+}";
+
+            await new VerifyCS.Test()
+            {
+                TestCode = code,
+                FixedCode = fixedCode,
+            }.RunAsync();
+        }
+
+        [Fact]
+        public async Task TestFourBlankLineAfterDocComment()
+        {
+            var code =
+@"
+/// <summary/>
+[||]
+
+
+
+class C
+{
+}";
+            var fixedCode =
+@"
+/// <summary/>
+
+class C
+{
+}";
+
+            await new VerifyCS.Test()
+            {
+                TestCode = code,
+                FixedCode = fixedCode,
+            }.RunAsync();
+        }
     }
 }


Remove warning being thrown in PaymentProcessor

--- src/SFA.DAS.EAS.PaymentProvider.Worker/Providers/PaymentDataProcessor.cs
+++ src/SFA.DAS.EAS.PaymentProvider.Worker/Providers/PaymentDataProcessor.cs
@@ -49,8 +49,6 @@
         {
             if (message?.Content?.AccountId == null)
             {
-                _logger.Warn("Payment message has invalid content and cannot be processed");
-
                 if (message != null)
                 {
                     await message.CompleteAsync();


Fix to Requet.QueryString use for all controller redirects

--- src/SFA.DAS.EAS.Web/Controllers/EmployerAccountTransactionsController.cs
+++ src/SFA.DAS.EAS.Web/Controllers/EmployerAccountTransactionsController.cs
@@ -77,7 +77,7 @@
         [Route("balance/{year}/{month}")]
         public ActionResult TransactionsView(string hashedAccountId, int year, int month)
         {
-            return Redirect(Url.EmployerFinanceAction($"finance/{year}/{month}{Request.QueryString}"));
+            return Redirect(Url.EmployerFinanceAction($"finance/{year}/{month}?{Request.QueryString}"));
         }

@@ -99,14 +99,14 @@
         [Route("balance/levyDeclaration/details")]
         public async Task<ActionResult> LevyDeclarationDetail(string hashedAccountId, DateTime fromDate, DateTime toDate)
         {
-            return Redirect(Url.EmployerFinanceAction($"finance/levyDeclaration/details/{Request.QueryString}"));
+            return Redirect(Url.EmployerFinanceAction($"finance/levyDeclaration/details?{Request.QueryString}"));
         }

         [Route("finance/provider/summary")]
         [Route("balance/provider/summary")]
         public async Task<ActionResult> ProviderPaymentSummary(string hashedAccountId, long ukprn, DateTime fromDate, DateTime toDate)
         {
-            return Redirect(Url.EmployerFinanceAction($"finance/provider/summary/{Request.QueryString}"));
+            return Redirect(Url.EmployerFinanceAction($"finance/provider/summary?{Request.QueryString}"));
         }

         [Route("finance/course/standard/summary")]
@@ -114,7 +114,7 @@
         public async Task<ActionResult> CourseStandardPaymentSummary(string hashedAccountId, long ukprn, string courseName,
             int? courseLevel, DateTime fromDate, DateTime toDate)
         {
-            return Redirect(Url.EmployerFinanceAction($"finance/course/standard/summary/{Request.QueryString}"));
+            return Redirect(Url.EmployerFinanceAction($"finance/course/standard/summary?{Request.QueryString}"));
         }

         [Route("finance/course/framework/summary")]
@@ -122,7 +122,7 @@
         public async Task<ActionResult> CourseFrameworkPaymentSummary(string hashedAccountId, long ukprn, string courseName,
             int? courseLevel, int? pathwayCode, DateTime fromDate, DateTime toDate)
         {
-            return Redirect(Url.EmployerFinanceAction($"finance/course/framework/summary/{Request.QueryString}"));
+            return Redirect(Url.EmployerFinanceAction($"finance/course/framework/summary?{Request.QueryString}"));
         }
     }
 }


Address PR feedback: Make the lock fields readonly Move locking out of TryBeginOperation, and into the callers.

--- src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs
+++ src/System.Net.Sockets/src/System/Net/Sockets/SocketAsyncContext.Unix.cs
@@ -453,10 +453,10 @@
         // We have separate locks for send and receive queues, so they can proceed concurrently.  Accept and connect
         // use the same lock as send, since they can't happen concurrently anyway.
         //
-        private object _sendAcceptConnectLock = new object();
-        private object _receiveLock = new object();
-
-        private object _registerLock = new object();
+        private readonly object _sendAcceptConnectLock = new object();
+        private readonly object _receiveLock = new object();
+
+        private readonly object _registerLock = new object();

         public SocketAsyncContext(SafeCloseSocket socket)
         {
@@ -546,39 +546,39 @@
             }
         }

-        private bool TryBeginOperation<TOperation>(ref OperationQueue<TOperation> queue, object queueLock, TOperation operation, Interop.Sys.SocketEvents events, bool maintainOrder, out bool isStopped)
+        private bool TryBeginOperation<TOperation>(ref OperationQueue<TOperation> queue, TOperation operation, Interop.Sys.SocketEvents events, bool maintainOrder, out bool isStopped)
             where TOperation : AsyncOperation
         {
-            lock (queueLock)
-            {
-                switch (queue.State)
-                {
-                    case QueueState.Stopped:
-                        isStopped = true;
+            // Exactly one of the two queue locks must be held by the caller
+            Debug.Assert(Monitor.IsEntered(_sendAcceptConnectLock) ^ Monitor.IsEntered(_receiveLock));
+
+            switch (queue.State)
+            {
+                case QueueState.Stopped:
+                    isStopped = true;
+                    return false;
+
+                case QueueState.Clear:
+                    break;
+
+                case QueueState.Set:
+                    if (queue.IsEmpty || !maintainOrder)
+                    {
+                        isStopped = false;
+                        queue.State = QueueState.Clear;
                         return false;
-
-                    case QueueState.Clear:
-                        break;
-
-                    case QueueState.Set:
-                        if (queue.IsEmpty || !maintainOrder)
-                        {
-                            isStopped = false;
-                            queue.State = QueueState.Clear;
-                            return false;
-                        }
-                        break;
-                }
-
-                if ((_registeredEvents & events) == Interop.Sys.SocketEvents.None)
-                {
-                    Register(events);
-                }
-
-                queue.Enqueue(operation);
-                isStopped = false;
-                return true;
-            }
+                    }
+                    break;
+            }
+
+            if ((_registeredEvents & events) == Interop.Sys.SocketEvents.None)
+            {
+                Register(events);
+            }
+
+            queue.Enqueue(operation);
+            isStopped = false;
+            return true;
         }

         public SocketError Accept(byte[] socketAddress, ref int socketAddressLen, int timeout, out int acceptedFd)
@@ -603,8 +603,16 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _acceptOrConnectQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: false, isStopped: out isStopped))
-                {
+                while (true)
+                {
+                    lock (_sendAcceptConnectLock)
+                    {
+                        if (TryBeginOperation(ref _acceptOrConnectQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: false, isStopped: out isStopped))
+                        {
+                            break;
+                        }
+                    }
+
                     if (isStopped)
                     {
                         acceptedFd = -1;
@@ -663,8 +671,16 @@
             };

             bool isStopped;
-            while (!TryBeginOperation(ref _acceptOrConnectQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: false, isStopped: out isStopped))
-            {
+            while (true)
+            {
+                lock (_sendAcceptConnectLock)
+                {
+                    if (TryBeginOperation(ref _acceptOrConnectQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: false, isStopped: out isStopped))
+                    {
+                        break;
+                    }
+                }
+
                 if (isStopped)
                 {
                     return SocketError.OperationAborted;
@@ -703,8 +719,16 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _acceptOrConnectQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: false, isStopped: out isStopped))
-                {
+                while (true)
+                {
+                    lock (_sendAcceptConnectLock)
+                    {
+                        if (TryBeginOperation(ref _acceptOrConnectQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: false, isStopped: out isStopped))
+                        {
+                            break;
+                        }
+                    }
+
                     if (isStopped)
                     {
                         return SocketError.Interrupted;
@@ -750,8 +774,16 @@
             };

             bool isStopped;
-            while (!TryBeginOperation(ref _acceptOrConnectQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: false, isStopped: out isStopped))
-            {
+            while (true)
+            {
+                lock (_sendAcceptConnectLock)
+                {
+                    if (TryBeginOperation(ref _acceptOrConnectQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: false, isStopped: out isStopped))
+                    {
+                        break;
+                    }
+                }
+
                 if (isStopped)
                 {
                     return SocketError.OperationAborted;
@@ -811,7 +843,7 @@
                     };

                     bool isStopped;
-                    while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                    while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                     {
                         if (isStopped)
                         {
@@ -878,7 +910,7 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                 {
                     if (isStopped)
                     {
@@ -937,7 +969,7 @@
                     };

                     bool isStopped;
-                    while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                    while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                     {
                         if (isStopped)
                         {
@@ -1004,7 +1036,7 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                 {
                     if (isStopped)
                     {
@@ -1057,7 +1089,7 @@
                     };

                     bool isStopped;
-                    while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                    while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                     {
                         if (isStopped)
                         {
@@ -1131,7 +1163,7 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _receiveQueue, _receiveLock, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
+                while (!TryBeginOperation(ref _receiveQueue, operation, Interop.Sys.SocketEvents.Read, maintainOrder: true, isStopped: out isStopped))
                 {
                     if (isStopped)
                     {
@@ -1193,7 +1225,7 @@
                     };

                     bool isStopped;
-                    while (!TryBeginOperation(ref _sendQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
+                    while (!TryBeginOperation(ref _sendQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
                     {
                         if (isStopped)
                         {
@@ -1255,7 +1287,7 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _sendQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
+                while (!TryBeginOperation(ref _sendQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
                 {
                     if (isStopped)
                     {
@@ -1319,7 +1351,7 @@
                     };

                     bool isStopped;
-                    while (!TryBeginOperation(ref _sendQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
+                    while (!TryBeginOperation(ref _sendQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
                     {
                         if (isStopped)
                         {
@@ -1382,7 +1414,7 @@
                 };

                 bool isStopped;
-                while (!TryBeginOperation(ref _sendQueue, _sendAcceptConnectLock, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
+                while (!TryBeginOperation(ref _sendQueue, operation, Interop.Sys.SocketEvents.Write, maintainOrder: true, isStopped: out isStopped))
                 {
                     if (isStopped)
                     {


Address Justin's feedback

Address Justin's feedback

--- src/Terrajobst.PlatformCompat.Analyzers.Tests/DeprecatedAnalyzerTests.cs
+++ src/Terrajobst.PlatformCompat.Analyzers.Tests/DeprecatedAnalyzerTests.cs
@@ -205,7 +205,7 @@
                 {
                     static void Main()
                     {
-                        var x = PlatformID.{{MEMBER_NAME}} x = null;
+                        var x = PlatformID.{{MEMBER_NAME}};
                     }
                 }
             ".Replace("MEMBER_NAME", memberName);


Still do ToArray as the first thing, to avoid test fails.

--- src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs
+++ src/Umbraco.Infrastructure/Persistence/SqlServerBulkSqlInsertProvider.cs
@@ -18,14 +18,15 @@

         public int BulkInsertRecords<T>(IUmbracoDatabase database, IEnumerable<T> records)
         {
-            if (!records.Any()) return 0;
+            var recordsA = records.ToArray();
+            if (recordsA.Length == 0) return 0;

             var pocoData = database.PocoDataFactory.ForType(typeof(T));
             if (pocoData == null) throw new InvalidOperationException("Could not find PocoData for " + typeof(T));

             return database.DatabaseType.IsSqlServer2008OrLater()
-                ? BulkInsertRecordsSqlServer(database, pocoData, records)
-                : BasicBulkSqlInsertProvider.BulkInsertRecordsWithCommands(database, records.ToArray());
+                ? BulkInsertRecordsSqlServer(database, pocoData, recordsA)
+                : BasicBulkSqlInsertProvider.BulkInsertRecordsWithCommands(database, recordsA);
         }

         /// <summary>


Incremented version.

Incremented version.

--- src/Abp/AbpConsts.cs
+++ src/Abp/AbpConsts.cs
@@ -8,6 +8,6 @@
         /// <summary>
         /// Current version of the ABP.
         /// </summary>
-        public const string CurrentVersion = "0.5.10.2";
+        public const string CurrentVersion = "0.5.10.3";
     }
 }


利用できない拡張メソッドを無効化

利用できない拡張メソッドを無効化

--- src/CharExtension.cs
+++ src/CharExtension.cs
@@ -113,13 +113,13 @@
         public static char ToLower(this char c) {
             return char.ToLower(c);
         }
-
+#if false
         /// 指定カルチャ規則で小文字化して返す
         /// <seealso cref="char.ToLower(char, CultureInfo)"/>
         public static char ToLower(this char c, CultureInfo culture) {
             return char.ToLower(c, culture);
         }
-
+#endif
         /// インバリアントカルチャ規則で小文字化して返す
         /// <seealso cref="char.ToLowerInvariant(char)"/>
         public static char ToLowerInvariant(this char c) {
@@ -137,13 +137,13 @@
         public static char ToUpper(this char c) {
             return char.ToUpper(c);
         }
-
+#if false
         /// 指定カルチャ規則で大文字化して返す
         /// <seealso cref="char.ToUpper(char, CultureInfo)"/>
         public static char ToUpper(this char c, CultureInfo culture) {
             return char.ToUpper(c, culture);
         }
-
+#endif
         /// インバリアントカルチャ規則で大文字化して返す
         /// <seealso cref="char.ToUpperInvariant(char)"/>
         public static char ToUpperInvariant(this char c) {


dev: add the test to ensure types of specified assembly should not be

exposed externally.

--- test/ExperimentUnitTest/AssemblyLevelTest.cs
+++ test/ExperimentUnitTest/AssemblyLevelTest.cs
@@ -1,5 +1,9 @@
-using System.Linq;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
 using Xunit;
+using Xunit.Extensions;

 namespace Jwc.Experiment
 {
@@ -22,5 +26,91 @@
             Assert.Equal(specifiedAssemblies.Length, actual.Length);
             Assert.False(specifiedAssemblies.Except(actual).Any(), "Empty");
         }
+
+        [Theory]
+        [InlineData("xunit.extensions")]
+        public void SutDoesNotExposeAnyTypeOfSpecifiedReference(string name)
+        {
+            // Fixture setup
+            var sut = typeof(BaseTheoremAttribute).Assembly;
+            var assemblyName = sut.GetReferencedAssemblies().Where(an => an.Name == name).Single();
+            var typesNotExposed = new HashSet<Type>(Assembly.Load(assemblyName).GetExportedTypes());
+
+            // Exercise system and Verify outcome
+            foreach (var type in sut.GetExportedTypes())
+            {
+                AssertDoesNotExpose(type, typesNotExposed);
+                foreach (var member in type.GetMembers())
+                {
+                    AssertDoesNotExpose(member, typesNotExposed);
+                }
+            }
+        }
+
+        private static void AssertDoesNotExpose(Type type, ICollection<Type> typesNotExposed)
+        {
+            while (type != null)
+            {
+                AssertDoesNotContain(type, typesNotExposed);
+                AssertDoesNotContain(type.GetInterfaces(), typesNotExposed);
+                type = type.BaseType;
+            }
+        }
+
+        private static void AssertDoesNotExpose(MemberInfo member, ICollection<Type> typesNotExposed)
+        {
+            var type = member as FieldInfo;
+            if (type != null)
+            {
+                AssertDoesNotContain(type.FieldType, typesNotExposed);
+                return;
+            }
+
+            var constructor = member as ConstructorInfo;
+            if (constructor != null)
+            {
+                AssertDoesNotContain(
+                    constructor.GetParameters().Select(pi => pi.ParameterType), typesNotExposed);
+                return;
+            }
+
+            var propety = member as PropertyInfo;
+            if (propety != null)
+            {
+                AssertDoesNotContain(propety.PropertyType, typesNotExposed);
+                return;
+            }
+
+            var method = member as MethodInfo;
+            if (method != null)
+            {
+                AssertDoesNotContain(method.ReturnType, typesNotExposed);
+                AssertDoesNotContain(
+                    method.GetParameters().Select(pi => pi.ParameterType), typesNotExposed);
+                return;
+            }
+
+            var @event = member as EventInfo;
+            if (@event != null)
+            {
+                AssertDoesNotContain(@event.EventHandlerType, typesNotExposed);
+                return;
+            }
+        }
+
+        private static void AssertDoesNotContain(IEnumerable<Type> types, ICollection<Type> typesNotExposed)
+        {
+            foreach (var type in types)
+            {
+                AssertDoesNotContain(type, typesNotExposed);
+            }
+        }
+
+        private static void AssertDoesNotContain(Type type, ICollection<Type> typesNotExposed)
+        {
+            Assert.False(
+                typesNotExposed.Contains(type),
+                type + " should not be exposed.");
+        }
     }
 }


Fix list accessing with lock in SimpleAudioEngine

--- src/denshion/CCSimpleAudioEngine.cs
+++ src/denshion/CCSimpleAudioEngine.cs
@@ -365,7 +365,10 @@
             CCEffectPlayer eff = new CCEffectPlayer();
             eff.Open(FullPath(filename), nId);
             eff.Volume = effectsVolume;
-            list[nId] = eff;
+            lock (list)
+            {
+                list[nId] = eff;
+            }
         }

         public void UnloadEffect(string filename)


refactored

refactored

Signed-off-by: Sven Strickroth <a88b7dcd1a9e3e17770bbaa6d7515b31a2d7e85d@cs-ware.de>

--- src/Gurtle/Plugin.cs
+++ src/Gurtle/Plugin.cs
@@ -1,10 +1,12 @@
 #region License, Terms and Author(s)
 //
 // Gurtle - IBugTraqProvider for Google Code
+// Copyright (c) 2011 Sven Strickroth. All rights reserved.
 // Copyright (c) 2008, 2009 Atif Aziz. All rights reserved.
 //
 //  Author(s):
 //
+//      Sven Strickroth, <email@cs-ware.de>
 //      Atif Aziz, http://www.raboof.com
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
@@ -51,7 +53,7 @@
     public sealed class Plugin : IBugTraqProvider2
     {
         private IList<Issue> _issues;
-        private IProvider _project;
+        private Parameters _parameters;

         public string GetCommitMessage(
             IntPtr hParentWnd,
@@ -68,50 +70,50 @@
         {
             if (parameters == null) throw new ArgumentNullException("parameters");

-                var project = parameters.Project;
-                if (project.Length == 0)
-                    throw new ApplicationException("Missing Google Code project specification.");
-
-                _project = parameters.Provider;
-
-                IList<Issue> issues;
-
-                using (var dialog = new IssueBrowserDialog(_project)
-                {
-                    UserNamePattern = parameters.User,
-                    StatusPattern = parameters.Status,
-                    UpdateCheckEnabled = true,
-                })
-                {
-                    var settings = Properties.Settings.Default;
-                    new WindowSettings(settings, dialog);
-
-                    var reply = dialog.ShowDialog(parentWindow);
-                    issues = dialog.SelectedIssueObjects;
-
-                    settings.Save();
-
-                    if (reply != DialogResult.OK || issues.Count == 0)
-                        return originalMessage;
-
-                    _issues = issues;
-                }
-
-                var message = new StringBuilder(originalMessage);
-
-                if (originalMessage.Length > 0 && !originalMessage.EndsWith("\n"))
-                    message.AppendLine();
-
-                foreach (var issue in issues)
-                {
-                    message
-                        .Append("(")
-                        .Append(GetIssueTypeAddress(issue.Type)).Append(" issue #")
-                        .Append(issue.Id).Append(") : ")
-                        .AppendLine(issue.Summary);
-                }
-
-                return message.ToString();
+            _parameters = parameters;
+
+            var project = parameters.Project;
+            if (project.Length == 0)
+                throw new ApplicationException("Missing project specification.");
+
+            IList<Issue> issues;
+
+            using (var dialog = new IssueBrowserDialog(_parameters.Provider)
+            {
+                UserNamePattern = parameters.User,
+                StatusPattern = parameters.Status,
+                UpdateCheckEnabled = true,
+            })
+            {
+                var settings = Properties.Settings.Default;
+                new WindowSettings(settings, dialog);
+
+                var reply = dialog.ShowDialog(parentWindow);
+                issues = dialog.SelectedIssueObjects;
+
+                settings.Save();
+
+                if (reply != DialogResult.OK || issues.Count == 0)
+                    return originalMessage;
+
+                _issues = issues;
+            }
+
+            var message = new StringBuilder(originalMessage);
+
+            if (originalMessage.Length > 0 && !originalMessage.EndsWith("\n"))
+                message.AppendLine();
+
+            foreach (var issue in issues)
+            {
+                message
+                    .Append("(")
+                    .Append(GetIssueTypeAddress(issue.Type)).Append(" issue #")
+                    .Append(issue.Id).Append(") : ")
+                    .AppendLine(issue.Summary);
+            }
+
+            return message.ToString();

         }

@@ -140,6 +142,7 @@
             bugIDOut = bugID;

             Parameters p = Parameters.Parse(parameters);
+            _parameters = p;
             if (p.Project.Length == 0)
             {
                 // we can extract the project name from the url, e.g.:
@@ -179,9 +182,7 @@
             string commonRoot, string[] pathList,
             string logMessage, string revision)
         {
-            var project = _project;
-            var issues = _issues;
-            OnCommitFinished(parentWindow, revision, project, issues);
+            OnCommitFinished(parentWindow, revision, _parameters.Provider, _issues);
             return null;
         }


JimEvans: Ignoring .NET test for IE. VisibilityTest.ZeroSizedDivIsShownIfDescendantHasSize

git-svn-id: aa1aa1384423cb28c2b1e29129bb3a91de1d9196@14154 07704840-8298-11de-bf8c-fd130f914ac9

--- dotnet/test/WebDriver.Common.Tests/VisibilityTest.cs
+++ dotnet/test/WebDriver.Common.Tests/VisibilityTest.cs
@@ -105,6 +105,7 @@

         [Test]
         [Category("Javascript")]
+        [IgnoreBrowser(Browser.IE, "Div with size 0 is not interpreted as displayed even if descendent has size")]
         public void ZeroSizedDivIsShownIfDescendantHasSize()
         {
             driver.Url = javascriptPage;


Use the entry assembly, not calling assembly.

The calling assembly will always be guiunit itself. All our
tests are written in different assembly. As such, if we aren't
given the path to an assembly we should assume that something else
is loading us and the thing which loaded us has the tests.

--- src/framework/GuiUnit/TestRunner.cs
+++ src/framework/GuiUnit/TestRunner.cs
@@ -139,10 +139,6 @@

 		void ExecuteWithListener (string[] args, TcpWriter tcpWriter)
 		{
-			// NOTE: Execute must be directly called from the
-			// test assembly in order for the mechanism to work.
-			Assembly callingAssembly = Assembly.GetCallingAssembly();
-
 			if (!commandLineOptions.NoHeader)
 				WriteHeader(this.writer);

@@ -184,7 +180,7 @@
 					}

 					if (assemblies.Count == 0)
-						assemblies.Add(callingAssembly);
+						assemblies.Add (Assembly.GetEntryAssembly ());

 					// TODO: For now, ignore all but first assembly
 					Assembly assembly = assemblies[0] as Assembly;


Added bestRepresentativeQuery model for Image Insights API

--- suggesttriplocationBot/suggesttriplocationBot/Model/BingImageResponse.cs
+++ suggesttriplocationBot/suggesttriplocationBot/Model/BingImageResponse.cs
@@ -6,6 +6,7 @@
     {
         public string _type { get; set; }
         public Instrumentation instrumentation { get; set; }
+        public BestRepresentativeQuery bestRepresentativeQuery { get; set; }
         public List<VisuallySimilarImages> visuallySimilarImages { get; set; }
         public string imageInsightsToken { get; set; }
     }
@@ -14,6 +15,14 @@
     {
         public string pingUrlBase { get; set; }
         public string pageLoadPingUrl { get; set; }
+    }
+
+    public class BestRepresentativeQuery
+    {
+        public string text { get; set; }
+        public string displayText { get; set; }
+        public string webSearchUrl { get; set; }
+        public string webSearchUrlPingSuffix { get; set; }
     }

     public class Thumbnail


fix unit test

fix unit test

--- test/Microsoft.DocAsCode.EntityModel.Tests/ConvertToViewModelUnitTest.cs
+++ test/Microsoft.DocAsCode.EntityModel.Tests/ConvertToViewModelUnitTest.cs
@@ -519,11 +519,11 @@
             Assert.Equal(MemberType.Class, reference.Type);
             Assert.Equal("Summary!", reference.Summary);
             Assert.Equal("C1", reference.Name);
-            Assert.Equal("C1", reference.NameForCSharp);
-            Assert.Equal("C1", reference.NameForVB);
+            Assert.Null(reference.NameForCSharp);
+            Assert.Null(reference.NameForVB);
             Assert.Equal("N1.C1", reference.Fullname);
-            Assert.Equal("N1.C1", reference.FullnameForCSharp);
-            Assert.Equal("N1.C1", reference.FullnameForVB);
+            Assert.Null(reference.FullnameForCSharp);
+            Assert.Null(reference.FullnameForVB);
             Assert.False(reference.IsExternal);
             Assert.Equal("href!", reference.Href);
         }
@@ -575,11 +575,11 @@
             var reference = vm.References.Find(x => x.Uid == "System.Object");
             Assert.NotNull(reference);
             Assert.Equal("Object", reference.Name);
-            Assert.Equal("Object", reference.NameForCSharp);
-            Assert.Equal("Object", reference.NameForVB);
+            Assert.Null(reference.NameForCSharp);
+            Assert.Null(reference.NameForVB);
             Assert.Equal("System.Object", reference.Fullname);
-            Assert.Equal("System.Object", reference.FullnameForCSharp);
-            Assert.Equal("System.Object", reference.FullnameForVB);
+            Assert.Null(reference.FullnameForCSharp);
+            Assert.Null(reference.FullnameForVB);
             Assert.True(reference.IsExternal);
             Assert.Equal("System", reference.Parent);
             Assert.Null(reference.Href);


Fixes ProcessorDoesNotBlockOnExporter (#368)

--- test/OpenTelemetry.Tests/Impl/Trace/Export/BatchingSpanProcessorTests.cs
+++ test/OpenTelemetry.Tests/Impl/Trace/Export/BatchingSpanProcessorTests.cs
@@ -223,8 +223,9 @@

         [Fact]
         public void ProcessorDoesNotBlockOnExporter()
-        {
-            var spanExporter = new TestExporter(_ => Thread.Sleep(500));
+        {
+            var resetEvent = new ManualResetEvent(false);
+            var spanExporter = new TestExporter(_ => resetEvent.WaitOne(TimeSpan.FromSeconds(10)));
             using (var factory = TracerFactory.Create(b => b
                 .AddProcessorPipeline(p => p
                     .SetExporter(spanExporter)
@@ -242,6 +243,8 @@

                 Assert.InRange(sw.Elapsed, TimeSpan.Zero, TimeSpan.FromMilliseconds(100));

+                resetEvent.Set();
+
                 var exported = WaitForSpans(spanExporter, 1, DefaultTimeout);

                 Assert.Single(exported);


Color

Color

--- ColorGL.cs
+++ ColorGL.cs
@@ -12,11 +12,11 @@
     public class ColorGL
     {
         private float r, g, b;
-        public float[] _Ambient = new float[] { 0f, 0f, 0f, 1.0f };
-        public float[] _Diffuse = new float[] { 0f, 0f, 0f, 1.0f };
-        public float[] _Emission = new float[] { 0f, 0f, 0f, 1.0f };
-        public float[] _Specular = new float[] { 0f, 0f, 0f, 1.0f };
-        public float[] _Shininess = new float[] { 0 }; // max 128
+        public readonly float[] _Ambient = new float[] { 0f, 0f, 0f, 1.0f };
+        public readonly float[] _Diffuse = new float[] { 0f, 0f, 0f, 1.0f };
+        public readonly float[] _Emission = new float[] { 0f, 0f, 0f, 1.0f };
+        public readonly float[] _Specular = new float[] { 0f, 0f, 0f, 1.0f };
+        public readonly float[] _Shininess = new float[] { 0 }; // max 128

         public ColorGL()
         {
@@ -138,5 +138,16 @@
             this._Specular[1] = s * this.g;
             this._Specular[2] = s * this.b;
         }
+
+        public ColorGL Clone()
+        {
+            return new ColorGL(
+                this._Ambient,
+                this._Diffuse,
+                this._Emission,
+                this._Specular,
+                this._Shininess[0]
+                );
+        }
     }
 }


Applied requested fixes which altered help text wording, added documentation and improved the code readability


[Toolkit.Graphics] Fixed issue #167: add flag to allow SpriteFont to dispose unmanaged resources from SpriteFontData.

--- Source/Toolkit/SharpDX.Toolkit.Graphics/SpriteFont.cs
+++ Source/Toolkit/SharpDX.Toolkit.Graphics/SpriteFont.cs
@@ -118,9 +118,17 @@
                                                                         new Vector2(1, 1),
                                                                     };

-        public static SpriteFont New(GraphicsDevice device, SpriteFontData spriteFontData)
-        {
-            return new SpriteFont(device, spriteFontData);
+        /// <summary>
+        /// Creates a new instance of the <see cref="SpriteFont"/> class from the specified <see cref="SpriteFontData"/>.
+        /// </summary>
+        /// <param name="device">The graphics device which will manage graphics resources of the created instance.</param>
+        /// <param name="spriteFontData">The font data to load from.</param>
+        /// <param name="disposeSpriteFontDataResources">true - if disposal of the created instance should dispose the unmanaged resources from the <paramref name="spriteFontData"/>,
+        ///  false - if the unmanaged resources should be disposed manually, default is false.</param>
+        /// <returns>The loaded <see cref="SpriteFont"/> instance.</returns>
+        public static SpriteFont New(GraphicsDevice device, SpriteFontData spriteFontData, bool disposeSpriteFontDataResources = false)
+        {
+            return new SpriteFont(device, spriteFontData, disposeSpriteFontDataResources);
         }

@@ -138,7 +146,9 @@
             var spriteFontData = SpriteFontData.Load(stream, bitmapDataLoader);
             if (spriteFontData == null)
                 return null;
-            return New(device, spriteFontData);
+            // the SpriteFontData is loaded here and will be used only in the current SpriteFont instance
+            // therefore it is safe to dispose it's Texture2D instances, if any.
+            return New(device, spriteFontData, true);
         }

         /// <summary>
@@ -166,7 +176,7 @@
                 return Load(device, stream, bitmapName => Texture2D.Load(device, Path.Combine(fileDirectory, bitmapName)));
         }

-        internal SpriteFont(GraphicsDevice device, SpriteFontData spriteFontData)
+        internal SpriteFont(GraphicsDevice device, SpriteFontData spriteFontData, bool disposeSpriteFontDataResources)
             : base(device)
         {
             drawGlyphDelegate = InternalDrawGlyph;
@@ -225,6 +235,8 @@
                 else if (bitmap.Data is Texture2D)
                 {
                     textures[i] = (Texture2D) bitmap.Data;
+                    if(disposeSpriteFontDataResources)
+                        ToDispose(textures[i]);
                 }
                 else
                 {


Removed exhibitdetails test temporarily

Removed exhibitdetails test temporarily


Don't add a column per item in the Mono virConnectOpenAuth example

--- examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
+++ examples/MonoDevelop/virConnectOpenAuth/MainWindow.cs
@@ -36,6 +36,10 @@
 		treeview1.AppendColumn(tvcDomains);

 		treeview1.Model = domainListStore;
+
+		CellRendererText crtDomainCell = new CellRendererText();
+		tvcDomains.PackStart(crtDomainCell, true);
+		tvcDomains.AddAttribute(crtDomainCell, "text", 0);
 	}

 	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
@@ -129,9 +133,6 @@
 	private void AddDomainInTreeView(string domainName)
 	{
 		domainListStore.AppendValues(domainName);
-		CellRendererText crtDomainCell = new CellRendererText();
-		tvcDomains.PackStart(crtDomainCell, true);
-		tvcDomains.AddAttribute(crtDomainCell, "text", 0);
 	}

     private static int AuthCallback(ref ConnectCredential[] creds, IntPtr cbdata)


Update #304 - Fix null reference exception that was picked up when no group is found

--- source/Glimpse.Core/Resource/ConfigurationResource.cs
+++ source/Glimpse.Core/Resource/ConfigurationResource.cs
@@ -184,21 +184,25 @@
             var result = new SortedDictionary<string, PackageItem<T>>();
             var otherPackage = new PackageItemDetail() { Name = "Other", Assembly = string.Empty };

-            foreach (var item in items)
-            {
-                var package = otherPackage;
-                if (packages.TryGetValue(item.GetType().Assembly.FullName, out package))
-                {
+            if (items != null)
+            {
+                foreach (var item in items)
+                {
+                    var package = (PackageItemDetail)null;
+                    if (!packages.TryGetValue(item.GetType().Assembly.FullName, out package))
+                    {
+                        package = otherPackage;
+                    }
+
+                    var entry = (PackageItem<T>)null;
+                    if (!result.TryGetValue(package.Assembly, out entry))
+                    {
+                        entry = result[package.Assembly] = new PackageItem<T>();
+                        entry.Package = package;
+                    }
+
+                    entry.Items.Add(item);
                 }
-
-                var entry = (PackageItem<T>)null;
-                if (!result.TryGetValue(package.Assembly, out entry))
-                {
-                    entry = result[package.Assembly] = new PackageItem<T>();
-                    entry.Package = package;
-                }
-
-                entry.Items.Add(item);
             }

             return result;


Null argument checks.

Null argument checks.


Added new tests for calling Register from multiple types and multiple threads


Don't go above the form tag when checking visibility


added link to "can i make it view" with recipe ID from recipe index passed as param to can I make it?


error en ListPicker value null

error en ListPicker value null


Update SymbolExtensions.cs

Update SymbolExtensions.cs


fixing null INavigationParameters

fixing null INavigationParameters


Fix issue with not replacing existing files, just writing over them


Add work in progress add remove time commands for TimeSpans


some more composition scale fixes

some more composition scale fixes


Fixed null reference exception

Fixed null reference exception


Add forgotten ShowEvent test

Add forgotten ShowEvent test

--- AllReadyApp/Web-App/AllReady.UnitTest/Controllers/EventControllerTests.cs
+++ AllReadyApp/Web-App/AllReady.UnitTest/Controllers/EventControllerTests.cs
@@ -45,9 +45,20 @@
             Assert.NotNull(attribute);
         }

-        [Fact(Skip="test forgotten")]
+        [Fact]
         public void ShowEventSendsShowEventQueryWithCorrectData()
-        {}
+        {
+            var builder = EventControllerBuilder.Instance();
+            var sut = builder.WithMediator().WithUserLogged().Build();
+
+            sut.ShowEvent(1);
+
+            builder
+                .MediatorMock
+                .Verify(x =>
+                    x.Send(It.Is<ShowEventQuery>(y =>
+                        y.EventId== 1 && y.User == sut.ControllerContext.HttpContext.User)));
+        }

         [Fact]
         public void ShowEventReturnsHttpNotFoundResultWhenViewModelIsNull()


Logger now logs errors a little better

Logger now logs errors a little better

--- Andromeda/Andromeda-Actions-Core/Infrastructure/Implementations/Logger.cs
+++ Andromeda/Andromeda-Actions-Core/Infrastructure/Implementations/Logger.cs
@@ -76,7 +76,7 @@
         {
             lock (Queue)
             {
-                Queue.Enqueue($"[{DateTime.Now}] {ErrorString} {msg}");
+                Queue.Enqueue($"[{DateTime.Now}] {ErrorString} {msg}| ERROR_MESSAGE:{e.Message}");
                 Queue.Enqueue($"[{DateTime.Now}] {StackTraceString} {e.StackTrace}");
             }
             _hasNewItems.Set();


-Fixed a leak in the TriangleMeshConvexContactManifold.

--- BEPUphysics/CollisionTests/Manifolds/TriangleMeshConvexContactManifold.cs
+++ BEPUphysics/CollisionTests/Manifolds/TriangleMeshConvexContactManifold.cs
@@ -405,7 +405,7 @@

-            candidatesToAdd.Clear();
+            candidatesToAdd.Dispose();

         }


ParticleSimulatorRenderer

ParticleSimulatorRenderer

--- Demos/CSharpGL.Demos/Form05ParticleSimulator/ParticleSimulatorRenderer.cs
+++ Demos/CSharpGL.Demos/Form05ParticleSimulator/ParticleSimulatorRenderer.cs
@@ -116,6 +116,8 @@

         protected override void DoRender(RenderEventArgs arg)
         {
+            float deltaTick = (float)random.NextDouble() * 5;
+            tick += (float)random.NextDouble() * 5;

             GL.BindBuffer(BufferTarget.UniformBuffer, attractor_buffer[0]);
             IntPtr attractors = GL.MapBufferRange(BufferTarget.UniformBuffer,


Added base documentation tothe ImmutableOrderedDictionary<TKey, TValue>, still need to modify interface methods to return this type instead of the internal dictionary's type.

--- HeaderArrayConverter/HeaderArrayConverter/ImmutableOrderedDictionary_2.cs
+++ HeaderArrayConverter/HeaderArrayConverter/ImmutableOrderedDictionary_2.cs
@@ -3,24 +3,55 @@
 using System.Collections.Generic;
 using System.Collections.Immutable;
 using System.Linq;
+using JetBrains.Annotations;

 namespace HeaderArrayConverter
 {
+    /// <summary>
+    /// Represents an immutable dictionary in which the insertion order is preserved.
+    /// </summary>
+    /// <typeparam name="TKey">
+    /// The key type.
+    /// </typeparam>
+    /// <typeparam name="TValue">
+    /// The item type.
+    /// </typeparam>
+    [PublicAPI]
     public class ImmutableOrderedDictionary<TKey, TValue> : IImmutableDictionary<TKey, TValue>
     {
-        private IImmutableDictionary<TKey, TValue> _dictionary;
-
-        private IImmutableList<KeyValuePair<TKey, TValue>> _items;
-
+        [NotNull]
+        private readonly IImmutableDictionary<TKey, TValue> _dictionary;
+
+        [NotNull]
+        private readonly IImmutableList<KeyValuePair<TKey, TValue>> _items;
+
+        /// <summary>
+        /// Gets the number of elements in the collection.
+        /// </summary>
         public int Count => _dictionary.Count;

+        /// <summary>
+        /// Gets the element that has the specified key in the read-only dictionary.
+        /// </summary>
         public TValue this[TKey key] => _dictionary[key];

+        /// <summary>
+        /// Gets an enumerable collection that contains the keys in the read-only dictionary.
+        /// </summary>
         public IEnumerable<TKey> Keys => _dictionary.Keys;

+        /// <summary>
+        /// Gets an enumerable collection that contains the values in the read-only dictionary.
+        /// </summary>
         public IEnumerable<TValue> Values => _dictionary.Values;

-        public ImmutableOrderedDictionary(IEnumerable<KeyValuePair<TKey, TValue>> source)
+        /// <summary>
+        /// Constructs an <see cref="ImmutableOrderedDictionary{TKey, TValue}"/> in which the insertion order is preserved.
+        /// </summary>
+        /// <param name="source">
+        /// The collection from which to create the
+        /// </param>
+        public ImmutableOrderedDictionary([NotNull] IEnumerable<KeyValuePair<TKey, TValue>> source)
         {
             if (source is null)
             {
@@ -31,6 +62,17 @@
             _dictionary = _items.ToImmutableDictionary(x => x.Key, x => x.Value);
         }

+        /// <summary>
+        /// Creates an <see cref="ImmutableOrderedDictionary{TKey, TValue}"/> from the collection.
+        /// </summary>
+        /// <param name="source">
+        /// The source collection.
+        /// </param>
+        /// <returns>
+        /// An <see cref="ImmutableOrderedDictionary{TKey, TValue}"/> created from the collection.
+        /// </returns>
+        [Pure]
+        [NotNull]
         public static ImmutableOrderedDictionary<TKey, TValue> Create(IEnumerable<KeyValuePair<TKey, TValue>> source)
         {
             if (source is null)
@@ -41,66 +83,183 @@
             return new ImmutableOrderedDictionary<TKey, TValue>(source);
         }

+        /// <summary>
+        /// Returns an enumerator that iterates through the collection.
+        /// </summary>
+        /// <returns>
+        /// An enumerator that can be used to iterate through the collection.
+        /// </returns>
         public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
         {
             return _items.GetEnumerator();
         }

+        /// <summary>
+        /// Returns an enumerator that iterates through the collection.
+        /// </summary>
+        /// <returns>
+        /// An enumerator that can be used to iterate through the collection.
+        /// </returns>
         IEnumerator IEnumerable.GetEnumerator()
         {
             return _items.GetEnumerator();
         }
-
+
+        /// <summary>
+        /// Determines whether the read-only dictionary contains an element that has the specified key.
+        /// </summary>
+        /// <param name="key">
+        /// The key to locate.
+        /// </param>
+        /// <returns>
+        /// True if the read-only dictionary contains an element that has the specified key; otherwise, false.
+        /// </returns>
         public bool ContainsKey(TKey key)
         {
             return _dictionary.ContainsKey(key);
         }

+        /// <summary>
+        /// Gets the value that is associated with the specified key.
+        /// </summary>
+        /// <param name="key">
+        /// The key to locate.
+        /// </param>
+        /// <param name="value">
+        /// When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the <paramref name="value" /> parameter. This parameter is passed uninitialized.
+        /// </param>
+        /// <returns>
+        /// True if the object that implements the <see cref="System.Collections.Generic.IReadOnlyDictionary{TKey, TValue}"/> interface contains an element that has the specified key; otherwise, false.
+        /// </returns>
         public bool TryGetValue(TKey key, out TValue value)
         {
             return _dictionary.TryGetValue(key, out value);
         }

+        /// <summary>
+        /// Gets an empty dictionary with equivalent ordering and key/value comparison rules.
+        /// </summary>
         public IImmutableDictionary<TKey, TValue> Clear()
         {
             return _dictionary.Any() ? Create(Enumerable.Empty<KeyValuePair<TKey, TValue>>()) : this;
         }

+        /// <summary>
+        /// Searches the dictionary for a given key and returns the equal key it finds, if any.
+        /// </summary>
+        /// <param name="equalKey">
+        /// The key to search for.
+        /// </param>
+        /// <param name="actualKey">
+        /// The key from the dictionary that the search found, or <paramref name="equalKey" /> if the search yielded no match.
+        /// </param>
+        /// <returns>
+        /// A value indicating whether the search was successful.
+        /// </returns>
         public bool TryGetKey(TKey equalKey, out TKey actualKey)
         {
             return _dictionary.TryGetKey(equalKey, out actualKey);
         }

+        /// <summary>
+        /// Adds the specified key and value to the dictionary.
+        /// </summary>
+        /// <param name="key">
+        /// The key of the entry to add.
+        /// </param>
+        /// <param name="value">
+        /// The value of the entry to add.
+        /// </param>
+        /// <returns>
+        /// The new dictionary containing the additional key-value pair.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> Add(TKey key, TValue value)
         {
             return _dictionary.Add(key, value);
         }

+        /// <summary>
+        /// Adds the specified key-value pairs to the dictionary.
+        /// </summary>
+        /// <param name="pairs"
+        /// >The pairs to add.
+        /// </param>
+        /// <returns>
+        /// The new dictionary containing the additional key-value pairs.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> AddRange(IEnumerable<KeyValuePair<TKey, TValue>> pairs)
         {
             return _dictionary.AddRange(pairs);
         }

+        /// <summary>
+        /// Sets the specified key and value to the dictionary, possibly overwriting an existing value for the given key.
+        /// </summary>
+        /// <param name="key">
+        /// The key of the entry to add.
+        /// </param>
+        /// <param name="value">
+        /// The value of the entry to add.
+        /// </param>
+        /// <returns>
+        /// The new dictionary containing the additional key-value pair.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> SetItem(TKey key, TValue value)
         {
             return _dictionary.SetItem(key, value);
         }

+        /// <summary>
+        /// Applies a given set of key=value pairs to an immutable dictionary, replacing any conflicting keys in the resulting dictionary.
+        /// </summary>
+        /// <param name="items">
+        /// The key=value pairs to set on the dictionary.  Any keys that conflict with existing keys will overwrite the previous values.
+        /// </param>
+        /// <returns>
+        /// An immutable dictionary.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> SetItems(IEnumerable<KeyValuePair<TKey, TValue>> items)
         {
             return _dictionary.SetItems(items);
         }

+        /// <summary>
+        /// Removes the specified keys from the dictionary with their associated values.
+        /// </summary>
+        /// <param name="keys">
+        /// The keys to remove.
+        /// </param>
+        /// <returns>
+        /// A new dictionary with those keys removed; or this instance if those keys are not in the dictionary.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> RemoveRange(IEnumerable<TKey> keys)
         {
             return _dictionary.RemoveRange(keys);
         }

+        /// <summary>
+        /// Removes the specified key from the dictionary with its associated value.
+        /// </summary>
+        /// <param name="key">
+        /// The key to remove.
+        /// </param>
+        /// <returns>
+        /// A new dictionary with the matching entry removed; or this instance if the key is not in the dictionary.
+        /// </returns>
         public IImmutableDictionary<TKey, TValue> Remove(TKey key)
         {
             return _dictionary.Remove(key);
         }

+        /// <summary>
+        /// Determines whether this dictionary contains the specified key-value pair.
+        /// </summary>
+        /// <param name="pair">
+        /// The key value pair.
+        /// </param>
+        /// <returns>
+        /// True if this dictionary contains the key-value pair; otherwise, false.
+        /// </returns>
         public bool Contains(KeyValuePair<TKey, TValue> pair)
         {
             return _dictionary.Contains(pair);


Also notifies that count has changed.

Also notifies that count has changed.

--- IX.Observable/FilterableObservableMasterSlaveCollection{TItem,TFilter}.cs
+++ IX.Observable/FilterableObservableMasterSlaveCollection{TItem,TFilter}.cs
@@ -73,6 +73,7 @@
                 this.AsyncPost(() =>
                 {
                     this.OnCollectionChanged();
+                    this.OnPropertyChanged(nameof(this.Count));
                     this.OnPropertyChanged(Constants.ItemsName);
                 });
             }


Now the enemies move allmost correctly.

Now the enemies move allmost correctly.

--- ImpactMan/ImpactMan/ArtificialIntelligence/EnemyArtificialIntelligence.cs
+++ ImpactMan/ImpactMan/ArtificialIntelligence/EnemyArtificialIntelligence.cs
@@ -35,25 +35,15 @@
                     continue;
                 }

-                int currentKey = 0;
-                while (true)
+                int currentKey = this.random.Next(0, 4);
+                Keys key = this.directionKeys[currentKey];
+                while (!enemy.TryUpdate(gameTime, new KeyboardState(key), this.level))
                 {
-                    Keys key = this.directionKeys[currentKey++];
-                    int indexOfKey = this.directionKeys.IndexOf(key);
-                    if (this.enemiesAndCurrentDirections.ContainsKey(enemy) &&
-                        this.enemiesAndCurrentDirections[enemy].Equals(this.directionKeys[(indexOfKey + 2) % this.directionKeys.Count]))
-                    {
-                        continue;
-                    }
+                    currentKey = this.random.Next(0, 4);
+                    key = this.directionKeys[currentKey];
+                }

-                    bool enemyMovedSuccessfully = enemy.TryUpdate(gameTime, new KeyboardState(key), this.level);
-
-                    if (enemyMovedSuccessfully)
-                    {
-                        this.enemiesAndCurrentDirections[enemy] = key;
-                        break;
-                    }
-                }
+                this.enemiesAndCurrentDirections[enemy] = key;
             }
         }
     }


Update a-t4-template-to-get-all-css-class-names.cshtml

--- Somedave/Views/Blog/Posts/a-t4-template-to-get-all-css-class-names.cshtml
+++ Somedave/Views/Blog/Posts/a-t4-template-to-get-all-css-class-names.cshtml
@@ -5,7 +5,7 @@
     Tags = new[] { "t4", "css" };
 }

-
This post combines two of my favorite things: meta-programming and the elimination of magic strings. The goal is to automatically generate a class with static const strings containing the name of all the CSS classes in your CSS files. Why would you want to do this? There are a number of reasons. First, it helps eliminate magic strings from your view code. Instead of writing <p class="my-class"> you can write <p class="@@Css.MyClass">. It also helps when writing view code because you'll have access to IntelliSense data for all of your CSS classes, making it easier to remember their names and avoid mistakes. Finally, it improves analysis and refactoring because you can now rely on code engines to locate and operate on uses of a particular const string instead of just plain-text searching.

+
This post combines two of my favorite things: meta-programming and the elimination of magic strings. The goal is to automatically generate a class with static const strings containing the name of all the CSS classes in your CSS files. Why would you want to do this? There are a number of reasons. First, it helps eliminate magic strings from your view code. Instead of writing <p class="my-class"> you can write <p class="@@Css.MyClass">. It also helps when writing view code because you'll have access to IntelliSense data for all of your CSS classes, making it easier to remember their names and avoid mistakes. Finally, it improves analysis and refactoring because you can now rely on code engines  to locate and operate on uses of a particular const string instead of just plain-text searching.

To accomplish this, we're going to use a T4 template. If you're not familiar with T4 templates, they're a technology that was added to Visual Studio and are "a mixture of text blocks and control logic that can generate a text file". In short, they let you create code or other content for your application before compile time. They're very powerful, but are also a little like salting your food: a little bit goes a long way and you don't want to use too much.

@@ -73,4 +73,4 @@
 		}
 		WriteLine("}");
 	}
-#>
+#>


PhasorWebUI: Fixed PDC main acronym load during edit mode.

--- Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
+++ Source/Libraries/Adapters/PhasorWebUI/Views/AddSynchrophasorDevice.cshtml
@@ -480,6 +480,7 @@

         function DeviceViewModel() {
             const self = this;
+            const defaultDeviceAcronym = "DEVICEACRONYM";

             // Observable fields
             self.voltages = ko.observableArray();
@@ -494,7 +495,7 @@

             // Internal fields
             self._addTagsAsVirtualPoints = ko.observable(undefined);
-            self._deviceAcronym = ko.observable("DEVICEACRONYM");
+            self._deviceAcronym = ko.observable(defaultDeviceAcronym);
             self._deviceName = ko.observable("Device Name");
             self._instanceName = ko.observable("");
             self._templateType = ko.observable("");
@@ -705,14 +706,16 @@
                     return 0;
                 });

-                let deviceAcronym = configFrame.IDLabel;
-
-                if (isEmpty(deviceAcronym) && !isEmpty(configFrame.StationName))
-                    deviceAcronym = getCleanAcronym(configFrame.StationName.toUpperCase().replaceAll(" ", "_"));
-                else
-                    deviceAcronym = "DEVICEACRONYM";
-
-                self.deviceAcronym(deviceAcronym);
+                if (isEmpty(self.deviceAcronym()) || self.deviceAcronym() === defaultDeviceAcronym) {
+                    let deviceAcronym = configFrame.IDLabel;
+
+                    if (isEmpty(deviceAcronym) && !isEmpty(configFrame.StationName))
+                        deviceAcronym = getCleanAcronym(configFrame.StationName.toUpperCase().replaceAll(" ", "_"));
+                    else
+                        deviceAcronym = defaultDeviceAcronym;
+
+                    self.deviceAcronym(deviceAcronym);
+                }

                 if (!isEmpty(configFrame.StationName))
                     self.deviceName(configFrame.StationName);
@@ -912,7 +915,7 @@
                 voltage.FirstVoltage = firstVoltage;
                 voltage.Enabled = ko.observable(true);
                 voltage.TagName = updateTagName(function () {
-                    return phasorHub.createPhasorPointTag(self.deviceAcronym(), vphmSignalType.Acronym, voltage.Label(), voltage.Phase(), phasorDefinition.SourceIndex, voltage.NominalVoltage());
+                    return phasorHub.createPhasorPointTag(voltage.Device.IDLabel(), vphmSignalType.Acronym, voltage.Label(), voltage.Phase(), phasorDefinition.SourceIndex, voltage.NominalVoltage());
                 }, voltage);

                 voltage.Label.extend({ required: true });
@@ -997,7 +1000,7 @@
                 });

                 current.TagName = updateTagName(function () {
-                    return phasorHub.createPhasorPointTag(self.deviceAcronym(), iphmSignalType.Acronym, current.Label(), current.Phase(), phasorDefinition.SourceIndex, current.AssociatedVoltage());
+                    return phasorHub.createPhasorPointTag(current.Device.IDLabel(), iphmSignalType.Acronym, current.Label(), current.Phase(), phasorDefinition.SourceIndex, current.AssociatedVoltage());
                 }, current);

                 current.DeviceVoltages = ko.pureComputed({
@@ -2595,6 +2598,7 @@

             phasorHub.queryDeviceByID(id).done(function (device) {
                 $("#editDeviceName").html("Editing " + device.Acronym);
+                viewModel.deviceAcronym(device.Acronym);
             })
             .fail(function (error) {
                 showErrorMessage(String.format("Failed to load existing device \"{0}\": {1}", id, error));
@@ -2956,7 +2960,7 @@

-

+

@@ -3024,7 +3028,7 @@

-

+


Fixed refference in MeterDataQualityOverride

--- Source/Libraries/FaultData/DataOperations/GTC/MeterDataQualityOverride.cs
+++ Source/Libraries/FaultData/DataOperations/GTC/MeterDataQualityOverride.cs
@@ -62,7 +62,7 @@
             {
                 DataGroup dataGroup = cycleDataResource.DataGroups[i];
                 VIDataGroup viDataGroup = cycleDataResource.VIDataGroups[i];
-                double llPeakNominalVoltage = dataGroup.Line.VoltageKV * 1000.0D * Math.Sqrt(2.0D);
+                double llPeakNominalVoltage = dataGroup.Asset.VoltageKV * 1000.0D * Math.Sqrt(2.0D);
                 double lnPeakNominalVoltage = llPeakNominalVoltage / Math.Sqrt(3.0D);

                 // Nominal multipliers used for first derivative, based on:


EQB-161 [Orders] Budget payment method not displayed on Order Details page

--- Sources/EPiServer.Reference.Commerce.Site/Views/OrderDetails/Index.cshtml
+++ Sources/EPiServer.Reference.Commerce.Site/Views/OrderDetails/Index.cshtml
@@ -19,12 +19,12 @@

                             @Html.Translate("/OrderHistory/Labels/Status") @(Model.OrderStatus)

-                            @Html.Translate("/OrderHistory/Labels/Payment")
                             @if (orderForm.Payments.Any())
                             {
+                                Html.Translate("/OrderHistory/Labels/Payment");
                                 string.Join(", ", orderForm.Payments.Select(x => x.PaymentMethodName));
+

                             }
-

                             @if (Model.PurchaseOrder.Properties[Constants.Quote.QuoteStatus] != null && Model.PurchaseOrder.Properties[Constants.Quote.QuoteStatus].ToString().Equals("RequestQuotationFinished"))
                             {
                                 @Html.DisplayName("Old Total")  @Model.PurchaseOrder.GetTotal().ToString()


Fix compiler errors

Fix compiler errors

--- StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers.Test/NamingRules/SA1308UnitTests.cs
@@ -87,6 +87,7 @@
         /// <summary>
         /// This is a regression test for DotNetAnalyzers/StyleCopAnalyzers#627.
         /// </summary>
+        /// <param name="prefix">The prefix to repeat in the variable name.</param>
         /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
         /// <seealso href="https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/627">#627: Code Fixes For Naming
         /// Rules SA1308 and SA1309 Do Not Always Fix The Name Entirely</seealso>
@@ -99,9 +100,10 @@
     private string {prefix}{prefix}bar = ""baz"";
 }}";

-            DiagnosticResult expected =
-                this.CSharpDiagnostic()
-                .WithArguments($"{prefix}{prefix}bar", prefix)
+            string diagnosticPrefix = prefix.Replace("\\u005F", "_");
+            DiagnosticResult expected =
+                this.CSharpDiagnostic()
+                .WithArguments($"{prefix}{prefix}bar", diagnosticPrefix)
                 .WithLocation(3, 20);

             await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
@@ -125,6 +127,7 @@
                 .WithLocation(3, 20);

             await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
+
             // A code fix is not offered as removing the prefixes would create an empty identifier.
             await this.VerifyCSharpFixAsync(testCode, testCode).ConfigureAwait(false);
         }
@@ -132,6 +135,8 @@
         /// <summary>
         /// This is a regression test for DotNetAnalyzers/StyleCopAnalyzers#627.
         /// </summary>
+        /// <param name="prefixes">The prefixes to prepend to the variable name.</param>
+        /// <param name="diagnosticPrefix">The prefix that should be reported in the diagnostic.</param>
         /// <returns>A <see cref="Task"/> representing the asynchronous unit test.</returns>
         /// <seealso href="https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/627">#627: Code Fixes For Naming
         /// Rules SA1308 and SA1309 Do Not Always Fix The Name Entirely</seealso>
@@ -146,7 +151,7 @@

             DiagnosticResult expected =
                 this.CSharpDiagnostic()
-                .WithArguments($"{prefixes}bar", firstPrefix)
+                .WithArguments($"{prefixes}bar", diagnosticPrefix)
                 .WithLocation(3, 20);

             await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
@@ -166,12 +171,13 @@

             DiagnosticResult expected =
                 this.CSharpDiagnostic()
-                .WithArguments(prefixes, firstPrefix)
-                .WithLocation(3, 20);
-
-            await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
+                .WithArguments(prefixes, diagnosticPrefix)
+                .WithLocation(3, 20);
+
+            await this.VerifyCSharpDiagnosticAsync(testCode, expected, CancellationToken.None).ConfigureAwait(false);
+
             // A code fix is not offered as removing the prefixes would create an empty identifier.
-            await this.VerifyCSharpFixAsync(testCode, fixedCode).ConfigureAwait(false);
+            await this.VerifyCSharpFixAsync(testCode, testCode).ConfigureAwait(false);
         }

         protected override IEnumerable<DiagnosticAnalyzer> GetCSharpDiagnosticAnalyzers()


This class has been moved to the Subtext.Web.Controls project

--- SubtextSystem/SubtextSolution/SubtextProject.Website/Controls/MenuItem.cs
+++ SubtextSystem/SubtextSolution/SubtextProject.Website/Controls/MenuItem.cs
@@ -1,196 +0,0 @@
-using System;
-using System.Web.UI.HtmlControls;
-using SubtextProject.Website.Text;
-
-namespace SubtextProject.Website.Controls
-{
-	///
-	/// Simple control used to render an anchor tag surrounded by a list item tag
-	/// for purposes of creating a menu.  It will not render an HREF when the HREF
-	/// points to the same page this page references.
-	///
-	public class MenuItem : HtmlContainerControl
-	{
-		///
-		/// Renders this menu item.
-		///
-		/// <param name="writer">Writer.</param>
-		protected override void Render(System.Web.UI.HtmlTextWriter writer)
-		{
-			string format = "
{4}
";
-
-			string cssClass = string.Empty;
-			string hrefString = string.Empty;
-			if(IsOnThisMenusPage && HighlightCssClass.Length > 0)
-			{
-				cssClass = string.Format(" class=\"{0}\"", HighlightCssClass);
-			}
-			else
-			{
-				hrefString = " href=\"" + Href + "\"";
-			}
-
-			string idText = string.Empty;
-			if(IsAttributeDefined("id"))
-				idText = " id=\"" + Attributes["id"] + "\"";
-
-			writer.Write(string.Format(format, cssClass, idText, hrefString, Title, Text));
-		}
-
-		bool IsAttributeDefined(string name)
-		{
-			return	(this.Attributes[name] != null && this.Attributes[name].Length > 0);
-		}
-
-		///
-		/// Gets or sets the text.
-		///
-		/// <value></value>
-		public string Text
-		{
-			get
-			{
-				return this.InnerText;
-			}
-			set
-			{
-				this.InnerText = value;
-			}
-		}
-
-		///
-		/// Gets or sets the title.
-		///
-		/// <value></value>
-		public string Title
-		{
-			get
-			{
-				if(IsAttributeDefined("title"))
-					return Attributes["title"];
-				else
-					return string.Empty;
-			}
-			set
-			{
-				Attributes["title"] = value;
-			}
-		}
-
-		///
-		/// Gets or sets the CSS used to highlight this item.
-		///
-		/// <value></value>
-		public string HighlightCssClass
-		{
-			get
-			{
-				if(IsAttributeDefined("highlightclass"))
-				  return Attributes["highlightclass"];
-			  else
-				  return "current";
-			}
-			set
-			{
-				Attributes["highlightclass"] = value;
-			}
-		}
-
-		///
-		/// Gets or sets the href.
-		///
-		/// <value></value>
-		public string Href
-		{
-			get
-			{
-				if(IsAttributeDefined("href"))
-				{
-					return ConvertToAppPath(Attributes["href"]);
-				}
-				else
-				{
-					return string.Empty;
-				}
-			}
-			set
-			{
-				Attributes["href"] = value;
-			}
-		}
-
-		//Without the Default.aspx
-		string CurrentRequestPath
-		{
-			get
-			{
-				return StringHelper.LeftBefore(Context.Request.Path, "Default.aspx", false);
-			}
-		}
-
-		// This is the url that is the parent of this menu item.
-		// For example, if this is a link in the about section
-		// /about/somefolder/mypage.aspx
-		// Then the parent Path would be /about/
-		public string ParentPath
-		{
-			get
-			{
-				if(IsAttributeDefined("parentpath"))
-					return ConvertToAppPath(Attributes["parentpath"]);
-				else
-					return ConvertToAppPath("~/");
-			}
-			set
-			{
-				Attributes["parentpath"] = value;
-			}
-		}
-
-		string ConvertToAppPath(string path)
-		{
-			string reference = path;
-			if(reference.Substring(0, 2) == "~/")
-			{
-				string appPath = Context.Request.ApplicationPath;
-				if(appPath.EndsWith("/"))
-				{
-					appPath = StringHelper.Left(appPath, appPath.Length - 1);
-				}
-				return appPath + reference.Substring(1);
-			}
-			return path;
-		}
-
-		///
-		/// Returns true if the current request corresponds to this menu
-		/// item's page.  This tells us whether or not this control should
-		/// be rendered as a link.
-		///
-		/// <value>
-		/// 	<c>true</c> if [is on this menus page]; otherwise, <c>false</c>.
-		/// </value>
-		public bool IsOnThisMenusPage
-		{
-			get
-			{
-				// If control points to /about/ and we're on /about/default.aspx
-				// then this is true.
-				if(CurrentRequestPath == ParentPath && ParentPath == Href)
-					return true;
-
-				// The reference must be longer than Parent Path This ensures that
-				// if we're pointing to /about/ and our parent is /about/, but are
-				// in the page /about/folder/default.aspx, we don't highlight this
-				// item.
-				// We would highlight it if our parent was /
-				bool referenceLongEnough = Href.Length > ParentPath.Length;
-
-				// Make sure the reference is part of the request path now.
-				bool referenceInRequestPath = StringHelper.IndexOf(CurrentRequestPath, Href, false) > -1;
-
-				return referenceLongEnough && referenceInRequestPath;
-			}
-		}
-	}
-}


Remove email sending from poll creation

Remove email sending from poll creation

When creating a poll, you're either anonymous, in which case we don't
have an email, so we can't send one, or you're logged in, so you'll see
the poll etc. on the dashboard. Thus the attempt to send an email on
creation is redundant (and will actually crash as it's always assuming
there's an email address!).

--- VotingApplication/VotingApplication.Web/Api/Controllers/PollController.cs
+++ VotingApplication/VotingApplication.Web/Api/Controllers/PollController.cs
@@ -3,9 +3,6 @@
 using System.Data.Entity;
 using System.Linq;
 using System.Net;
-using System.Net.Http;
-using System.Threading;
-using System.Web.Configuration;
 using System.Web.Http;
 using VotingApplication.Data.Context;
 using VotingApplication.Data.Model;
@@ -58,7 +55,7 @@
                 ManageId = Guid.NewGuid(),
                 Name = pollCreationRequest.Name,
                 Creator = pollCreationRequest.Creator,
-                PollType = pollCreationRequest.VotingStrategy != null &&
+                PollType = pollCreationRequest.VotingStrategy != null &&
                            Enum.IsDefined(typeof(PollType), pollCreationRequest.VotingStrategy) ?
                                 (PollType)Enum.Parse(typeof(PollType), pollCreationRequest.VotingStrategy, true) : PollType.Basic,
                 Options = new List<Option>(),
@@ -108,8 +105,7 @@

         #endregion

-        #region Post
-
+        [HttpPost]
         public PollCreationResponseModel Post(PollCreationRequestModel pollCreationRequest)
         {
             #region Input Validation
@@ -131,8 +127,6 @@

             #endregion

-            #region DB Object Creation
-
             Poll newPoll = ModelToPoll(pollCreationRequest);

             using (var context = _contextFactory.CreateContext())
@@ -141,13 +135,6 @@
                 context.SaveChanges();
             }

-            #endregion
-
-            Thread newThread = new Thread(new ThreadStart(() => SendCreateEmail(pollCreationRequest.Email, newPoll.UUID, newPoll.ManageId)));
-            newThread.Start();
-
-            #region Response
-
             PollCreationResponseModel response = new PollCreationResponseModel
             {
                 UUID = newPoll.UUID,
@@ -155,27 +142,6 @@
             };

             return response;
-
-            #endregion
         }
-
-        private void SendCreateEmail(string email, Guid UUID, Guid manageId)
-        {
-            String hostUri = WebConfigurationManager.AppSettings["HostURI"];
-            if (hostUri == String.Empty)
-            {
-                return;
-            }
-
-            string message = String.Join("\n\n", new List<string>()
-                {"Your poll is now created and ready to go!",
-                 "You can invite people to vote by giving them this link: " + hostUri + "/Poll/Index/" + UUID,
-                 "You can administer your poll at "+ hostUri + "/Manage/Index/" + manageId,
-                 "(Don't share this link around!)"});
-
-            _mailSender.SendMail(email, "Your poll is ready!", message);
-        }
-
-        #endregion
     }
 }


CA-107341:  Truncation issue occurred on rolling pool upgrade window.

Truncated pool and host names on the Ready to Upgrade page to 64 characters, which resolves the layout problem from extremely long names.

--- XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeReadyToUpgradePage.cs
+++ XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeReadyToUpgradePage.cs
@@ -64,14 +64,14 @@
                 {
                     e.Graphics.DrawString(string.Format(host.IsMaster()
                                                             ? Messages.UPGRADE_POOL_MASTER_X
-                                                            : Messages.UPGRADE_SERVER_X, host.Name), Program.DefaultFont, brush, e.Bounds);
+                                                            : Messages.UPGRADE_SERVER_X, host.Name.Ellipsise(64)), Program.DefaultFont, brush, e.Bounds);
                     return;
                 }

                 Pool pool = item as Pool;
                 if (pool != null)
                 {
-                    e.Graphics.DrawString(string.Format(Messages.POOL_X_READYUPGRADE, pool.Name), Program.DefaultFontBold, brush, e.Bounds);
+                    e.Graphics.DrawString(string.Format(Messages.POOL_X_READYUPGRADE, pool.Name.Ellipsise(64)), Program.DefaultFontBold, brush, e.Bounds);
                     return;
                 }


CA-293687: Remove redundant check

CA-293687: Remove redundant check

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs
+++ XenAdmin/Wizards/RollingUpgradeWizard/RollingUpgradeWizardPrecheckPage.cs
@@ -166,7 +166,6 @@

             //HA checks - for each pool
             var haChecks = (from Host server in SelectedMasters
-                where server.IsMaster()
                 select new HAOffCheck(server) as Check).ToList();
             groups.Add(new CheckGroup(Messages.CHECKING_HA_STATUS, haChecks));

@@ -217,7 +216,6 @@
             if (ApplyUpdatesToNewVersion)
             {
                 var automatedUpdateChecks = (from Host server in SelectedMasters
-                    where server.IsMaster()
                     select new AutomatedUpdatesLicenseCheck(server) as Check).ToList();

                 automatedUpdateChecks.Add(new CfuAvailabilityCheck());


More Rcon fixes

More Rcon fixes

--- UnityProject/Assets/Scripts/RCON/RconManager.cs
+++ UnityProject/Assets/Scripts/RCON/RconManager.cs
@@ -94,7 +94,7 @@
             httpServer.UserCredentialsFinder = id =>
             {
                 var name = id.Name;
-				Debug.Log("ATTEMPT AUTH: " + id.Name);
+				Debug.Log("ATTEMPT AUTH");
                 return name == config.RconPass
                 ? new NetworkCredential("admin" , null, "admin")
                 : null;
@@ -102,8 +102,6 @@

 			httpServer.SslConfiguration.ClientCertificateValidationCallback =
 			(sender, certificate, chain, sslPolicyErrors) => {
-				Debug.Log("Validate: issuer: " + certificate.Issuer);
-				Debug.Log("SSL errors: " + sslPolicyErrors.GetDescription().ToString());
 			return true;
 			};
 			httpServer.Start();
@@ -193,6 +191,9 @@

 		public static string GetFullChatLog()
 		{
+			if(string.IsNullOrEmpty(ChatLog)){
+				return "No one has said anything yet..";
+			}
 			return ChatLog;
 		}
     }


CreateFromTask

CreateFromTask

--- WalletWasabi.Gui/Shell/Commands/DiskCommands.cs
+++ WalletWasabi.Gui/Shell/Commands/DiskCommands.cs
@@ -18,9 +18,9 @@
 		{
 			var onOpenDataFolder = ReactiveCommand.Create(OnOpenDataFolder);
 			var onOpenWalletsFolder = ReactiveCommand.Create(OnOpenWalletsFolder);
-			var onOpenLogFile = ReactiveCommand.Create(OnOpenLogFileAsync);
-			var onOpenTorLogFile = ReactiveCommand.Create(OnOpenTorLogFileAsync);
-			var onOpenConfigFile = ReactiveCommand.Create(OnOpenConfigFileAsync);
+			var onOpenLogFile = ReactiveCommand.CreateFromTask(OnOpenLogFileAsync);
+			var onOpenTorLogFile = ReactiveCommand.CreateFromTask(OnOpenTorLogFileAsync);
+			var onOpenConfigFile = ReactiveCommand.CreateFromTask(OnOpenConfigFileAsync);

 			Observable
 				.Merge(onOpenConfigFile.ThrownExceptions)


Fixed another snippet-tag typo.

Fixed another snippet-tag typo.

--- dotnetv3/Cognito/scenarios/Cognito_Basics/Cognito_MVP/GlobalUsings.cs
+++ dotnetv3/Cognito/scenarios/Cognito_Basics/Cognito_MVP/GlobalUsings.cs
@@ -1,6 +1,9 @@
-// snippet-start:[dotnetv3.Cognito_MVP.Usings]
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier:  Apache-2.0
+
+// snippet-start:[dotnetv3.Cognito_MVP.Usings]
 global using Amazon;
 global using Amazon.CognitoIdentityProvider;
 global using Amazon.CognitoIdentityProvider.Model;
 global using Cognito_MVP;
-// snippet-end:[dotnetv3.Cognito_MVP.Usings]+// snippet-end:[dotnetv3.Cognito_MVP.Usings]


Updated formatter to include sealed and hidden state of ct

--- Core/OfficeDevPnP.Core/Framework/Provisioning/Providers/Xml/XMLPnPSchemaV201605Formatter.cs
+++ Core/OfficeDevPnP.Core/Framework/Provisioning/Providers/Xml/XMLPnPSchemaV201605Formatter.cs
@@ -490,6 +490,8 @@
                          Description = ct.Description,
                          Group = ct.Group,
                          Name = ct.Name,
+                         Hidden = ct.Hidden,
+                         Sealed = ct.Sealed,
                          FieldRefs = ct.FieldRefs.Count > 0 ?
                          (from fieldRef in ct.FieldRefs
                           select new V201605.ContentTypeFieldRef


Nm about the triangle list resizing mistake, I had read the code wrong initially.

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@285 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Axiom/Engine/Graphics/EdgeListBuilder.cs
+++ Axiom/Engine/Graphics/EdgeListBuilder.cs
@@ -204,8 +204,7 @@
                 float* pReal = null;

                 // iterate over all the groups of 3 indices
-                // TODO: Ogre has this as count + iterations, warn them
-                edgeData.triangles.Capacity = edgeData.triangles.Count * iterations;
+                edgeData.triangles.Capacity = edgeData.triangles.Count + iterations;

                 for(int t = 0; t < iterations; t++) {
                     EdgeData.Triangle tri = new EdgeData.Triangle();


Refactor

Refactor

--- AzureBatchSample/TaskWebJob/Functions.cs
+++ AzureBatchSample/TaskWebJob/Functions.cs
@@ -11,22 +11,7 @@
     public static class Functions
     {
         [NoAutomaticTrigger]
-        public static void RecordTime(
-            DateTime startTime,
-            IBinder binder,
-            TextWriter logger)
-        {
-            var dt = $"{startTime:yyyyMMdd-HHmmss}";
-
-            var blobAttribute = new BlobAttribute($"output/{dt}");
-            var blob = binder.Bind<CloudBlockBlob>(blobAttribute);
-            blob.UploadText(dt);
-
-            logger.WriteLine(dt);
-        }
-
-        [NoAutomaticTrigger]
-        public static void RecordTimeAndSleep(
+        public static void RecordTimeTest(
             DateTime startTime,
             IBinder binder,
             TextWriter logger)
@@ -39,28 +24,28 @@
             blob.UploadText(start);
             logger.WriteLine(start);

+            //RecordTime(start, blob, logger);
+            //RecordTimeAndSleep(start, blob, logger);
+            RecordTimes(start, blob, logger);
+        }
+
+        public static void RecordTime(string startString, CloudBlockBlob blob, TextWriter logger)
+        {
+        }
+
+        public static void RecordTimeAndSleep(string startString, CloudBlockBlob blob, TextWriter logger)
+        {
             Thread.Sleep(10 * 60 * 1000);
         }

-        [NoAutomaticTrigger]
-        public static void RecordTimes(
-            DateTime startTime,
-            IBinder binder,
-            TextWriter logger)
+        public static void RecordTimes(string startString, CloudBlockBlob blob, TextWriter logger)
         {
-            var start = $"{startTime:yyyyMMdd-HHmmss}";
-
-            var blobAttribute = new BlobAttribute($"output/{start}");
-            var blob = binder.Bind<CloudBlockBlob>(blobAttribute);
-
-            logger.WriteLine(start);
-
             while (true)
             {
                 Thread.Sleep(20 * 1000);

                 var now = $"{DateTime.UtcNow:yyyyMMdd-HHmmss}";
-                blob.UploadText($"{start}\r\n{now}");
+                blob.UploadText($"{startString}\r\n{now}");

                 logger.WriteLine(now);
             }


This should fix #5

This should fix #5

--- BankFileParsers/Parsers/BaiTranslator.cs
+++ BankFileParsers/Parsers/BaiTranslator.cs
@@ -138,7 +138,7 @@
                             SenderIdentification = data.SenderIdentification,
                             ReceiverIndetification = data.ReceiverIdentification,
                             FileIdentificationNumber = data.FileIdentificationNumber,
-                            CurrencyCode = group.CurrencyCode,
+                            CurrencyCode = account.CurrencyCode,
                             CustomerAccountNumber = account.CustomerAccountNumber,
                             Amount = amount,
                             Count = fund.ItemCount,


fix key not being stored

fix key not being stored

--- BitSharp.Storage/MissingDataException.cs
+++ BitSharp.Storage/MissingDataException.cs
@@ -21,6 +21,7 @@

         public MissingDataException(object key)
         {
+            this.key = key;
         }

         public object Key { get { return this.key; } }


More tests.

More tests.

--- WpfAnalyzers.Test/WPF0005PropertyChangedCallbackShouldMatchRegisteredNameTests/ValidCode.cs
+++ WpfAnalyzers.Test/WPF0005PropertyChangedCallbackShouldMatchRegisteredNameTests/ValidCode.cs
@@ -47,6 +47,7 @@
         [TestCase("new FrameworkPropertyMetadata((o, e) => { })")]
         [TestCase("new FrameworkPropertyMetadata(OnBarChanged)")]
         [TestCase("new FrameworkPropertyMetadata(OnBarChanged, CoerceBar)")]
+        [TestCase("new FrameworkPropertyMetadata(coerceValueCallback: CoerceBar, propertyChangedCallback: OnBarChanged)")]
         public void DependencyPropertyRegisterWithMetadata(string metadata)
         {
             var testCode = @"
@@ -285,5 +286,54 @@
 }";
             AnalyzerAssert.Valid(Analyzer, testCode);
         }
+
+        [Test]
+        public void UsedByMoreThanOnePropertyMatchingNeither()
+        {
+            var testCode = @"
+namespace RoslynSandbox
+{
+    using System.Windows;
+    using System.Windows.Controls;
+
+    public class FooControl : Control
+    {
+        /// Identifies the <see cref=""Bar""/> dependency property.
+        public static readonly DependencyProperty BarProperty = DependencyProperty.Register(
+            nameof(Bar),
+            typeof(int),
+            typeof(FooControl),
+            new PropertyMetadata(default(int), Meh));
+
+        /// Identifies the <see cref=""Baz""/> dependency property.
+        public static readonly DependencyProperty BazProperty = DependencyProperty.Register(
+            nameof(Baz),
+            typeof(int),
+            typeof(FooControl),
+            new FrameworkPropertyMetadata(1, propertyChangedCallback: Meh));
+
+        public int Bar
+        {
+            get => (int)this.GetValue(BarProperty);
+            set => this.SetValue(BarProperty, value);
+        }
+
+        public int Baz
+        {
+            get => (int)this.GetValue(BazProperty);
+            set => this.SetValue(BazProperty, value);
+        }
+
+        private static void Meh(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            if ((int)e.NewValue > 0)
+            {
+                d.ClearValue(BackgroundProperty);
+            }
+        }
+    }
+}";
+            AnalyzerAssert.Valid(Analyzer, testCode);
+        }
     }
 }


AnimBaseのAnimatio実行時に外部からEaseTypeを設定できるように変更

--- Assets/Scripts/AnimBase.cs
+++ Assets/Scripts/AnimBase.cs
@@ -22,9 +22,21 @@
 		public Action PositionCompleteEvent = null;
 		public Action FadeCompleteEvent = null;

+		private Vector2 anchored
+		{
+			get
+			{
+				return (gameObject.transform as RectTransform).anchoredPosition;
+            }
+			set
+			{
+				(gameObject.transform as RectTransform).anchoredPosition = value;
+			}
+		}
+
 		void Awake()
 		{
-			initPosition = (gameObject.transform as RectTransform).anchoredPosition;
+			initPosition = anchored;
 			OnAwake();
 		}

@@ -40,23 +52,23 @@
 			var parentTrans = parentObject.transform as RectTransform;
 			var dPos = parentObject.InitPosition - parentTrans.anchoredPosition;

-			(gameObject.transform as RectTransform).anchoredPosition = initPosition - dPos;
+			anchored = initPosition - dPos;
 		}

 		public virtual void Initialize()
 		{
-			(this.gameObject.transform as RectTransform).anchoredPosition = initPosition;
+			anchored = initPosition;
 		}

-		public void Animation(float time, Vector2 target)
+		public void Animation(float time, Vector2 target, iTween.EaseType ease = iTween.EaseType.easeOutCubic)
 		{
 			iTween.tweens.Clear();

 			iTween.ValueTo(this.gameObject, iTween.Hash(
-				"from", (this.gameObject.transform as RectTransform).anchoredPosition,
+				"from", anchored,
 				"to", target,
 				"time", time,
-				"easetype", "easeOutCubic",
+				"easetype", ease,
 				"onupdatetarget", this.gameObject,
 				"onupdate", "OnUpdateAnimation",
 				"oncomplete", "OnPositionCompleteProcess"));


Change TeamArea heal and damage quantity

--- Assets/Scripts/TeamArea.cs
+++ Assets/Scripts/TeamArea.cs
@@ -24,7 +24,7 @@
           return;

         if (Time.time - _healTimestamp > _healInterval) {
-          _synchronizer.SyncHeal(target.PhotonView.viewID, _quantity);
+          _synchronizer.SyncHeal(target.PhotonView.viewID, (int)(target.Hp.Max.Value / 3.0f));
           _healTimestamp = Time.time;
         }
       }
@@ -35,16 +35,15 @@
         target.State.Invincible = true;
         MonoUtility.Instance.DelaySec(_damageInterval, () => { target.State.Invincible = false; } );

-        _synchronizer.SyncAttack(photonView.viewID, target.PhotonView.viewID, _quantity, false, HitEffectType.None);
+        _synchronizer.SyncAttack(photonView.viewID, target.PhotonView.viewID, (int)(target.Hp.Max.Value / 3.0f), false, HitEffectType.None);
       }
     }

     public PhotonView PhotonView => photonView;
-    public int Power => _quantity;
+    public int Power => 0;
     public int Critical => 0;

     [SerializeField] private int _team;
-    [SerializeField] private int _quantity;
     private SkillSynchronizer _synchronizer;
     private float _healInterval = 1.0f;
     private float _damageInterval = 1.0f;


Delete AssemblyInfo.cs

Delete AssemblyInfo.cs

--- CSTrackaccess/Properties/AssemblyInfo.cs
+++ CSTrackaccess/Properties/AssemblyInfo.cs
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Управление общими сведениями о сборке осуществляется с помощью
-// набора атрибутов. Измените значения этих атрибутов, чтобы изменить сведения,
-// связанные со сборкой.
-[assembly: AssemblyTitle("CSTrackaccess")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
-[assembly: AssemblyProduct("CSTrackaccess")]
-[assembly: AssemblyCopyright("Copyright ©  2013")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Параметр ComVisible со значением FALSE делает типы в сборке невидимыми
-// для COM-компонентов.  Если требуется обратиться к типу в этой сборке через
-// COM, задайте атрибуту ComVisible значение TRUE для этого типа.
-[assembly: ComVisible(false)]
-
-// Следующий GUID служит для идентификации библиотеки типов, если этот проект будет видимым для COM
-[assembly: Guid("cb13b13b-ca15-453a-af8f-824533fe4f74")]
-
-// Сведения о версии сборки состоят из следующих четырех значений:
-//
-//      Основной номер версии
-//      Дополнительный номер версии
-//      Номер построения
-//      Редакция
-//
-// Можно задать все значения или принять номер построения и номер редакции по умолчанию,
-// используя "*", как показано ниже:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]


Remove unused load event handler

Remove unused load event handler

--- CefSharp.WinForms.Example/BrowserForm.cs
+++ CefSharp.WinForms.Example/BrowserForm.cs
@@ -11,8 +11,6 @@
         public BrowserForm()
         {
             InitializeComponent();
-
-            Load += BrowserFormLoad;

             Text = "CefSharp";
             WindowState = FormWindowState.Maximized;
@@ -33,11 +31,6 @@
             };
             tabPage.Controls.Add(browser);
             browserTabControl.Controls.Add(tabPage);
-        }
-
-        private void BrowserFormLoad(object sender, EventArgs e)
-        {
-
         }

         private void ExitMenuItemClick(object sender, EventArgs e)


Refactoring.

Refactoring.

--- CheckoutKata/CheckoutKata.Tests/Tests.cs
+++ CheckoutKata/CheckoutKata.Tests/Tests.cs
@@ -132,17 +132,15 @@
     {
         private readonly int _x;
         private readonly double _y;
-        private readonly GetXForY _promotion;
-
-        public GetXForYProxy(char item, double unitPrice, int x, double y) : this(item, unitPrice, new GetXForY(x, y))
+
+        public GetXForYProxy(char item, double unitPrice, int x, double y) : this(item, unitPrice)
         {
             _x = x;
             _y = y;
         }

-        private GetXForYProxy(char item, double unitPrice, GetXForY promotion) : base(item, unitPrice)
-        {
-            _promotion = promotion;
+        private GetXForYProxy(char item, double unitPrice) : base(item, unitPrice)
+        {
         }

         public override double SubTotal(int numberOfUnits)
@@ -170,18 +168,6 @@
             }
             return new PromotionResult(price, numberOfUnits1);
         }
-
-        private class GetXForY
-        {
-            public readonly int _x;
-            public readonly double _y;
-
-            public GetXForY(int x, double y)
-            {
-                _x = x;
-                _y = y;
-            }
-        }
     }

     public class Checkout


Fix tabs/spaces in test site startup

Fix tabs/spaces in test site startup

--- BundlerTestSite/Startup.cs
+++ BundlerTestSite/Startup.cs
@@ -14,8 +14,8 @@
         public static BundlerRouteTable MarkdownRoutesWithTemplate = new BundlerRouteTable();
         public void Configuration(IAppBuilder app)
         {
-			app.UseBundlerMiddlewareForIIS();
-			app.UseBundlerMarkdown(MarkdownRoutes);
+            app.UseBundlerMiddlewareForIIS();
+            app.UseBundlerMarkdown(MarkdownRoutes);
             app.UseBundlerMarkdownWithTempalte("~/markdown/markdowntemplate.html", MarkdownRoutesWithTemplate);
         }
     }


Remove check for directory existing per Scott

--- IronFoundry.ServiceBroker/Models/MsSqlDatabaseBuilder.cs
+++ IronFoundry.ServiceBroker/Models/MsSqlDatabaseBuilder.cs
@@ -41,11 +41,6 @@
             Debug.Assert(sqlPlan != null, "plan should be typeof(MsSqlPlan)");

             var formattedDatabaseName = string.Format(databaseNameFormat, databaseName);
-
-            if (!Directory.Exists(databaseFilePath))
-            {
-                throw new ArgumentException("The requested path for the data files does not exist. Please check your SQL file path in configuration.");
-            }

             string createDatabaseCommand;
             if (sqlPlan.DatabaseSize >= 0)


Turn off QM caching - there is some evidence that... :(

--- LINQToTTree/LINQToTTreeLib/QueryVisitors/QueryVisitor.cs
+++ LINQToTTree/LINQToTTreeLib/QueryVisitors/QueryVisitor.cs
@@ -72,7 +72,7 @@
                 if (result != null)
                 {
                     _codeEnv.SetResult(result);
-                    _scoping.Add(_codeContext.Add(queryModel, result));
+                    //_scoping.Add(_codeContext.Add(queryModel, result));
                 }
                 return;
             }


Fix naming convention.

Fix naming convention.

--- Miles.MassTransit/Courier/QueueNameGenerateExtensions.cs
+++ Miles.MassTransit/Courier/QueueNameGenerateExtensions.cs
@@ -7,7 +7,7 @@
     public static class QueueNameGenerateExtensions
     {
         private const string Arguments = "Arguments";
-        private const string Logs = "Logs";
+        private const string Log = "Log";
         private const string Compensate = "Compensate";

         public static string GenerateExecutionQueueName(this Type type)
@@ -17,7 +17,7 @@

         public static string GenerateCompensationQueueName(this Type type)
         {
-            return GenerateQueueName(type, Logs, Compensate);
+            return GenerateQueueName(type, Log, Compensate);
         }

         private static string GenerateQueueName(Type type, string remove, string append = "")


Fixed rare NullReferenceException when unregistering event handlers.

--- Nodejs/Product/Nodejs/NpmUI/NpmOutputControlViewModel.cs
+++ Nodejs/Product/Nodejs/NpmUI/NpmOutputControlViewModel.cs
@@ -175,12 +175,15 @@
                                 true);
                 }
             } finally {
-                _commander.OutputLogged -= commander_OutputLogged;
-                _commander.ErrorLogged -= commander_ErrorLogged;
-                _commander.ExceptionLogged -= commander_ExceptionLogged;
-                _commander.CommandCompleted -= commander_CommandCompleted;
-                lock (_lock) {
-                    _commander = null;
+                var cmdr = _commander;
+                if (null != cmdr) {
+                    cmdr.OutputLogged -= commander_OutputLogged;
+                    cmdr.ErrorLogged -= commander_ErrorLogged;
+                    cmdr.ExceptionLogged -= commander_ExceptionLogged;
+                    cmdr.CommandCompleted -= commander_CommandCompleted;
+                    lock (_lock) {
+                        _commander = null;
+                    }
                 }
             }
         }