minor: Correct minor spelling mistake Reseting -> Resetting in HG Map module log message

--- OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
+++ OpenSim/Region/CoreModules/Hypergrid/HGWorldMapModule.cs
@@ -129,7 +129,7 @@
                         b.Access = 254; // means 'simulator is offline'. We need this because the viewer ignores 255's
                     }

-                    m_log.DebugFormat("[HG MAP]: Reseting {0} blocks", mapBlocks.Count);
+                    m_log.DebugFormat("[HG MAP]: Resetting {0} blocks", mapBlocks.Count);
                     sp.ControllingClient.SendMapBlock(mapBlocks, 0);
                     m_SeenMapBlocks.Remove(clientID);
                 }


Removed unnecessary reference

Removed unnecessary reference

--- hibernate/Program.cs
+++ hibernate/Program.cs
@@ -2,58 +2,40 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
-using System.Threading;     // Thread
+using System.Threading; 	// Thread
 using System.Threading.Tasks;
-using System.IO;            // File
 //using System.Diagnostics;   // Process
 using System.Windows.Forms; // Application
-using Microsoft.Win32;      // Registry
+using Microsoft.Win32; 		// Registry

 namespace hibernate
 {
-    class Program
-    {
-        private static string CustomLibrary = @"SvtLib.dll";
-        //private static string ErrorLow = "Please enter TIME argument\nUsage: hibernate <seconds>";
-        private static string ErrorMedium = @"Please run as administrator";
-        private static string ErrorHigh = CustomLibrary + @" missing";
+	class Program
+	{
+		//private static string ErrorLow = "Please enter TIME argument\nUsage: hibernate <seconds>";
+		private static string ErrorMedium = "Please run as administrator";

-        static int Main(string[] args)
-        {
-            if (File.Exists(CustomLibrary))
-            {
-                if (isHibernationEnabled())
-                {
-                    return doHibernation(args);
-                }
-                else
-                {
-                    if (isAppElevated())
-                    {
-                        enableHibernation();
+		static int Main(string[] args)
+		{
+			if (isHibernationEnabled())
+			{
+				return doHibernation(args);
+			}
+			else
+			{
+				if (isAppElevated())
+				{
+					enableHibernation();

-                        return doHibernation(args);
-                    }
-                    else
-                    {
-                        Console.WriteLine(ErrorMedium);
-                        return 2;
-                    }
-                }
-            }
-            else
-            {
-                if (isHibernationEnabled())
-                {
-                    return doHibernation(args);
-                }
-                else
-                {
-                    Console.WriteLine(ErrorHigh);
-                    return 1;
-                }
-            }
-        }
+					return doHibernation(args);
+				}
+				else
+				{
+					Console.WriteLine(ErrorMedium);
+					return 2;
+				}
+			}
+		}

         private static bool isHibernationEnabled()
         {


:lemon: C# Hamming - re-enabled all tests

--- csharp/hamming/HammingTest.cs
+++ csharp/hamming/HammingTest.cs
@@ -9,35 +9,30 @@
         Assert.That(Hamming.Compute("",""), Is.EqualTo(0));
     }

-    [Ignore]
     [Test]
     public void No_difference_between_identical_strands()
     {
         Assert.That(Hamming.Compute("GGACTGA","GGACTGA"), Is.EqualTo(0));
     }

-    [Ignore]
     [Test]
     public void Complete_hamming_distance_in_small_strand()
     {
         Assert.That(Hamming.Compute("ACT","GGA"), Is.EqualTo(3));
     }

-    [Ignore]
     [Test]
     public void Hamming_distance_is_off_by_one_strand()
     {
         Assert.That(Hamming.Compute("GGACGGATTCTG","AGGACGGATTCT"), Is.EqualTo(9));
     }

-    [Ignore]
     [Test]
     public void Smalling_hamming_distance_in_middle_somewhere()
     {
         Assert.That(Hamming.Compute("GGACG","GGTCG"), Is.EqualTo(1));
     }

-    [Ignore]
     [Test]
     public void Larger_distance()
     {


addrange directly

addrange directly


Fix text selected bug

Fix text selected bug

--- PowerShellTools/Intellisense/AutoCompletionController.cs
+++ PowerShellTools/Intellisense/AutoCompletionController.cs
@@ -65,6 +65,11 @@
                 return NextCommandHandler.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
             }

+            if (pguidCmdGroup != VSConstants.VSStd2K)
+            {
+                return NextCommandHandler.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
+            }
+
             return ProcessKeystroke(nCmdID, pvaIn) == VSConstants.S_OK ? VSConstants.S_OK : NextCommandHandler.Exec(ref pguidCmdGroup, nCmdID, nCmdexecopt, pvaIn, pvaOut);
         }

@@ -76,7 +81,13 @@
         #endregion

         private int ProcessKeystroke(uint nCmdID, IntPtr pvaIn)
-        {
+        {
+            if (!_textView.Selection.IsEmpty)
+            {
+                // Auto completion won't take effect when there is text selection.
+                return VSConstants.S_FALSE;
+            }
+
             switch (nCmdID)
             {
                 case (uint)VSConstants.VSStd2KCmdID.TYPECHAR:


Disable add from cookiecutter command on project items where the project itself is not supported.

--- Python/Product/Cookiecutter/Model/ProjectSystemClient.cs
+++ Python/Product/Cookiecutter/Model/ProjectSystemClient.cs
@@ -149,10 +149,12 @@
             foreach (EnvDTE.UIHierarchyItem selItem in items) {
                 var item = selItem.Object as EnvDTE.ProjectItem;
                 if (item != null && item.Properties != null) {
-                    yield return new ProjectLocation() {
-                        FolderPath = item.Properties.Item("FullPath").Value.ToString(),
-                        ProjectUniqueName = item.ContainingProject.UniqueName,
-                    };
+                    if (IsProjectSupported(item.ContainingProject)) {
+                        yield return new ProjectLocation() {
+                            FolderPath = item.Properties.Item("FullPath").Value.ToString(),
+                            ProjectUniqueName = item.ContainingProject.UniqueName,
+                        };
+                    }
                 }

                 var proj = selItem.Object as EnvDTE.Project;


Delete Form1.cs

Delete Form1.cs

--- hw-control/Form1.cs
+++ hw-control/Form1.cs
@@ -1,71 +0,0 @@
-using Phidgets;
-using Phidgets.Events;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Linq;
-using System.Text;
-using System.Windows.Forms;
-
-namespace Itrash
-{
-    public partial class Form1Test : Form
-    {
-        private InterfaceKit ifKit;
-
-        public Form1Test()
-        {
-            InitializeComponent();
-        }
-
-        // Init device
-        private void Form_Load(object sender, EventArgs e)
-        {
-            try
-            {
-                ifKit = new InterfaceKit();
-
-                ifKit.Attach += new AttachEventHandler(ifKit_Attach);
-                ifKit.Detach += new DetachEventHandler(ifKit_Detach);
-                ifKit.Error += new ErrorEventHandler(ifKit_Error);
-
-                ifKit.InputChange += new InputChangeEventHandler(ifKit_InputChange);
-                ifKit.OutputChange += new OutputChangeEventHandler(ifKit_OutputChange);
-                ifKit.SensorChange += new SensorChangeEventHandler(ifKit_SensorChange);
-            }
-            catch (PhidgetException ignored) {}
-        }
-
-        private void ifKit_SensorChange(object sender, SensorChangeEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-
-        private void ifKit_OutputChange(object sender, OutputChangeEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-
-        private void ifKit_InputChange(object sender, InputChangeEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-
-        private void ifKit_Error(object sender, ErrorEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-
-        private void ifKit_Detach(object sender, DetachEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-
-        private void ifKit_Attach(object sender, AttachEventArgs e)
-        {
-            throw new NotImplementedException();
-        }
-    }
-}


fix Refresh

fix Refresh

--- resharper/src/resharper-unity/Rider/UnityRefreshTracker.cs
+++ resharper/src/resharper-unity/Rider/UnityRefreshTracker.cs
@@ -1,8 +1,10 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using JetBrains.Application.Settings;
 using JetBrains.Application.Threading;
 using JetBrains.DataFlow;
+using JetBrains.DocumentModel;
 using JetBrains.DocumentModel.Transactions;
 using JetBrains.ProjectModel;
 using JetBrains.ProjectModel.DataContext;
@@ -115,16 +117,19 @@
             });

             documentTransactionManager.AfterTransactionCommit.Advise(lifetime,
-                () =>
+                args =>
                 {
-                    locks.ExecuteWithReadLock(() =>
+                    if (args.Succeded && args.Changes.Any())
                     {
-                        if (documentTransactionManager.CurrentTransaction?.ParentTransaction == null)
+                        locks.ExecuteWithReadLock(() =>
                         {
-                            myLogger.Verbose("documentTransactionManager.AfterTransactionCommit");
-                            groupingEvent.FireIncoming();
-                        }
-                    });
+                            if (documentTransactionManager.CurrentTransaction?.ParentTransaction == null)
+                            {
+                                myLogger.Verbose("documentTransactionManager.AfterTransactionCommit");
+                                groupingEvent.FireIncoming();
+                            }
+                        });
+                    }
                 });
         }
     }


Clear document dirty when undoing back to start

Dirtiness is now determined directly from the AvalonEdit undo stack
(which has the concept built in) rather than doing it ourselves.

--- ShaderEditorApp/ViewModel/Workspace/DocumentViewModel.cs
+++ ShaderEditorApp/ViewModel/Workspace/DocumentViewModel.cs
@@ -45,8 +45,9 @@

 			Document = new TextDocument(contents);

-			// Dirty when document changes.
-			Document.TextChanged += (o, e) => IsDirty = true;
+			// Get 'dirtiness' from the document's undo stack.
+			_isDirty = this.WhenAny(x => x.Document.UndoStack.IsOriginalFile, change => !change.Value)
+				.ToProperty(this, x => x.IsDirty);

 			Close = CommandUtil.Create(_ => _openDocumentSet.CloseDocument(this));

@@ -111,7 +112,7 @@
 			Document.Text = File.ReadAllText(FilePath);

 			// Contents now match the file's, so clear dirty flag.
-			IsDirty = false;
+			Document.UndoStack.MarkAsOriginalFile();
 		}

 		// Save the file to disk.
@@ -129,7 +130,7 @@
 					Document.WriteTextTo(writer);
 				}

-				IsDirty = false;
+				Document.UndoStack.MarkAsOriginalFile();

 				// Add to recent file list.
 				_openDocumentSet.WorkspaceVM.Workspace.UserSettings.RecentFiles.AddFile(FilePath);
@@ -235,12 +236,8 @@
 		// AvalonEdit document object.
 		public TextDocument Document { get; }

-		private bool _bDirty = false;
-		public bool IsDirty
-		{
-			get { return _bDirty; }
-			private set { this.RaiseAndSetIfChanged(ref _bDirty, value); }
-		}
+		private readonly ObservableAsPropertyHelper<bool> _isDirty;
+		public bool IsDirty => _isDirty.Value;

 		public bool IsScript
 		{


remove english SpacePascal differences

remove english SpacePascal differences

--- Signum.Utilities/NaturalLanguage/NaturalLanguageTools.cs
+++ Signum.Utilities/NaturalLanguage/NaturalLanguageTools.cs
@@ -94,7 +94,7 @@
             if (culture == null)
                 culture = CultureInfo.CurrentUICulture;

-            return SpacePascal(pascalStr, CultureInfo.CurrentUICulture.TwoLetterISOLanguageName == "en");
+            return SpacePascal(pascalStr, false);
         }

         public static string SpacePascal(this string pascalStr, bool preserveUppercase)


Wpf: revert change from revision 1135

Wpf: revert change from revision 1135

--- Source/OxyPlot.Wpf/RenderContexts/ShapesRenderContext.cs
+++ Source/OxyPlot.Wpf/RenderContexts/ShapesRenderContext.cs
@@ -553,20 +553,10 @@
                     {
                         size.Width = Math.Max(maxSize.Value.Width, 0);
                     }
-                    else
-                    {
-                        // Add 1 to make sure the text is not clipped at the end
-                        size.Width += 1;
-                    }

                     if (size.Height > maxSize.Value.Height + 1e-3)
                     {
                         size.Height = Math.Max(maxSize.Value.Height, 0);
-                    }
-                    else
-                    {
-                        // Add 1 to make sure the text is not clipped at the bottom
-                        size.Height += 1;
                     }

                     tb.Width = size.Width;


ADDED: ECS.Processes - Storing id of created entity in CreateEntityProcess for next process in chain.

--- Source/Slash.ECS/Source/Processes/CreateEntityProcess.cs
+++ Source/Slash.ECS/Source/Processes/CreateEntityProcess.cs
@@ -36,13 +36,19 @@

         #endregion

+        #region Properties
+
+        public int CreatedEntity { get; private set; }
+
+        #endregion
+
         #region Public Methods and Operators

         public override void Update(float dt)
         {
             base.Update(dt);

-            this.EntityManager.CreateEntity(this.blueprintId, this.attributeTable);
+            this.CreatedEntity = this.EntityManager.CreateEntity(this.blueprintId, this.attributeTable);

             this.Kill();
         }


Fix failing unit test

Fix failing unit test

The code that was finding the node concerned by a diagnostic
was too greedy

--- TestDiagnostics/RoslynExtensions/DiagnosticExtensions.cs
+++ TestDiagnostics/RoslynExtensions/DiagnosticExtensions.cs
@@ -24,6 +24,7 @@
             return root.FindToken(diagnosticSpan.Start)
                 .Parent
                 .AncestorsAndSelf()
+                .Where(x => x.GetLocation().SourceSpan == diagnosticSpan)
                 .OfType<TSyntaxNode>()
                 .First();
         }


Save encoding changed to utf-8 without bom to compatible with old windows.

--- TorrentHardLinkHelper.Library/HardLink/HardLinkHelper.cs
+++ TorrentHardLinkHelper.Library/HardLink/HardLinkHelper.cs
@@ -35,7 +35,8 @@
                 CreateFolder(targetParentFolder);
             }
             this.SearchFolder(sourceFolder, rootFolder, copyLimitSize);
-            File.WriteAllText(Path.Combine(rootFolder, "!hard-link.cmd"), this._builder.ToString(), Encoding.UTF8);
+            var utf8bom = new UTF8Encoding(false);
+            File.WriteAllText(Path.Combine(rootFolder, "!hard-link.cmd"), this._builder.ToString(), utf8bom);
         }

         private void SearchFolder(string folder, string targetParentFolder, int copyLimitSize)


Add caching

Add caching


word edit ui fixes

word edit ui fixes


Remove debug code.

Remove debug code.

--- src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
+++ src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs
@@ -308,7 +308,6 @@

                 Extent = newExtent;
                 Offset = newOffset;
-                System.Diagnostics.Debug.WriteLine($"Shifting due to anchor by {anchorShift} to {Offset + anchorShift} with max {Extent - Viewport}");
                 ArrangeOverrideImpl(size, -Offset);
             }


Hardware.Gio: Avoid NREs when getting bus number etc

--- src/Backends/Banshee.Gio/Banshee.Hardware.Gio/UsbDevice.cs
+++ src/Backends/Banshee.Gio/Banshee.Hardware.Gio/UsbDevice.cs
@@ -72,20 +72,33 @@

         public static int GetBusNumber (IUsbDevice device)
         {
-            var raw = device as IRawDevice;
-            return raw == null ? 0 : int.Parse (raw.Device.UdevMetadata.GetPropertyString (UdevUsbBusNumber));
+            int num = 0;
+            var raw = device as IRawDevice;
+
+            if (raw != null && Int32.TryParse (raw.Device.UdevMetadata.GetPropertyString (UdevUsbBusNumber), out num)) {
+                return num;
+            }
+            return 0;
         }

         public static int GetDeviceNumber (IUsbDevice device)
         {
             var raw = device as IRawDevice;
-            return raw ==  null ? 0 : int.Parse (raw.Device.UdevMetadata.GetPropertyString (UdevUsbDeviceNumber));
+            int num = 0;
+            if (raw != null && Int32.TryParse (raw.Device.UdevMetadata.GetPropertyString (UdevUsbDeviceNumber), out num)) {
+                return num;
+            }
+            return 0;
         }

         public static int GetProductId (IUsbDevice device)
         {
             var raw = device as IRawDevice;
-            return raw == null ? 0 : int.Parse (raw.Device.UdevMetadata.GetPropertyString (UdevProductId), NumberStyles.HexNumber);
+            int num = 0;
+            if (raw != null && Int32.TryParse (raw.Device.UdevMetadata.GetPropertyString (UdevProductId), NumberStyles.HexNumber, null, out num)) {
+                return num;
+            }
+            return 0;
         }

         public static int GetSpeed (IUsbDevice device)


Fix typo

Fix typo

--- src/Dangl.WebDocumentation/Views/Home/ManageAccount.cshtml
+++ src/Dangl.WebDocumentation/Views/Home/ManageAccount.cshtml
@@ -3,5 +3,5 @@

Manage Account

-
You user account is managed on Dangl.Identity.. You can edit your account details there.

+
You user account is managed on Dangl.Identity. You can edit your account details there.


Simplify

Simplify

--- src/Features/Core/Portable/QuickInfo/QuickInfoUtilities.cs
+++ src/Features/Core/Portable/QuickInfo/QuickInfoUtilities.cs
@@ -10,6 +10,7 @@
 using System.Threading.Tasks;
 using Microsoft.CodeAnalysis.DocumentationComments;
 using Microsoft.CodeAnalysis.LanguageServices;
+using Microsoft.CodeAnalysis.PooledObjects;
 using Microsoft.CodeAnalysis.Shared.Extensions;
 using Microsoft.CodeAnalysis.Shared.Utilities;
 using Microsoft.CodeAnalysis.Tags;
@@ -31,12 +32,9 @@
             CancellationToken cancellationToken = default)
         {
             var formatter = workspace.Services.GetLanguageServices(semanticModel.Language).GetRequiredService<IDocumentationCommentFormattingService>();
-
-            var showWarningGlyph = supportedPlatforms != null && supportedPlatforms.HasValidAndInvalidProjects();
-
             var groups = await descriptionService.ToDescriptionGroupsAsync(workspace, semanticModel, span.Start, symbols, cancellationToken).ConfigureAwait(false);

-            var sections = ImmutableArray.CreateBuilder<QuickInfoSection>(initialCapacity: groups.Count);
+            using var _1 = ArrayBuilder<QuickInfoSection>.GetInstance(out var sections);

             var symbol = symbols.First();
             if (showAwaitReturn)
@@ -49,30 +47,26 @@
                     AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable());
                     return QuickInfoItem.Create(span, sections: sections.ToImmutable());
                 }
-                else
+
+                if (TryGetGroupText(SymbolDescriptionGroups.MainDescription, out var mainDescriptionTaggedParts))
                 {
-                    if (TryGetGroupText(SymbolDescriptionGroups.MainDescription, out var mainDescriptionTaggedParts))
-                    {
-                        // We'll take the existing message and wrap it with a message saying this was returned from the task.
-                        var defaultSymbol = "{0}";
-                        var symbolIndex = FeaturesResources.Awaited_task_returns_0.IndexOf(defaultSymbol);
+                    // We'll take the existing message and wrap it with a message saying this was returned from the task.
+                    var defaultSymbol = "{0}";
+                    var symbolIndex = FeaturesResources.Awaited_task_returns_0.IndexOf(defaultSymbol);

-                        var builder = ImmutableArray.CreateBuilder<TaggedText>();
-                        builder.AddText(FeaturesResources.Awaited_task_returns_0.Substring(0, symbolIndex));
-                        builder.AddRange(mainDescriptionTaggedParts);
-                        builder.AddText(FeaturesResources.Awaited_task_returns_0[(symbolIndex + defaultSymbol.Length)..]);
+                    var builder = ImmutableArray.CreateBuilder<TaggedText>();
+                    builder.AddText(FeaturesResources.Awaited_task_returns_0.Substring(0, symbolIndex));
+                    builder.AddRange(mainDescriptionTaggedParts);
+                    builder.AddText(FeaturesResources.Awaited_task_returns_0[(symbolIndex + defaultSymbol.Length)..]);

-                        AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable());
-                    }
+                    AddSection(QuickInfoSectionKinds.Description, builder.ToImmutable());
                 }
             }
-            else
+            else if (TryGetGroupText(SymbolDescriptionGroups.MainDescription, out var mainDescriptionTaggedParts))
             {
-                if (TryGetGroupText(SymbolDescriptionGroups.MainDescription, out var mainDescriptionTaggedParts))
-                {
-                    AddSection(QuickInfoSectionKinds.Description, mainDescriptionTaggedParts);
-                }
+                AddSection(QuickInfoSectionKinds.Description, mainDescriptionTaggedParts);
             }
+

             if (groups.TryGetValue(SymbolDescriptionGroups.Documentation, out var docParts) && !docParts.IsDefaultOrEmpty)
                 AddSection(QuickInfoSectionKinds.DocumentationComments, docParts);
@@ -122,11 +116,15 @@
                 AddSection(QuickInfoSectionKinds.AnonymousTypes, builder.ToImmutable());
             }

-            var usageTextBuilder = ImmutableArray.CreateBuilder<TaggedText>();
+            using var _ = ArrayBuilder<TaggedText>.GetInstance(out var usageTextBuilder);
             if (TryGetGroupText(SymbolDescriptionGroups.AwaitableUsageText, out var awaitableUsageText))
-            {
                 usageTextBuilder.AddRange(awaitableUsageText);
-            }
+
+            if (supportedPlatforms != null)
+                usageTextBuilder.AddRange(supportedPlatforms.ToDisplayParts().ToTaggedText());
+
+            if (usageTextBuilder.Count > 0)
+                AddSection(QuickInfoSectionKinds.Usage, usageTextBuilder.ToImmutable());

             var nullableMessage = flowState switch
             {
@@ -140,28 +138,14 @@
                 AddSection(QuickInfoSectionKinds.NullabilityAnalysis, ImmutableArray.Create(new TaggedText(TextTags.Text, nullableMessage)));
             }

-            if (supportedPlatforms != null)
-            {
-                usageTextBuilder.AddRange(supportedPlatforms.ToDisplayParts().ToTaggedText());
-            }
-
-            if (usageTextBuilder.Count > 0)
-            {
-                AddSection(QuickInfoSectionKinds.Usage, usageTextBuilder.ToImmutable());
-            }
-
             if (TryGetGroupText(SymbolDescriptionGroups.Exceptions, out var exceptionsText))
-            {
                 AddSection(QuickInfoSectionKinds.Exception, exceptionsText);
-            }

             if (TryGetGroupText(SymbolDescriptionGroups.Captures, out var capturesText))
-            {
                 AddSection(QuickInfoSectionKinds.Captures, capturesText);
-            }

             var tags = ImmutableArray.CreateRange(GlyphTags.GetTags(symbol.GetGlyph()));
-            if (showWarningGlyph)
+            if (supportedPlatforms?.HasValidAndInvalidProjects() == true)
                 tags = tags.Add(WellKnownTags.Warning);

             return QuickInfoItem.Create(span, tags, sections.ToImmutable());


Check token

Check token

--- src/Features/Core/Portable/Workspace/BackgroundCompiler.cs
+++ src/Features/Core/Portable/Workspace/BackgroundCompiler.cs
@@ -130,6 +130,8 @@
             ArrayBuilder<Compilation> compilations,
             CancellationToken cancellationToken)
         {
+            cancellationToken.ThrowIfCancellationRequested();
+
             var trackingService = solution.Workspace.Services.GetRequiredService<IDocumentTrackingService>();
             var visibleProjectIds = trackingService.GetVisibleDocuments().Select(d => d.ProjectId).ToSet();
             var activeProjectId = trackingService.TryGetActiveDocument()?.ProjectId;


Moved the Flash div to above the body.

Moved the Flash div to above the body.

--- src/FunnelWeb.Web/Areas/Admin/Views/Shared/_Private.cshtml
+++ src/FunnelWeb.Web/Areas/Admin/Views/Shared/_Private.cshtml
@@ -27,13 +27,12 @@

+  @if (TempData.ContainsKey("Flash")) {
+

+
@TempData["Flash"]

+

+  }

-    @if (TempData.ContainsKey("Flash")) {
-

-
@TempData["Flash"]

-

-    }
-
     @if (IsSectionDefined("Summary"))
     {


fixing TagRepository queryOver to work. Not sure if it's the best way to do it, I'm no NH expert :/

--- src/FunnelWeb/Model/Repositories/Internal/TagRepository.cs
+++ src/FunnelWeb/Model/Repositories/Internal/TagRepository.cs
@@ -32,14 +32,20 @@

         public IEnumerable<Entry> GetTaggedItems(string tagName, int skip, int take)
         {
-            return session.QueryOver<Tag>()
-                .Where(t => t.Name == tagName)
-                .JoinQueryOver<Entry>(i => i.Entries)
+            var tags = session.QueryOver<Tag>()
+                .Where(t => t.Name == tagName);
+
+            var entries = tags
+                .Left
+                    .JoinQueryOver<Entry>(i => i.Entries);
+
+            var results = entries
                 .Where(e => e.Published < DateTime.UtcNow.Date.AddDays(1))
-                .OrderBy(e=>e.Published).Desc
-                .Skip(skip)
-                .Take(take)
-                .List<Entry>();
+                .OrderBy(e => e.Published).Desc;
+
+            return results.List<Tag>()
+                .First()
+                .Entries;
         }

         public int GetTaggedItemCount(string tagName)


just sysnc

just sysnc


no null checks on the client side! the businesslayer should just return an empty list if there are no items


Updated dll references to new dll name

Updated dll references to new dll name


DBSet is actually a Unit Of Work implementation so no need for an abstraction of an abstraction.


Added chart.js script in production.

Added chart.js script in production.


Fix bug in LeaseManager CQL statement

Fix bug in LeaseManager CQL statement

--- src/KillrVideo.SampleData.Worker/Scheduler/LeaseManager.cs
+++ src/KillrVideo.SampleData.Worker/Scheduler/LeaseManager.cs
@@ -83,7 +83,7 @@

                 // Try to acquire the lease using LWT in Cassandra
                 PreparedStatement prepared =
-                    await _statementCache.NoContext.GetOrAddAsync("INSERT INTO sample_data_leases VALUES (name, owner) VALUES (?, ?) IF NOT EXISTS");
+                    await _statementCache.NoContext.GetOrAddAsync("INSERT INTO sample_data_leases (name, owner) VALUES (?, ?) IF NOT EXISTS");
                 BoundStatement bound = prepared.Bind(_leaseName, _uniqueId);
                 RowSet rows = await _session.ExecuteAsync(bound).ConfigureAwait(false);
                 Row row = rows.Single();


Removed beam restriction

Removed beam restriction

--- src/Nuterra/Maritaria/FirstPerson/FirstPersonController.cs
+++ src/Nuterra/Maritaria/FirstPerson/FirstPersonController.cs
@@ -37,10 +37,6 @@
 			{
 				Tank player = Singleton.playerTank;
 				if (!player)
-				{
-					RevertCamera();
-				}
-				if (player.beam.IsActive)
 				{
 					RevertCamera();
 				}


Register the LanguageServerLogger only once

--- src/OmniSharp.LanguageServerProtocol/LanguageServerHost.cs
+++ src/OmniSharp.LanguageServerProtocol/LanguageServerHost.cs
@@ -62,7 +62,7 @@
                 .WithInput(input)
                 .WithOutput(output)
                 // initializeParams from the client won't be arriving yet, configure with app loglevel
-                .ConfigureLogging(GetLogBuilderAction(configureLogging, application.LogLevel))
+                .ConfigureLogging(AddLanguageProtocolLogging(application.LogLevel))
                 .OnInitialize(Initialize)
                 .OnInitialized(Initialized)
                 .WithServices(ConfigureServices);
@@ -178,11 +178,12 @@
             }
         }

-        private static Action<ILoggingBuilder> GetLogBuilderAction(Action<ILoggingBuilder> configureLogging, LogLevel loglevel) => builder =>
+        private static Action<ILoggingBuilder> AddLanguageProtocolLogging(LogLevel loglevel) => builder => builder.AddLanguageProtocolLogging().SetMinimumLevel(loglevel);
+
+        private static Action<ILoggingBuilder> ConfigureLogging(Action<ILoggingBuilder> configureLogging, LogLevel loglevel) => builder =>
         {
             configureLogging?.Invoke(builder);
             builder
-                .AddLanguageProtocolLogging()
                 .SetMinimumLevel(loglevel);
         };

@@ -211,7 +212,7 @@

             var serviceProvider =
                 CompositionHostBuilder.CreateDefaultServiceProvider(environment, configurationResult.Configuration, eventEmitter,
-                    services, GetLogBuilderAction(configureLogging, environment.LogLevel));
+                    services, ConfigureLogging(configureLogging, environment.LogLevel));

             var loggerFactory = serviceProvider.GetService<ILoggerFactory>();
             var logger = loggerFactory.CreateLogger<LanguageServerHost>();


Add missing issuer assignment in the OpenIddict server OWIN host

--- src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs
+++ src/OpenIddict.Server.Owin/OpenIddictServerOwinHandlers.cs
@@ -199,6 +199,8 @@
                     return default;
                 }

+                context.Issuer = issuer;
+
                 return default;
             }
         }


Adding a database index on MediaPartRecord.FolderPath

--- src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs
+++ src/Orchard.Web/Modules/Orchard.MediaLibrary/Migrations.cs
@@ -121,5 +121,14 @@

             return 4;
         }
+
+        public int UpdateFrom4() {
+
+            SchemaBuilder.AlterTable("MediaPartRecord", t => t
+                .CreateIndex("IDX_MediaPartRecord_FolderPath", "FolderPath")
+            );
+
+            return 5;
+        }
     }
 }


add missing favicon

add missing favicon

--- src/Orchard.Web/Themes/LETSBootstrap/Views/Document.cshtml
+++ src/Orchard.Web/Themes/LETSBootstrap/Views/Document.cshtml
@@ -16,6 +16,8 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta property="og:url" content='@Request.Url.AbsoluteUri.Replace("http://", "https://")' />
     <meta property="og:title" content="@pageTitle" />
+
+    <link rel="shortcut icon" href="~/themes/LETSBootstrap/Content/logo.png" type="image/x-icon">

     <title>@pageTitle</title>


921: hit test before offset, important

921: hit test before offset, important

--- src/PixelFarm/PaintLab.RenderTree/4_Boxes/RenderBoxBase.cs
+++ src/PixelFarm/PaintLab.RenderTree/4_Boxes/RenderBoxBase.cs
@@ -42,26 +42,23 @@
                 return this.myviewportY;
             }
         }
-
-
         public sealed override void CustomDrawToThisCanvas(DrawBoard canvas, Rectangle updateArea)
         {
-            canvas.OffsetCanvasOrigin(-myviewportX, -myviewportY);
-            updateArea.Offset(myviewportX, myviewportY);
-
-
             if (canvas.PushClipAreaRect(this.Width, this.Height, ref updateArea))
             {
+
+                canvas.OffsetCanvasOrigin(-myviewportX, -myviewportY);
+                updateArea.Offset(myviewportX, myviewportY);
                 this.DrawBoxContent(canvas, updateArea);
+#if DEBUG
+                //for debug
+                // canvas.dbug_DrawCrossRect(Color.Red,updateArea);
+#endif
+                canvas.OffsetCanvasOrigin(myviewportX, myviewportY);
+                updateArea.Offset(-myviewportX, -myviewportY);
+
             }
             canvas.PopClipAreaRect();
-
-#if DEBUG
-            //for debug
-            // canvas.dbug_DrawCrossRect(Color.Red,updateArea);
-#endif
-            canvas.OffsetCanvasOrigin(myviewportX, myviewportY);
-            updateArea.Offset(-myviewportX, -myviewportY);
         }

         public override void ChildrenHitTestCore(HitChain hitChain)


Возможно исправлена рефлексия типов в Linux see #877

--- src/ScriptEngine/Machine/Reflection/ReflectedMethodInfo.cs
+++ src/ScriptEngine/Machine/Reflection/ReflectedMethodInfo.cs
@@ -55,7 +55,7 @@

         public override System.Reflection.MethodInfo GetBaseDefinition()
         {
-            throw new NotImplementedException();
+            return this;
         }

         public override Type ReturnType
@@ -100,7 +100,7 @@

         public override MethodImplAttributes GetMethodImplementationFlags()
         {
-            throw new NotImplementedException();
+            return MethodImplAttributes.Managed;
         }

         public override ParameterInfo[] GetParameters()


catch exception when sorting grid

catch exception when sorting grid

--- src/Tc.Psg.CloudFtpBridge.UI/Controls/ServerGridControl.cs
+++ src/Tc.Psg.CloudFtpBridge.UI/Controls/ServerGridControl.cs
@@ -46,14 +46,19 @@

         private void _grid_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
         {
-            Guid serverId = (Guid)_grid.Rows[e.RowIndex].Tag;
+            try
+            {
+                Guid serverId = (Guid)_grid.Rows[e.RowIndex].Tag;

-            ServerDetailForm serverDetailForm = FormFactory.CreateForm<ServerDetailForm>(ParentForm);
+                ServerDetailForm serverDetailForm = FormFactory.CreateForm<ServerDetailForm>(ParentForm);

-            serverDetailForm.ServerId = serverId;
-            serverDetailForm.ShowDialog();
+                serverDetailForm.ServerId = serverId;
+                serverDetailForm.ShowDialog();

-            RefreshServers();
+                RefreshServers();
+            }
+            catch (Exception ex)
+            { System.Diagnostics.Trace.TraceInformation("_grid_CellMouseDoubleClick -  " + ex.Message); }
         }
     }
 }


import school data bugs was fixed

import school data bugs was fixed

--- src/TravelAgent.Web/TravelAgent.WebAPI/Models/SchoolDto.cs
+++ src/TravelAgent.Web/TravelAgent.WebAPI/Models/SchoolDto.cs
@@ -31,6 +31,11 @@

         public static IList<School> ToList(IList<SchoolDto> dto_list)
         {
+            if(dto_list == null)
+            {
+                return new List<School>();
+            }
+
             IList<School> list = new List<School>();
             foreach (SchoolDto item in dto_list)
             {


adds code snippet to startup

adds code snippet to startup

--- src/UmbracoIdentity.Web/App_Code/UmbracoIdentityStartup.cs
+++ src/UmbracoIdentity.Web/App_Code/UmbracoIdentityStartup.cs
@@ -34,6 +34,21 @@
             //Single method to configure the Identity user manager for use with Umbraco
             app.ConfigureUserManagerForUmbracoMembers<UmbracoApplicationMember>();

+            //Method used to store in external SQL CE db (legacy)
+            //app.ConfigureUserManagerForUmbracoMembers<UmbracoMembersUserManager<UmbracoApplicationMember>, UmbracoApplicationMember>(
+            //    ApplicationContext,
+            //    (options, context) => UmbracoMembersUserManager<UmbracoApplicationMember>.Create(
+            //        options,
+            //        ApplicationContext.Services.MemberService,
+            //        ApplicationContext.Services.MemberTypeService,
+            //        ApplicationContext.Services.MemberGroupService,
+            //        //custom login store to force the storage be in an external SQLCE db
+            //        new ExternalLoginStore(
+            //            ApplicationContext.ProfilingLogger.Logger,
+            //            ApplicationContext.DatabaseContext,
+            //            //use an external SQLCE db file
+            //            useSeparateDbFile: true)));
+
             //Single method to configure the Identity user manager for use with Umbraco
             app.ConfigureRoleManagerForUmbracoMembers<UmbracoApplicationRole>();
         }
@@ -58,7 +73,7 @@
                 //You can modify these options for any customizations you'd like
                 new FrontEndCookieAuthenticationOptions(),
                 PipelineStage.Authenticate);
-
+
             // Uncomment the following lines to enable logging in with third party login providers

             //app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);


Quickfix

Quickfix

--- src/WebApiToTypeScript/Endpoints/MobileEndpointsService.cs
+++ src/WebApiToTypeScript/Endpoints/MobileEndpointsService.cs
@@ -106,30 +106,6 @@
             }
         }

-        private void WriteInterfaceWithCallToBlock(TypeScriptBlock interfaceWithCallBlock, WebApiAction action, WebApiHttpVerb verb)
-        {
-            var callArguments = action.BodyParameters
-                .Select(a => a.GetParameterString(withOptionals: false, interfaceName: true));
-
-            var callArgument = callArguments
-                .SingleOrDefault();
-
-            var callArgumentsList = string.IsNullOrWhiteSpace(callArgument)
-                ? "httpConfig?: ng.IRequestShortcutConfig"
-                : $"{callArgument}, httpConfig?: ng.IRequestShortcutConfig";
-
-            string typeScriptReturnType, typeScriptTypeForCall;
-
-            action.GetReturnTypes(out typeScriptReturnType, out typeScriptTypeForCall);
-
-            interfaceWithCallBlock
-                .AddStatement($"call{typeScriptTypeForCall}({callArgumentsList}): ng.IPromise{typeScriptReturnType};");
-
-            if (Config.EndpointsSupportCaching && verb == WebApiHttpVerb.Get)
-                interfaceWithCallBlock
-                    .AddStatement($"callCached{typeScriptTypeForCall}({callArgumentsList}): ng.IPromise{typeScriptReturnType};");
-        }
-
         private void WriteToStringToBlock(TypeScriptBlock classBlock, string actionName, WebApiAction action)
         {
             var toStringBlock = classBlock


fix build

fix build

--- src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs
+++ src/Windows/Avalonia.Win32/WindowImpl.CustomCaptionProc.cs
@@ -1,6 +1,9 @@
 using System;
 using System.Collections.Generic;
 using System.Text;
+using Avalonia.Controls;
+using Avalonia.Input;
+using static Avalonia.Win32.Interop.UnmanagedMethods;

 namespace Avalonia.Win32
 {


Get toolset by ToolsVersion

Get toolset by ToolsVersion

This was mistakenly set to assemblyVersion, which is "14.1.0.0", but since
it's looked up in a string dictionary, that doesn't match toolset version
"14.1".

--- src/XMakeBuildEngine/UnitTests/Definition/Toolset_Tests.cs
+++ src/XMakeBuildEngine/UnitTests/Definition/Toolset_Tests.cs
@@ -199,7 +199,7 @@
                 Environment.SetEnvironmentVariable("VisualStudioVersion", null);

                 ProjectCollection projectCollection = new ProjectCollection();
-                Toolset parentToolset = projectCollection.GetToolset(ObjectModelHelpers.MSBuildAssemblyVersion);
+                Toolset parentToolset = projectCollection.GetToolset(ObjectModelHelpers.MSBuildDefaultToolsVersion);

                 Toolset t = new Toolset("Fake", parentToolset.ToolsPath, null, projectCollection, null, parentToolset.OverrideTasksPath);


Autogenerated queue name change (this is a pretty stupid change)

--- TeaTime.cs
+++ TeaTime.cs
@@ -543,7 +543,7 @@
     public static MonoBehaviour tt(this MonoBehaviour instance, string queueName = null, bool resetQueue = false)
     {
         if (queueName == null)
-            queueName = DEFAULT_QUEUE_NAME + "_" + Time.time + "_" + UnityEngine.Random.Range(int.MinValue, int.MaxValue);
+            queueName = DEFAULT_QUEUE_NAME + "_" + Time.time + "_" + UnityEngine.Random.Range(0, int.MaxValue);

         PrepareInstanceCurrentQueue(instance);
         currentQueue[instance] = queueName;


[fix] async void to async Task

[fix] async void to async Task

--- test/EnjoyCQRS.UnitTests/MessageBus/EventPublisherTests.cs
+++ test/EnjoyCQRS.UnitTests/MessageBus/EventPublisherTests.cs
@@ -19,7 +19,7 @@

         [Then]
         [Trait(CategoryName, CategoryValue)]
-        public async void When_a_single_event_is_published_to_the_bus_containing_a_single_EventHandler()
+        public async Task When_a_single_event_is_published_to_the_bus_containing_a_single_EventHandler()
         {
             var testEvent = new TestEvent(Guid.NewGuid());

@@ -34,15 +34,15 @@

             EventPublisher eventPublisher = new EventPublisher(eventRouter);

-            await eventPublisher.PublishAsync<IDomainEvent>(new[] { testEvent });
-            await eventPublisher.CommitAsync();
+            await eventPublisher.PublishAsync<IDomainEvent>(new[] { testEvent }).ConfigureAwait(false);
+            await eventPublisher.CommitAsync().ConfigureAwait(false);

             handler.Ids.First().Should().Be(testEvent.AggregateId);
         }

         [Then]
         [Trait(CategoryName, CategoryValue)]
-        public async void When_a_single_event_is_published_to_the_bus_containing_multiple_EventHandlers()
+        public async Task When_a_single_event_is_published_to_the_bus_containing_multiple_EventHandlers()
         {
             var handler1 = new FirstTestEventHandler();
             var handler2 = new SecondTestEventHandler();
@@ -59,8 +59,8 @@

             var testEvent = new TestEvent(Guid.NewGuid());

-            await eventPublisher.PublishAsync<IDomainEvent>(new[] { testEvent });
-            await eventPublisher.CommitAsync();
+            await eventPublisher.PublishAsync<IDomainEvent>(new[] { testEvent }).ConfigureAwait(false);
+            await eventPublisher.CommitAsync().ConfigureAwait(false);

             handler1.Ids.First().Should().Be(testEvent.AggregateId);
             handler2.Ids.First().Should().Be(testEvent.AggregateId);
@@ -68,7 +68,7 @@

         [Then]
         [Trait(CategoryName, CategoryValue)]
-        public async void Events_should_be_published_on_correct_order()
+        public async Task Events_should_be_published_on_correct_order()
         {
             var ids = new List<Tuple<Guid, int>>();

@@ -92,9 +92,9 @@
                 orderTestEvent,
                 orderTestEvent2,
                 orderTestEvent3
-            });
+            }).ConfigureAwait(false);

-            await eventPublisher.CommitAsync();
+            await eventPublisher.CommitAsync().ConfigureAwait(false);

             ids[0].Item2.Should().Be(orderTestEvent.Order);


- added handling of enums for binary logic operations. still have to fix missing linkage of value field

--- Source/Mosa.Compiler.Framework/IR/CILTransformationStage.cs
+++ Source/Mosa.Compiler.Framework/IR/CILTransformationStage.cs
@@ -308,6 +308,20 @@
 		/// <param name="context">The context.</param>
 		void CIL.ICILVisitor.BinaryLogic(Context context)
 		{
+			if (context.Operand1.Type is ValueTypeSigType)
+			{
+				var type = this.methodCompiler.Method.Module.GetType ((context.Operand1.Type as ValueTypeSigType).Token);
+				var operand = new MemberOperand (type.Fields[0], type.Fields[0].SignatureType, new IntPtr (0));
+				context.SetOperand (0, operand);
+			}
+
+			if (context.Operand2.Type is ValueTypeSigType)
+			{
+				var type = this.methodCompiler.Method.Module.GetType ((context.Operand2.Type as ValueTypeSigType).Token);
+				var operand = new MemberOperand (type.Fields[0], type.Fields[0].SignatureType, new IntPtr (0));
+				context.SetOperand (1, operand);
+			}
+
 			switch ((context.Instruction as CIL.BaseInstruction).OpCode)
 			{
 				case CIL.OpCode.And:


Adds todo about ClearCache method.

Adds todo about ClearCache method.

--- Sources/DotNet/Woopsa/Implementation/WoopsaObjectAdapter.cs
+++ Sources/DotNet/Woopsa/Implementation/WoopsaObjectAdapter.cs
@@ -63,6 +63,7 @@
             }
         }

+        // TODO CJI From CJI : Make it work.
         public void ClearCache()
         {
             _typesCache = new Dictionary<Type, TypeCache>();


20000006-1396 #287 - Adicionada validação de preenchimento da disciplina para carregar os dados do currículo por período do curso.

--- Src/GestaoEscolar/WebControls/Curriculo/UCCurriculo.ascx.cs
+++ Src/GestaoEscolar/WebControls/Curriculo/UCCurriculo.ascx.cs
@@ -73,7 +73,7 @@
         {
             get
             {
-                if (rblDisciplina.Items.Count > 0)
+                if (rblDisciplina.Items.Count > 0 && !string.IsNullOrEmpty(rblDisciplina.SelectedValue))
                     return Convert.ToInt32(rblDisciplina.SelectedValue);
                 return -1;
             }
@@ -508,7 +508,7 @@
                 VS_ltCurriculoSugestaoObjetivo = null;
                 grvEixo.EditIndex = -1;

-                if (__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar)
+                if (__SessionWEB.__UsuarioWEB.GrupoPermissao.grp_consultar && VS_tds_id > 0)
                 {
                     CarregarObjetivos(grvEixo, (byte)ACA_CurriculoObjetivoTipo.Eixo, -1);
                 }


IMPROVEMENT playback key combination - mute all tracks except the ones of the selected match when holding SHIFT key IMPROVEMENT scroll selected match into viewport

--- MatchingWindow.xaml.cs
+++ MatchingWindow.xaml.cs
@@ -296,6 +296,7 @@
                 TimeSpan t2 = match.Track2.Offset + match.Track2Time;
                 TimeSpan diff = t1 - t2;
                 multiTrackViewer.Display(t1 - new TimeSpan(diff.Ticks / 2), true);
+                multiTrackViewer.Display(match);

                 if (Keyboard.IsKeyDown(Key.LeftCtrl)) {
                     // sync
@@ -303,6 +304,14 @@
                 }

                 if (Keyboard.IsKeyDown(Key.LeftAlt)) {
+                    if (Keyboard.IsKeyDown(Key.LeftShift)) {
+                        // mute all but selected tracks
+                        foreach (AudioTrack t in trackList) {
+                            t.Mute = true;
+                        }
+                        match.Track1.Mute = false;
+                        match.Track2.Mute = false;
+                    }
                     // start playback
                     MediaCommands.Pause.Execute(null, multiTrackViewer);
                     MediaCommands.Play.Execute(null, multiTrackViewer);


Use the requested NewLine format when writing an empty message body

--- MimeKit/MimeMessage.cs
+++ MimeKit/MimeMessage.cs
@@ -371,7 +371,7 @@
 			Headers.WriteTo (stream);

 			if (Body == null) {
-				stream.WriteByte ((byte) '\n');
+				stream.Write (options.NewLineBytes, 0, options.NewLineBytes.Length);
 			} else {
 				Body.WriteTo (stream);
 			}


support compound time values in reminder (e.g. 15h5m)

--- ModCore/Logic/Dates.cs
+++ ModCore/Logic/Dates.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Diagnostics;
+using System.Text.RegularExpressions;
 using Chronic;
 using RayBotSharp.Utils;

@@ -94,7 +95,11 @@
                 return (Continue, time + ((ulong) tk * i));
             }

-            // read values like "5s"
+            // read compound values like "15h14min" or "5s"
+            if (TryParseCompound(s, out var j))
+                return (Continue, time + j);
+
+            // read values like "15:14" as 15h14min
             if (TimeSpan.TryParse(s, out var ts))
                 return (Continue, time + (ulong) ts.TotalMilliseconds);

@@ -110,6 +115,34 @@

             // what to do with invalid tokens? break? continue? i guess break
             return (Break, time);
+        }
+
+        /// <summary>
+        /// Attempt to parse a length of time in a single word in <c>15h5m</c> format
+        /// </summary>
+        /// <param name="s">The token to parse</param>
+        /// <param name="time">The resulting time to set</param>
+        /// <returns>True if there was anything to parse, false otherwise</returns>
+        /// <exception cref="Exception">If an invalid unit is encountered</exception>
+        private static bool TryParseCompound(string s, out ulong time)
+        {
+            time = 0UL;
+            var re = new Regex("([0-9]+)([a-zA-Z]+)");
+            foreach (Match match in re.Matches(s))
+            {
+                var i = uint.Parse(match.Groups[1].Value);
+                var unit = match.Groups[2].Value;
+
+                // get the amount of ms that corresponds to the unit of time unit
+                if (!Enum.TryParse<Unit>(unit.Trim(), true, out var tk))
+                    throw new Exception($"Unknown amount of time '{i}' of '{unit}'. If you think this is an unaccounted-for scenario, notify the dev!");
+
+                // add N * MsValue
+                time += (ulong) tk * i;
+            }
+
+            // we succeed if we matched/parsed anything, so the output is >0
+            return time != 0UL;
         }

         /// <summary>


Try catch exception

Try catch exception

added try catch exception for the httpWebRequest

--- Movies/MainActivity.cs
+++ Movies/MainActivity.cs
@@ -19,7 +19,7 @@

 namespace Movies
 {
-    [Activity(Label = "Movies",  Icon = "@drawable/icon")]
+    [Activity(Label = "Movies", Icon = "@drawable/icon")]
     public class MainActivity : Activity
     {
         private SearchResponse results;
@@ -48,19 +48,19 @@
             // and attach an event to it
             // Get the Title EditBox and button resources:

-          //  next = FindViewById<Button>(Resource.Id.getNextButton);
-           // prev = FindViewById<Button>(Resource.Id.getPreviousButton);
-         //   next.Visibility = ViewStates.Invisible;
-         //   prev.Visibility = ViewStates.Invisible;
+            //  next = FindViewById<Button>(Resource.Id.getNextButton);
+            // prev = FindViewById<Button>(Resource.Id.getPreviousButton);
+            //   next.Visibility = ViewStates.Invisible;
+            //   prev.Visibility = ViewStates.Invisible;

             mLinearLayout = FindViewById<LinearLayout>(Resource.Id.mainView);
             mTitleSectionLayout = FindViewById<LinearLayout>(Resource.Id.titleSection);
             mGetSectionLayout = FindViewById<LinearLayout>(Resource.Id.getSection);
-           // mPrevNextLayout = FindViewById<LinearLayout>(Resource.Id.prev_next_section);
+            // mPrevNextLayout = FindViewById<LinearLayout>(Resource.Id.prev_next_section);
             mListaLayout = FindViewById<ListView>(Resource.Id.listaFilm);
-
+
             mLinearLayout.Click += (sender, e) =>
             {
                 InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Activity.InputMethodService);
@@ -77,18 +77,19 @@
                 InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Activity.InputMethodService);
                 inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.None);
             };
-
-           /* mPrevNextLayout.Click += (sender, e) =>
-            {
-                InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Activity.InputMethodService);
-                inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.None);
-            };*/
+
+            /* mPrevNextLayout.Click += (sender, e) =>
+             {
+                 InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Activity.InputMethodService);
+                 inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.None);
+             };*/

             movieTitle = FindViewById<EditText>(Resource.Id.titleText);
             listaFilm = FindViewById<ListView>(Resource.Id.listaFilm);
             Button searchMoviesButton = FindViewById<Button>(Resource.Id.getMoviesButton);

-            searchMoviesButton.Click += async (sender, e) => {
+            searchMoviesButton.Click += async (sender, e) =>
+            {
                 InputMethodManager inputManager = (InputMethodManager)this.GetSystemService(Activity.InputMethodService);
                 inputManager.HideSoftInputFromWindow(this.CurrentFocus.WindowToken, HideSoftInputFlags.None);

@@ -117,28 +118,31 @@

                         //string[] items = results.Search.Select(x => x.Title + " (" + x.Year + ")").ToArray();

-                        if (results.Response == "False")
+                        if (results != null)
                         {
-                            listaFilm.SetAdapter(null);
-                            DisplayAlert("Alert", "No results were found", "OK");
-                        }
-                        else
-                        {
-                            items = new List<string>();
-                            items = results.Search.Select(x => x.Title + " (" + x.Year + ")").ToList();
-                            //items = new string[] { "Vegetables", "Fruits", "Flower Buds", "Legumes", "Bulbs", "Tubers" };
-                            if(Convert.ToInt16(results.totalResults) > 10)
-                               items.Add("Load more items...");
-
-                            Console.Out.WriteLine("vedere se funziona il parse : {0} {1} {2}", results.totalResults, results.Response, results.Error);
-
-                            listaFilm.Adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, items);
-
-
-                            //ListAdapter = new ArrayAdapter<String>(this, Android.Resource.Layout.SimpleListItem1, items);
-
-                            // ParseAndDisplay (json);
-                            // next.Visibility = ViewStates.Visible;
+                            if (results.Response == "False")
+                            {
+                                listaFilm.SetAdapter(null);
+                                DisplayAlert("Alert", "No results were found", "OK");
+                            }
+                            else
+                            {
+                                items = new List<string>();
+                                items = results.Search.Select(x => x.Title + " (" + x.Year + ")").ToList();
+                                //items = new string[] { "Vegetables", "Fruits", "Flower Buds", "Legumes", "Bulbs", "Tubers" };
+                                if (Convert.ToInt16(results.totalResults) > 10)
+                                    items.Add("Load more items...");
+
+                                Console.Out.WriteLine("vedere se funziona il parse : {0} {1} {2}", results.totalResults, results.Response, results.Error);
+
+                                listaFilm.Adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, items);
+
+
+                                //ListAdapter = new ArrayAdapter<String>(this, Android.Resource.Layout.SimpleListItem1, items);
+
+                                // ParseAndDisplay (json);
+                                // next.Visibility = ViewStates.Visible;
+                            }
                         }
                     }
                     else
@@ -148,14 +152,15 @@
                 }
                 else
                 {
-                     DisplayAlert("Alert", "You need INTERNET CONNECTION", "OK");
-                }
+                    DisplayAlert("Alert", "You need INTERNET CONNECTION", "OK");
+                }
+

-
-
-            };
-
-            listaFilm.ItemClick += async (sender, e) => {
+
+            };
+
+            listaFilm.ItemClick += async (sender, e) =>
+            {
                 //Console.Out.WriteLine("detagli e: {0}", e);
                 // var t = e.Position.ToString();

@@ -163,7 +168,7 @@

                 if (e.Position == (items.Count - 1) && pageNumber != (Convert.ToInt16(results.totalResults) % 10 == 0 ? Convert.ToInt16(results.totalResults) / 10 : (Convert.ToInt16(results.totalResults) / 10) + 1))
                 {
-                    if ( pageNumber < (Convert.ToInt16(results.totalResults) % 10 == 0 ? Convert.ToInt16(results.totalResults) / 10 : (Convert.ToInt16(results.totalResults) / 10) + 1) - 1)
+                    if (pageNumber < (Convert.ToInt16(results.totalResults) % 10 == 0 ? Convert.ToInt16(results.totalResults) / 10 : (Convert.ToInt16(results.totalResults) / 10) + 1) - 1)
                     {
                         pageNumber++;
                         string url = "http://www.omdbapi.com/?s=" + movieTitle.Text + "&r=json" + "&page=" + pageNumber.ToString();
@@ -185,8 +190,8 @@
                         listaFilm.Adapter = new ArrayAdapter<string>(this, Android.Resource.Layout.SimpleListItem1, items);
                         //listaFilm.SmoothScrollToPosition(scrollNumber);
                         listaFilm.SetSelection(scrollNumber);
-
-
+
+
                     }
                     else
                     if (pageNumber < (Convert.ToInt16(results.totalResults) % 10 == 0 ? Convert.ToInt16(results.totalResults) / 10 : (Convert.ToInt16(results.totalResults) / 10) + 1))
@@ -220,7 +225,7 @@
                 }
             };

-
+
         }

         private void DisplayAlert(string v1, string v2, string v3)
@@ -228,63 +233,79 @@
             AlertDialog.Builder alert = new AlertDialog.Builder(this);
             alert.SetTitle(v1);
             alert.SetMessage(v2);
-            alert.SetNeutralButton(v3, (senderAlert, args) => {
-                  alert.Dispose();
+            alert.SetNeutralButton(v3, (senderAlert, args) =>
+            {
+                alert.Dispose();
             });
-
+
             Dialog dialog = alert.Create();
             dialog.Show();
         }
         public bool isConnected()
-        {
-
-                try
-                {
-                    Android.Net.ConnectivityManager connectivityManager = (Android.Net.ConnectivityManager)GetSystemService(ConnectivityService);
-                    Android.Net.NetworkInfo activeConnection = connectivityManager.ActiveNetworkInfo;
-                    bool isOnline = (activeConnection != null) && activeConnection.IsConnected;
-                    return isOnline;
-                }
-                catch (Exception e)
-                {
-
-                    Console.Out.WriteLine(e.ToString());
-                    return false;
-                }
-
+        {
+
+            try
+            {
+                Android.Net.ConnectivityManager connectivityManager = (Android.Net.ConnectivityManager)GetSystemService(ConnectivityService);
+                Android.Net.NetworkInfo activeConnection = connectivityManager.ActiveNetworkInfo;
+                bool isOnline = (activeConnection != null) && activeConnection.IsConnected;
+                return isOnline;
+            }
+            catch (Exception e)
+            {
+
+                Console.Out.WriteLine(e.ToString());
+                return false;
+            }
+
         }

         private async Task<SearchResponse> FetchDataMoviesAsync(string url)
         {
             // Create an HTTP web request using the URL:
-            HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(url));
-            request.ContentType = "application/json";
-            request.Method = "GET";
-
-            // Send the request to the server and wait for the response:
-            using (WebResponse response = await request.GetResponseAsync())
-            {
-                // Get a stream representation of the HTTP web response:
-                using (Stream stream = response.GetResponseStream())
+            try
+            {
+                HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(new Uri(url));
+                request.ContentType = "application/json";
+                request.Method = "GET";
+
+                // Send the request to the server and wait for the response:
+                using (WebResponse response = await request.GetResponseAsync())
                 {
-                    // Use this stream to build a JSON document object:
-                    StreamReader reader = new StreamReader(stream);
-                    string text = reader.ReadToEnd();
-                    Console.Out.WriteLine("Response string: {0}", text);
-
-                    SearchResponse results = JsonConvert.DeserializeObject<SearchResponse>(text);
-
-                    /* Per test */
-                    Console.Out.WriteLine("Reserialized: {0}", JsonConvert.SerializeObject(results));
-                   // Console.Out.WriteLine("First movie: {0}", results.Search.GetRange(0, 1)[0].Title);
-
-                    return results;
-                }
-            }
+                    // Get a stream representation of the HTTP web response:
+                    using (Stream stream = response.GetResponseStream())
+                    {
+                        // Use this stream to build a JSON document object:
+                        StreamReader reader = new StreamReader(stream);
+                        string text = reader.ReadToEnd();
+                        Console.Out.WriteLine("Response string: {0}", text);
+
+                        SearchResponse results = JsonConvert.DeserializeObject<SearchResponse>(text);
+
+                        /* Per test */
+                        Console.Out.WriteLine("Reserialized: {0}", JsonConvert.SerializeObject(results));
+                        // Console.Out.WriteLine("First movie: {0}", results.Search.GetRange(0, 1)[0].Title);
+
+                        return results;
+                    }
+                }
+            }
+            catch (WebException ex)
+            {
+
+                DisplayAlert("Alert", "Something went wrong with the server. Please try again later", "OK");
+                return null;
+            }
+            catch (Exception ex)
+            {
+                DisplayAlert("Alert", "Something went wrong. Please try again later", "OK");
+                return null;
+            }
+
+
         }
-
-
-        }
+    }
 }

+


remove unused variable name

remove unused variable name

--- TwitchPlaysAssembly/Src/ComponentSolvers/ComponentSolver.cs
+++ TwitchPlaysAssembly/Src/ComponentSolvers/ComponentSolver.cs
@@ -169,7 +169,6 @@
 			}
 		}

-		int previousStrikeCount = StrikeCount;
 		bool parseError = false;
 		bool needQuaternionReset = false;
 		bool hideCamera = false;


yet one more test

yet one more test

--- Voron.Graph.Tests/BaseSingleDestinationShortestPathTests.cs
+++ Voron.Graph.Tests/BaseSingleDestinationShortestPathTests.cs
@@ -81,6 +81,64 @@
         }

         /*       ^ node2 (1,1) -> node3 (2,1)
+                     *      /                     \
+                     * node1(0,0) ---------------- > node4 (20,0)
+                     */
+        [TestMethod]
+        public void Cheaper_and_shortest_path_should_be_preferred()
+        {
+            var graph = new GraphStorage("TestGraph", Env);
+
+            Node node1, node2, node3, node4;
+            using (var tx = graph.NewTransaction(TransactionFlags.ReadWrite))
+            {
+                node1 = graph.Commands.CreateNode(tx, JsonFromValue(1));
+                node2 = graph.Commands.CreateNode(tx, JsonFromValue(2));
+                node3 = graph.Commands.CreateNode(tx, JsonFromValue(3));
+                node4 = graph.Commands.CreateNode(tx, JsonFromValue(4));
+
+                node1.ConnectWith(tx, node2, graph, 50);
+                node2.ConnectWith(tx, node3, graph, 50);
+                node3.ConnectWith(tx, node4, graph, 50);
+
+                node1.ConnectWith(tx, node4, graph, 1);
+
+                tx.Commit();
+            }
+
+            nodeLocations[node1.Key] = new Point
+            {
+                x = 0,
+                y = 0
+            };
+
+            nodeLocations[node2.Key] = new Point
+            {
+                x = 1,
+                y = 10
+            };
+
+            nodeLocations[node3.Key] = new Point
+            {
+                x = 2,
+                y = 10
+            };
+
+            nodeLocations[node4.Key] = new Point
+            {
+                x = 4,
+                y = 0
+            };
+
+            using (var tx = graph.NewTransaction(TransactionFlags.Read))
+            {
+                var shortestPath = GetAlgorithm(tx, graph, node1, node4).Execute();
+
+                shortestPath.Should().ContainInOrder(node1.Key, node4.Key);
+            }
+        }
+
+        /*       ^ node2 (1,1) -> node3 (2,1)
               *      /                     \
               * node1(0,0) ---------------- > node4 (20,0)
               */
@@ -97,11 +155,11 @@
                 node3 = graph.Commands.CreateNode(tx, JsonFromValue(3));
                 node4 = graph.Commands.CreateNode(tx, JsonFromValue(4));

-                node1.ConnectWith(tx, node2, graph, 50);
-                node2.ConnectWith(tx, node3, graph, 50);
-                node3.ConnectWith(tx, node4, graph, 50);
-
-                node1.ConnectWith(tx, node4, graph, 1);
+                node1.ConnectWith(tx, node2, graph, 1);
+                node2.ConnectWith(tx, node3, graph, 1);
+                node3.ConnectWith(tx, node4, graph, 1);
+
+                node1.ConnectWith(tx, node4, graph, 10);

                 tx.Commit();
             }
@@ -134,7 +192,7 @@
             {
                 var shortestPath = GetAlgorithm(tx, graph, node1,node4).Execute();

-                shortestPath.Should().ContainInOrder(node1.Key, node4.Key);
+                shortestPath.Should().ContainInOrder(node1.Key, node2.Key, node3.Key, node4.Key);
             }
         }


Add separator replacement logic

Add separator replacement logic

--- osu.Framework/Platform/DesktopStorage.cs
+++ osu.Framework/Platform/DesktopStorage.cs
@@ -52,6 +52,8 @@

         public override string GetFullPath(string path, bool createIfNotExisting = false)
         {
+            path = path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar);
+
             var basePath = Path.GetFullPath(Path.Combine(BasePath, BaseName, SubDirectory));
             var resolvedPath = Path.GetFullPath(Path.Combine(basePath, path));


Very slightly reduce size of slider bar to increase bottom padding

--- osu.Game/Screens/Edit/Screens/Compose/BeatDivisorControl.cs
+++ osu.Game/Screens/Edit/Screens/Compose/BeatDivisorControl.cs
@@ -130,7 +130,7 @@
                     },
                     RowDimensions = new[]
                     {
-                        new Dimension(GridSizeMode.Absolute, 35),
+                        new Dimension(GridSizeMode.Absolute, 30),
                         new Dimension(GridSizeMode.Absolute, 25),
                     }
                 }


Scoped ServiceCollection methods

Scoped ServiceCollection methods

Add extensions methods to allow the registration of scoped message inspectors and operation tuners

--- src/SoapCore/SoapEndpointExtensions.cs
+++ src/SoapCore/SoapEndpointExtensions.cs
@@ -339,6 +339,13 @@
 			return serviceCollection;
 		}

+		public static IServiceCollection AddSoapMessageInspector<TService>(this IServiceCollection serviceCollection)
+			where TService : class, IMessageInspector2
+		{
+			serviceCollection.AddScoped<IMessageInspector2, TService>();
+			return serviceCollection;
+		}
+
 		public static IServiceCollection AddSoapMessageInspector(this IServiceCollection serviceCollection, IMessageInspector2 messageInspector)
 		{
 			serviceCollection.AddSingleton(messageInspector);
@@ -360,6 +367,13 @@
 		public static IServiceCollection AddSoapModelBindingFilter(this IServiceCollection serviceCollection, IModelBindingFilter modelBindingFilter)
 		{
 			serviceCollection.TryAddSingleton(modelBindingFilter);
+			return serviceCollection;
+		}
+
+		public static IServiceCollection AddSoapServiceOperationTuner<TService>(this IServiceCollection serviceCollection)
+			where TService : class, IServiceOperationTuner
+		{
+			serviceCollection.AddScoped<IServiceOperationTuner, TService>();
 			return serviceCollection;
 		}


Implementation of Socks4

Implementation of Socks4

--- src/SocksSharp/Proxy/Clients/Socks4.cs
+++ src/SocksSharp/Proxy/Clients/Socks4.cs
@@ -1,4 +1,5 @@
-using System;
+using SocksSharp.Helpers;
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
@@ -11,7 +12,7 @@
 {
     public class Socks4 : IProxy
     {
-        #region Константы (защищённые)
+        #region Constants (protected)

         internal protected const int DefaultPort = 1080;

@@ -30,82 +31,66 @@
         public Socks4() { }

         /// <summary>
-        /// Создаёт соединение с сервером через прокси-сервер.
+        /// Create connection to destination host via proxy server.
         /// </summary>
-        /// <param name="destinationHost">Хост сервера, с которым нужно связаться через прокси-сервер.</param>
-        /// <param name="destinationPort">Порт сервера, с которым нужно связаться через прокси-сервер.</param>
-        /// <param name="tcpClient">Соединение, через которое нужно работать, или значение <see langword="null"/>.</param>
-        /// <returns>Соединение с сервером через прокси-сервер.</returns>
-        /// <exception cref="System.InvalidOperationException">
-        /// Значение свойства <see cref="Host"/> равно <see langword="null"/> или имеет нулевую длину.
-        /// -или-
-        /// Значение свойства <see cref="Port"/> меньше 1 или больше 65535.
-        /// -или-
-        /// Значение свойства <see cref="Username"/> имеет длину более 255 символов.
-        /// -или-
-        /// Значение свойства <see cref="Password"/> имеет длину более 255 символов.
-        /// </exception>
-        /// <exception cref="System.ArgumentNullException">Значение параметра <paramref name="destinationHost"/> равно <see langword="null"/>.</exception>
-        /// <exception cref="System.ArgumentException">Значение параметра <paramref name="destinationHost"/> является пустой строкой.</exception>
-        /// <exception cref="System.ArgumentOutOfRangeException">Значение параметра <paramref name="destinationPort"/> меньше 1 или больше 65535.</exception>
-        /// <exception cref="xNet.Net.ProxyException">Ошибка при работе с прокси-сервером.</exception>
-        public override TcpClient CreateConnection(string destinationHost, int destinationPort, TcpClient tcpClient = null)
+        /// <param name="destinationHost">Host</param>
+        /// <param name="destinationPort">Port</param>
+        /// <param name="tcpClient">Connection with proxy server.</param>
+        /// <returns>Connection to destination host</returns>
+        /// <exception cref="System.ArgumentException">Value of <paramref name="destinationHost"/> is <see langword="null"/> or empty.</exception>
+        /// <exception cref="System.ArgumentOutOfRangeException">Value of <paramref name="destinationPort"/> less than 1 or greater than 65535.</exception>
+        /// <exception cref="ProxyException">Error while working with proxy.</exception>
+        public TcpClient CreateConnection(string destinationHost, int destinationPort, TcpClient client)
         {
-            #region Проверка параметров
-
-            if (destinationHost == null)
+            if (String.IsNullOrEmpty(destinationHost))
             {
-                throw new ArgumentNullException("destinationHost");
+                throw new ArgumentException(nameof(destinationHost));
             }

-            //if (destinationHost.Length == 0)
-            //{
-            //    throw ExceptionHelper.EmptyString("destinationHost");
-            //}
+            if (!ExceptionHelper.ValidateTcpPort(destinationPort))
+            {
+                throw new ArgumentOutOfRangeException(nameof(destinationPort));
+            }

-            //if (!ExceptionHelper.ValidateTcpPort(destinationPort))
-            //{
-            //    throw ExceptionHelper.WrongTcpPort("destinationPort");
-            //}
-
-            #endregion
-
-            TcpClient curTcpClient = tcpClient;
-
-            if (curTcpClient == null)
+            if (client == null && !client.Connected)
             {
-                //curTcpClient = CreateConnectionToProxy();
+                throw new SocketException();
             }

             try
             {
-                SendCommand(curTcpClient.GetStream(), CommandConnect, destinationHost, destinationPort);
+                SendCommand(client.GetStream(), CommandConnect, destinationHost, destinationPort);
             }
             catch (Exception ex)
             {
-                curTcpClient.Close();
+                client.Close();

                 if (ex is IOException || ex is SocketException)
                 {
-                    //throw NewProxyException(Resources.ProxyException_Error, ex);
+                    throw new ProxyException("Error while working with proxy", ex);
                 }

                 throw;
             }

-            return curTcpClient;
+            return client;
         }

-
-        #region Методы (внутренние защищённые)
+        #region Methods (protected)

         internal protected virtual void SendCommand(NetworkStream nStream, byte command, string destinationHost, int destinationPort)
         {
             byte[] dstPort = GetIPAddressBytes(destinationHost);
             byte[] dstIp = GetPortBytes(destinationPort);

-            byte[] userId = string.IsNullOrEmpty(_username) ?
-                new byte[0] : Encoding.ASCII.GetBytes(_username);
+            byte[] userId = new byte[0];
+            if (Settings.Credentials != null)
+            {
+                if (!String.IsNullOrEmpty(Settings.Credentials.UserName))
+                {
+                    userId = Encoding.ASCII.GetBytes(Settings.Credentials.UserName);
+                }
+            }

             // +----+----+----+----+----+----+----+----+----+----+....+----+
             // | VN | CD | DSTPORT |      DSTIP        | USERID       |NULL|
@@ -131,8 +116,7 @@
             nStream.Read(response, 0, response.Length);

             byte reply = response[1];
-
-            // Если запрос не выполнен.
+
             if (reply != CommandReplyRequestGranted)
             {
                 HandleCommandError(reply);
@@ -158,8 +142,7 @@
                 {
                     if (ex is SocketException || ex is ArgumentException)
                     {
-                        //throw new ProxyException(string.Format(
-                            //Resources.ProxyException_FailedGetHostAddresses, destinationHost), this, ex);
+                        throw new ProxyException("Failed to get host address", ex);
                     }

                     throw;
@@ -186,26 +169,23 @@
             switch (command)
             {
                 case CommandReplyRequestRejectedOrFailed:
-                    //errorMessage = Resources.Socks4_CommandReplyRequestRejectedOrFailed;
+                    errorMessage = "Request rejected or failed";
                     break;

                 case CommandReplyRequestRejectedCannotConnectToIdentd:
-                    //errorMessage = Resources.Socks4_CommandReplyRequestRejectedCannotConnectToIdentd;
+                    errorMessage = "Request rejected: cannot connect to identd";
                     break;

                 case CommandReplyRequestRejectedDifferentIdentd:
-                    //errorMessage = Resources.Socks4_CommandReplyRequestRejectedDifferentIdentd;
+                    errorMessage = "Request rejected: different identd";
                     break;

                 default:
-                    //errorMessage = Resources.Socks_UnknownError;
+                    errorMessage = "Unknown socks error";
                     break;
             }

-            //string exceptionMsg = string.Format(
-                //Resources.ProxyException_CommandError, errorMessage, ToString());
-
-            //throw new ProxyException(exceptionMsg, this);
+            throw new ProxyException(errorMessage);
         }

         #endregion


License

License

--- src/SocksSharp/Proxy/Clients/Socks4.cs
+++ src/SocksSharp/Proxy/Clients/Socks4.cs
@@ -1,4 +1,26 @@
-using System;
+/*
+Copyright © 2012-2015 Ruslan Khuduev <x-rus@list.ru>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+ */
+
+using System;
 using System.IO;
 using System.Net;
 using System.Text;


Minor fix of the console output

Minor fix of the console output

--- src/SolutionCop.CommandLine/Program.cs
+++ src/SolutionCop.CommandLine/Program.cs
@@ -44,7 +44,7 @@

                 if (errors.Any())
                 {
-                    Console.WriteLine("ERROR: ***** Full list of errors: *****");
+                    Console.Out.WriteLine("ERROR: ***** Full list of errors: *****");
                     errors.ForEach(x => Console.Out.WriteLine("ERROR: {0}", x));
                     if (commandLineParameters.BuildServerType == BuildServer.TeamCity)
                     {


ignored OperationCanceledException

ignored OperationCanceledException

--- src/SuperSocket.Channel/PipeChannel.cs
+++ src/SuperSocket.Channel/PipeChannel.cs
@@ -97,6 +97,9 @@
             {
                 await Task.WhenAll(_readsTask, _sendsTask);
             }
+            catch (OperationCanceledException)
+            {
+            }
             catch (Exception e)
             {
                 Logger.LogError(e, "Unhandled exception in the method PipeChannel.Run.");


short circuit for dynamic mappers from hash lookup

--- src/Susanoo/CommandResultExpression.cs
+++ src/Susanoo/CommandResultExpression.cs
@@ -98,7 +98,7 @@
             CommandProcessorCommon instance;
             SingleResultSetCommandProcessor<TFilter, TResult> result;

-            if (CommandManager.TryGetCommandProcessor(commandResultExpression.CacheHash, out instance))
+            if (typeof(TResult) != typeof(object) && CommandManager.TryGetCommandProcessor(commandResultExpression.CacheHash, out instance))
                 result = (SingleResultSetCommandProcessor<TFilter, TResult>)instance;
             else
                 result = new SingleResultSetCommandProcessor<TFilter, TResult>(commandResultExpression, name);


Change Watch Timeout to Seconds

Change Watch Timeout to Seconds

Seems like a good idea to have all the Etcd client calls in seconds, I
got caught out by the watch value using Milliseconds.

--- etcetera/EtcdClient.cs
+++ etcetera/EtcdClient.cs
@@ -176,7 +176,7 @@

             if (timeout.HasValue)
             {
-                getRequest.Timeout = timeout.Value;
+                getRequest.Timeout = timeout.Value * 1000;
             }

             if (waitIndex.HasValue)
@@ -234,7 +234,7 @@
             return response.StatusCode == 0;
         }

-         Exception constructException(IRestResponse<EtcdResponse> response)
+        Exception constructException(IRestResponse<EtcdResponse> response)
         {
             var msg = new StringBuilder();
             msg.AppendFormat("Server: '{0}'", _client.BaseUrl);


Made DotNetTcpClientNetworkClient throw networkdisconnection exceptions

--- src/GladNet3.Client.DotNetTcpClient/Network/DotNetTcpClientNetworkClient.cs
+++ src/GladNet3.Client.DotNetTcpClient/Network/DotNetTcpClientNetworkClient.cs
@@ -7,6 +7,7 @@
 using System.Text;
 using System.Threading;
 using System.Threading.Tasks;
+using GladNet;

 namespace GladNet
 {
@@ -19,6 +20,7 @@
 	public sealed class DotNetTcpClientNetworkClient : NetworkClientBase, IConnectable, IDisconnectable, IDisposable,
 		IBytesWrittable, IBytesReadable
 	{
+		//TODO: Expose the connectivity of this better, so that we don't have to call and pray.
 		//Can't be readonly because clients may want to reconnect
 		private TcpClient InternalTcpClient { get; set; }

@@ -93,7 +95,7 @@
 		public override Task WriteAsync(byte[] bytes, int offset, int count)
 		{
 			if(!InternalTcpClient.Connected)
-				throw new InvalidOperationException($"The internal {nameof(TcpClient)}: {nameof(InternalTcpClient)} is not connected to an endpoint. You must call {nameof(ConnectAsync)} before writing any bytes.");
+				throw new NetworkDisconnectedException($"The internal {nameof(TcpClient)}: {nameof(InternalTcpClient)} is not connected to an endpoint. You must call {nameof(ConnectAsync)} before writing any bytes.");

 			//We can just write the bytes to the stream if we're connected.
 			return InternalTcpClient.GetStream().WriteAsync(bytes, offset, count);
@@ -103,7 +105,7 @@
 		public override async Task<int> ReadAsync(byte[] buffer, int start, int count, CancellationToken token)
 		{
 			if(!InternalTcpClient.Connected)
-				throw new InvalidOperationException($"The internal {nameof(TcpClient)}: {nameof(InternalTcpClient)} is not connected to an endpoint. You must call {nameof(ConnectAsync)} before reading any bytes.");
+				throw new NetworkDisconnectedException($"The internal {nameof(TcpClient)}: {nameof(InternalTcpClient)} is not connected to an endpoint. You must call {nameof(ConnectAsync)} before reading any bytes.");

 			Stream stream = InternalTcpClient.GetStream(); //TODO: Is it expensive to call GetStream? Should we cache it


Changed from the String object qualifier to type qualifier

--- src/Umbraco.Web/HtmlStringUtilities.cs
+++ src/Umbraco.Web/HtmlStringUtilities.cs
@@ -247,13 +247,13 @@
                     outputms.Position = 0;
                     using (TextReader outputtr = new StreamReader(outputms))
                     {
-                        string result = String.Empty;
+                        string result = string.Empty;

                         string firstTrim = outputtr.ReadToEnd().Replace("  ", " ").Trim();

                         //Check to see if there is an empty char between the hellip and the output string
                         //if there is, remove it
-                        if (String.IsNullOrEmpty(firstTrim) == false)
+                        if (string.IsNullOrWhiteSpace(firstTrim) == false)
                         {
                             result = firstTrim[firstTrim.Length - hellip.Length -1] == ' ' ? firstTrim.Remove(firstTrim.Length - hellip.Length -1, 1) : firstTrim;
                         }


BREAKING: Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree: Renamed Iterator > Enumerator, Keys() > GetEnumerator() (see #279)

--- src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs
+++ src/Lucene.Net.Analysis.Common/Analysis/Compound/Hyphenation/TernaryTree.cs
@@ -449,11 +449,13 @@
             int i = 0, n = m_length;
             string[] k = new string[n];
             char[] v = new char[n];
-            Iterator iter = new Iterator(this);
-            while (iter.MoveNext())
-            {
-                v[i] = iter.Value;
-                k[i++] = iter.Current;
+            using (Enumerator iter = new Enumerator(this))
+            {
+                while (iter.MoveNext())
+                {
+                    v[i] = iter.Value;
+                    k[i++] = iter.Current;
+                }
             }
             Init();
             InsertBalanced(k, v, 0, n);
@@ -520,25 +522,30 @@
             }
         }

-        public virtual IEnumerator<string> Keys()
-        {
-            return new Iterator(this);
+        /// <summary>
+        /// Gets an enumerator over the keys of this <see cref="TernaryTree"/>.
+        /// <para/>
+        /// NOTE: This was keys() in Lucene.
+        /// </summary>
+        /// <returns>An enumerator over the keys of this <see cref="TernaryTree"/>.</returns>
+        public virtual IEnumerator<string> GetEnumerator()
+        {
+            return new Enumerator(this);
         }

         /// <summary>
         /// Enumerator for TernaryTree
-        ///
+        /// <para/>
         /// LUCENENET NOTE: This differs a bit from its Java counterpart to adhere to
-        /// .NET IEnumerator semantics. In Java, when the <see cref="Iterator"/> is
+        /// .NET IEnumerator semantics. In Java, when the <see cref="Enumerator"/> is
         /// instantiated, it is already positioned at the first element. However,
         /// to act like a .NET IEnumerator, the initial state is undefined and considered
         /// to be before the first element until <see cref="MoveNext"/> is called, and
         /// if a move took place it will return <c>true</c>;
         /// </summary>
-        public class Iterator : IEnumerator<string>
+        public class Enumerator : IEnumerator<string>
         {
             private readonly TernaryTree outerInstance;
-

             /// <summary>
             /// current node index
@@ -558,11 +565,12 @@
                 internal char parent;
                 internal char child;

-                public Item()
-                {
-                    parent = (char)0;
-                    child = (char)0;
-                }
+                // LUCENENET: This constructor is unnecessary
+                //public Item()
+                //{
+                //    parent = (char)0;
+                //    child = (char)0;
+                //}

                 public Item(char p, char c)
                 {
@@ -574,7 +582,6 @@
                 {
                     return new Item(parent, child);
                 }
-
             }

             /// <summary>
@@ -589,7 +596,7 @@

             private bool isInitialized = false;

-            public Iterator(TernaryTree ternaryTree)
+            public Enumerator(TernaryTree ternaryTree)
             {
                 this.outerInstance = ternaryTree;
                 cur = -1;
@@ -623,7 +630,7 @@
             /// </summary>
             private int Up()
             {
-                Item i = new Item();
+                Item i/* = new Item()*/; // LUCENENET: Removed unnecessary assignment
                 int res = 0;

                 if (ns.Count == 0)


Ensured that the artifacts folder is created.

--- src/UmbracoArchiveProcessor/Program.cs
+++ src/UmbracoArchiveProcessor/Program.cs
@@ -23,11 +23,17 @@
 		{
 			var current_dir = Environment.CurrentDirectory;

-			var target_path = Path.Combine(current_dir, "_temp");
+			var target_path = Path.Combine(current_dir, "_tmp");
 			var target_dir = new DirectoryInfo(target_path);

 			if (!target_dir.Exists)
 				target_dir.Create();
+
+			var artifacts_path = Path.Combine(current_dir, "artifacts");
+			var artifacts_dir = new DirectoryInfo(artifacts_path);
+
+			if (!artifacts_dir.Exists)
+				artifacts_dir.Create();

 			var umbraco_version = GetLatestUmbracoVersionNumber();

@@ -260,16 +266,17 @@

 			foreach (var file in files)
 			{
-				var artifacts_dir = new DirectoryInfo(Path.Combine(target_dir.FullName, "..", "artifacts", umbraco_version));
-
-				if (!artifacts_dir.Exists)
-					artifacts_dir.Create();
+				var version_path = Path.Combine(target_dir.FullName, "..", "artifacts", umbraco_version);
+				var version_dir = new DirectoryInfo(version_path);
+
+				if (!version_dir.Exists)
+					version_dir.Create();

 				var associatedFiles = target_dir.GetFiles(file.Name.Replace(".zip", ".*"), searchOption);

 				foreach (var associatedFile in associatedFiles)
 				{
-					associatedFile.MoveTo(Path.Combine(artifacts_dir.FullName, associatedFile.Name));
+					associatedFile.MoveTo(Path.Combine(version_dir.FullName, associatedFile.Name));
 				}
 			}
 		}


Add Avalonia.Animation assembly to the pre-scanned assemblies to fix unit tests.

--- src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs
+++ src/Markup/Avalonia.Markup.Xaml/PortableXaml/AvaloniaRuntimeTypeProvider.cs
@@ -7,7 +7,6 @@
 using System.Reflection;
 using Avalonia.Controls;
 using Avalonia.Data;
-using Avalonia.Markup.Data;
 using Avalonia.Markup.Xaml.Templates;
 using Avalonia.Media;
 using Avalonia.Metadata;
@@ -33,6 +32,7 @@
         private static readonly IEnumerable<Assembly> ForcedAssemblies = new[]
         {
             typeof(AvaloniaObject).GetTypeInfo().Assembly,
+            typeof(Animation.Animation).GetTypeInfo().Assembly,
             typeof(Control).GetTypeInfo().Assembly,
             typeof(Style).GetTypeInfo().Assembly,
             typeof(DataTemplate).GetTypeInfo().Assembly,
@@ -146,4 +146,4 @@
             return null;
         }
     }
-}+}