Fix sort properties tests.

Fix sort properties tests.

--- Gu.Analyzers.Test/GU0020SortPropertiesTests/CodeFix.cs
+++ Gu.Analyzers.Test/GU0020SortPropertiesTests/CodeFix.cs
@@ -30,16 +30,16 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 12, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 14, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             var expected3 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 16, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             var expected4 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 18, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3, expected4 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -88,10 +88,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 16, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 18, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -140,16 +140,16 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 12, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 14, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             var expected3 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 16, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             var expected4 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 18, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2, expected3, expected4 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -204,10 +204,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 19, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 24, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -255,10 +255,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 9, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 11, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -299,10 +299,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 9, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 17, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -365,10 +365,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                .WithLocation("Foo.cs", 10, 9)
-                               .WithMessage("Sort properties.");
+                               .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 23, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);

             var fixedCode = @"
@@ -426,10 +426,10 @@
     }";
             var expected1 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 10, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");
             var expected2 = this.CSharpDiagnostic()
                                 .WithLocation("Foo.cs", 12, 9)
-                                .WithMessage("Sort properties.");
+                                .WithMessage("Move property.");

             await this.VerifyCSharpDiagnosticAsync(testCode, new[] { expected1, expected2 }, CancellationToken.None).ConfigureAwait(false);


Programme final

Programme final

--- blabla/blabla/Program.cs
+++ blabla/blabla/Program.cs
@@ -29,6 +29,8 @@
                     Console.WriteLine("peut etre");
                 }
                 Console.ReadKey();
+                Console.WriteLine("Appuyez sur une touche pour recommencer");
+                Console.Clear();
             }
         }
     }


Splash image is now responsive

Splash image is now responsive

--- HH.Website/Default.cshtml
+++ HH.Website/Default.cshtml
@@ -2,20 +2,22 @@
     Layout = "~/Shared/_HomeBootstrapLayout.cshtml";
     Page.Title = "Home Page";
 }
+

-

-                        Affordable Housing Services
-

-
for

-

-                        Property Owners
+

+                        Provide affordable housing

                     Landlord
-                    Developer
+                    Property Developer


Remove the UIAutoHideMainMenu from SettingsForm.

--- Sandra.UI/AppTemplate/SettingsForm.cs
+++ Sandra.UI/AppTemplate/SettingsForm.cs
@@ -24,6 +24,7 @@
 using Eutherion.Win.Storage;
 using Eutherion.Win.UIActions;
 using System;
+using System.Collections.Generic;
 using System.Drawing;
 using System.Globalization;
 using System.IO;
@@ -42,7 +43,7 @@
         private readonly SettingProperty<PersistableFormState> formStateSetting;
         private readonly SettingProperty<int> errorHeightSetting;

-        private readonly UIAutoHideMainMenu autoHideMainMenu;
+        private readonly UIActionHandler mainMenuActionHandler;

         private readonly SplitContainer splitter;
         private readonly ListBoxEx errorsListBox;
@@ -150,27 +151,29 @@

             BindStandardUIActions();

-            // Initialize menu strip which becomes visible only when the ALT key is pressed.
-            autoHideMainMenu = new UIAutoHideMainMenu(this);
-
-            var fileMenu = autoHideMainMenu.AddMenuItem(new UIMenuNode.Container(SharedLocalizedStringKeys.File.ToTextProvider()));
-            fileMenu.BindActions(
+            // Initialize menu strip.
+            mainMenuActionHandler = new UIActionHandler();
+
+            var fileMenu = new UIMenuNode.Container(SharedLocalizedStringKeys.File.ToTextProvider());
+            fileMenu.Nodes.AddRange(BindMainMenuItemActions(
                 SharedUIAction.SaveToFile,
-                SharedUIAction.Close);
-
-            var editMenu = autoHideMainMenu.AddMenuItem(new UIMenuNode.Container(SharedLocalizedStringKeys.Edit.ToTextProvider()));
-            editMenu.BindActions(
+                SharedUIAction.Close));
+
+            var editMenu = new UIMenuNode.Container(SharedLocalizedStringKeys.Edit.ToTextProvider());
+            editMenu.Nodes.AddRange(BindMainMenuItemActions(
                 SharedUIAction.Undo,
                 SharedUIAction.Redo,
                 SharedUIAction.CutSelectionToClipBoard,
                 SharedUIAction.CopySelectionToClipBoard,
                 SharedUIAction.PasteSelectionFromClipBoard,
-                SharedUIAction.SelectAllText);
-
-            var viewMenu = autoHideMainMenu.AddMenuItem(new UIMenuNode.Container(SharedLocalizedStringKeys.View.ToTextProvider()));
-            viewMenu.BindActions(
+                SharedUIAction.SelectAllText));
+
+            var viewMenu = new UIMenuNode.Container(SharedLocalizedStringKeys.View.ToTextProvider());
+            viewMenu.Nodes.AddRange(BindMainMenuItemActions(
                 SharedUIAction.ZoomIn,
-                SharedUIAction.ZoomOut);
+                SharedUIAction.ZoomOut));
+
+            if (MainMenuStrip != null) MainMenuStrip.BackColor = DefaultSyntaxEditorStyle.ForeColor;

             Session.Current.CurrentLocalizerChanged += CurrentLocalizerChanged;
         }
@@ -181,6 +184,11 @@
             {
                 UIMenu.UpdateMenu(MainMenuStrip.Items);
             }
+        }
+
+        private List<UIMenuNode> BindMainMenuItemActions(params DefaultUIActionBinding[] bindings)
+        {
+            return new List<UIMenuNode>();
         }

         private void ErrorsListBox_KeyDown(object sender, KeyEventArgs e)
@@ -279,23 +287,10 @@
             }
         }

-        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
-        {
-            if (keyData == (Keys.Menu | Keys.Alt))
-            {
-                autoHideMainMenu.ToggleMainMenu();
-                if (MainMenuStrip != null) MainMenuStrip.BackColor = DefaultSyntaxEditorStyle.ForeColor;
-                return true;
-            }
-
-            return base.ProcessCmdKey(ref msg, keyData);
-        }
-
         protected override void Dispose(bool disposing)
         {
             if (disposing)
             {
-                autoHideMainMenu.Dispose();
                 noErrorsString?.Dispose();
                 errorLocationString?.Dispose();
             }


Improve hash asset id getter

Improve hash asset id getter

--- Scripts/GameApi/LiteNetLibIdentity.cs
+++ Scripts/GameApi/LiteNetLibIdentity.cs
@@ -71,25 +71,30 @@
         internal readonly HashSet<long> Subscribers = new HashSet<long>();

         public string AssetId { get { return assetId; } }
+        private int? hashAssetId;
         public int HashAssetId
         {
             get
             {
-                unchecked
+                if (!hashAssetId.HasValue)
                 {
-                    int hash1 = 5381;
-                    int hash2 = hash1;
-
-                    for (int i = 0; i < AssetId.Length && AssetId[i] != '\0'; i += 2)
+                    unchecked
                     {
-                        hash1 = ((hash1 << 5) + hash1) ^ AssetId[i];
-                        if (i == AssetId.Length - 1 || AssetId[i + 1] == '\0')
-                            break;
-                        hash2 = ((hash2 << 5) + hash2) ^ AssetId[i + 1];
+                        int hash1 = 5381;
+                        int hash2 = hash1;
+
+                        for (int i = 0; i < AssetId.Length && AssetId[i] != '\0'; i += 2)
+                        {
+                            hash1 = ((hash1 << 5) + hash1) ^ AssetId[i];
+                            if (i == AssetId.Length - 1 || AssetId[i + 1] == '\0')
+                                break;
+                            hash2 = ((hash2 << 5) + hash2) ^ AssetId[i + 1];
+                        }
+
+                        hashAssetId = hash1 + (hash2 * 1566083941);
                     }
-
-                    return hash1 + (hash2 * 1566083941);
                 }
+                return hashAssetId.Value;
             }
         }
         public uint ObjectId { get { return objectId; } internal set { objectId = value; } }


Allow developer to change asset Id

Allow developer to change asset Id

--- Scripts/GameApi/LiteNetLibIdentity.cs
+++ Scripts/GameApi/LiteNetLibIdentity.cs
@@ -16,7 +16,7 @@
     public sealed class LiteNetLibIdentity : MonoBehaviour
     {
         public static uint HighestObjectId { get; private set; }
-        [LiteNetLibReadOnly, SerializeField]
+        [SerializeField]
         private string assetId;
         [LiteNetLibReadOnly, SerializeField]
         private uint objectId;
@@ -191,8 +191,8 @@

         private void AssignAssetID(GameObject prefab)
         {
-            string path = AssetDatabase.GetAssetPath(prefab);
-            assetId = AssetDatabase.AssetPathToGUID(path);
+            if (!string.IsNullOrEmpty(assetId)) return;
+            assetId = AssetDatabase.AssetPathToGUID(AssetDatabase.GetAssetPath(prefab));
         }

         private bool ThisIsAPrefab()


Fixes a race where wrong task could be awaited in channel completion

We had a startTask we would await in DisposeAsync and channel completion continuation. This task would be initially set to a completed task and then once StartAsync was invoked it would be replaced with the actual task representing StartAsyncInternal. However if a transport failed immediately after starting the channel completion continuation could have been called before the StartAsyncInternal method completed. In this case we would await the inital completed task and then very likely would fail trying to await _receiveLoop task because it wouldn't necessarily be set.
The fix is to use TaskCompletionSource so we don't try to swap tasks. We need to do some additional state checks because:
- the TaskCompletionSource task may never be completed (e.g. DisposeAsync is being called without starting the connection)
- TaskCompletionSource allows setting the result only once and we should not return its task more than once (e.g. calling StartAsync after connection was successfully started and stopped)

Fixes #304

--- src/Microsoft.AspNetCore.Sockets.Client/Connection.cs
+++ src/Microsoft.AspNetCore.Sockets.Client/Connection.cs
@@ -22,7 +22,7 @@
         private volatile IChannelConnection<Message, SendMessage> _transportChannel;
         private volatile ITransport _transport;
         private volatile Task _receiveLoopTask;
-        private volatile Task _startTask = Task.CompletedTask;
+        private TaskCompletionSource<object> _startTcs = new TaskCompletionSource<object>(TaskCreationOptions.RunContinuationsAsynchronously);
         private TaskQueue _eventQueue = new TaskQueue();

         private ReadableChannel<Message> Input => _transportChannel.Input;
@@ -52,18 +52,35 @@

         public Task StartAsync(ITransport transport, HttpClient httpClient)
         {
-            _startTask = StartAsyncInternal(transport, httpClient);
-            return _startTask;
-        }
-
-        private async Task StartAsyncInternal(ITransport transport, HttpClient httpClient)
-        {
             if (Interlocked.CompareExchange(ref _connectionState, ConnectionState.Connecting, ConnectionState.Initial)
                 != ConnectionState.Initial)
             {
-                throw new InvalidOperationException("Cannot start a connection that is not in the Initial state.");
-            }
-
+                return Task.FromException(
+                    new InvalidOperationException("Cannot start a connection that is not in the Initial state."));
+            }
+
+            StartAsyncInternal(transport, httpClient)
+                .ContinueWith(t =>
+                {
+                    if (t.IsFaulted)
+                    {
+                        _startTcs.SetException(t.Exception.InnerException);
+                    }
+                    else if (t.IsCanceled)
+                    {
+                        _startTcs.SetCanceled();
+                    }
+                    else
+                    {
+                        _startTcs.SetResult(null);
+                    }
+                });
+
+            return _startTcs.Task;
+        }
+
+        private async Task StartAsyncInternal(ITransport transport, HttpClient httpClient)
+        {
             _logger.LogDebug("Starting connection.");

             try
@@ -116,7 +133,8 @@
                     // There is a short window between we start the channel and assign the _receiveLoopTask a value.
                     // To make sure that _receiveLoopTask can be awaited (i.e. is not null) we need to await _startTask.
                     _logger.LogDebug("Ensuring all outstanding messages are processed.");
-                    await _startTask;
+
+                    await _startTcs.Task;
                     await _receiveLoopTask;

                     _logger.LogDebug("Draining event queue");
@@ -287,10 +305,15 @@
         {
             _logger.LogInformation("Stopping client.");

-            Interlocked.Exchange(ref _connectionState, ConnectionState.Disconnected);
-            try
-            {
-                await _startTask;
+            if (Interlocked.Exchange(ref _connectionState, ConnectionState.Disconnected) == ConnectionState.Initial)
+            {
+                // the connection was never started so there is nothing to clean up
+                return;
+            }
+
+            try
+            {
+                await _startTcs.Task;
             }
             catch
             {


Removed unneccesary call to piecePicker.IsInteresting(id);

svn path=/trunk/bitsharp/; revision=68903

--- src/MonoTorrent.Client/PiecePicking/StandardPicker.cs
+++ src/MonoTorrent.Client/PiecePicking/StandardPicker.cs
@@ -303,11 +303,8 @@
                 id.TorrentManager.HashedPiece(new PieceHashedEventArgs(piece.Index, result));

                 if (result)
-                {
-                    id.Peer.Connection.IsInterestingToMe = this.IsInteresting(id);
                     id.TorrentManager.PieceCompleted(piece.Index);
-                }
-
+#warning To some tricks if we fail to reduce the amount we have to redownload
                 pieces.Remove(piece);

                 if (pieces.Count == 0)


Simplifying adding fields to document

Simplifying adding fields to document

--- src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
+++ src/NLog.Targets.ElasticSearch/ElasticSearchTarget.cs
@@ -73,11 +73,8 @@
                 if (logEvent.Exception != null)
                     document.Add("exception", logEvent.Exception);
                 document.Add("message", Layout.Render(logEvent));
-                if (Fields.Any())
-                {
-                    foreach (var field in Fields)
-                        document.Add(field.Name, field.Layout.Render(logEvent));
-                }
+                foreach (var field in Fields)
+                    document.Add(field.Name, field.Layout.Render(logEvent));

                 payload.Add(new { index = new { _index = Index.Render(logEvent), _type = DocumentType.Render(logEvent) } });
                 payload.Add(document);


AssemblyInfo updated.

AssemblyInfo updated.

--- SignalRest/Properties/AssemblyInfo.cs
+++ SignalRest/Properties/AssemblyInfo.cs
@@ -1,36 +1,10 @@
 using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;

-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
 [assembly: AssemblyTitle("SignalRest")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("")]
+[assembly: AssemblyDescription("Make SignalR hubs available to any REST client.")]
+[assembly: AssemblyCompany("Epiforge Software, LLC")]
 [assembly: AssemblyProduct("SignalRest")]
-[assembly: AssemblyCopyright("Copyright ©  2017")]
+[assembly: AssemblyCopyright("Copyright © 2017 by Epiforge Software, LLC")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components.  If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("a3c01e49-d74a-4302-ad4b-b5dc9c136922")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.*")]


binary serialization was added

binary serialization was added

--- src/OpenTl.Schema/Serialization/SerializationUtils.cs
+++ src/OpenTl.Schema/Serialization/SerializationUtils.cs
@@ -13,5 +13,19 @@
         {
             return Encoding.UTF8.GetString(bytes);
         }
+
+        public static byte[] GetBinaryFromString(string str)
+        {
+            var bytes = new byte[str.Length * sizeof(char)];
+            System.Buffer.BlockCopy(str.ToCharArray(), 0, bytes, 0, bytes.Length);
+            return bytes;
+        }
+
+        public static string GetStringFromBinary(byte[] bytes)
+        {
+            var chars = new char[bytes.Length / sizeof(char)];
+            System.Buffer.BlockCopy(bytes, 0, chars, 0, bytes.Length);
+            return new string(chars);
+        }
     }
 }


Fixing Scale/Precision unit test

Fixing Scale/Precision unit test

Needed as NHibernate has fixed the related bug
https://nhibernate.jira.com/browse/NH-2979

--HG--
branch : 1.x

--- src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs
+++ src/Orchard.Tests/DataMigration/SchemaBuilderTests.cs
@@ -229,7 +229,7 @@

             _schemaBuilder
                 .CreateTable("Product", table => table
-                    .Column("Price", DbType.Decimal, column => column.WithPrecision(6).WithScale(9))
+                    .Column("Price", DbType.Decimal, column => column.WithPrecision(19).WithScale(9))
                     );

             _schemaBuilder


Add SignalRRealTimeNotifier to Notifiers

--- src/Abp.Web.SignalR/Web/SignalR/AbpWebSignalRModule.cs
+++ src/Abp.Web.SignalR/Web/SignalR/AbpWebSignalRModule.cs
@@ -1,5 +1,6 @@
 using System.Reflection;
 using Abp.Modules;
+using Abp.Web.SignalR.Notifications;
 using Castle.MicroKernel.Registration;
 using Microsoft.AspNet.SignalR;
 using Newtonsoft.Json;
@@ -17,6 +18,8 @@
         {
             GlobalHost.DependencyResolver = new WindsorDependencyResolver(IocManager.IocContainer);
             UseAbpSignalRContractResolver();
+
+            Configuration.Notifications.Notifiers.Add<SignalRRealTimeNotifier>();
         }

         /// <inheritdoc/>


No use of Parallel.ForEach because it changes the order of properties

--- src/QuickIEnumerableToExcelExporter/MetadataReader.cs
+++ src/QuickIEnumerableToExcelExporter/MetadataReader.cs
@@ -24,10 +24,8 @@
  */

 using System;
-using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
-using System.Threading.Tasks;

 namespace QuickIEnumerableToExcelExporter
 {
@@ -36,37 +34,33 @@
         public static List<ExportProperty> ReadMetadata(Type exportType)
         {
             // Prepare output
-            var exportProperties = new ConcurrentBag<ExportProperty>();
+            var exportProperties = new List<ExportProperty>();

             // Get properties and prepare
-            var properties = exportType.GetProperties().ToList();
+            exportType.GetProperties().ToList().ForEach(property =>
+            {
+                // Create with defaults
+                var exportProperty = new ExportProperty
+                {
+                    Header = property.Name,
+                    Property = new ExportPropertyInfo(property)
+                };

-            Parallel.ForEach(
-                properties,
-                property =>
+                // Apply settings from attribute if given
+                var exportAttribute = property.GetCustomAttributes(typeof(ExportToExcelAttribute), false).FirstOrDefault() as ExportToExcelAttribute;
+                if (exportAttribute != null && !exportAttribute.Ignore)
                 {
-                    // Create with defaults
-                    var exportProperty = new ExportProperty
-                    {
-                        Header = property.Name,
-                        Property = new ExportPropertyInfo(property)
-                    };
+                    ApplyExportAttributeToProperty(exportAttribute, exportProperty);
+                }

-                    // Apply settings from attribute if given
-                    var exportAttribute = property.GetCustomAttributes(typeof(ExportToExcelAttribute), false).FirstOrDefault() as ExportToExcelAttribute;
-                    if (exportAttribute != null && !exportAttribute.Ignore)
-                    {
-                        ApplyExportAttributeToProperty(exportAttribute, exportProperty);
-                    }
+                // Add to collection if not ignored
+                if (exportAttribute == null || !exportAttribute.Ignore)
+                {
+                    exportProperties.Add(exportProperty);
+                }
+            });

-                    // Add to collection if not ignored
-                    if (exportAttribute == null || !exportAttribute.Ignore)
-                    {
-                        exportProperties.Add(exportProperty);
-                    }
-                });
-
-            return exportProperties.ToList();
+            return exportProperties;
         }

         private static void ApplyExportAttributeToProperty(ExportToExcelAttribute attribute, ExportProperty property)


Fix #1154: extra = inserted

Fix #1154: extra = inserted

--- src/R/Editor/Impl/Completion/RCompletionController.cs
+++ src/R/Editor/Impl/Completion/RCompletionController.cs
@@ -327,6 +327,17 @@
             return false;
         }

+        public override bool IsMuteCharacter(char typedCharacter) {
+            if(typedCharacter == '=') {
+                bool equalsCompletion = CompletionSession.SelectedCompletionSet
+                                                         .SelectionStatus.Completion
+                                                         .InsertionText.TrimEnd().EndsWith("=", StringComparison.Ordinal);
+                if (equalsCompletion) {
+                    return true;
+                }
+            }
+            return base.IsMuteCharacter(typedCharacter);
+        }
         /// <summary>
         /// Updates insertion text so it excludes final commit character
         /// </summary>


Added certificate renewal to BIO

Added certificate renewal to BIO

--- src/Red-Folder.com/Views/MyBio/_Certifications.cshtml
+++ src/Red-Folder.com/Views/MyBio/_Certifications.cshtml
@@ -9,6 +9,18 @@

+
+
+
+
Microsoft Certified: Azure Developer Associate

+
March 2019

+
Renewed March 2021

+
Earning Azure Developer Associate certification validates the skills and knowledge to design and build cloud solutions such as applications and services. Candidates participate in all phases of development, from solution design, to development and deployment, to testing and maintenance. They partner with cloud solution architects, cloud DBAs, cloud administrators, and clients to implement the solution.

+

+

+
+

+

@@ -18,18 +30,6 @@

Earning Azure Administrator Associate certification validates the skills and knowledge to manage cloud services that span storage, security, networking, and compute cloud capabilities. Candidates have a deep understanding of each service across the full IT lifecycle, and take requests for infrastructure services, applications, and environments. They make recommendations on services to use for optimal performance and scale, as well as provision, size, monitor, and adjust resources as appropriate.

-
-

-

-
-
-
-
Microsoft Certified: Azure Developer Associate

-
March 2019

-
Earning Azure Developer Associate certification validates the skills and knowledge to design and build cloud solutions such as applications and services. Candidates participate in all phases of development, from solution design, to development and deployment, to testing and maintenance. They partner with cloud solution architects, cloud DBAs, cloud administrators, and clients to implement the solution.

-

-

-


Applies patch from Issue #125 from Teravus - fixes SimStats

git-svn-id: c32cf1ecefca26b8770d7b0740bc0c5c174087e4@1629 c754d5e9-d413-0410-bcdf-9574c9dba6b7

--- libsecondlife/NetworkManager.cs
+++ libsecondlife/NetworkManager.cs
@@ -908,6 +908,9 @@
 					case 5:
                         simulator.Stats.NetTime = s.StatValue;
 						break;
+                    case 6:
+                        simulator.Stats.OtherTime = s.StatValue;
+                        break;
 					case 7:
                         simulator.Stats.PhysicsTime = s.StatValue;
 						break;
@@ -918,8 +921,9 @@
                         simulator.Stats.ScriptTime = s.StatValue;
 						break;
 					case 10:
-                        simulator.Stats.OtherTime = s.StatValue;
-						break;
+                        //simulator.Stats.OtherTime = s.StatValue;
+						// This is not othertime, this is something else
+                        break;
 					case 11:
                         simulator.Stats.Objects = Convert.ToInt32(s.StatValue);
 						break;


Add search method

Add search method

--- src/AspNetCoreSPA.Web/Controllers/StudentController.cs
+++ src/AspNetCoreSPA.Web/Controllers/StudentController.cs
@@ -34,6 +34,13 @@

             return Json(_students);
         }
+
+        [Route("searchStudent")]
+        [HttpGet]
+        public IActionResult Search([FromQuery] string firstName)
+        {
+            return Json(_students.Where(student => student.FirstName.Equals(firstName)));
+        }
     }

     public class Student


Update IUIComponentExtensions.HasNoCssTransition method to handle StaleElementReferenceException

--- src/Atata.KendoUI/Extensions/IUIComponentExtensions.cs
+++ src/Atata.KendoUI/Extensions/IUIComponentExtensions.cs
@@ -23,7 +23,16 @@

         private static bool HasNoCssTransition(IWebElement element)
         {
-            string transitionDuration = element.GetCssValue("transitionDuration");
+            string transitionDuration;
+
+            try
+            {
+                transitionDuration = element.GetCssValue("transitionDuration");
+            }
+            catch (StaleElementReferenceException)
+            {
+                return true;
+            }

             return transitionDuration == null
                 || !decimal.TryParse(transitionDuration.TrimEnd('m', 's'), out decimal transitionTime)


Log the _repl null in Verbose log.

Log the _repl null in Verbose log.

--- src/Couchbase.Lite.Shared/API/Sync/Replicator.cs
+++ src/Couchbase.Lite.Shared/API/Sync/Replicator.cs
@@ -196,11 +196,10 @@
         {
             CBDebug.MustNotBeNull(WriteLog.To.Sync, Tag, nameof(handler), handler);
             var cbHandler = new CouchbaseEventHandler<DocumentReplicationEventArgs>(handler, scheduler);
-            if (_repl!= null) {
+            if (_documentEndedUpdate.Add(cbHandler) == 0) {
                 SetProgressLevel(C4ReplicatorProgressLevel.PerDocument);
             }

-            _documentEndedUpdate.Add(cbHandler);
             return new ListenerToken(cbHandler, "repl");
         }

@@ -750,6 +749,11 @@

         private void SetProgressLevel(C4ReplicatorProgressLevel progressLevel)
         {
+            if (_repl == null) {
+                WriteLog.To.Sync.V(Tag, $"Progress level {progressLevel} is not yet set because C4Replicator is not created.");
+                return;
+            }
+
             C4Error err = new C4Error();
             if (!Native.c4repl_setProgressLevel(_repl, progressLevel, &err) || err.code > 0) {
                 WriteLog.To.Sync.W(Tag, $"Failed set progress level to {progressLevel}", err);


DCS-30: Store link to students in Teacher.

--- src/DiplomContentSystem.Core/Entities/Teacher.cs
+++ src/DiplomContentSystem.Core/Entities/Teacher.cs
@@ -18,6 +18,7 @@
         public Department Department { get; set; }

         public List<DiplomWork> DiplomWorks { get; set; }
+        public List<Student> Students { get; set; }
         public List<TeacherComment> TeacherComments { get; set; }
     }
 }


Removed a duplicate statement

Removed a duplicate statement

--- src/Discord.Net/WebSocket/DiscordSocketClient.cs
+++ src/Discord.Net/WebSocket/DiscordSocketClient.cs
@@ -792,7 +792,6 @@
                                         var guild = DataStore.GetGuild(data.GuildId.Value);
                                         if (guild != null)
                                         {
-                                            guild.AddChannel(data, DataStore);
                                             channel = guild.AddChannel(data, DataStore);

                                             if (!guild.IsSynced)


Explicit private set for PerRequestContainer.RequestContainer

--- src/Dotnettency.Container/PerRequestContainer.cs
+++ src/Dotnettency.Container/PerRequestContainer.cs
@@ -13,7 +13,7 @@
             RequestContainer = requestContainer;
         }

-        public ITenantContainerAdaptor RequestContainer { get; }
+        public ITenantContainerAdaptor RequestContainer { get; private set; }

         public async Task ExecuteWithinSwappedRequestContainer(RequestDelegate request, HttpContext context)
         {


Remove redundant comment

Remove redundant comment

--- src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs
+++ src/Avalonia.Base/Media/TextFormatting/TextLineImpl.cs
@@ -266,10 +266,6 @@
                         {
                             offset = Math.Max(0, currentPosition - shapedRun.Text.Start);
                         }
-                        //else
-                        //{
-                        //    offset = Math.Max(0, currentPosition - shapedRun.Text.Start + shapedRun.Text.Length);
-                        //}

                         characterHit = new CharacterHit(characterHit.FirstCharacterIndex + offset, characterHit.TrailingLength);


Fix bug where deleting read-only files failed

--- DirectoryHash/Program.cs
+++ DirectoryHash/Program.cs
@@ -110,6 +110,8 @@

                         if (!dryRun)
                         {
+                            // Files that are marked read-only can't be deleted by FileInfo.Delete()
+                            fileInfo.IsReadOnly = false;
                             fileInfo.Delete();
                         }
                     }


Oops, fixed speech recognition startup error (fixed #15)

--- src/Gablarski.SpeechNotifier/SpeechRecognizer.cs
+++ src/Gablarski.SpeechNotifier/SpeechRecognizer.cs
@@ -66,7 +66,7 @@
 		{
 			lock (this.sync)
 			{
-				if (this.recognition == null)
+				if (this.recognition != null)
 					throw new InvalidOperationException ("Already open");

 				this.recognition = new SpeechRecognitionEngine();


Update CoreRT for changes in shared partition

Signed-off-by: dotnet-bot <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/System.Private.CoreLib/shared/System/Activator.cs
+++ src/System.Private.CoreLib/shared/System/Activator.cs
@@ -36,11 +36,6 @@
         public static object CreateInstance(Type type) =>
             CreateInstance(type, nonPublic: false);

-        [DebuggerHidden]
-        [DebuggerStepThrough]
-        public static object CreateInstance(Type type, bool nonPublic) =>
-            CreateInstance(type, nonPublic, wrapExceptions: true);
-
         public static ObjectHandle CreateInstanceFrom(string assemblyFile, string typeName) =>
             CreateInstanceFrom(assemblyFile, typeName, false, ConstructorDefault, null, null, null, null);


Added `CSharpSources.IsReservedKeyword` static helper method.

--- src/Generator/Generators/CSharp/CSharpSources.cs
+++ src/Generator/Generators/CSharp/CSharpSources.cs
@@ -58,6 +58,8 @@
             "ushort", "decimal", "int", "sbyte", "short", "double", "long", "string",
             "void", "partial", "yield", "where"
         };
+
+        public static bool IsReservedKeyword(string id) => ReservedKeywords.Contains(id);

         public override string SafeIdentifier(string id)
         {


Fixed sp_playlistcontainer_is_loaded marshalling

--- src/Torshify/Core/Native/Spotify.PlaylistContainer.cs
+++ src/Torshify/Core/Native/Spotify.PlaylistContainer.cs
@@ -29,6 +29,7 @@
         /// <param name="pcPtr">Playlist container</param>
         /// <returns>True if container is loaded</returns>
         [DllImport("libspotify")]
+        [return: MarshalAs(UnmanagedType.I1)]
         internal static extern bool sp_playlistcontainer_is_loaded(IntPtr pcPtr);

         /// <summary>


refactor.

refactor.

--- src/Cap.Consistency/Extensions/ReflectionExtensions.cs
+++ src/Cap.Consistency/Extensions/ReflectionExtensions.cs
@@ -1,162 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Linq.Expressions;
-using System.Reflection;
-using System.Threading.Tasks;
-
-namespace Cap.Consistency.Extensions
-{
-    public static class ReflectionExtensions
-    {
-        public static Type MakeDefType(this TypeInfo byRefTypeInfo)
-        {
-            if (byRefTypeInfo == null)
-            {
-                throw new ArgumentNullException(nameof(byRefTypeInfo));
-            }
-            if (!byRefTypeInfo.IsByRef)
-            {
-                throw new ArgumentException($"Type {byRefTypeInfo} is not passed by reference.");
-            }
-
-            var assemblyQualifiedName = byRefTypeInfo.AssemblyQualifiedName;
-            var index = assemblyQualifiedName.IndexOf('&');
-            assemblyQualifiedName = assemblyQualifiedName.Remove(index, 1);
-
-            return byRefTypeInfo.Assembly.GetType(assemblyQualifiedName, true);
-        }
-
-        public static bool CanInherited(this TypeInfo typeInfo)
-        {
-            if (typeInfo == null)
-            {
-                throw new ArgumentNullException(nameof(typeInfo));
-            }
-
-            if (!typeInfo.IsClass || typeInfo.IsSealed)
-            {
-                return false;
-            }
-
-            if (typeInfo.IsNested)
-            {
-                return typeInfo.IsNestedPublic && typeInfo.DeclaringType.GetTypeInfo().IsPublic;
-            }
-            else
-            {
-                return typeInfo.IsPublic;
-            }
-        }
-
-        internal static MethodInfo GetMethodBySign(this TypeInfo typeInfo, MethodInfo method)
-        {
-            if (method.IsGenericMethod)
-            {
-                foreach (var genericMethod in typeInfo.DeclaredMethods.Where(m => m.IsGenericMethod))
-                {
-                    if (method.ToString() == genericMethod.ToString())
-                    {
-                        return genericMethod;
-                    }
-                }
-            }
-
-            return typeInfo.GetMethod(method.Name, method.GetParameterTypes());
-        }
-
-        public static Type[] GetParameterTypes(this MethodInfo method)
-        {
-            if (method == null)
-            {
-                throw new ArgumentNullException(nameof(method));
-            }
-            return method.GetParameters().Select(parame => parame.ParameterType).ToArray();
-        }
-
-        public static bool IsPropertyBinding(this MethodInfo method)
-        {
-            if (method == null)
-            {
-                throw new ArgumentNullException(nameof(method));
-            }
-
-            return method.GetBindingProperty() != null;
-        }
-
-        public static PropertyInfo GetBindingProperty(this MethodInfo method)
-        {
-            if (method == null)
-            {
-                throw new ArgumentNullException(nameof(method));
-            }
-
-            foreach (var property in method.DeclaringType.GetTypeInfo().DeclaredProperties)
-            {
-                if (property.CanRead && property.GetMethod == method)
-                {
-                    return property;
-                }
-
-                if (property.CanWrite && property.SetMethod == method)
-                {
-                    return property;
-                }
-            }
-
-            return null;
-        }
-
-        public static MethodInfo GetMethod<T>(Expression<T> expression)
-        {
-            if (expression == null)
-            {
-                throw new ArgumentNullException(nameof(expression));
-            }
-            var methodCallExpression = expression.Body as MethodCallExpression;
-            if (methodCallExpression == null)
-            {
-                throw new InvalidCastException("Cannot be converted to MethodCallExpression");
-            }
-            return methodCallExpression.Method;
-        }
-
-        public static MethodInfo GetMethod<T>(string name)
-        {
-            if (name == null)
-            {
-                throw new ArgumentNullException(nameof(name));
-            }
-
-            return typeof(T).GetTypeInfo().GetMethod(name);
-        }
-
-        internal static MethodInfo ReacquisitionIfDeclaringTypeIsGenericTypeDefinition(this MethodInfo methodInfo, Type closedGenericType)
-        {
-            if (!methodInfo.DeclaringType.GetTypeInfo().IsGenericTypeDefinition)
-            {
-                return methodInfo;
-            }
-
-            return closedGenericType.GetTypeInfo().GetMethod(methodInfo.Name, methodInfo.GetParameterTypes());
-        }
-
-
-
-        internal static string GetFullName(this MemberInfo member)
-        {
-            var declaringType = member.DeclaringType.GetTypeInfo();
-            if (declaringType.IsInterface)
-            {
-                return $"{declaringType.Name}.{member.Name}".Replace('+', '.');
-            }
-            return member.Name;
-        }
-
-        internal static bool IsReturnTask(this MethodInfo methodInfo)
-        {
-            return typeof(Task).GetTypeInfo().IsAssignableFrom(methodInfo.ReturnType.GetTypeInfo());
-        }
-
-    }
-}


Simplified the generation of C# for property setters.

Signed-off-by: Dimitar Dobrev <ca751a5c976abad79158718440750fc638d19ebc@protonmail.com>

--- src/Generator/Generators/CSharp/CSharpSources.cs
+++ src/Generator/Generators/CSharp/CSharpSources.cs
@@ -816,22 +816,16 @@
             if (!property.Type.Equals(param.Type) && property.Type.IsEnumType())
                 param.Name = "&" + param.Name;

-            var function = property.SetMethod;
-            var method = function as Method;
-            if (function.SynthKind == FunctionSynthKind.AbstractImplCall)
-                GenerateVirtualPropertyCall(method, @class.BaseClass, property,
-                    new List<Parameter> { param });
-            else if (method != null && method.IsVirtual)
-                GenerateVirtualPropertyCall(method, @class, property, new List<Parameter> { param });
-            else if (method != null && method.OperatorKind == CXXOperatorKind.Subscript)
-            {
-                if (method.OperatorKind == CXXOperatorKind.Subscript)
-                    GenerateIndexerSetter(method);
-                else
-                    GenerateInternalFunctionCall(property.SetMethod, new List<Parameter> { param });
-            }
+            var parameters = new List<Parameter> { param };
+            if (property.SetMethod.SynthKind == FunctionSynthKind.AbstractImplCall)
+                GenerateVirtualPropertyCall(property.SetMethod, @class.BaseClass,
+                   property, parameters);
+            else if (property.SetMethod.IsVirtual)
+                GenerateVirtualPropertyCall(property.SetMethod, @class, property, parameters);
+            else if (property.SetMethod.OperatorKind == CXXOperatorKind.Subscript)
+                GenerateIndexerSetter(property.SetMethod);
             else
-                GenerateInternalFunctionCall(function, new List<Parameter> { param });
+                GenerateInternalFunctionCall(property.SetMethod, parameters);
         }

         private void GenerateFieldSetter(Field field, Class @class)


Add explicit types.

Add explicit types.

--- src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+++ src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
@@ -2769,7 +2769,7 @@
             var closeParen = this.EatToken(SyntaxKind.CloseParenToken);

             this.ParseBlockAndExpressionBodiesWithSemicolon(
-                out var body, out var expressionBody, out var semicolon,
+                out BlockSyntax body, out ArrowExpressionClauseSyntax expressionBody, out SyntaxToken semicolon,
                 requestedExpressionBodyFeature: MessageID.IDS_FeatureExpressionBodiedDeOrConstructor);

             var parameterList = _syntaxFactory.ParameterList(openParen, default(SeparatedSyntaxList<ParameterSyntax>), closeParen);


add some branches

add some branches

--- dotnet-csproj-cleaner/dotnet-csproj-cleaner/Program.cs
+++ dotnet-csproj-cleaner/dotnet-csproj-cleaner/Program.cs
@@ -19,6 +19,7 @@
                 return;
             }
             using (FileStream fs = new FileStream(args[0], FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
+            {
                 try
                 {
                     bool fileIsChanged = false;
@@ -63,14 +64,17 @@
                         return;
                     }
                     using (FileStream writer = new FileStream(args[0], FileMode.Truncate, FileAccess.Write, FileShare.ReadWrite))
+                    {
                         xmldoc.Save(writer);
+                    }
                     Console.WriteLine(String.Format("File {0} changed", args[0]));
                 }
                 catch (Exception ex)
                 {
                     Console.WriteLine(ex.Message);
                 }
-
+            }
+
         }

     }


Making disconnection error messages less scary - exception details are debug and filtered out from console by default.

--- Infusion.Proxy/Program.cs
+++ Infusion.Proxy/Program.cs
@@ -194,13 +194,14 @@
             }
             catch (IOException ioex) when (ioex.InnerException is SocketException socex && socex.SocketErrorCode == SocketError.ConnectionReset)
             {
-                Console.Error("Connection to client lost.");
-                throw;
+                Console.Error("Connection to client lost. Please restart infusion.");
+                Console.Debug(socex.ToString());
             }
             catch (Exception ex)
             {
-                Console.Error(serverDiagnosticPullStream.Flush());
-                Console.Error(ex.ToString());
+                Console.Error("Connection to client lost. Please restart infusion.");
+                Console.Debug(serverDiagnosticPullStream.Flush());
+                Console.Debug(ex.ToString());
                 throw;
             }
             finally
@@ -299,7 +300,7 @@
                         }
                         catch (EndOfStreamException ex)
                         {
-                            Console.Error(ex.ToString());
+                            Console.Debug(ex.ToString());
                             // just swallow this exception, wait for the next batch
                         }
                     }
@@ -308,8 +309,9 @@
             }
             catch (Exception ex)
             {
-                Console.Error(serverDiagnosticPullStream.Flush());
-                Console.Error(ex.ToString());
+                Console.Error("Disconnected from server. Please, restart Infusion.");
+                Console.Debug(serverDiagnosticPullStream.Flush());
+                Console.Debug(ex.ToString());
                 throw;
             }
         }


Simplify parameter parsing.

Simplify parameter parsing.

--- src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
+++ src/Compilers/CSharp/Portable/Parser/LanguageParser.cs
@@ -3479,59 +3479,49 @@
             var saveTerm = _termState;
             _termState |= TerminatorState.IsEndOfParameterList;

-            var modifiers = _pool.Allocate();
-            try
-            {
-                if (this.CurrentToken.Kind != closeKind)
-                {
+            if (this.CurrentToken.Kind != closeKind)
+            {
 tryAgain:
-                    if (this.IsPossibleParameter() || this.CurrentToken.Kind == SyntaxKind.CommaToken)
-                    {
-                        // first parameter
-                        modifiers.Clear();
-                        var parameter = this.ParseParameter(modifiers);
-                        nodes.Add(parameter);
-
-                        // additional parameters
-                        while (true)
+                if (this.IsPossibleParameter() || this.CurrentToken.Kind == SyntaxKind.CommaToken)
+                {
+                    // first parameter
+                    var parameter = this.ParseParameter();
+                    nodes.Add(parameter);
+
+                    // additional parameters
+                    while (true)
+                    {
+                        if (this.CurrentToken.Kind == closeKind)
                         {
-                            if (this.CurrentToken.Kind == closeKind)
+                            break;
+                        }
+                        else if (this.CurrentToken.Kind == SyntaxKind.CommaToken || this.IsPossibleParameter())
+                        {
+                            nodes.AddSeparator(this.EatToken(SyntaxKind.CommaToken));
+                            parameter = this.ParseParameter();
+                            if (parameter.IsMissing && this.IsPossibleParameter())
                             {
-                                break;
+                                // ensure we always consume tokens
+                                parameter = AddTrailingSkippedSyntax(parameter, this.EatToken());
                             }
-                            else if (this.CurrentToken.Kind == SyntaxKind.CommaToken || this.IsPossibleParameter())
-                            {
-                                nodes.AddSeparator(this.EatToken(SyntaxKind.CommaToken));
-                                modifiers.Clear();
-                                parameter = this.ParseParameter(modifiers);
-                                if (parameter.IsMissing && this.IsPossibleParameter())
-                                {
-                                    // ensure we always consume tokens
-                                    parameter = AddTrailingSkippedSyntax(parameter, this.EatToken());
-                                }
-
-                                nodes.Add(parameter);
-                                continue;
-                            }
-                            else if (this.SkipBadParameterListTokens(ref open, nodes, SyntaxKind.CommaToken, closeKind) == PostSkipAction.Abort)
-                            {
-                                break;
-                            }
+
+                            nodes.Add(parameter);
+                            continue;
                         }
-                    }
-                    else if (this.SkipBadParameterListTokens(ref open, nodes, SyntaxKind.IdentifierToken, closeKind) == PostSkipAction.Continue)
-                    {
-                        goto tryAgain;
-                    }
-                }
-
-                _termState = saveTerm;
-                close = this.EatToken(closeKind);
-            }
-            finally
-            {
-                _pool.Free(modifiers);
-            }
+                        else if (this.SkipBadParameterListTokens(ref open, nodes, SyntaxKind.CommaToken, closeKind) == PostSkipAction.Abort)
+                        {
+                            break;
+                        }
+                    }
+                }
+                else if (this.SkipBadParameterListTokens(ref open, nodes, SyntaxKind.IdentifierToken, closeKind) == PostSkipAction.Continue)
+                {
+                    goto tryAgain;
+                }
+            }
+
+            _termState = saveTerm;
+            close = this.EatToken(closeKind);
         }

         private bool IsEndOfParameterList()
@@ -3566,24 +3556,13 @@
             }
         }

-        private static bool CanReuseParameter(CSharp.Syntax.ParameterSyntax parameter, SyntaxListBuilder modifiers)
+        private static bool CanReuseParameter(CSharp.Syntax.ParameterSyntax parameter)
         {
             if (parameter == null)
             {
                 return false;
             }

-            // cannot reuse parameter if it had modifiers.
-            if ((modifiers != null && modifiers.Count != 0) || parameter.Modifiers.Count != 0)
-            {
-                return false;
-            }
-
-            return CanReuseParameter(parameter);
-        }
-
-        private static bool CanReuseParameter(CSharp.Syntax.ParameterSyntax parameter)
-        {
             // cannot reuse a node that possibly ends in an expression
             if (parameter.Default != null)
             {
@@ -3611,51 +3590,59 @@
             return true;
         }

-        private ParameterSyntax ParseParameter(
-            SyntaxListBuilder modifiers)
-        {
-            if (this.IsIncrementalAndFactoryContextMatches && CanReuseParameter(this.CurrentNode as CSharp.Syntax.ParameterSyntax, modifiers))
+        private ParameterSyntax ParseParameter()
+        {
+            if (this.IsIncrementalAndFactoryContextMatches && CanReuseParameter(this.CurrentNode as CSharp.Syntax.ParameterSyntax))
             {
                 return (ParameterSyntax)this.EatNode();
             }

             var attributes = this.ParseAttributeDeclarations();
-            this.ParseParameterModifiers(modifiers);
-
-            TypeSyntax type;
-            SyntaxToken name;
-            if (this.CurrentToken.Kind != SyntaxKind.ArgListKeyword)
-            {
-                type = this.ParseType(mode: ParseTypeMode.Parameter);
-                name = this.ParseIdentifierToken();
-
-                // When the user type "int goo[]", give them a useful error
-                if (this.CurrentToken.Kind == SyntaxKind.OpenBracketToken && this.PeekToken(1).Kind == SyntaxKind.CloseBracketToken)
-                {
-                    var open = this.EatToken();
-                    var close = this.EatToken();
-                    open = this.AddError(open, ErrorCode.ERR_BadArraySyntax);
-                    name = AddTrailingSkippedSyntax(name, SyntaxList.List(open, close));
-                }
-            }
-            else
-            {
-                // We store an __arglist parameter as a parameter with null type and whose
-                // .Identifier has the kind ArgListKeyword.
-                type = null;
-                name = this.EatToken(SyntaxKind.ArgListKeyword);
-            }
-
-            EqualsValueClauseSyntax def = null;
-            if (this.CurrentToken.Kind == SyntaxKind.EqualsToken)
-            {
-                var equals = this.EatToken(SyntaxKind.EqualsToken);
-                var value = this.ParseExpressionCore();
-                def = _syntaxFactory.EqualsValueClause(equals, value: value);
-                def = CheckFeatureAvailability(def, MessageID.IDS_FeatureOptionalParameter);
-            }
-
-            return _syntaxFactory.Parameter(attributes, modifiers.ToList(), type, name, def);
+
+            var modifiers = _pool.Allocate();
+            try
+            {
+                this.ParseParameterModifiers(modifiers);
+
+                TypeSyntax type;
+                SyntaxToken name;
+                if (this.CurrentToken.Kind != SyntaxKind.ArgListKeyword)
+                {
+                    type = this.ParseType(mode: ParseTypeMode.Parameter);
+                    name = this.ParseIdentifierToken();
+
+                    // When the user type "int goo[]", give them a useful error
+                    if (this.CurrentToken.Kind == SyntaxKind.OpenBracketToken && this.PeekToken(1).Kind == SyntaxKind.CloseBracketToken)
+                    {
+                        var open = this.EatToken();
+                        var close = this.EatToken();
+                        open = this.AddError(open, ErrorCode.ERR_BadArraySyntax);
+                        name = AddTrailingSkippedSyntax(name, SyntaxList.List(open, close));
+                    }
+                }
+                else
+                {
+                    // We store an __arglist parameter as a parameter with null type and whose
+                    // .Identifier has the kind ArgListKeyword.
+                    type = null;
+                    name = this.EatToken(SyntaxKind.ArgListKeyword);
+                }
+
+                EqualsValueClauseSyntax def = null;
+                if (this.CurrentToken.Kind == SyntaxKind.EqualsToken)
+                {
+                    var equals = this.EatToken(SyntaxKind.EqualsToken);
+                    var value = this.ParseExpressionCore();
+                    def = _syntaxFactory.EqualsValueClause(equals, value: value);
+                    def = CheckFeatureAvailability(def, MessageID.IDS_FeatureOptionalParameter);
+                }
+
+                return _syntaxFactory.Parameter(attributes, modifiers.ToList(), type, name, def);
+            }
+            finally
+            {
+                _pool.Free(modifiers);
+            }
         }

         private static bool IsParameterModifier(SyntaxKind kind)


Not using "using" when setting the platform.

--- ENetCS/Native/ENetApi.cs
+++ ENetCS/Native/ENetApi.cs
@@ -61,13 +61,12 @@
                     {
                         if (_platform == null)
                         {
-                            using(ENetApi platform = new ENetApiPlatform())
+                            ENetApi platform = new ENetApiPlatform();
+                            ENetCallbacks inits = new ENetCallbacks();
+
+                            if (platform.initialize_with_callbacks(ENET_VERSION, ref inits) >= 0)
                             {
-                                ENetCallbacks inits = new ENetCallbacks();
-                                if (platform.initialize_with_callbacks(ENET_VERSION, ref inits) >= 0)
-                                {
-                                    _platform = platform;
-                                }
+                                _platform = platform;
                             }
                         }


Implemented issue 14701.

Implemented issue 14701.

--- EPPlus/ExcelRangeBase.cs
+++ EPPlus/ExcelRangeBase.cs
@@ -1521,7 +1521,7 @@
 		/// Load the data from the datatable starting from the top left cell of the range
 		/// </summary>
 		/// <param name="Table">The datatable to load</param>
-		/// <param name="PrintHeaders">Print the column names on first row</param>
+		/// <param name="PrintHeaders">Print the column caption property (if set) or the columnname property if not, on first row</param>
 		/// <param name="TableStyle">The table style to apply to the data</param>
 		public void LoadFromDataTable(DataTable Table, bool PrintHeaders, TableStyles TableStyle)
 		{
@@ -1539,7 +1539,7 @@
 		/// Load the data from the datatable starting from the top left cell of the range
 		/// </summary>
 		/// <param name="Table">The datatable to load</param>
-		/// <param name="PrintHeaders">Print the column names on first row</param>
+		/// <param name="PrintHeaders">Print the caption property (if set) or the columnname property if not, on first row</param>
 		public void LoadFromDataTable(DataTable Table, bool PrintHeaders)
 		{
 			if (Table == null)
@@ -1552,7 +1552,8 @@
 			{
 				foreach (DataColumn dc in Table.Columns)
 				{
-					_worksheet.Cell(row, col++).Value = dc.ColumnName;
+                    // If no caption is set, the ColumnName property is called implicitly.
+					_worksheet.Cell(row, col++).Value = dc.Caption;
 				}
 				row++;
 				col = _fromCol;


Added: SelectedGameItem property in the LoadGameViewModel

--- src/Federation.UWP/ViewModel/Menu/LoadGameViewModel.cs
+++ src/Federation.UWP/ViewModel/Menu/LoadGameViewModel.cs
@@ -1,4 +1,5 @@
 using System.Collections.ObjectModel;
+using System.Linq;

 using Federation.UWP.DAL;
 using Federation.UWP.Objects.Game;
@@ -21,9 +22,25 @@
             }
         }

+        private MainGameItem _selectedGameItem;
+
+        public MainGameItem SelectedGameItem
+        {
+            get => _selectedGameItem;
+
+            set { _selectedGameItem = value; OnPropertyChanged(); }
+        }
+
         public LoadGameViewModel()
         {
             GameItems = new ObservableCollection<MainGameItem>(new LiteDBDAL().GetGameList());
+
+            if (!GameItems.Any())
+            {
+                return;
+            }
+
+            SelectedGameItem = GameItems.FirstOrDefault();
         }
     }
 }


MySqlGenerator can not currently generate RenameColumnExpression correctly; changed to throw NotImplementedException

--- src/FluentMigrator.Runner/Generators/MySqlGenerator.cs
+++ src/FluentMigrator.Runner/Generators/MySqlGenerator.cs
@@ -174,7 +174,8 @@
 		public override string Generate(RenameColumnExpression expression)
 		{
 			// may need to add definition to end. blerg
-			return FormatExpression("ALTER TABLE `{0}` CHANGE COLUMN {1} {2}", expression.TableName, expression.OldName, expression.NewName);
+			//return FormatExpression("ALTER TABLE `{0}` CHANGE COLUMN {1} {2}", expression.TableName, expression.OldName, expression.NewName);
+			throw new NotImplementedException();
 		}

 		public override string Generate(InsertDataExpression expression)


Fix observed exception

Fix observed exception

--- MatterControl.OpenGL/GCodeRenderer/GCodeRenderer.cs
+++ MatterControl.OpenGL/GCodeRenderer/GCodeRenderer.cs
@@ -343,7 +343,8 @@
 					for (int i = renderInfo.StartLayerIndex; i < renderInfo.EndLayerIndex - 1; i++)
 					{
 						int featuresOnLayer = renderFeatures[i].Count;
-						if (featuresOnLayer > 1)
+						if (featuresOnLayer > 1
+							&& layerVertexBuffer[i] != null)
 						{
 							layerVertexBuffer[i].RenderRange(0, featureEndIndex[i][featuresOnLayer - 1]);
 						}
@@ -372,7 +373,8 @@
 						startFeature = Math.Max(endFeature - 1, 0);
 					}

-					if (endFeature > startFeature)
+					if (endFeature > startFeature
+						&& layerVertexBuffer[layerIndex] != null)
 					{
 						int ellementCount = featureEndIndex[layerIndex][endFeature - 1] - featureStartIndex[layerIndex][startFeature];


Draw x64 image in Agg

Draw x64 image in Agg

--- MatterControlLib/ApplicationView/WidescreenPanel.cs
+++ MatterControlLib/ApplicationView/WidescreenPanel.cs
@@ -31,6 +31,7 @@
 using MatterHackers.Agg;
 using MatterHackers.Agg.Image;
 using MatterHackers.Agg.Platform;
+using MatterHackers.Agg.Transform;
 using MatterHackers.Agg.UI;
 using MatterHackers.Localizations;
 using MatterHackers.MatterControl.ConfigurationPage;
@@ -191,7 +192,18 @@

 			popupMenu.CreateHorizontalLine();

-			menuItem = popupMenu.CreateMenuItem("About".Localize() + " MatterControl", indicatorIcon);
+			var imageBuffer = new ImageBuffer(18, 18);
+
+			// x64 indicator icon
+			if (IntPtr.Size == 8)
+			{
+				var graphics = imageBuffer.NewGraphics2D();
+				graphics.Clear(menuTheme.ActiveTabColor);
+				graphics.Rectangle(imageBuffer.GetBoundingRect(), menuTheme.PrimaryAccentColor);
+				graphics.DrawString("64", imageBuffer.Width / 2, imageBuffer.Height / 2, 8, Agg.Font.Justification.Center, Agg.Font.Baseline.BoundsCenter, color: menuTheme.PrimaryAccentColor);
+			}
+
+			menuItem = popupMenu.CreateMenuItem("About".Localize() + " MatterControl", imageBuffer);
 			menuItem.Click += (s, e) => ApplicationController.Instance.ShowAboutPage();
 			return popupMenu;
 		}


Ensure icon is loaded after .InvertIcons property is deserialized

- Issue MatterHackers/MatterControl#4826
Thumbnail generating icon is not theme aware

--- MatterControlLib/ApplicationView/Themes/ThemeConfig.cs
+++ MatterControlLib/ApplicationView/Themes/ThemeConfig.cs
@@ -238,6 +238,9 @@
 			// {
 			// 	this.BedColor = this.ResolveColor(this.BackgroundColor, Color.Gray.WithAlpha(60));
 			// }
+
+			// EnsureDefaults is called after deserialization and at a point when state should be fully loaded. Invoking RebuildTheme here ensures icons are inverted correctly
+			this.RebuildTheme();
 		}

 		public Color RowBorder { get; set; }


Update btcwallet arguments for mainnet switch.

--- Paymetheus.Rpc/WalletProcess.cs
+++ Paymetheus.Rpc/WalletProcess.cs
@@ -17,11 +17,18 @@
             if (intendedNetwork == null)
                 throw new ArgumentNullException(nameof(intendedNetwork));

-            // Note: when mainnet becomes the default this should use "testnet" and
-            // not "testnet3" as the flag.
-            string networkFlag = "";
-            if (intendedNetwork != BlockChainIdentity.TestNet3)
+            var networkFlag = "";
+            if (intendedNetwork == BlockChainIdentity.TestNet3)
+            {
+                // While the actual name of the network is "testnet3", the wallet uses
+                // the --testnet flag for this network.
+                networkFlag = "--testnet";
+            }
+            else if (intendedNetwork != BlockChainIdentity.MainNet)
+            {
                 networkFlag = $"--{intendedNetwork.Name}";
+            }
+
             var v4ListenAddress = RpcListenAddress("127.0.0.1", intendedNetwork);

             var processInfo = new ProcessStartInfo();


Fixed badly named variable when reading memory info

--- MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs
+++ MinidumpExplorer/DbgHelp.MinidumpFiles/MiniDumpFile.cs
@@ -106,9 +106,9 @@
             }

             // 4 == skip the NumberOfMemoryRanges field (4 bytes)
-            MINIDUMP_MEMORY_DESCRIPTOR[] modules = ReadArray<MINIDUMP_MEMORY_DESCRIPTOR>(streamPointer + 4, (int)memoryList.NumberOfMemoryRanges);
-
-            List<MiniDumpMemoryDescriptor> returnList = new List<MiniDumpMemoryDescriptor>(modules.Select(x => new MiniDumpMemoryDescriptor(x)));
+            MINIDUMP_MEMORY_DESCRIPTOR[] memoryDescriptors = ReadArray<MINIDUMP_MEMORY_DESCRIPTOR>(streamPointer + 4, (int)memoryList.NumberOfMemoryRanges);
+
+            List<MiniDumpMemoryDescriptor> returnList = new List<MiniDumpMemoryDescriptor>(memoryDescriptors.Select(x => new MiniDumpMemoryDescriptor(x)));

             return returnList.ToArray();
         }


Properly instantiate dialog.

Properly instantiate dialog.

--- Pinta/Dialogs/NewImageDialog.cs
+++ Pinta/Dialogs/NewImageDialog.cs
@@ -26,17 +26,18 @@

 using System;
 using Pinta.Core;
+using Gtk;

 namespace Pinta
 {
 	public partial class NewImageDialog : Gtk.Dialog
 	{
-		public NewImageDialog ()
+		public NewImageDialog () : base (string.Empty, PintaCore.Chrome.MainWindow, DialogFlags.Modal)
 		{
 			this.Build ();

-			this.Icon = Gtk.IconTheme.Default.LoadIcon ("gtk-new", 16, Gtk.IconLookupFlags.UseBuiltin);
-			AlternativeButtonOrder = new int[] { (int) Gtk.ResponseType.Ok, (int) Gtk.ResponseType.Cancel };
+			this.Icon = Gtk.IconTheme.Default.LoadIcon ("gtk-new", 16, IconLookupFlags.UseBuiltin);
+			AlternativeButtonOrder = new int[] { (int) ResponseType.Ok, (int) ResponseType.Cancel };
 		}

 		public int NewImageWidth { get { return this.widthSpinner.ValueAsInt; } }


Improve code style consistency.

Improve code style consistency.

--- src/MySqlConnector/Serialization/ConnectionSettings.cs
+++ src/MySqlConnector/Serialization/ConnectionSettings.cs
@@ -103,26 +103,26 @@
 		public bool UseCompression { get; }

 		// Helper Functions
-		private int? _connectionTimeoutMilliseconds;
+		int? m_connectionTimeoutMilliseconds;
 		public int ConnectionTimeoutMilliseconds
 		{
 			get
 			{
-				if (!_connectionTimeoutMilliseconds.HasValue)
+				if (!m_connectionTimeoutMilliseconds.HasValue)
 				{
 					try
 					{
 						checked
 						{
-							_connectionTimeoutMilliseconds = ConnectionTimeout * 1000;
+							m_connectionTimeoutMilliseconds = ConnectionTimeout * 1000;
 						}
 					}
 					catch (OverflowException)
 					{
-						_connectionTimeoutMilliseconds = Int32.MaxValue;
+						m_connectionTimeoutMilliseconds = Int32.MaxValue;
 					}
 				}
-				return _connectionTimeoutMilliseconds.Value;
+				return m_connectionTimeoutMilliseconds.Value;
 			}
 		}


Properly distinguish between .NET 4.0 and 4.5

--- src/NUnitEngine/nunit.engine/Services/DomainManager.cs
+++ src/NUnitEngine/nunit.engine/Services/DomainManager.cs
@@ -109,6 +109,10 @@

                 if (configFile == null || configFile == string.Empty)
                     configFile = testFile.Name + ".config";
+
+                // Setting the target framework is only supported when running with
+                // multiple AppDomains, one per assembly.
+                SetTargetFramework(testFile.FullName, setup);
             }
             else
             {
@@ -385,6 +389,57 @@
             }
         }

+        // .NET versions greater than v4.0 report as v4.0, so look at
+        // the TargetFrameworkAttribute on the assembly if it exists
+        private static void SetTargetFramework(string assemblyPath, AppDomainSetup setup)
+        {
+            var property = typeof(AppDomainSetup).GetProperty("TargetFrameworkName", BindingFlags.Public | BindingFlags.Instance);
+
+            // If property is null, .NET 4.5+ is not installed, so there is no need
+            if (property != null)
+            {
+                var domain = AppDomain.CreateDomain("TargetFrameworkDomain");
+                try
+                {
+                    var agentType = typeof(TargetFrameworkAgent);
+                    var agent = domain.CreateInstanceAndUnwrap(agentType.Assembly.FullName, agentType.FullName) as TargetFrameworkAgent;
+                    var targetFramework = agent.GetTargetFrameworkName(assemblyPath);
+                    if(!string.IsNullOrEmpty(targetFramework))
+                    {
+                        property.SetValue(setup, targetFramework, null);
+                    }
+                }
+                finally
+                {
+                    AppDomain.Unload(domain);
+                }
+            }
+        }
+
+        private class TargetFrameworkAgent : MarshalByRefObject
+        {
+            public string GetTargetFrameworkName(string assemblyPath)
+            {
+                // You can't get custom attributes when the assembly is loaded reflection only
+                var testAssembly = Assembly.LoadFrom(assemblyPath);
+
+                var attrs = testAssembly.GetCustomAttributes(false);
+                foreach (Attribute attr in attrs)
+                {
+                    var type = attr.GetType();
+                    if (type.Name == "TargetFrameworkAttribute")
+                    {
+                        var property = type.GetProperty("FrameworkName", BindingFlags.Public | BindingFlags.Instance);
+                        if (property != null)
+                        {
+                            return property.GetValue(attr, null) as string;
+                        }
+                    }
+                }
+                return null;
+            }
+        }
+
         #endregion
     }
 }


Remove unused imports

Remove unused imports

--- src/HolzShots.Windows/Forms/CopyCodeLinkLabel.cs
+++ src/HolzShots.Windows/Forms/CopyCodeLinkLabel.cs
@@ -1,5 +1,3 @@
-using System;
-using System.ComponentModel;
 using System.Drawing;

 namespace HolzShots.Windows.Forms


ignoring connection failed exceptions

ignoring connection failed exceptions

--- src/Nvents/Services/Network/MultiEventServiceClient.cs
+++ src/Nvents/Services/Network/MultiEventServiceClient.cs
@@ -53,7 +53,14 @@
 				var connection = server as ICommunicationObject;
 				connection.Faulted += connection_FaultedOrClosing;
 				connection.Closing += connection_FaultedOrClosing;
-				connection.Open();
+				try
+				{
+					connection.Open();
+				}
+				catch (Exception ex)
+				{
+					continue;
+				}
 				servers[address] = server;
 				yield return server;
 			}


Add SiloName to membership logging statements (and not just IP address).

--- src/Orleans/SystemTargetInterfaces/IMembershipTable.cs
+++ src/Orleans/SystemTargetInterfaces/IMembershipTable.cs
@@ -173,7 +173,8 @@
                (x, y) =>
                {
                    if (x.Item1.Status.Equals(SiloStatus.Dead)) return 1; // put Deads at the end
-                   return 1;
+                   if (y.Item1.Status.Equals(SiloStatus.Dead)) return -1; // put Deads at the end
+                   return String.Compare(x.Item1.InstanceName, y.Item1.InstanceName, StringComparison.Ordinal);
                });
             Members = list.AsReadOnly();
             Version = version;
@@ -222,7 +223,7 @@
                 dead,
                 otherCounts,
                 Version,
-                Utils.EnumerableToString(Members, (tuple) => tuple.Item1.ToFullString()));
+                Utils.EnumerableToString(Members, tuple => tuple.Item1.ToFullString()));
         }

         // return a copy of the table removing all dead appereances of dead nodes, except for the last one.
@@ -230,10 +231,10 @@
         {
             var dead = new Dictionary<string, Tuple<MembershipEntry, string>>();
             // pick only latest Dead for each instance
-            foreach (var next in this.Members.Where(item => item.Item1.Status == SiloStatus.Dead))
+            foreach (var next in Members.Where(item => item.Item1.Status == SiloStatus.Dead))
             {
                 var name = next.Item1.InstanceName;
-                Tuple<MembershipEntry, string> prev = null;
+                Tuple<MembershipEntry, string> prev;
                 if (!dead.TryGetValue(name, out prev))
                 {
                     dead[name] = next;
@@ -247,8 +248,8 @@
             }
             //now add back non-dead
             List<Tuple<MembershipEntry, string>> all = dead.Values.ToList();
-            all.AddRange(this.Members.Where(item => item.Item1.Status != SiloStatus.Dead));
-            return new MembershipTableData(all, this.Version);
+            all.AddRange(Members.Where(item => item.Item1.Status != SiloStatus.Dead));
+            return new MembershipTableData(all, Version);
         }
     }

@@ -271,7 +272,7 @@

         public List<Tuple<SiloAddress, DateTime>> SuspectTimes { get; set; }

-        private static readonly List<Tuple<SiloAddress, DateTime>> emptyList = new List<Tuple<SiloAddress, DateTime>>(0);
+        private static readonly List<Tuple<SiloAddress, DateTime>> EmptyList = new List<Tuple<SiloAddress, DateTime>>(0);

         // partialUpdate arrivies via gossiping with other oracles. In such a case only take the status.
         internal void Update(MembershipEntry updatedSiloEntry)
@@ -295,7 +296,7 @@
         internal List<Tuple<SiloAddress, DateTime>> GetFreshVotes(TimeSpan expiration)
         {
             if (SuspectTimes == null)
-                return emptyList;
+                return EmptyList;
             DateTime now = DateTime.UtcNow;
             return SuspectTimes.FindAll(voter =>
                 {
@@ -326,7 +327,7 @@

         public override string ToString()
         {
-            return string.Format("SiloAddress={0} Status={1}", SiloAddress.ToLongString(), Status);
+            return string.Format("SiloAddress={0} InstanceName={1} Status={2}", SiloAddress.ToLongString(), InstanceName, Status);
         }

         internal string ToFullString(bool full = false)
@@ -340,21 +341,21 @@
             List<DateTime> timestamps = SuspectTimes == null
                 ? null
                 : SuspectTimes.Select(tuple => tuple.Item2).ToList();
-            return string.Format("[SiloAddress={0} Status={1} HostName={2} ProxyPort={3} " +
-                                 "RoleName={4} InstanceName={5} UpdateZone={6} FaultZone={7} StartTime = {8} IAmAliveTime = {9} {10} {11}]",
+            return string.Format("[SiloAddress={0} InstanceName={1} Status={2} HostName={3} ProxyPort={4} " +
+                                 "RoleName={5} UpdateZone={6} FaultZone={7} StartTime = {8} IAmAliveTime = {9} {10} {11}]",
                 SiloAddress.ToLongString(),
+                InstanceName,
                 Status,
                 HostName,
                 ProxyPort,
                 RoleName,
-                InstanceName,
                 UpdateZone,
                 FaultZone,
                 TraceLogger.PrintDate(StartTime),
                 TraceLogger.PrintDate(IAmAliveTime),
                 suspecters == null
                     ? ""
-                    : "Suspecters = " + Utils.EnumerableToString(suspecters, (SiloAddress sa) => sa.ToLongString()),
+                    : "Suspecters = " + Utils.EnumerableToString(suspecters, sa => sa.ToLongString()),
                 timestamps == null
                     ? ""
                     : "SuspectTimes = " + Utils.EnumerableToString(timestamps, TraceLogger.PrintDate)


Add interactive host test

Add interactive host test

--- src/Interactive/HostTest/InteractiveHostTests.cs
+++ src/Interactive/HostTest/InteractiveHostTests.cs
@@ -11,6 +11,7 @@
 using System.Text;
 using System.Threading;
 using Microsoft.CodeAnalysis;
+using Microsoft.CodeAnalysis.CSharp;
 using Microsoft.CodeAnalysis.CSharp.Test.Utilities;
 using Microsoft.CodeAnalysis.Editor.CSharp.Interactive;
 using Microsoft.CodeAnalysis.Interactive;
@@ -1066,6 +1067,35 @@
             Assert.Equal("[Metadata.ICSProp]\r\n", output);
         }

+        [Fact, WorkItem(6457, "https://github.com/dotnet/roslyn/issues/6457")]
+        public void MissingReferencesReuse()
+        {
+            var source = @"
+public class C
+{
+    public System.Diagnostics.Process P;
+}
+";
+
+            var lib = CSharpCompilation.Create(
+"Lib",
+new[] { SyntaxFactory.ParseSyntaxTree(source) },
+new[] { TestReferences.NetFx.v4_0_30319.mscorlib, TestReferences.NetFx.v4_0_30319.System },
+new CSharpCompilationOptions(OutputKind.DynamicallyLinkedLibrary));
+
+            var libFile = Temp.CreateFile("lib").WriteAllBytes(lib.EmitToArray());
+
+            Execute($@"#r ""{libFile.Path}""");
+            Execute("C c;");
+            Execute("c = new C()");
+
+            var error = ReadErrorOutputToEnd();
+            Assert.Equal("", error);
+
+            var output = ReadOutputToEnd();
+            AssertEx.AssertEqualToleratingWhitespaceDifferences("C { P=null }", output);
+        }
+
         #region Submission result printing - null/void/value.

         [Fact]


Thank you, BaseHttpServer, for telling me where things go wrong.

--- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -662,11 +662,11 @@
             }
             catch (IOException e)
             {
-                m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw ", e);
+                m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e);
             }
             catch (Exception e)
             {
-                m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw " + e.ToString());
+                m_log.ErrorFormat("[BASE HTTP SERVER]: HandleRequest() threw {0}", e.StackTrace);
                 SendHTML500(response);
             }
             finally


In BaseHttpServer.HandleRequest(), use Culture.SetCurrentCulture() rather than creating a new CultureInfo separately

--- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -436,7 +436,7 @@
 //                    reqnum = String.Format("{0}:{1}",request.RemoteIPEndPoint,request.Headers["opensim-request-id"]);
                  //m_log.DebugFormat("[BASE HTTP SERVER]: <{0}> handle request for {1}",reqnum,request.RawUrl);

-                Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US", true);
+                Culture.SetCurrentCulture();

 //                //  This is the REST agent interface. We require an agent to properly identify
 //                //  itself. If the REST handler recognizes the prefix it will attempt to


* A few fixes to the Linear Motor

* A few fixes to the Linear Motor

--- OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs
+++ OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs
@@ -64,6 +64,7 @@
         private Vector3 m_angularMotorDirection = Vector3.Zero;
         private Vector3 m_linearFrictionTimescale = Vector3.Zero;
         private Vector3 m_linearMotorDirection = Vector3.Zero;
+        private Vector3 m_linearMotorDirectionLASTSET = Vector3.Zero;
         private Vector3 m_linearMotorOffset = Vector3.Zero;
         private float m_angularDeflectionEfficiency = 0;
         private float m_angularDeflectionTimescale = 0;
@@ -86,7 +87,7 @@
         private VehicleFlag m_flags = (VehicleFlag) 0;

         private bool m_LinearMotorSetLastFrame = false;
-
+

@@ -173,7 +174,7 @@
                     break;
                 case Vehicle.LINEAR_MOTOR_DIRECTION:
                     m_linearMotorDirection = new Vector3(pValue, pValue, pValue);
-                    m_LinearMotorSetLastFrame = true;
+                    m_linearMotorDirectionLASTSET = new Vector3(pValue, pValue, pValue);
                     break;
                 case Vehicle.LINEAR_MOTOR_OFFSET:
                     m_linearMotorOffset = new Vector3(pValue, pValue, pValue);
@@ -199,6 +200,7 @@
                     break;
                 case Vehicle.LINEAR_MOTOR_DIRECTION:
                     m_linearMotorDirection = new Vector3(pValue.X, pValue.Y, pValue.Z);
+                    m_linearMotorDirectionLASTSET = new Vector3(pValue.X, pValue.Y, pValue.Z);
                     break;
                 case Vehicle.LINEAR_MOTOR_OFFSET:
                     m_linearMotorOffset = new Vector3(pValue.X, pValue.Y, pValue.Z);
@@ -466,27 +468,31 @@

             if (!m_linearMotorDirection.ApproxEquals(Vector3.Zero, 0.01f))
             {
+
                 Vector3 addAmount = m_linearMotorDirection/(m_linearMotorTimescale/pTimestep);
                 m_lastLinearVelocityVector += (addAmount*10);

                 // This will work temporarily, but we really need to compare speed on an axis
-                if (Math.Abs(m_lastLinearVelocityVector.X) > Math.Abs(m_linearMotorDirection.X))
-                    m_lastLinearVelocityVector.X = m_linearMotorDirection.X;
-                if (Math.Abs(m_lastLinearVelocityVector.Y) > Math.Abs(m_linearMotorDirection.Y))
-                    m_lastLinearVelocityVector.Y = m_linearMotorDirection.Y;
-                if (Math.Abs(m_lastLinearVelocityVector.Z) > Math.Abs(m_linearMotorDirection.Z))
-                    m_lastLinearVelocityVector.Z = m_linearMotorDirection.Z;
-                //System.Console.WriteLine("add: " + addAmount);
-
-                m_linearMotorDirection -= (m_linearMotorDirection*new Vector3(1, 1, 1)/
-                                          (m_linearMotorDecayTimescale/pTimestep)) * 0.10f;
+                if (Math.Abs(m_lastLinearVelocityVector.X) > Math.Abs(m_linearMotorDirectionLASTSET.X))
+                    m_lastLinearVelocityVector.X = m_linearMotorDirectionLASTSET.X;
+                if (Math.Abs(m_lastLinearVelocityVector.Y) > Math.Abs(m_linearMotorDirectionLASTSET.Y))
+                    m_lastLinearVelocityVector.Y = m_linearMotorDirectionLASTSET.Y;
+                if (Math.Abs(m_lastLinearVelocityVector.Z) > Math.Abs(m_linearMotorDirectionLASTSET.Z))
+                    m_lastLinearVelocityVector.Z = m_linearMotorDirectionLASTSET.Z;
+                //Console.WriteLine("add: " + addAmount);
+
+                Vector3 decayfraction = ((Vector3.One/(m_linearMotorDecayTimescale/pTimestep)));
+                //Console.WriteLine("decay: " + decayfraction);
+
+                m_linearMotorDirection -= m_linearMotorDirection * decayfraction;
                 //Console.WriteLine("actual: " + m_linearMotorDirection);
             }
+
             //System.Console.WriteLine(m_linearMotorDirection + " " + m_lastLinearVelocityVector);

             SetMotorProperties();
-
-            Vector3 decayamount = new Vector3(1,1,1)/(m_linearFrictionTimescale/pTimestep);
+
+            Vector3 decayamount = Vector3.One / (m_linearFrictionTimescale / pTimestep);
             m_lastLinearVelocityVector -= m_lastLinearVelocityVector * decayamount;

             //m_linearMotorDirection  *= decayamount;
@@ -507,7 +513,7 @@
             {

                 d.JointSetLMotorAxis(m_lMotor1, 0, 1, dirNorm.X, dirNorm.Y, dirNorm.Z);
-                d.JointSetLMotorParam(m_lMotor1, (int)dParam.Vel, m_linearMotorDirection.Length());
+                d.JointSetLMotorParam(m_lMotor1, (int)dParam.Vel, m_lastLinearVelocityVector.Length());

                 d.JointSetLMotorParam(m_lMotor1, (int)dParam.FMax, 35f * objMass.mass);
             }


Update class reference.

Update class reference.

--- src/SJP.Schematic.Reporting/Html/ViewModels/Columns.cs
+++ src/SJP.Schematic.Reporting/Html/ViewModels/Columns.cs
@@ -114,7 +114,7 @@
             )
             {
                 var isKey = isPrimaryKeyColumn || isUniqueKeyColumn || isForeignKeyColumn;
-                ColumnClass = isKey ? @"class=""keyColumn""" : string.Empty;
+                ColumnClass = isKey ? @"class=""is-key-column""" : string.Empty;

                 ColumnIcon = BuildColumnIcon(isPrimaryKeyColumn, isUniqueKeyColumn, isForeignKeyColumn);
                 ColumnTitle = BuildColumnTitle(isPrimaryKeyColumn, isUniqueKeyColumn, isForeignKeyColumn);
@@ -150,19 +150,19 @@

                 if (isPrimaryKeyColumn)
                 {
-                    const string iconText = @"";
+                    const string iconText = @"";
                     iconPieces.Add(iconText);
                 }

                 if (isUniqueKeyColumn)
                 {
-                    const string iconText = @"";
+                    const string iconText = @"";
                     iconPieces.Add(iconText);
                 }

                 if (isForeignKeyColumn)
                 {
-                    const string iconText = @"";
+                    const string iconText = @"";
                     iconPieces.Add(iconText);
                 }


Некорректный выброс исключения при попытке получения итератора

--- src/ScriptEngine/Machine/Contexts/COMWrapperContext.cs
+++ src/ScriptEngine/Machine/Contexts/COMWrapperContext.cs
@@ -11,10 +11,12 @@
     {
         private Type _dispatchedType;
         private object _instance;
-        private bool? _isEnumerable;
+        private bool? _isIndexed;
         private Dictionary<string, int> _dispIdCache = new Dictionary<string,int>(StringComparer.InvariantCultureIgnoreCase);
         private Dictionary<int, MemberInfo> _membersCache = new Dictionary<int, MemberInfo>();
         private Dictionary<int, MethodInfo> _methodBinding = new Dictionary<int, MethodInfo>();
+
+        private const uint E_DISP_MEMBERNOTFOUND = 0x80020003;

         public COMWrapperContext(string progId, IValue[] arguments)
         {
@@ -176,9 +178,17 @@
                                         _instance,
                                         new object[0]);
             }
-            catch (MissingMethodException)
-            {
-                throw RuntimeException.IteratorIsNotDefined();
+            catch (TargetInvocationException e)
+            {
+                uint hr = (uint)System.Runtime.InteropServices.Marshal.GetHRForException(e.InnerException);
+                if (hr == E_DISP_MEMBERNOTFOUND)
+                {
+                    throw RuntimeException.IteratorIsNotDefined();
+                }
+                else
+                {
+                    throw;
+                }
             }

             while (comEnumerator.MoveNext())
@@ -239,6 +249,40 @@
             get
             {
                 return true;
+            }
+        }
+
+        public override bool IsIndexed
+        {
+            get
+            {
+                if (_isIndexed == null)
+                {
+                    try
+                    {
+
+                        var comValue = _instance.GetType().InvokeMember("[DispId=0]",
+                                                BindingFlags.InvokeMethod|BindingFlags.GetProperty,
+                                                null,
+                                                _instance,
+                                                new object[0]);
+                        _isIndexed = true;
+                    }
+                    catch (TargetInvocationException e)
+                    {
+                        uint hr = (uint)System.Runtime.InteropServices.Marshal.GetHRForException(e.InnerException);
+                        if (hr == E_DISP_MEMBERNOTFOUND)
+                        {
+                            _isIndexed = false;
+                        }
+                        else
+                        {
+                            throw;
+                        }
+                    }
+                }
+
+                return (bool)_isIndexed;
             }
         }


cleaning things from the example

cleaning things from the example

--- Example/MainPage.xaml.cs
+++ Example/MainPage.xaml.cs
@@ -18,20 +18,14 @@
 {
     public partial class MainPage : PhoneApplicationPage
     {
-
-
         const string MODEL_FILE = "haarcascade_frontalface_alt.xml";
-        FaceDetectionWinPhone.Detector _detector;
+        FaceDetectionWinPhone.Detector m_detector;

-        // private byte[] pixelBytes;
-        // private int[] pixelData;
         // Constructor
         public MainPage()
         {
             InitializeComponent();
-            _detector = new FaceDetectionWinPhone.Detector(System.Xml.Linq.XDocument.Load(MODEL_FILE));
-            // Sample code to localize the ApplicationBar
-            //BuildLocalizedApplicationBar();
+            m_detector = new FaceDetectionWinPhone.Detector(System.Xml.Linq.XDocument.Load(MODEL_FILE));
         }

         private void btnPhotoChoose_Clicked(object sender, RoutedEventArgs e)
@@ -46,17 +40,15 @@
         {
             if (e.TaskResult == TaskResult.OK)
             {
-                //Code to display the photo on the page in an image control named myImage.
                 BitmapImage bmp = new BitmapImage();
                 bmp.SetSource(e.ChosenPhoto);
                 WriteableBitmap btmMap = new WriteableBitmap(bmp);

                 List<FaceDetectionWinPhone.Rectangle> faces =
-                     _detector.getFaces(
+                     m_detector.getFaces(
                      btmMap, 10f, 1f, 0.05f, 1, false, false);

-
-
+                //update the bitmap before drawing it.
                 foreach (var r in faces)
                 {
                     int x = Convert.ToInt32(r.X);


Updates the read_all_forwards method to accurately provide the next position for continuing to read messages.

--- src/SqlStreamStore.Sqlite/SqliteStreamStore.ReadAll.cs
+++ src/SqlStreamStore.Sqlite/SqliteStreamStore.ReadAll.cs
@@ -120,7 +120,7 @@

                 bool isEnd = remainingMessages - messages.Count <= 0;
                 var nextPosition = messages.Any()
-                    ? messages.Last().Position
+                    ? messages.Last().Position + 1
                     : Position.End;

                 return Task.FromResult(new ReadAllPage(


checkpoint:  fixed ValidationBuildSession problems

--- src/StructureMap/Diagnostics/ValidationBuildSession.cs
+++ src/StructureMap/Diagnostics/ValidationBuildSession.cs
@@ -7,6 +7,7 @@
 using StructureMap.Graph;
 using StructureMap.Interceptors;
 using StructureMap.Pipeline;
+using StructureMap.TypeRules;

 namespace StructureMap.Diagnostics
 {
@@ -106,8 +107,9 @@
             _explicitInstances = pipelineGraph.GetAllInstances();
             _errors = new ErrorCollection();

-            pipelineGraph.EachInstance((t, i) =>
-            {
+            pipelineGraph.EachInstance((t, i) => {
+                if (t.IsOpenGeneric()) return;
+
                 _buildStack = new BuildStack();
                 validateInstance(t, i);
             });


clean up

clean up

--- src/SupaCharge.Core/ExceptionHandling/ExceptionDump.cs
+++ src/SupaCharge.Core/ExceptionHandling/ExceptionDump.cs
@@ -4,48 +4,37 @@

 namespace SupaCharge.Core.ExceptionHandling {
   public class ExceptionDump {
-    public ExceptionDump(Exception Exception) {
-      mException = Exception;
-      mIsInnerException = false;
-      if (HasInnerException(Exception))
-        mIsInnerException = true;
+    public ExceptionDump(Exception exception) {
+      mException = exception;
     }

     public override string ToString() {
-      var parts = FormatException(mException);
-      return parts;
+      return FormatException(mException);
     }

-    private static bool HasInnerException(Exception exc) {
-      return exc.InnerException != null;
-    }
-
-    private string FormatException(Exception exc) {
-      var parts = new List<string>();
+    private static string FormatException(Exception exc) {
+      var messages = new List<string>();

       while (exc != null) {
-        if (mIsInnerException && exc != mException)
-          parts.Add("----- Inner Exception");
-
-        parts.Add(exc.GetType().ToString());
-        parts.Add(exc.Message);
-        parts.Add(exc.StackTrace);
-
+        if (messages.Count > 0)
+          messages.Add("----- Inner Exception");
+        messages.Add(exc.GetType().ToString());
+        messages.Add(exc.Message);
+        messages.Add(exc.StackTrace);
         exc = exc.InnerException;
       }

-      var result = parts
-        .Where(s => s != null && FilterEmptyItem(s))
-        .ToArray();
-
-      return string.Join(Environment.NewLine, result);
+      return CombineMessages(messages);
     }

-    private static bool FilterEmptyItem(string item) {
-      return (item.Length > 0 && item != string.Empty);
+    private static string CombineMessages(IEnumerable<string> parts) {
+      return string.Join(Environment.NewLine, parts.Where(s => IsValidMessage(s)).ToArray());
     }

-    private readonly bool mIsInnerException;
+    private static bool IsValidMessage(string message) {
+      return !string.IsNullOrEmpty(message);
+    }
+
     private readonly Exception mException;
   }
 }


chaned time and days

chaned time and days

- days to day(s)
- months to month(s) etc

--- src/NadekoBot/Modules/Utility/Commands/Remind.cs
+++ src/NadekoBot/Modules/Utility/Commands/Remind.cs
@@ -151,11 +151,11 @@
                         continue;
                     }
                     else if (value < 1 ||
-                        (groupName == "months" && value > 1) ||
-                        (groupName == "weeks" && value > 4) ||
-                        (groupName == "days" && value >= 7) ||
-                        (groupName == "hours" && value > 23) ||
-                        (groupName == "minutes" && value > 59))
+                        (groupName == "month(s)" && value > 1) ||
+                        (groupName == "week(s)" && value > 4) ||
+                        (groupName == "day(s)" && value >= 7) ||
+                        (groupName == "hour(s)" && value > 23) ||
+                        (groupName == "minute(s)" && value > 59))
                     {
                         await channel.SendMessageAsync($"⚠ Invalid {groupName} value.").ConfigureAwait(false);
                         return;
@@ -164,11 +164,11 @@
                         namesAndValues[groupName] = value;
                     output += m.Groups[groupName].Value + " " + groupName + " ";
                 }
-                var time = DateTime.Now + new TimeSpan(30 * namesAndValues["months"] +
-                                                        7 * namesAndValues["weeks"] +
-                                                        namesAndValues["days"],
-                                                        namesAndValues["hours"],
-                                                        namesAndValues["minutes"],
+                var time = DateTime.Now + new TimeSpan(30 * namesAndValues["month(s)"] +
+                                                        7 * namesAndValues["week(s)"] +
+                                                        namesAndValues["day(s)"],
+                                                        namesAndValues["hour(s)"],
+                                                        namesAndValues["minute(s)"],
                                                         0);

                 var rem = new Reminder