PlgTable: binary commands from enum

PlgTable: binary commands from enum

--- ScadaWeb/OpenPlugins/PlgTable/plugins/Table/Command.aspx.cs
+++ ScadaWeb/OpenPlugins/PlgTable/plugins/Table/Command.aspx.cs
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Mikhail Shiryaev
+ * Copyright 2017 Mikhail Shiryaev
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
  *
  * Author   : Mikhail Shiryaev
  * Created  : 2016
- * Modified : 2016
+ * Modified : 2017
  */

 using Scada.Client;
@@ -55,6 +55,7 @@
         private UserData userData; // данные пользователя приложения
         private bool cmdEnabled;   // отправка команды разрешена
         private int ctrlCnlNum;    // номер канала управления
+        private int cmdTypeID;     // ид. типа команды

         /// <summary>
@@ -215,6 +216,7 @@
             {
                 cmdEnabled = (bool)ViewState["CmdEnabled"];
                 ctrlCnlNum = (int)ViewState["CtrlCnlNum"];
+                cmdTypeID = (int)ViewState["CmdTypeID"];
             }
             else
             {
@@ -239,6 +241,9 @@
                 // получение канала управления
                 CtrlCnlProps ctrlCnlProps = appData.DataAccess.GetCtrlCnlProps(ctrlCnlNum);
                 ViewState["CmdEnabled"] = ctrlCnlProps != null;
+
+                cmdTypeID = ctrlCnlProps == null ? BaseValues.CmdTypes.Standard : ctrlCnlProps.CmdTypeID;
+                ViewState["CmdTypeID"] = cmdTypeID;

                 if (ctrlCnlProps == null)
                 {
@@ -262,28 +267,27 @@
                     pnlPassword.Visible = userData.WebSettings.CmdPassword;

                     // настройка элементов управления в зависимости от типа команды
-                    switch (ctrlCnlProps.CmdTypeID)
-                    {
-                        case BaseValues.CmdTypes.Standard:
-                            if (ctrlCnlProps.CmdValArr == null)
-                            {
+                    if (cmdTypeID == BaseValues.CmdTypes.Standard || cmdTypeID == BaseValues.CmdTypes.Binary)
+                    {
+                        if (ctrlCnlProps.CmdValArr == null)
+                        {
+                            if (cmdTypeID == BaseValues.CmdTypes.Standard)
                                 pnlRealValue.Visible = true;
-                            }
                             else
-                            {
-                                repCommands.DataSource = GetDiscreteCmds(ctrlCnlProps.CmdValArr);
-                                repCommands.DataBind();
-                                pnlDiscreteValue.Visible = true;
-                                btnSubmit.Enabled = false; // disable postback on Enter
-                                btnSubmit.CssClass = "hide-exec-btn"; // hide Execute button
-                            }
-                            break;
-                        case BaseValues.CmdTypes.Binary:
-                            pnlData.Visible = true;
-                            break;
-                        default: // BaseValues.CmdTypes.Request:
-                            ViewState["KPNum"] = ctrlCnlProps.KPNum;
-                            break;
+                                pnlData.Visible = true;
+                        }
+                        else
+                        {
+                            repCommands.DataSource = GetDiscreteCmds(ctrlCnlProps.CmdValArr);
+                            repCommands.DataBind();
+                            pnlDiscreteValue.Visible = true;
+                            btnSubmit.Enabled = false; // disable postback on Enter
+                            btnSubmit.CssClass = "hide-exec-btn"; // hide Execute button
+                        }
+                    }
+                    else // BaseValues.CmdTypes.Request
+                    {
+                        ViewState["KPNum"] = ctrlCnlProps.KPNum;
                     }
                 }
             }
@@ -324,10 +328,14 @@
         {
             if (cmdEnabled && CheckPassword())
             {
-                // отправка стандартной команды для дискретных значений
+                // отправка стандартной или бинарной команды для дискретных значений
                 Button btn = (Button)e.CommandSource;
                 int cmdVal = int.Parse(btn.Attributes["data-cmdval"]);
-                SendStandardCmd(cmdVal);
+
+                if (cmdTypeID == BaseValues.CmdTypes.Standard)
+                    SendStandardCmd(cmdVal);
+                else
+                    SendBinaryCmd(BitConverter.GetBytes(cmdVal));
             }
         }
     }


obfuscate user agent

obfuscate user agent

--- src/FilterLists.Services/SnapshotService/SnapshotDe.cs
+++ src/FilterLists.Services/SnapshotService/SnapshotDe.cs
@@ -14,6 +14,7 @@
     public class SnapshotDe
     {
         private const int BatchSize = 1000;
+        private const string UserAgentString = @"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36";
         private readonly FilterListsDbContext dbContext;
         private readonly FilterListViewUrlDto list;
         private Snapshot snapshot;
@@ -71,11 +72,14 @@
         private async Task<string> GetContent()
         {
             using (var httpClient = new HttpClient())
-            using (var httpResponseMessage = await httpClient.GetAsync(list.ViewUrl))
             {
-                snapshot.HttpStatusCode = ((int)httpResponseMessage.StatusCode).ToString();
-                if (httpResponseMessage.IsSuccessStatusCode)
-                    return await httpResponseMessage.Content.ReadAsStringAsync();
+                httpClient.DefaultRequestHeaders.UserAgent.ParseAdd(UserAgentString);
+                using (var httpResponseMessage = await httpClient.GetAsync(list.ViewUrl))
+                {
+                    snapshot.HttpStatusCode = ((int)httpResponseMessage.StatusCode).ToString();
+                    if (httpResponseMessage.IsSuccessStatusCode)
+                        return await httpResponseMessage.Content.ReadAsStringAsync();
+                }
             }

             return null;


(TFS CS 6673)

(TFS CS 6673)

--- Signum.Engine.Extensions/WikiMarkup/WikiParserExtensions.cs
+++ Signum.Engine.Extensions/WikiMarkup/WikiParserExtensions.cs
@@ -53,14 +53,15 @@
                 }, RegexOptions.Singleline);
             }

+
+            //3: Encode
+            result = HttpUtility.HtmlEncode(content);
+
             //1: Process tokens
-            result = ProcessTokens(content, settings);
+            result = ProcessTokens(result, settings);

             //2: Process format
             result = ProcessFormat(result, settings);
-
-            //3: Encode
-            result = HttpUtility.HtmlEncode(result);

             if (settings.AllowRawHtml)
                 result = Regex.Replace(result, @"\|\|(?<key>HTML\d+)\|\|", m => htmlFragments[m.Value]);


fix HeavyProfofiler refresh when running

--- Signum.React.Extensions/Profiler/ProfilerHeavyController.cs
+++ Signum.React.Extensions/Profiler/ProfilerHeavyController.cs
@@ -60,7 +60,8 @@
         {
             ProfilerPermission.ViewHeavyProfiler.AssertAuthorized();

-            return HeavyProfiler.Entries.Select(e => new HeavyProfofilerEntryTS(e, false)).ToList();
+            lock (HeavyProfiler.Entries)
+                return HeavyProfiler.Entries.Select(e => new HeavyProfofilerEntryTS(e, false)).ToList();
         }

         [Route("api/profilerHeavy/details/{fullIndex}"), HttpGet]


Make CslaBinaryReader/Writer the default for the MobileFormatter. bugid: 1066

--- Source/Csla/Serialization/Mobile/CslaReaderWriterFactory.cs
+++ Source/Csla/Serialization/Mobile/CslaReaderWriterFactory.cs
@@ -53,7 +53,7 @@
 		{
 			if (_writerType == null)
 			{
-				_writerType = typeof(CslaXmlBinaryWriter);
+				_writerType = typeof(CslaBinaryWriter);
 			}
 			return (ICslaWriter)Activator.CreateInstance(_writerType);
 		}
@@ -66,12 +66,12 @@
 		{
 			if (_readerType == null)
 			{
-				_readerType = typeof(CslaXmlBinaryReader);
+				_readerType = typeof(CslaBinaryReader);
 			}
 			return (ICslaReader)Activator.CreateInstance(_readerType);
 		}
 #else
-		/// <summary>
+    /// <summary>
 		/// Get an instance of the writer that is used to write data to serialization stream
 		/// </summary>
 		/// <returns>Instance of the writer that is used to write data to serialization stream</returns>
@@ -82,7 +82,7 @@
 				string writerType = System.Configuration.ConfigurationManager.AppSettings["CslaWriter"];
 				if (string.IsNullOrEmpty(writerType))
 				{
-					_writerType = typeof (CslaXmlBinaryWriter);
+					_writerType = typeof (CslaBinaryWriter);
 				}
 				else
 				{
@@ -103,7 +103,7 @@
 				string readerType = System.Configuration.ConfigurationManager.AppSettings["CslaReader"];
 				if (string.IsNullOrEmpty(readerType))
 				{
-					_readerType = typeof(CslaXmlBinaryReader);
+          _readerType = typeof(CslaBinaryReader);
 				}
 				else
 				{


Fix concurrency bug in Batch Update and Delete

GetDynamicClass method: added the double check for "signature" in "classes" dictionary to avoid concurrency issues.
CreateDynamicClass: removed the upgrade to write lock because managed by the caller "GetDynamicClass" method.

--- Source/EntityFramework.Extended/Dynamic/DynamicQueryable.cs
+++ Source/EntityFramework.Extended/Dynamic/DynamicQueryable.cs
@@ -285,8 +285,19 @@
                 Type type;
                 if (!classes.TryGetValue(signature, out type))
                 {
-                    type = CreateDynamicClass(signature.properties);
-                    classes.Add(signature, type);
+    				LockCookie cookie = rwLock.UpgradeToWriterLock(Timeout.Infinite);
+    				try
+    				{
+    					if (!classes.TryGetValue(signature, out type))
+    					{
+    						type = CreateDynamicClass(signature.properties);
+    						classes.Add(signature, type);
+    					}
+    				}
+    				finally
+    				{
+    					rwLock.DowngradeFromWriterLock(ref cookie);
+    				}
                 }
                 return type;
             }
@@ -298,34 +309,26 @@

         Type CreateDynamicClass(DynamicProperty[] properties)
         {
-            LockCookie cookie = rwLock.UpgradeToWriterLock(Timeout.Infinite);
+            string typeName = "DynamicClass" + (classCount + 1);
+#if ENABLE_LINQ_PARTIAL_TRUST
+            new ReflectionPermission(PermissionState.Unrestricted).Assert();
+#endif
             try
             {
-                string typeName = "DynamicClass" + (classCount + 1);
+                TypeBuilder tb = this.module.DefineType(typeName, TypeAttributes.Class |
+                    TypeAttributes.Public, typeof(DynamicClass));
+                FieldInfo[] fields = GenerateProperties(tb, properties);
+                GenerateEquals(tb, fields);
+                GenerateGetHashCode(tb, fields);
+                Type result = tb.CreateType();
+                classCount++;
+                return result;
+            }
+            finally
+            {
 #if ENABLE_LINQ_PARTIAL_TRUST
-                new ReflectionPermission(PermissionState.Unrestricted).Assert();
+                PermissionSet.RevertAssert();
 #endif
-                try
-                {
-                    TypeBuilder tb = this.module.DefineType(typeName, TypeAttributes.Class |
-                        TypeAttributes.Public, typeof(DynamicClass));
-                    FieldInfo[] fields = GenerateProperties(tb, properties);
-                    GenerateEquals(tb, fields);
-                    GenerateGetHashCode(tb, fields);
-                    Type result = tb.CreateType();
-                    classCount++;
-                    return result;
-                }
-                finally
-                {
-#if ENABLE_LINQ_PARTIAL_TRUST
-                    PermissionSet.RevertAssert();
-#endif
-                }
-            }
-            finally
-            {
-                rwLock.DowngradeFromWriterLock(ref cookie);
             }
         }


workaround for AppContext.BaseDirectory being null on some platforms (#293)

--- src/WireMock.Net/Owin/AspNetCoreSelfHost.cs
+++ src/WireMock.Net/Owin/AspNetCoreSelfHost.cs
@@ -56,7 +56,18 @@

         public Task StartAsync()
         {
-            _host = new WebHostBuilder()
+            var builder = new WebHostBuilder();
+
+            // Workaround for https://github.com/WireMock-Net/WireMock.Net/issues/292
+            // On some platforms, AppContext.BaseDirectory is null, which causes WebHostBuilder to fail if ContentRoot is not
+            // specified (even though we don't actually use that base path mechanism, since we have our own way of configuring
+            // a filesystem handler).
+            if (string.IsNullOrEmpty(AppContext.BaseDirectory))
+            {
+                builder.UseContentRoot(System.IO.Directory.GetCurrentDirectory());
+            }
+
+            _host = builder
                 .ConfigureServices(services =>
                 {
                     services.AddSingleton(_options.FileSystemHandler);


Remove junk

Remove junk

--- Abacaxi/SequenceExtensions.cs
+++ Abacaxi/SequenceExtensions.cs
@@ -1532,83 +1532,6 @@
             return new ListViewWrapper<T>(sequence, startIndex, length);
         }

-        /// <summary>
-        /// Returns a new sequence that contains elements from the original <paramref name="sequence" /> converted to the given type.
-        /// </summary>
-        /// <typeparam name="T">The type of elements in the input sequence.</typeparam>
-        /// <typeparam name="TResult">The type of the elements in the resulting sequence.</typeparam>
-        /// <param name="sequence">The input sequence.</param>
-        /// <param name="formatProvider">The format provider.</param>
-        /// <param name="validateFunc">The validation function.</param>
-        /// <returns>
-        /// A sequence that contains the converted elements.
-        /// </returns>
-        /// <exception cref="ArgumentNullException">Thrown if either <paramref name="sequence" />,
-        /// <paramref name="formatProvider" /> or <paramref name="validateFunc" /> is <c>null</c>.</exception>
-        /// <remarks>
-        /// This extension method uses <see cref="ObjectExtensions.As{T}(object)" /> method to convert each element in the <paramref name="sequence" />.
-        /// </remarks>
-        [NotNull, ItemCanBeNull]
-        public static IEnumerable<TResult> As<T, TResult>([NotNull] this IEnumerable<T> sequence,
-            [NotNull] IFormatProvider formatProvider, [NotNull] Func<TResult, bool> validateFunc)
-        {
-            Validate.ArgumentNotNull(nameof(sequence), sequence);
-            Validate.ArgumentNotNull(nameof(formatProvider), formatProvider);
-            Validate.ArgumentNotNull(nameof(validateFunc), validateFunc);
-
-            return sequence.Select(item => item.As(formatProvider, validateFunc));
-        }
-
-        /// <summary>
-        /// Returns a new sequence that contains elements from the original <paramref name="sequence" /> converted to the given type.
-        /// </summary>
-        /// <typeparam name="T">The type of elements in the input sequence.</typeparam>
-        /// <typeparam name="TResult">The type of the elements in the resulting sequence.</typeparam>
-        /// <param name="sequence">The input sequence.</param>
-        /// <param name="formatProvider">The format provider.</param>
-        /// <returns>
-        /// A sequence that contains the converted elements.
-        /// </returns>
-        /// <exception cref="ArgumentNullException">Thrown if either <paramref name="sequence" /> or <paramref name="formatProvider" /> is <c>null</c>.</exception>
-        /// <remarks>
-        /// This extension method uses <see cref="ObjectExtensions.As{T}(object)" /> method to convert each element in the <paramref name="sequence" />.
-        /// </remarks>
-        [NotNull, ItemCanBeNull]
-        public static IEnumerable<TResult> As<T, TResult>(
-            [NotNull] this IEnumerable<T> sequence,
-            [NotNull] IFormatProvider formatProvider)
-        {
-            Validate.ArgumentNotNull(nameof(sequence), sequence);
-            Validate.ArgumentNotNull(nameof(formatProvider), formatProvider);
-
-            return sequence.Select(item => item.As<TResult>(formatProvider));
-        }
-
-        /// <summary>
-        /// Returns a new sequence that contains elements from the original <paramref name="sequence" /> converted to the given type.
-        /// </summary>
-        /// <typeparam name="T">The type of elements in the input sequence.</typeparam>
-        /// <typeparam name="TResult">The type of the elements in the resulting sequence.</typeparam>
-        /// <param name="sequence">The input sequence.</param>
-        /// <param name="validateFunc">The validation function.</param>
-        /// <returns>
-        /// A sequence that contains the converted elements.
-        /// </returns>
-        /// <exception cref="ArgumentNullException">Thrown if either <paramref name="sequence" /> or <paramref name="validateFunc" /> is <c>null</c>.</exception>
-        /// <remarks>
-        /// This extension method uses <see cref="ObjectExtensions.As{T}(object)" /> method to convert each element in the <paramref name="sequence" />.
-        /// </remarks>
-        [NotNull, ItemCanBeNull]
-        public static IEnumerable<TResult> As<T, TResult>(
-            [NotNull] this IEnumerable<T> sequence,
-            [NotNull] Func<TResult, bool> validateFunc)
-        {
-            Validate.ArgumentNotNull(nameof(sequence), sequence);
-            Validate.ArgumentNotNull(nameof(validateFunc), validateFunc);
-
-            return sequence.Select(item => item.As(validateFunc));
-        }
-
         private struct EditChoice
         {
             public const int Cancel = -1;


コミットリスト更新時に選択コミットをなるべく保持するようにした

コミットリスト更新時に選択コミットをなるべく保持するようにした

--- Anne/Features/RepositoryVm.cs
+++ Anne/Features/RepositoryVm.cs
@@ -111,15 +111,18 @@
             IsFiltering = new ReactiveProperty<bool>().AddTo(MultipleDisposable);

             // コミット
-            var observeCommits = _model.ObserveProperty(x => x.Commits);
-            Commits = FileStatus.WipFiles.CombineLatest(
-                observeCommits,
-                WordFilter,
+            ICommitVm selectedCommitVm = null;
+
+            Commits = FileStatus.WipFiles.CombineLatest(_model.ObserveProperty(x => x.Commits), WordFilter,
                 (wipFiles, commits, wordFilter) => new {wipFiles, commits, wordFilter})
                 .Do(_ => IsFiltering.Value = true)
                 .Do(_ => _oldCommits.Enqueue(Commits?.Value))
                 .Select(x =>
                 {
+                    selectedCommitVm = null;
+
+                    var selectedCommitHash = (SelectedCommit?.Value as DoneCommitVm)?.Hash;
+
                     var allCommits = new ObservableCollection<ICommitVm>();
                     {
                         if (x.wipFiles.Any())
@@ -129,7 +132,15 @@
                             .AsParallel()
                             .AsOrdered()
                             .Where(y => x.wordFilter.IsMatch(y.Message))
-                            .Select(y => (ICommitVm) new DoneCommitVm(this, y, TwoPaneLayout))
+                            .Select(y =>
+                            {
+                                var commit = new DoneCommitVm(this, y, TwoPaneLayout);
+
+                                if (commit.Hash == selectedCommitHash)
+                                    selectedCommitVm = commit;
+
+                                return (ICommitVm) commit;
+                            })
                             .ForEach(y => allCommits.Add(y));
                     }

@@ -146,7 +157,7 @@
             SelectedRemoteBranch = new ReactiveProperty<BranchVm>().AddTo(MultipleDisposable);

             SelectedCommit = Commits
-                .Select(c => c?.FirstOrDefault())
+                .Select(c => selectedCommitVm ?? c?.FirstOrDefault())
                 .ToReactiveProperty()
                 .AddTo(MultipleDisposable);


Add support for custom reverse proxy endpoints (#2003)

* Add support for custom reverse proxy endpoints

* Fix missing string.Format, use KnownNetworks instead of KnownProxies

* Misc

--- ArchiSteamFarm/IPC/Startup.cs
+++ ArchiSteamFarm/IPC/Startup.cs
@@ -22,8 +22,11 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
+using System.Net;
 using System.Reflection;
 using ArchiSteamFarm.IPC.Integration;
+using ArchiSteamFarm.Localization;
 using ArchiSteamFarm.Plugins;
 using JetBrains.Annotations;
 using Microsoft.AspNetCore.Builder;
@@ -130,8 +133,47 @@

 			// The order of dependency injection matters, pay attention to it

+			// Add support for custom reverse proxy endpoints
+			HashSet<string>? knownNetworksText = Configuration.GetSection("Kestrel:KnownNetworks").Get<HashSet<string>>();
+
+			HashSet<IPNetwork>? knownNetworks = null;
+
+			if (knownNetworksText != null) {
+				knownNetworks = new HashSet<IPNetwork>(knownNetworksText.Count);
+
+				foreach (string ipAddressText in knownNetworksText) {
+					string[] addressParts = ipAddressText.Split('/', StringSplitOptions.RemoveEmptyEntries);
+
+					if ((addressParts.Length != 2) || !IPAddress.TryParse(addressParts[0], out IPAddress? ipAddress)) {
+						ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(ipAddressText)));
+						ASF.ArchiLogger.LogGenericDebug(nameof(ipAddressText) + ": " + ipAddressText);
+
+						break;
+					}
+
+					if (!byte.TryParse(addressParts[1], out byte prefixLength)) {
+						ASF.ArchiLogger.LogGenericError(string.Format(Strings.ErrorIsInvalid, nameof(prefixLength)));
+						ASF.ArchiLogger.LogGenericDebug(nameof(ipAddressText) + ": " + ipAddressText);
+
+						break;
+					}
+
+					knownNetworks.Add(new IPNetwork(ipAddress, prefixLength));
+				}
+			}
+
 			// Add support for proxies
-			services.Configure<ForwardedHeadersOptions>(options => options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto);
+			services.Configure<ForwardedHeadersOptions>(
+				options => {
+					options.ForwardedHeaders = ForwardedHeaders.XForwardedFor | ForwardedHeaders.XForwardedProto;
+
+					if (knownNetworks != null) {
+						foreach (IPNetwork knownNetwork in knownNetworks) {
+							options.KnownNetworks.Add(knownNetwork);
+						}
+					}
+				}
+			);

 			// Add support for response compression
 			services.AddResponseCompression();


Replace Assert.IsNotNullOrEmpty -> Assert.IsNotNull and Assert.IsNotEmpty

--- source/icu.net.tests/Collation/RuleBasedCollatorTests.cs
+++ source/icu.net.tests/Collation/RuleBasedCollatorTests.cs
@@ -905,7 +905,8 @@
 			var collationRules = Collator.GetCollationRules(locale, UColRuleOption.UCOL_FULL_RULES);

 			Assert.IsEmpty(tailoredRules);
-			Assert.IsNotNullOrEmpty(collationRules);
+			Assert.IsNotNull(collationRules);
+			Assert.IsNotEmpty(collationRules);
 		}
 	}
 }


Insert XML-Comments

Insert XML-Comments

--- src/Avalonia.Controls.DataGrid/DataGridTemplateColumn.cs
+++ src/Avalonia.Controls.DataGrid/DataGridTemplateColumn.cs
@@ -32,12 +32,24 @@

         private IDataTemplate _cellEditingCellTemplate;

+        /// <summary>
+        /// Defines the <see cref="CellEditingTemplate"/> property.
+        /// </summary>
         public static readonly DirectProperty<DataGridTemplateColumn, IDataTemplate> CellEditingTemplateProperty =
                 AvaloniaProperty.RegisterDirect<DataGridTemplateColumn, IDataTemplate>(
                     nameof(CellEditingTemplate),
                     o => o.CellEditingTemplate,
                     (o, v) => o.CellEditingTemplate = v);

+        /// <summary>
+        /// Gets or sets the <see cref="IDataTemplate"/> which is used for the editing mode of the current <see cref="DataGridCell"/>
+        /// </summary>
+        /// <value>
+        /// An <see cref="IDataTemplate"/> for the editing mode of the current <see cref="DataGridCell"/>
+        /// </value>
+        /// <remarks>
+        /// If this property is <see langword="null"/> the column is read-only.
+        /// </remarks>
         public IDataTemplate CellEditingTemplate
         {
             get => _cellEditingCellTemplate;


Updated BoboService.cs to 4.0.2 compatibility.

--- src/BoboBrowse.Net/BoboBrowse.Net/Service/BoboService.cs
+++ src/BoboBrowse.Net/BoboBrowse.Net/Service/BoboService.cs
@@ -17,7 +17,7 @@
 //* See the License for the specific language governing permissions and
 //* limitations under the License.

-// Version compatibility level: 3.2.0
+// Version compatibility level: 4.0.2
 namespace BoboBrowse.Net.Service
 {
     using BoboBrowse.Net;
@@ -32,7 +32,7 @@
         private static ILog logger = LogManager.GetLogger(typeof(BoboService));

         private readonly DirectoryInfo _idxDir;
-        private BoboSegmentReader _boboReader;
+        private BoboMultiReader _boboReader;

         public BoboService(string path)
             : this(new DirectoryInfo(path))
@@ -76,10 +76,10 @@

         public virtual void Start()
         {
-            IndexReader reader = IndexReader.Open(FSDirectory.Open(_idxDir), true);
+            DirectoryReader reader = DirectoryReader.Open(FSDirectory.Open(_idxDir));
             try
             {
-                _boboReader = BoboSegmentReader.GetInstance(reader);
+                _boboReader = BoboMultiReader.GetInstance(reader);
             }
             catch
             {


Fix deterministic PDB writer check

Fix deterministic PDB writer check

--- src/Compilers/Core/Portable/NativePdbWriter/PdbWriter.cs
+++ src/Compilers/Core/Portable/NativePdbWriter/PdbWriter.cs
@@ -773,7 +773,7 @@
                 if (_deterministic)
                 {
                     var deterministicSymWriter = symWriter as ISymUnmanagedWriter6;
-                    if (symWriter == null)
+                    if (deterministicSymWriter == null)
                     {
                         throw new NotSupportedException(CodeAnalysisResources.SymWriterNotDeterministic);
                     }


Fixes iOS/Android build issue w/ logger.

--- src/Couchbase.Lite.Shared/Util/CouchbaseTraceListener.cs
+++ src/Couchbase.Lite.Shared/Util/CouchbaseTraceListener.cs
@@ -68,8 +68,10 @@
                 : TraceOptions.None;
         }

+
         void WriteOptionalTraceInfo()
         {
+            #if !__MOBILE__
             var traceInfo = new TraceEventCache();
             if (TraceOutputOptions.HasFlag(TraceOptions.ThreadId))
             {
@@ -83,8 +85,10 @@
             {
                 PrintTimeStamp(traceInfo);
             }
-        }
-
+            #endif
+        }
+
+    #if !__MOBILE__
         void PrintThreadId(TraceEventCache info)
         {
             #if __DEBUGGER__
@@ -123,7 +127,7 @@
             Console.Out.Write(Environment.NewLine);
             #endif
         }
-
+    #endif
         public void WriteLine(SourceLevels level, string message, string category)
         {
             Level = level;


runtime generated command bindings fixed

--- src/DotVVM.Framework/Binding/CommandBindingExpression.cs
+++ src/DotVVM.Framework/Binding/CommandBindingExpression.cs
@@ -18,7 +18,7 @@
         { }

         public CommandBindingExpression(CompiledBindingExpression.BindingDelegate command, string id)
-            : base(new CompiledBindingExpression() { Delegate = command, Id = id })
+            : base(new CompiledBindingExpression() { Delegate = command, Id = id, Javascript = $"dotvvm.postbackScript('{ id }')" })
         {
         }


GSF.TimeSeries: Fixed null reference exceptions during device statistics registration in the DataSubscriber when the DataSource is null.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/gsf/Main;C89374

--- Source/Libraries/GSF.TimeSeries/Transport/DataSubscriber.cs
+++ Source/Libraries/GSF.TimeSeries/Transport/DataSubscriber.cs
@@ -3645,10 +3645,13 @@
             {
                 dataSource = DataSource;

-                if (!dataSource.Tables.Contains("InputStreamDevices"))
-                {
-                    foreach (DeviceStatisticsHelper<SubscribedDevice> statisticsHelper in m_statisticsHelpers)
-                        statisticsHelper.Device.Dispose();
+                if ((object)dataSource == null || !dataSource.Tables.Contains("InputStreamDevices"))
+                {
+                    if ((object)m_statisticsHelpers != null)
+                    {
+                        foreach (DeviceStatisticsHelper<SubscribedDevice> statisticsHelper in m_statisticsHelpers)
+                            statisticsHelper.Device.Dispose();
+                    }

                     m_statisticsHelpers = new List<DeviceStatisticsHelper<SubscribedDevice>>();
                 }


Applied patch from Ian Griffiths (issue 847)

--- src/Gallio/Gallio/Model/DefaultTestFrameworkManager.cs
+++ src/Gallio/Gallio/Model/DefaultTestFrameworkManager.cs
@@ -42,6 +42,7 @@
         private readonly List<ComponentHandle<ITestFramework, TestFrameworkTraits>> testFrameworkHandlesWithoutFallback;
         private readonly ComponentHandle<ITestFramework, TestFrameworkTraits> fallbackTestFrameworkHandle;
         private readonly IFileTypeManager fileTypeManager;
+        private readonly ILogger logger;

         /// <summary>
         /// Creates a test framework manager.
@@ -49,11 +50,9 @@
         /// <param name="testFrameworkHandles">The test framework handles.</param>
         /// <param name="fallbackTestFrameworkHandle">The fallback test framework handle.</param>
         /// <param name="fileTypeManager">The file type manager.</param>
-        /// <exception cref="ArgumentNullException">Thrown if <paramref name="testFrameworkHandles"/>,
-        /// <paramref name="fallbackTestFrameworkHandle"/> or <paramref name="fileTypeManager "/>is null.</exception>
-        public DefaultTestFrameworkManager(ComponentHandle<ITestFramework, TestFrameworkTraits>[] testFrameworkHandles,
-            ComponentHandle<ITestFramework, TestFrameworkTraits> fallbackTestFrameworkHandle,
-            IFileTypeManager fileTypeManager)
+        /// <param name="logger">The logger.</param>
+        /// <exception cref="ArgumentNullException">Thrown if <paramref name="testFrameworkHandles"/>, <paramref name="fallbackTestFrameworkHandle"/> or <paramref name="fileTypeManager "/> or <paramref name="logger"/>is null.</exception>
+        public DefaultTestFrameworkManager(ComponentHandle<ITestFramework, TestFrameworkTraits>[] testFrameworkHandles, ComponentHandle<ITestFramework, TestFrameworkTraits> fallbackTestFrameworkHandle, IFileTypeManager fileTypeManager, ILogger logger)
         {
             if (testFrameworkHandles == null || Array.IndexOf(testFrameworkHandles, null) >= 0)
                 throw new ArgumentNullException("testFrameworkHandles");
@@ -61,10 +60,13 @@
                 throw new ArgumentNullException("fallbackTestFrameworkHandle");
             if (fileTypeManager == null)
                 throw new ArgumentNullException("fileTypeManager");
+            if (logger == null)
+                throw new ArgumentNullException("logger");

             this.testFrameworkHandles = testFrameworkHandles;
             this.fallbackTestFrameworkHandle = fallbackTestFrameworkHandle;
             this.fileTypeManager = fileTypeManager;
+            this.logger = logger;

             testFrameworkHandlesWithoutFallback = new List<ComponentHandle<ITestFramework, TestFrameworkTraits>>(testFrameworkHandles.Length);
             foreach (var testFrameworkHandle in testFrameworkHandles)
@@ -231,13 +233,13 @@
                             partitions.Add(selection, file);
                     }
                 }
-                catch (IOException)
-                {
-                    // Ignore the file.
-                }
-                catch (UnauthorizedAccessException)
-                {
-                    // Ignore the file.
+                catch (IOException exception)
+                {
+                    logger.Log(LogSeverity.Error, string.Format("Skipping file '{0}' due to IO error.", file.FullName), exception);
+                }
+                catch (UnauthorizedAccessException exception)
+                {
+                    logger.Log(LogSeverity.Error, string.Format("Skipping file '{0}' due to security error", file.FullName), exception);
                 }
             }


fix: Fixed comments

fix: Fixed comments

--- Assets/Adjust/Unity/Adjust.cs
+++ Assets/Adjust/Unity/Adjust.cs
@@ -35,13 +35,13 @@

         [Header("ANDROID SPECIFIC FEATURES:")]
         [Space(5)]
-        public bool preinstallTrackingEnabled = false;
+        public bool preinstallTracking = false;

         [Header("iOS SPECIFIC FEATURES:")]
         [Space(5)]
-        public bool allowAdInfoReading = true;
-        public bool allowAdServicesInfoReading = true;
-        public bool allowIDFAInfoReading = true;
+        public bool iadInfoReading = true;
+        public bool adServicesInfoReading = true;
+        public bool IDFAInfoReading = true;
         public bool skAdNetworkHandling = true;

 #if UNITY_IOS
@@ -77,10 +77,10 @@
                 adjustConfig.setAppSecret(this.secretId, this.info1, this.info2, this.info3, this.info4);
                 adjustConfig.setDelayStart(this.startDelay);
                 adjustConfig.setNeedsCost(this.needsCost);
-                adjustConfig.setPreinstallTrackingEnabled(this.preinstallTrackingEnabled);
-                adjustConfig.setAllowiAdInfoReading(this.allowAdInfoReading);
-                adjustConfig.setAllowAdServicesInfoReading(this.allowAdServicesInfoReading);
-                adjustConfig.setAllowIdfaReading(this.allowIDFAInfoReading);
+                adjustConfig.setPreinstallTrackingEnabled(this.preinstallTracking);
+                adjustConfig.setAllowiAdInfoReading(this.iadInfoReading);
+                adjustConfig.setAllowAdServicesInfoReading(this.adServicesInfoReading);
+                adjustConfig.setAllowIdfaReading(this.IDFAInfoReading);
                 if (!skAdNetworkHandling)
                 {
                     adjustConfig.deactivateSKAdNetworkHandling();


Tweak the startup process for IIS support.

--- src/FlightNode.Identity/Services/Providers/ApiStartup.cs
+++ src/FlightNode.Identity/Services/Providers/ApiStartup.cs
@@ -11,7 +11,6 @@
 using System;
 using System.Linq;
 using System.Reflection;
-using System.Threading.Tasks;

 namespace FlightNode.Identity.Services.Providers
 {
@@ -45,21 +44,6 @@

             // OAuth 2.0 Bearer Access Token Generation
             app.UseOAuthAuthorizationServer(OAuthServerOptions);
-
-
-            //var OAuthBearerOptions = new OAuthBearerAuthenticationOptions();
-            //OAuthBearerOptions.AccessTokenFormat = OAuthServerOptions.AccessTokenFormat;
-            //OAuthBearerOptions.AccessTokenProvider = OAuthServerOptions.AccessTokenProvider;
-            //OAuthBearerOptions.AuthenticationMode = OAuthServerOptions.AuthenticationMode;
-            //OAuthBearerOptions.AuthenticationType = OAuthServerOptions.AuthenticationType;
-            //OAuthBearerOptions.Description = OAuthServerOptions.Description;
-
-            //OAuthBearerOptions.Provider = new CustomBearerAuthenticationProvider();
-            //OAuthBearerOptions.SystemClock = OAuthServerOptions.SystemClock;
-
-            //app.UseOAuthBearerAuthentication(OAuthBearerOptions);
-
-            //app.UseOAuthBearerTokens(OAuthServerOptions);

             return app;
         }
@@ -106,17 +90,4 @@
         }

     }
-
-    //public class CustomBearerAuthenticationProvider : OAuthBearerAuthenticationProvider
-    //{
-    //    // This validates the identity based on the issuer of the claim.
-    //    // The issuer is set in the API endpoint that logs the user in
-    //    public override Task ValidateIdentity(OAuthValidateIdentityContext context)
-    //    {
-    //        var claims = context.Ticket.Identity.Claims;
-    //        if (claims.Count() == 0 || claims.Any(claim => claim.Issuer != "Facebook" && claim.Issuer != "LOCAL_AUTHORITY"))
-    //            context.Rejected();
-    //        return Task.FromResult<object>(null);
-    //    }
-    //}
 }


fix: previous rename caused dotnet to crash

--- src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs
+++ src/JsonApiDotNetCore/Internal/Generics/GenericProcessorFactory.cs
@@ -41,12 +41,12 @@
         }

         public TInterface GetProcessor<TInterface>(Type openGenericType, Type resourceType)
-            => GetProcessor<TInterface>(openGenericType, resourceType);
+            => GetProcessorInternal<TInterface>(openGenericType, resourceType);

         public TInterface GetProcessor<TInterface>(Type openGenericType, Type resourceType, Type keyType)
-            => GetProcessor<TInterface>(openGenericType, resourceType, keyType);
+            => GetProcessorInternal<TInterface>(openGenericType, resourceType, keyType);

-        private TInterface GetProcessor<TInterface>(Type openGenericType, params Type[] types)
+        private TInterface GetProcessorInternal<TInterface>(Type openGenericType, params Type[] types)
         {
             var concreteType = openGenericType.MakeGenericType(types);


Added documentation for PackageInstallationOptions

--- Source/OpenIIoT.SDK/Packaging/PackageInstallationOptions.cs
+++ Source/OpenIIoT.SDK/Packaging/PackageInstallationOptions.cs
@@ -1,22 +1,66 @@
-using Newtonsoft.Json;
-using Newtonsoft.Json.Converters;
-using OpenIIoT.SDK.Packaging;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+/*
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀  ▀  ▀      ▀▀
+      █
+      █      ▄███████▄                                                               ▄█                                                                                ▄██████▄
+      █     ███    ███                                                              ███                                                                                ███    ███
+      █     ███    ███   ▄█████   ▄██████    █  █▄     ▄█████     ▄████▄     ▄█████ ███▌ ██▄▄▄▄    ▄█████     ██      ▄█████   █        █         ▄█████      ██     █   ██████  ██▄▄▄▄  ███    ███    █████▄     ██     █   ██████  ██▄▄▄▄    ▄█████
+      █     ███    ███   ██   ██ ██    ██   ██ ▄██▀    ██   ██   ██    ▀    ██   █  ███▌ ██▀▀▀█▄   ██  ▀  ▀███████▄   ██   ██ ██       ██         ██   ██ ▀███████▄ ██  ██    ██ ██▀▀▀█▄ ███    ███   ██   ██ ▀███████▄ ██  ██    ██ ██▀▀▀█▄   ██  ▀
+      █   ▀█████████▀    ██   ██ ██    ▀    ██▐█▀      ██   ██  ▄██        ▄██▄▄    ███▌ ██   ██   ██         ██  ▀   ██   ██ ██       ██         ██   ██     ██  ▀ ██▌ ██    ██ ██   ██ ███    ███   ██   ██     ██  ▀ ██▌ ██    ██ ██   ██   ██
+      █     ███        ▀████████ ██    ▄  ▀▀████     ▀████████ ▀▀██ ███▄  ▀▀██▀▀    ███  ██   ██ ▀███████     ██    ▀████████ ██       ██       ▀████████     ██    ██  ██    ██ ██   ██ ███    ███ ▀██████▀      ██    ██  ██    ██ ██   ██ ▀███████
+      █     ███          ██   ██ ██    ██   ██ ▀██▄    ██   ██   ██    ██   ██   █  ███  ██   ██    ▄  ██     ██      ██   ██ ██▌    ▄ ██▌    ▄   ██   ██     ██    ██  ██    ██ ██   ██ ███    ███   ██          ██    ██  ██    ██ ██   ██    ▄  ██
+      █    ▄████▀        ██   █▀ ██████▀    ▀█   ▀█▀   ██   █▀   ██████▀    ███████ █▀    █   █   ▄████▀     ▄██▀     ██   █▀ ████▄▄██ ████▄▄██   ██   █▀    ▄██▀   █    ██████   █   █   ▀██████▀   ▄███▀       ▄██▀   █    ██████   █   █   ▄████▀
+      █
+ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄  ▄▄ ▄▄   ▄▄▄▄ ▄▄     ▄▄     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
+ █████████████████████████████████████████████████████████████ ███████████████ ██  ██ ██   ████ ██     ██     ████████████████ █ █
+      ▄
+      █  Installation options for the Package installation operation.
+      █
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀     ▀▀               ▀
+      █  The GNU Affero General Public License (GNU AGPL)
+      █
+      █  Copyright (C) 2016-2017 JP Dillingham (jp@dillingham.ws)
+      █
+      █  This program is free software: you can redistribute it and/or modify
+      █  it under the terms of the GNU Affero General Public License as published by
+      █  the Free Software Foundation, either version 3 of the License, or
+      █  (at your option) any later version.
+      █
+      █  This program is distributed in the hope that it will be useful,
+      █  but WITHOUT ANY WARRANTY; without even the implied warranty of
+      █  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+      █  GNU Affero General Public License for more details.
+      █
+      █  You should have received a copy of the GNU Affero General Public License
+      █  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+      █
+      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
+                                                                                ██
+                                                                                ▀█▄ ██ ▄█▀
+                                                                                ▀████▀
+                                                                                ▀▀                            */

 namespace OpenIIoT.SDK.Packaging
 {
+    /// <summary>
+    ///     Installation options for the <see cref="Package"/> installation operation.
+    /// </summary>
     public class PackageInstallationOptions
     {
         #region Public Properties

+        /// <summary>
+        ///     Gets or sets a value indicating whether the destination folder should be overwritten if it exists.
+        /// </summary>
         public bool Overwrite { get; set; }

+        /// <summary>
+        ///     Gets or sets the PGP public key with which the <see cref="Package"/> is to be verified.
+        /// </summary>
         public string PublicKey { get; set; }
+
+        /// <summary>
+        ///     Gets or sets a value indicating whether <see cref="Package"/> verification should be skipped prior to installation.
+        /// </summary>
         public bool SkipVerification { get; set; }

         #endregion Public Properties


Treat subclasses with interface types the same as parent classes with interface types

- All tests passing

--- src/FluentNHibernate/Visitors/SeparateSubclassVisitor.cs
+++ src/FluentNHibernate/Visitors/SeparateSubclassVisitor.cs
@@ -91,7 +91,7 @@
                 var subclassType = subclassProvider.EntityType;
                 var level = 0;

-                bool implOfParent = parentType.IsInterface
+                bool implOfParent = (parentType.IsInterface || subclassType.IsInterface)
                     ? DistanceFromParentInterface(parentType, subclassType, ref level)
                     : DistanceFromParentBase(parentType, subclassType.BaseType, ref level);


Removed commented code.

Removed commented code.

--- Source/TrackableEntities.Client/ChangeTrackingExtensions.cs
+++ Source/TrackableEntities.Client/ChangeTrackingExtensions.cs
@@ -172,41 +172,6 @@
             return false;
         }

-        // TODO: Remove commented code
-        /* private static bool HasChanges_Old(this ITrackable item, ITrackable parent)
-        {
-            // Include private props to get ref prop change tracker
-            foreach (var prop in item.GetType().GetProperties(BindingFlags.Instance |
-                BindingFlags.Public | BindingFlags.NonPublic))
-            {
-                var trackingColl = prop.GetValue(item, null) as ITrackingCollection;
-                if (trackingColl != null)
-                {
-                    // Recursively check for child collection changes
-                    bool stopRecursion = false;
-                    foreach (ITrackable child in trackingColl)
-                    {
-                        // Stop recursion if trackable is same type as parent
-                        if (parent != null && (child.GetType() == parent.GetType()))
-                        {
-                            stopRecursion = true;
-                            break;
-                        }
-                        bool hasChanges = child.HasChanges(item);
-                        if (hasChanges) return true;
-                    }
-
-                    // Return true if child collection has changes
-                    if (!stopRecursion)
-                    {
-                        ITrackingCollection changes = trackingColl.GetChanges(false);
-                        if (changes.Count > 0) return true;
-                    }
-                }
-            }
-            return false;
-        } */
-
         private static ITrackable GetEquatableItem
             (this IEnumerable<ITrackable> sourceItems, ITrackable sourceItem, bool isTrackableRef)
         {


Extend SqliteConnection to handle double and nullable values.

https://bugzilla.gnome.org/show_bug.cgi?id=614734

--- src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs
+++ src/Hyena.Data.Sqlite/Hyena.Data.Sqlite/SqliteUtils.cs
@@ -43,8 +43,15 @@
             } else if (type == typeof (int) || type == typeof (long) || type == typeof (bool)
                 || type == typeof (DateTime) || type == typeof (TimeSpan) || type.IsEnum) {
                 return "INTEGER";
+            } else if (type == typeof (int?) || type == typeof (long?) || type == typeof (bool?)
+                || type == typeof (uint?)) {
+                return "INTEGER NULL";
             } else if (type == typeof (byte[])) {
                 return "BLOB";
+            } else if (type == typeof (double)) {
+                return "REAL";
+             } else if (type == typeof (double?)) {
+                return "REAL NULL";
             } else {
                 throw new Exception (String.Format (
                     "The type {0} cannot be bound to a database column.", type.Name));


Don't call cancel.OnCompleted after disposal.

`cancel.OnNext` causes `cancel` to get disposed, so don't try calling
`OnCompleted` on it afterwards. Fixes #311.

--- src/GitHub.UI.Reactive/Controls/SimpleViewUserControl.cs
+++ src/GitHub.UI.Reactive/Controls/SimpleViewUserControl.cs
@@ -56,7 +56,6 @@
                 return;

             cancel.OnNext(null);
-            cancel.OnCompleted();
         }

         protected void NotifyIsBusy(bool busy)


Fixed ExecuteDocumentCommandBase output

Fixed ExecuteDocumentCommandBase output

--- src/NSwag.Commands/Commands/Document/ExecuteDocumentCommandBase.cs
+++ src/NSwag.Commands/Commands/Document/ExecuteDocumentCommandBase.cs
@@ -27,17 +27,18 @@
                 await ExecuteDocumentAsync(host, Input);
             else
             {
-                if (await DynamicApis.FileExistsAsync("nswag.json").ConfigureAwait(false))
+                var hasNSwagJson = await DynamicApis.FileExistsAsync("nswag.json").ConfigureAwait(false);
+                if (hasNSwagJson)
                     await ExecuteDocumentAsync(host, "nswag.json");

-                var currenctDirectory = await DynamicApis.DirectoryGetCurrentDirectoryAsync().ConfigureAwait(false);
-                var files = await DynamicApis.DirectoryGetFilesAsync(currenctDirectory, "*.nswag").ConfigureAwait(false);
+                var currentDirectory = await DynamicApis.DirectoryGetCurrentDirectoryAsync().ConfigureAwait(false);
+                var files = await DynamicApis.DirectoryGetFilesAsync(currentDirectory, "*.nswag").ConfigureAwait(false);
                 if (files.Any())
                 {
                     foreach (var file in files)
                         await ExecuteDocumentAsync(host, file);
                 }
-                else
+                else if (!hasNSwagJson)
                     host.WriteMessage("Current directory does not contain any .nswag files.");
             }
             return null;


typo in log

typo in log

--- src/IdentityServer4/Validation/PostBodySecretParser.cs
+++ src/IdentityServer4/Validation/PostBodySecretParser.cs
@@ -62,7 +62,7 @@
                 {
                     if (id.Length > _options.InputLengthRestrictions.ClientId)
                     {
-                        _logger.LogError("Client ID exceeds maximum lenght.");
+                        _logger.LogError("Client ID exceeds maximum length.");
                         return null;
                     }

@@ -70,7 +70,7 @@
                     {
                         if (secret.Length > _options.InputLengthRestrictions.ClientSecret)
                         {
-                            _logger.LogError("Client secret exceeds maximum lenght.");
+                            _logger.LogError("Client secret exceeds maximum length.");
                             return null;
                         }


left some notes for myself in GameManager

--- Assets/Scripts/GameManager.cs
+++ Assets/Scripts/GameManager.cs
@@ -31,7 +31,10 @@
         //Debug.Log("player0 in GM has " + player0Cards.Count + " cards");
         if (Input.GetKeyDown(KeyCode.Space))
         {
-
+            //this is purelyfor testing purposes
+            //I need to write a function to do this, but also need to write comparisons
+            //I need to log who had the highest hand, the second highest, and so forth, so that eventually I can add in side pots and shit
+            //I COULD do that in another script? some kind of Comparer Script maybe? and make instances of itself to compare? but either way it's gonna be a pain in the ass
             TableCards.instance.DebugHands();
             TableCards.instance.EvaluatePlayer(Destinations.player0);
             TableCards.instance.EvaluatePlayer(Destinations.player1);


Update Heal.cs

Update Heal.cs

--- Assets/Scripts/Player/Heal.cs
+++ Assets/Scripts/Player/Heal.cs
@@ -3,8 +3,6 @@
 using UnityEngine.UI;

 public class Heal : MonoBehaviour {
-
-    private Transform player;

     private float currentHealth;


Fixing Widget layers deletion

Fixing Widget layers deletion

--- src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs
+++ src/Orchard.Web/Modules/Orchard.Widgets/Services/WidgetsService.cs
@@ -57,7 +57,7 @@

         public IEnumerable<WidgetPart> GetOrphanedWidgets() {
             return _contentManager
-                .Query<WidgetPart, WidgetPartRecord>()
+                .Query<WidgetPart>()
                 .ForVersion(VersionOptions.Latest)
                 .WithQueryHints(new QueryHints().ExpandParts<CommonPart>())
                 .Where<CommonPartRecord>(x => x.Container == null)
@@ -66,7 +66,8 @@

         public IEnumerable<WidgetPart> GetWidgets(int layerId) {
             return _contentManager
-                .Query<WidgetPart, WidgetPartRecord>()
+                .Query<WidgetPart>()
+                .ForVersion(VersionOptions.Latest)
                 .WithQueryHints(new QueryHints().ExpandParts<CommonPart>())
                 .Where<CommonPartRecord>(x => x.Container.Id == layerId)
                 .List();


add isconnectedMessage for ProcessNewConsumerErrorHandler

--- SportingSolutions.Udapi.Sdk/Actors/StreamControllerActor.cs
+++ SportingSolutions.Udapi.Sdk/Actors/StreamControllerActor.cs
@@ -336,6 +336,10 @@
         private void ProcessNewConsumerErrorHandler(Exception e)
         {
             _logger.Error($"ProcessNewConsumer limit exceeded with errorsCout={_processNewConsumerErrorCounter}  disconnected event will be raised  {e}");
+            if (UDAPI.Configuration.UseStreamControllerMailbox)
+                Self.Tell(DefaultDisconnectedMessage);
+            else
+                DisconnectedHandler(DefaultDisconnectedMessage);
             _processNewConsumerErrorCounter = 0;
         }


Expose IClusterMembershipService publicly (#6243)

--- src/Orleans.Runtime/MembershipService/IClusterMembershipService.cs
+++ src/Orleans.Runtime/MembershipService/IClusterMembershipService.cs
@@ -3,7 +3,7 @@

 namespace Orleans.Runtime
 {
-    internal interface IClusterMembershipService
+    public interface IClusterMembershipService
     {
         ClusterMembershipSnapshot CurrentSnapshot { get; }


Changed a use of NoSpecimen to the ctor w/out req.

--- Src/AutoFixtureUnitTest/Kernel/NoSpecimenOutputGuardTest.cs
+++ Src/AutoFixtureUnitTest/Kernel/NoSpecimenOutputGuardTest.cs
@@ -113,9 +113,7 @@
             var request = new object();
             var context = new DelegatingSpecimenContext();
             var expectedResult = new object();
-#pragma warning disable 618
-            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => r == request && c == context ? expectedResult : new NoSpecimen(r) };
-#pragma warning restore 618
+            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => r == request && c == context ? expectedResult : new NoSpecimen() };

             var sut = new NoSpecimenOutputGuard(builder);
             // Exercise system
@@ -129,9 +127,7 @@
         public void CreateThrowsWhenDecoratedBuilderReturnsNoSpecimen()
         {
             // Fixture setup
-#pragma warning disable 618
-            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => new NoSpecimen(r) };
-#pragma warning restore 618
+            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => new NoSpecimen() };
             var sut = new NoSpecimenOutputGuard(builder);
             // Exercise system and verify outcome
             var dummyRequest = new object();
@@ -146,19 +142,15 @@
         {
             // Fixture setup
             var request = new object();
-
-#pragma warning disable 618
-            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => new NoSpecimen(r) };
-#pragma warning restore 618
+
+            var builder = new DelegatingSpecimenBuilder { OnCreate = (r, c) => new NoSpecimen() };
             var spec = new DelegatingRequestSpecification { OnIsSatisfiedBy = r => request == r ? false : true };
             var sut = new NoSpecimenOutputGuard(builder, spec);
             // Exercise system
             var dummyContext = new DelegatingSpecimenContext();
             var result = sut.Create(request, dummyContext);
             // Verify outcome
-#pragma warning disable 618
-            var expectedResult = new NoSpecimen(request);
-#pragma warning restore 618
+            var expectedResult = new NoSpecimen();
             Assert.Equal(expectedResult, result);
             // Teardown
         }


Fix ConfigurableMessageHandler comments for the lists

--- Src/GoogleApis.Core/Apis/Http/ConfigurableMessageHandler.cs
+++ Src/GoogleApis.Core/Apis/Http/ConfigurableMessageHandler.cs
@@ -75,7 +75,7 @@
             new List<IHttpExecuteInterceptor>();

         ///
-        /// Gets a snapshot of <see cref="IHttpUnsuccessfulResponseHandler"/>s associated with this instance's handlers.
+        /// Gets a snapshot of <see cref="IHttpUnsuccessfulResponseHandler"/>s associated with this instance.
         /// <remarks>
         /// Since version 1.10, the return value had been changed from <c>IList</c> to <c>IEnumerable</c> in order to
         /// keep this class thread-safe. The returned enumerable is a snapshot version of the handlers. More info is
@@ -112,7 +112,7 @@
         }

         ///
-        /// Gets a snapshot of <see cref="IHttpExceptionHandler"/>s associated with this instance's handlers.
+        /// Gets a snapshot of <see cref="IHttpExceptionHandler"/>s associated with this instance.
         /// <remarks>
         /// Since version 1.10, the return value had been changed from <c>IList</c> to <c>IEnumerable</c> in order to
         /// keep this class thread-safe. The returned enumerable is a snapshot version of the handlers. More info is
@@ -149,7 +149,7 @@
         }

         ///
-        /// Gets a snapshot of <see cref="IHttpExecuteInterceptor"/>s associated with this instance's interceptors.
+        /// Gets a snapshot of <see cref="IHttpExecuteInterceptor"/>s associated with this instance.
         /// <remarks>
         /// Since version 1.10, the return value had been changed from <c>IList</c> to <c>IEnumerable</c> in order to
         /// keep this class thread-safe. The returned enumerable is a snapshot version of the interceptors. More info


update nancy metrics tests

update nancy metrics tests

--- Src/Metrics.Tests/NancyAdapter/NancyAdapterGlobalMetrics.cs
+++ Src/Metrics.Tests/NancyAdapter/NancyAdapterGlobalMetrics.cs
@@ -11,7 +11,6 @@
 {
     public class NancyAdapterGlobalMetrics
     {
-
         public class ActiveRequestsModule : NancyModule
         {
             public ActiveRequestsModule(Task trigger, TaskCompletionSource<int> request1, TaskCompletionSource<int> request2)
@@ -68,11 +67,11 @@
         [Fact]
         public void NancyMetricsShouldBeAbleToRecordTimeForAllRequests()
         {
-            this.context.ForAllTimers(v => v.Rate.Count.Should().Be(0));
+            this.context.TimerValue("NancyFx", "Requests").Rate.Count.Should().Be(0);

             browser.Get("/test/action").StatusCode.Should().Be(HttpStatusCode.OK);

-            var timer = this.context.TimerValue("NancyFx.Requests");
+            var timer = this.context.TimerValue("NancyFx", "Requests");

             timer.Rate.Count.Should().Be(1);
             timer.Histogram.Count.Should().Be(1);
@@ -82,7 +81,7 @@

             browser.Post("/test/post").StatusCode.Should().Be(HttpStatusCode.OK);

-            timer = this.context.TimerValue("NancyFx.Requests");
+            timer = this.context.TimerValue("NancyFx", "Requests");

             timer.Rate.Count.Should().Be(2);
             timer.Histogram.Count.Should().Be(2);
@@ -91,51 +90,51 @@
             timer.Histogram.Min.Should().Be(TimeUnit.Milliseconds.ToNanoseconds(100));
         }

-        //[Fact]
-        //public void NancyMetricsShouldBeAbleToCountErrors()
-        //{
-        //    meter.Value.Count.Should().Be(0);
-        //    Assert.Throws<Exception>(() => browser.Get("/test/error"));
-        //    meter.Value.Count.Should().Be(1);
-        //    Assert.Throws<Exception>(() => browser.Get("/test/error"));
-        //    meter.Value.Count.Should().Be(2);
-        //}
+        [Fact]
+        public void NancyMetricsShouldBeAbleToCountErrors()
+        {
+            this.context.MeterValue("NancyFx", "Errors").Count.Should().Be(0);
+            Assert.Throws<Exception>(() => browser.Get("/test/error"));
+            this.context.MeterValue("NancyFx", "Errors").Count.Should().Be(1);
+            Assert.Throws<Exception>(() => browser.Get("/test/error"));
+            this.context.MeterValue("NancyFx", "Errors").Count.Should().Be(2);
+        }

-        //[Fact]
-        //public void NancyMetricsShouldBeAbleToCountActiveRequests()
-        //{
-        //    counter.Value.Should().Be(0);
-        //    var request1 = Task.Factory.StartNew(() => browser.Get("/concurrent/request1"));
+        [Fact]
+        public void NancyMetricsShouldBeAbleToCountActiveRequests()
+        {
+            this.context.CounterValue("NancyFx", "Active Requests").Should().Be(0);
+            var request1 = Task.Factory.StartNew(() => browser.Get("/concurrent/request1"));

-        //    result1.Task.Wait();
-        //    counter.Value.Should().Be(1);
+            result1.Task.Wait();
+            this.context.CounterValue("NancyFx", "Active Requests").Should().Be(1);

-        //    var request2 = Task.Factory.StartNew(() => browser.Get("/concurrent/request2"));
-        //    result2.Task.Wait();
-        //    counter.Value.Should().Be(2);
+            var request2 = Task.Factory.StartNew(() => browser.Get("/concurrent/request2"));
+            result2.Task.Wait();
+            this.context.CounterValue("NancyFx", "Active Requests").Should().Be(2);

-        //    requestTrigger.SetResult(0);
-        //    Task.WaitAll(request1, request2);
-        //    counter.Value.Should().Be(0);
-        //}
+            requestTrigger.SetResult(0);
+            Task.WaitAll(request1, request2);
+            this.context.CounterValue("NancyFx", "Active Requests").Should().Be(0);
+        }

-        //[Fact]
-        //public void NancyMetricsShoulBeAbleToRecordPostAndPutRequestSize()
-        //{
-        //    size.Value.Count.Should().Be(0);
+        [Fact]
+        public void NancyMetricsShoulBeAbleToRecordPostAndPutRequestSize()
+        {
+            this.context.HistogramValue("NancyFx", "Post & Put Request Size").Count.Should().Be(0);

-        //    browser.Get("/test/action").StatusCode.Should().Be(HttpStatusCode.OK);
+            browser.Get("/test/action").StatusCode.Should().Be(HttpStatusCode.OK);

-        //    size.Value.Count.Should().Be(0);
+            this.context.HistogramValue("NancyFx", "Post & Put Request Size").Count.Should().Be(0);

-        //    browser.Post("/test/post", ctx =>
-        //    {
-        //        ctx.Header("Content-Length", "content".Length.ToString());
-        //        ctx.Body("content");
-        //    }).StatusCode.Should().Be(HttpStatusCode.OK);
+            browser.Post("/test/post", ctx =>
+            {
+                ctx.Header("Content-Length", "content".Length.ToString());
+                ctx.Body("content");
+            }).StatusCode.Should().Be(HttpStatusCode.OK);

-        //    size.Value.Count.Should().Be(1);
-        //    size.Value.Min.Should().Be("content".Length);
-        //}
+            this.context.HistogramValue("NancyFx", "Post & Put Request Size").Count.Should().Be(1);
+            this.context.HistogramValue("NancyFx", "Post & Put Request Size").Min.Should().Be("content".Length);
+        }
     }
 }


Added RTL Property to API

Added RTL Property to API

--- Src/Our.Umbraco.Vorto/Web/Controllers/VortoApiController.cs
+++ Src/Our.Umbraco.Vorto/Web/Controllers/VortoApiController.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.Linq;
@@ -120,7 +120,8 @@
 							{
 								IsoCode = x.Name,
 								Name = x.DisplayName,
-								NativeName = x.NativeName
+								NativeName = x.NativeName,
+                                				IsRightToLeft = x.TextInfo.IsRightToLeft
 							}));
 					}
 				}
@@ -136,7 +137,8 @@
 							{
 								IsoCode = x.Name,
 								Name = x.DisplayName,
-								NativeName = x.NativeName
+                                				NativeName = x.NativeName,
+                                				IsRightToLeft = x.TextInfo.IsRightToLeft
 							}));
 				}
 			}
@@ -148,7 +150,8 @@
 					{
 						IsoCode = x.Name,
 						Name = x.DisplayName,
-						NativeName = x.NativeName
+                        			NativeName = x.NativeName,
+                        			IsRightToLeft = x.TextInfo.IsRightToLeft
 					}));
 			}

@@ -205,7 +208,8 @@
 				{
 					IsoCode = x.Name,
 					Name = x.DisplayName,
-					NativeName = x.NativeName
+                    			NativeName = x.NativeName,
+                    			IsRightToLeft = x.TextInfo.IsRightToLeft
 				}));

 			return languages;


Made it so event skip day will correctly show the number of days it skipped over.

--- Src/TrailSimulation/Game/Window/RandomEvent/EventSkipDay.cs
+++ Src/TrailSimulation/Game/Window/RandomEvent/EventSkipDay.cs
@@ -2,6 +2,10 @@
 // <copyright file="EventSkipDay.cs" company="Ron 'Maxwolf' McDowell">
 //   ron.mcdowell@gmail.com
 // </copyright>
+// <summary>
+//   Skips over a set amount of time that an event would like to move past. The days will be ticked normally, and not
+//   forced like a river crossing does so days won't go by while crossing a single river.
+// </summary>
 // --------------------------------------------------------------------------------------------------------------------
 namespace TrailSimulation.Game
 {
@@ -72,17 +76,14 @@
             if (!string.IsNullOrEmpty(UserData.EventText))
                 _skipMessage.AppendLine($"{Environment.NewLine}{UserData.EventText}");

-            // Show the losing day text until we are done doing that, then only show event text and wait for user input.
-            if (UserData.DaysToSkip > 0)
+            // Determine if we have skipped a single day, or multiple days.
+            _skipMessage.AppendLine(UserData.DaysToSkip > 1
+                ? $"Lose {UserData.DaysToSkip} days."
+                : "Lose 1 day.");
+
+            // Only show the press enter when they can actually leave.
+            if (UserData.DaysToSkip <= 0)
             {
-                // Determine if we have skipped a single day, or multiple days.
-                _skipMessage.AppendLine(UserData.DaysToSkip > 1
-                    ? $"Lose {UserData.DaysToSkip} days."
-                    : "Lose 1 day.");
-            }
-            else
-            {
-                // Allow the user to stop resting, this will break the cycle and reset days to rest to zero.
                 _skipMessage.AppendLine($"{Environment.NewLine}{InputManager.PRESS_ENTER}{Environment.NewLine}");
             }
         }


fix failing delete by query with slice unit test on expected json

--- src/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs
+++ src/Tests/Document/Multiple/DeleteByQuery/DeleteByQueryApiTests.cs
@@ -230,7 +230,7 @@
 			new
 			{
 				slice = new { id = 0, max = 2 },
-				query = new { terms = new { name = new { terms = FirstTenProjectNames } } }
+				query = new { terms = new { name = FirstTenProjectNames } }
 			};

 		protected override DeleteByQueryDescriptor<Project> NewDescriptor() => new DeleteByQueryDescriptor<Project>(this.CallIsolatedValue);


Reduce the number of allocations required to register one syntax kind

--- StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerExtensions.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/AnalyzerExtensions.cs
@@ -5,6 +5,7 @@
 {
     using System;
     using System.Collections.Concurrent;
+    using System.Collections.Immutable;
     using System.Threading;
     using Microsoft.CodeAnalysis;
     using Microsoft.CodeAnalysis.Diagnostics;
@@ -92,6 +93,25 @@
         /// collect state information to be used by other syntax node actions or code block end actions.
         /// </summary>
         /// <remarks>This method honors exclusions.</remarks>
+        /// <param name="context">Action will be executed only if the kind of a <see cref="SyntaxNode"/> matches
+        /// <paramref name="syntaxKind"/>.</param>
+        /// <param name="action">Action to be executed at completion of semantic analysis of a
+        /// <see cref="SyntaxNode"/>.</param>
+        /// <param name="syntaxKind">The kind of syntax that should be analyzed.</param>
+        /// <typeparam name="TLanguageKindEnum">Enum type giving the syntax node kinds of the source language for which
+        /// the action applies.</typeparam>
+        public static void RegisterSyntaxNodeActionHonorExclusions<TLanguageKindEnum>(this CompilationStartAnalysisContext context, Action<SyntaxNodeAnalysisContext> action, TLanguageKindEnum syntaxKind)
+            where TLanguageKindEnum : struct
+        {
+            context.RegisterSyntaxNodeActionHonorExclusions(action, LanguageKindArrays<TLanguageKindEnum>.GetOrCreateArray(syntaxKind));
+        }
+
+        /// <summary>
+        /// Register an action to be executed at completion of semantic analysis of a <see cref="SyntaxNode"/> with an
+        /// appropriate kind. A syntax node action can report diagnostics about a <see cref="SyntaxNode"/>, and can also
+        /// collect state information to be used by other syntax node actions or code block end actions.
+        /// </summary>
+        /// <remarks>This method honors exclusions.</remarks>
         /// <param name="context">Action will be executed only if the kind of a <see cref="SyntaxNode"/> matches one of
         /// the <paramref name="syntaxKinds"/> values.</param>
         /// <param name="action">Action to be executed at completion of semantic analysis of a
@@ -100,6 +120,32 @@
         /// <typeparam name="TLanguageKindEnum">Enum type giving the syntax node kinds of the source language for which
         /// the action applies.</typeparam>
         public static void RegisterSyntaxNodeActionHonorExclusions<TLanguageKindEnum>(this CompilationStartAnalysisContext context, Action<SyntaxNodeAnalysisContext> action, params TLanguageKindEnum[] syntaxKinds)
+            where TLanguageKindEnum : struct
+        {
+            if (syntaxKinds == null)
+            {
+                RegisterSyntaxNodeActionHonorExclusions(context, action, default(ImmutableArray<TLanguageKindEnum>));
+            }
+            else
+            {
+                RegisterSyntaxNodeActionHonorExclusions(context, action, syntaxKinds.ToImmutableArray());
+            }
+        }
+
+        /// <summary>
+        /// Register an action to be executed at completion of semantic analysis of a <see cref="SyntaxNode"/> with an
+        /// appropriate kind. A syntax node action can report diagnostics about a <see cref="SyntaxNode"/>, and can also
+        /// collect state information to be used by other syntax node actions or code block end actions.
+        /// </summary>
+        /// <remarks>This method honors exclusions.</remarks>
+        /// <param name="context">Action will be executed only if the kind of a <see cref="SyntaxNode"/> matches one of
+        /// the <paramref name="syntaxKinds"/> values.</param>
+        /// <param name="action">Action to be executed at completion of semantic analysis of a
+        /// <see cref="SyntaxNode"/>.</param>
+        /// <param name="syntaxKinds">The kinds of syntax that should be analyzed.</param>
+        /// <typeparam name="TLanguageKindEnum">Enum type giving the syntax node kinds of the source language for which
+        /// the action applies.</typeparam>
+        public static void RegisterSyntaxNodeActionHonorExclusions<TLanguageKindEnum>(this CompilationStartAnalysisContext context, Action<SyntaxNodeAnalysisContext> action, ImmutableArray<TLanguageKindEnum> syntaxKinds)
             where TLanguageKindEnum : struct
         {
             Compilation compilation = context.Compilation;
@@ -121,5 +167,24 @@
                 },
                 syntaxKinds);
         }
+
+        private static class LanguageKindArrays<TLanguageKindEnum>
+            where TLanguageKindEnum : struct
+        {
+            private static readonly ConcurrentDictionary<TLanguageKindEnum, ImmutableArray<TLanguageKindEnum>> Arrays =
+                new ConcurrentDictionary<TLanguageKindEnum, ImmutableArray<TLanguageKindEnum>>();
+
+            private static readonly Func<TLanguageKindEnum, ImmutableArray<TLanguageKindEnum>> CreateValueFactory = CreateValue;
+
+            public static ImmutableArray<TLanguageKindEnum> GetOrCreateArray(TLanguageKindEnum syntaxKind)
+            {
+                return Arrays.GetOrAdd(syntaxKind, CreateValueFactory);
+            }
+
+            private static ImmutableArray<TLanguageKindEnum> CreateValue(TLanguageKindEnum syntaxKind)
+            {
+                return ImmutableArray.Create(syntaxKind);
+            }
+        }
     }
 }


Test fix?

Test fix?

--- src/MiniCover/Commands/Options/WorkingDirectoryOption.cs
+++ src/MiniCover/Commands/Options/WorkingDirectoryOption.cs
@@ -10,7 +10,7 @@

         private static readonly string Description = $"Change working directory [default: {DefaultValue}]";

-        public WorkingDirectoryOption()
+        internal WorkingDirectoryOption()
             : base(Description, OptionTemplate)
         {
         }
@@ -22,7 +22,7 @@
             var directory = new DirectoryInfo(workingDirectoryPath);
             Console.WriteLine($"Changing working directory to '{directory.FullName}'");
             Directory.SetCurrentDirectory(directory.FullName);
-            return new DirectoryInfo(workingDirectoryPath);
+            return directory;
         }

         protected override bool Validation() => true;


Add more missing topic sanitization to SessionController

--- src/Tgstation.Server.Host/Components/Watchdog/SessionController.cs
+++ src/Tgstation.Server.Host/Components/Watchdog/SessionController.cs
@@ -254,9 +254,18 @@
 		}

 		/// <inheritdoc />
-		public Task<string> SendCommand(string command, CancellationToken cancellationToken) => byondTopicSender.SendTopic(new IPEndPoint(IPAddress.Loopback, reattachInformation.Port), String.Format(CultureInfo.InvariantCulture, "?{0}={1}&{2}={3}", InteropConstants.DMInteropAccessIdentifier, reattachInformation.AccessIdentifier, InteropConstants.DMParameterCommand, command), cancellationToken);
-
-		async Task<bool> SetPortImpl(ushort port, CancellationToken cancellationToken) => await SendCommand(String.Format(CultureInfo.InvariantCulture, "{0}&{1}={2}", InteropConstants.DMTopicChangePort, InteropConstants.DMParameterNewPort, port), cancellationToken).ConfigureAwait(false) == InteropConstants.DMResponseSuccess;
+		public Task<string> SendCommand(string command, CancellationToken cancellationToken) => byondTopicSender.SendTopic(
+				new IPEndPoint(IPAddress.Loopback, reattachInformation.Port),
+				String.Format(CultureInfo.InvariantCulture,
+				"?{0}={1}&{2}={3}",
+				byondTopicSender.SanitizeString(InteropConstants.DMInteropAccessIdentifier),
+				byondTopicSender.SanitizeString(reattachInformation.AccessIdentifier),
+				byondTopicSender.SanitizeString(InteropConstants.DMParameterCommand),
+				//intentionally don't sanitize command, that's up to the caller
+				command),
+				cancellationToken);
+
+		async Task<bool> SetPortImpl(ushort port, CancellationToken cancellationToken) => await SendCommand(String.Format(CultureInfo.InvariantCulture, "{0}&{1}={2}", byondTopicSender.SanitizeString(InteropConstants.DMTopicChangePort), byondTopicSender.SanitizeString(InteropConstants.DMParameterNewPort), byondTopicSender.SanitizeString(port.ToString(CultureInfo.InvariantCulture))), cancellationToken).ConfigureAwait(false) == InteropConstants.DMResponseSuccess;

 		/// <inheritdoc />
 		public async Task<bool> ClosePort(CancellationToken cancellationToken)


Remove the exclamation mark to find embedded templates (#1150)

--- src/NJsonSchema.CodeGeneration/DefaultTemplateFactory.cs
+++ src/NJsonSchema.CodeGeneration/DefaultTemplateFactory.cs
@@ -74,6 +74,7 @@
         /// <exception cref="InvalidOperationException">Could not load template.</exception>
         protected virtual string GetEmbeddedLiquidTemplate(string language, string template)
         {
+            template = template.TrimEnd('!');
             var assembly = GetLiquidAssembly("NJsonSchema.CodeGeneration." + language);
             var resourceName = "NJsonSchema.CodeGeneration." + language + ".Templates." + template + ".liquid";


Fit in with guidelines

Fit in with guidelines

--- src/Nancy.ViewEngines.DotLiquid/LiquidNancyFileSystem.cs
+++ src/Nancy.ViewEngines.DotLiquid/LiquidNancyFileSystem.cs
@@ -6,7 +6,7 @@

     public class LiquidNancyFileSystem : liquid.FileSystems.IFileSystem
     {
-        private ViewEngineStartupContext nancyContext;
+        private readonly ViewEngineStartupContext nancyContext;

         public LiquidNancyFileSystem(ViewEngineStartupContext viewEngineStartupContext)
         {
@@ -19,7 +19,9 @@
             ViewLocationResult viewLocation = nancyContext.ViewLocationResults.FirstOrDefault(v => v.Name.Replace("_", "") == templateName.Replace("'", ""));

             if (viewLocation != null)
+            {
                 return viewLocation.Contents.Invoke().ReadToEnd();
+            }

             throw new liquid.Exceptions.FileSystemException("Template file '{0}' not found", new[] { templateName });
         }


PublishedSnapshotService.OnMemberRefreshedEntity stores data as published rather than edited

--- src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
+++ src/Umbraco.Web/PublishedCache/NuCache/PublishedSnapshotService.cs
@@ -1218,7 +1218,7 @@
             var member = args.Entity;

             // refresh the edited data
-            OnRepositoryRefreshed(db, member, true);
+            OnRepositoryRefreshed(db, member, false);
         }

         private void OnRepositoryRefreshed(IUmbracoDatabase db, IContentBase content, bool published)


Move some logic into the ColorGridButton subclass

--- Colours/Controls/ColorGrid.cs
+++ Colours/Controls/ColorGrid.cs
@@ -16,6 +16,12 @@
     {
         class ColorGridButton : ColorButton
         {
+            public ColorGridButton() : base()
+            {
+                Dock = DockStyle.Fill;
+                Margin = new Padding(1);
+            }
+
             protected override bool IsInputKey(Keys keyData)
             {
                 // we only need to handle up/down, we're fine with stock l/r
@@ -138,10 +144,6 @@
                     var pc = ra.ToArray()[c];
                     var cb = new ColorGridButton()
                     {
-                        //Width = 32,
-                        //Height = 32,
-                        Dock = DockStyle.Fill,
-                        Margin = new Padding(1),
                         Color = pc.Color,
                         Tag = pc,
                         ContextMenuStrip = ColorContextMenuStrip


Bugfix: don't try to delete null FDO entries

If an LF entry was created and immediately deleted, it won't have a
corresponding GUID in FDO, so GetOrCreateEntryByGuid() can return null
under those circumstances.

--- src/LfMerge/DataConverters/ConvertMongoToFdoLexicon.cs
+++ src/LfMerge/DataConverters/ConvertMongoToFdoLexicon.cs
@@ -431,6 +431,9 @@
 			ILexEntry fdoEntry = GetOrCreateEntryByGuid(guid);
 			if (lfEntry.IsDeleted)
 			{
+				// LF entry deleted: delete the corresponding FDO entry
+				if (fdoEntry == null)
+					return; // No need to delete an FDO entry that doesn't exist
 				if (fdoEntry.CanDelete)
 					fdoEntry.Delete();
 				else


minor

minor

--- src/biz.dfch.CS.Osram.Lightify.Client.Tests/ClientGetGroupsTest.cs
+++ src/biz.dfch.CS.Osram.Lightify.Client.Tests/ClientGetGroupsTest.cs
@@ -66,9 +66,10 @@

             var result = sut.GetGroups();

-            Mock.Assert(restCallExecutor);
             Assert.IsNotNull(result);
             Assert.AreEqual(2, result.Count);
+
+            Mock.Assert(restCallExecutor);
         }
     }
 }


Add Method to Get Device

Add Method to Get Device

--- AM2320/AM2320Demo/AM2320Demo/AM2320.cs
+++ AM2320/AM2320Demo/AM2320Demo/AM2320.cs
@@ -50,6 +50,11 @@
             return data;
         }

+        public I2cDevice GetDevice()
+        {
+            return sensor;
+        }
+
         public void Dispose()
         {
             sensor.Dispose();


add license header

add license header

git-svn-id: 223c0ba935819ffdcafdc68147dc609b4e469b1e@1670342 13f79535-47bb-0310-9956-ffa450edef68

--- src/examples/cs/Appenders/WebServiceAppender/WebServiceAppender.cs
+++ src/examples/cs/Appenders/WebServiceAppender/WebServiceAppender.cs
@@ -1,3 +1,22 @@
+#region Apache License
+//
+// Licensed to the Apache Software Foundation (ASF) under one or more
+// contributor license agreements. See the NOTICE file distributed with
+// this work for additional information regarding copyright ownership.
+// The ASF licenses this file to you under the Apache License, Version 2.0
+// (the "License"); you may not use this file except in compliance with
+// the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+#endregion
+
 using System;
 using System.CodeDom;
 using System.CodeDom.Compiler;


Fix commit 9dee03a2678f2819bcee45825637ce3238d876c7

--- Algo/Testing/BaseEmulationConnector.cs
+++ Algo/Testing/BaseEmulationConnector.cs
@@ -55,6 +55,11 @@
 			TransactionIdGenerator = emulationAdapter.TransactionIdGenerator;
 		}

+		private DateTimeOffset _currentTime;
+
+		/// <inheritdoc />
+		public override DateTimeOffset CurrentTime => _currentTime;
+
 		/// <summary>
 		/// The adapter, executing messages in <see cref="IMarketEmulator"/>.
 		/// </summary>
@@ -76,6 +81,24 @@
 				storage.SetValue(nameof(EmulationAdapter), EmulationAdapter.Save());

 			base.Save(storage);
+		}
+
+		/// <inheritdoc />
+		protected override void OnProcessMessage(Message message)
+		{
+			// output messages from adapters goes non ordered
+			if (_currentTime < message.LocalTime)
+				_currentTime = message.LocalTime;
+
+			base.OnProcessMessage(message);
+		}
+
+		/// <inheritdoc />
+		public override void ClearCache()
+		{
+			base.ClearCache();
+
+			_currentTime = default;
 		}

 		/// <inheritdoc />


CustomHistoryMessageAdapter. Fix Message.LocalTime initialization.

--- Algo/Testing/IHistoryMessageAdapter.cs
+++ Algo/Testing/IHistoryMessageAdapter.cs
@@ -82,6 +82,13 @@
 		/// <inheritdoc />
 		protected override void OnInnerAdapterNewOutMessage(Message message)
 		{
+			if (message is ConnectMessage)
+				message.LocalTime = StartDate;
+			else if (message is IServerTimeMessage timeMsg)
+				message.LocalTime = timeMsg.ServerTime;
+			else
+				message.LocalTime = default;
+
 			_outMessages.Enqueue(message);
 		}


LabController history tracking

LabController history tracking

--- Anlab.Mvc/Controllers/LabController.cs
+++ Anlab.Mvc/Controllers/LabController.cs
@@ -180,6 +180,17 @@

             order = await UpdateOrderFromLabworksResult(order, result);

+            var user = _dbContext.Users.Single(a => a.Id == CurrentUserId);
+            order.History.Add(new History
+            {
+                    Action = "Added Request Number",
+                    Status = order.Status,
+                    ActorId = user.NormalizedUserName,
+                    ActorName = user.Name,
+                    JsonDetails = order.JsonDetails,
+                    Notes = $"Request Number: {order.RequestNum} {ErrorMessage}",
+            });
+
             await _dbContext.SaveChangesAsync();

             Message = "Order updated from work request number";
@@ -307,6 +318,18 @@

             await _orderMessageService.EnqueueReceivedMessage(order, model.BypassEmail);

+            var extraMessage = model.BypassEmail ? "Without Email" : "";
+            var user = _dbContext.Users.Single(a => a.Id == CurrentUserId);
+            order.History.Add(new History
+            {
+                    Action = "Received",
+                    Status = order.Status,
+                    ActorId = user.NormalizedUserName,
+                    ActorName = user.Name,
+                    JsonDetails = order.JsonDetails,
+                    Notes = $"Request Number: {order.RequestNum} {extraMessage}",
+            });
+
             await _dbContext.SaveChangesAsync();

             Message = "Order marked as received";
@@ -418,6 +441,20 @@
             }
             //Only send email if there wasn't a problem with sloth.
             await _orderMessageService.EnqueueFinalizedMessage(order, model.BypassEmail);
+
+            var extraMailMessage = model.BypassEmail ? "Without Email" : "";
+            var user = _dbContext.Users.Single(a => a.Id == CurrentUserId);
+            order.History.Add(new History
+            {
+                    Action = "Finalized",
+                    Status = order.Status,
+                    ActorId = user.NormalizedUserName,
+                    ActorName = user.Name,
+                    JsonDetails = order.JsonDetails,
+                    Notes = $"Order marked as Finalized{extraMessage} {extraMailMessage}",
+            });
+
+
             await _dbContext.SaveChangesAsync();

             Message = $"Order marked as Finalized{extraMessage}";
@@ -462,6 +499,8 @@
         [HttpPost]
         public async Task<ActionResult> OverrideOrder(int id, OverrideOrderModel model)
         {
+            var historyNote = string.Empty;
+
             var orderToUpdate = await _dbContext.Orders.Include(i => i.Creator).SingleOrDefaultAsync(o => o.Id == id);

             if (orderToUpdate == null)
@@ -519,6 +558,7 @@
                         ErrorMessage = "Errors Detected. Override failed";
                         return View(model);
                     }
+                    historyNote = $"Account Changed Old: {orderDetails.Payment.Account} New: {model.Account}.";

                     orderDetails.Payment.Account = model.Account;
                     orderToUpdate.SaveDetails(orderDetails);
@@ -554,8 +594,28 @@

                     }

+                    historyNote = $"Additional emails changed. Old: {orderToUpdate.AdditionalEmails} New: {model.Emails}. {historyNote}";
+
                     orderToUpdate.AdditionalEmails = string.Join(';', filteredEmailList);
                 }
+            }
+
+            if (orderToUpdate.Paid != model.Paid)
+            {
+                historyNote = $"Paid value changed. New: {model.Paid.ToYesNoString()}. {historyNote}";
+            }
+            if (orderToUpdate.Status != model.Status)
+            {
+                historyNote = $"Status value changed. Old: {orderToUpdate.Status}. {historyNote}";
+            }
+            if (model.IsDeleted)
+            {
+                historyNote = $"Marked as Deleted. {historyNote}";
+            }
+
+            if (model.UploadFile != null && model.UploadFile.Length >= 0)
+            {
+                historyNote = $"New File Uploaded. {historyNote}";
             }

             orderToUpdate.Paid = model.Paid;
@@ -568,6 +628,17 @@
                 Log.Information($"New Results File Identifier {orderToUpdate.ResultsFileIdentifier}");
             }

+            var user = _dbContext.Users.Single(a => a.Id == CurrentUserId);
+            orderToUpdate.History.Add(new History
+            {
+                    Action = "Admin Override",
+                    Status = orderToUpdate.Status,
+                    ActorId = user.NormalizedUserName,
+                    ActorName = user.Name,
+                    JsonDetails = orderToUpdate.JsonDetails,
+                    Notes = historyNote,
+            });
+
             await _dbContext.SaveChangesAsync();

             if (model.IsDeleted)


Update AnalysisService.Format method

Update AnalysisService.Format method

The format method now takes start/end line/column numbers to allow formatting in a given range. We cannot use Range type in AnalysisService form some strange reason, probably because it leads to circular dependency. Therefore we resort to passing in the integer parameters.

--- src/PowerShellEditorServices/Analysis/AnalysisService.cs
+++ src/PowerShellEditorServices/Analysis/AnalysisService.cs
@@ -251,8 +251,14 @@
         /// </summary>
         /// <param name="scriptDefinition">Script text to be formatted</param>
         /// <returns>The formatted script text.</returns>
-        public async Task<string> Format(string scriptDefinition)
-        {
+        public async Task<string> Format(
+            string scriptDefinition,
+            int startLineNumber = -1,
+            int startColumnNumber = -1,
+            int endLineNumber = -1,
+            int endColumnNumber = -1)
+        {
+            // we cannot use Range type therefore this workaround of using -1 default value
             if (!hasScriptAnalyzerModule)
             {
                 return null;
@@ -261,7 +267,11 @@
             var result = await InvokePowerShellAsync(
                 "Invoke-Formatter",
                 new Dictionary<string, object> {
-                    {"ScriptDefinition", scriptDefinition}
+                    {"ScriptDefinition", scriptDefinition},
+                    {"StartLineNumber", startLineNumber},
+                    {"StartColumnNumber", startColumnNumber},
+                    {"EndLineNumber", endLineNumber},
+                    {"EndColumnNumber", endColumnNumber}
                 });

             return result?.Select(r => r.ImmediateBaseObject as string).FirstOrDefault();


Use a property to check module info status

--- src/PowerShellEditorServices/Analysis/AnalysisService.cs
+++ src/PowerShellEditorServices/Analysis/AnalysisService.cs
@@ -27,6 +27,15 @@
         private const int NumRunspaces = 2;
         private RunspacePool analysisRunspacePool;
         private PSModuleInfo scriptAnalyzerModuleInfo;
+
+        private bool hasScriptAnalyzerModule
+        {
+            get
+            {
+                return scriptAnalyzerModuleInfo != null;
+            }
+        }
+
         private string[] activeRules;
         private string settingsPath;

@@ -160,7 +169,7 @@
         public IEnumerable<string> GetPSScriptAnalyzerRules()
         {
             List<string> ruleNames = new List<string>();
-            if (scriptAnalyzerModuleInfo != null)
+            if (hasScriptAnalyzerModule)
             {
                 var ruleObjects = InvokePowerShell("Get-ScriptAnalyzerRule", new Dictionary<string, object>());
                 foreach (var rule in ruleObjects)
@@ -215,7 +224,7 @@
             string[] rules,
             TSettings settings) where TSettings : class
         {
-            if (this.scriptAnalyzerModuleInfo != null
+            if (hasScriptAnalyzerModule
                 && file.IsAnalysisEnabled
                 && (typeof(TSettings) == typeof(string) || typeof(TSettings) == typeof(Hashtable))
                 && (rules != null || settings != null))
@@ -246,16 +255,16 @@
                   .AddParameter("First", 1);

                 var modules = ps.Invoke<PSModuleInfo>();
-                var scriptAnalyzerModuleInfo = modules == null ? null : modules.FirstOrDefault();
-                if (scriptAnalyzerModuleInfo != null)
+                var psModuleInfo = modules == null ? null : modules.FirstOrDefault();
+                if (psModuleInfo != null)
                 {
                     Logger.Write(
                         LogLevel.Normal,
                             string.Format(
                                 "PSScriptAnalyzer found at {0}",
-                                scriptAnalyzerModuleInfo.Path));
-
-                    return scriptAnalyzerModuleInfo;
+                                psModuleInfo.Path));
+
+                    return psModuleInfo;
                 }

                 Logger.Write(
@@ -267,7 +276,7 @@

         private void EnumeratePSScriptAnalyzerRules()
         {
-            if (scriptAnalyzerModuleInfo != null)
+            if (hasScriptAnalyzerModule)
             {
                 var rules = GetPSScriptAnalyzerRules();
                 var sb = new StringBuilder();
@@ -288,7 +297,7 @@
         {
             var diagnosticRecords = new PSObject[0];

-            if (this.scriptAnalyzerModuleInfo != null
+            if (hasScriptAnalyzerModule
                 && (typeof(TSettings) == typeof(string)
                     || typeof(TSettings) == typeof(Hashtable)))
             {


bump version to 101

bump version to 101

--- src/Microsoft.VisualStudio.Services.Agent/Constants.cs
+++ src/Microsoft.VisualStudio.Services.Agent/Constants.cs
@@ -16,7 +16,7 @@

         public static class Agent
         {
-            public static readonly string Version = "2.100.1";
+            public static readonly string Version = "2.101.0";

 #if OS_LINUX
             public static readonly OSPlatform Platform = OSPlatform.Linux;


Fix DynamicTableEntity

Fix DynamicTableEntity

Fix bug for DynamicTableEntity configuration - add DynamicTableEntity to be used in method Write(LogEventInfo logEvent) insead of NLogEntity.

--- src/NLog.Extensions.AzureStorage/TableStorageTarget.cs
+++ src/NLog.Extensions.AzureStorage/TableStorageTarget.cs
@@ -113,8 +113,9 @@
                 tableName = CheckAndRepairTableName(tableName);

                 InitializeTable(tableName);
-                var layoutMessage = RenderLogEvent(Layout, logEvent);
-                var entity = new NLogEntity(logEvent, layoutMessage, _machineName, logEvent.LoggerName, LogTimeStampFormat);
+                //var layoutMessage = RenderLogEvent(Layout, logEvent);
+                //var entity = new NLogEntity(logEvent, layoutMessage, _machineName, logEvent.LoggerName, LogTimeStampFormat);
+                var entity = CreateTableEntity(logEvent, logEvent.LoggerName);
                 var insertOperation = TableOperation.Insert(entity);
                 TableExecute(_table, insertOperation);
             }


Update SwaggerExtensionDataAttribute.cs

Update SwaggerExtensionDataAttribute.cs

--- src/NSwag.Annotations/SwaggerExtensionDataAttribute.cs
+++ src/NSwag.Annotations/SwaggerExtensionDataAttribute.cs
@@ -10,35 +10,25 @@

 namespace NSwag.Annotations
 {
-    ///
-    /// Indicates extension data to be added to the Swagger definition.
-    ///
+    /// Indicates extension data to be added to the Swagger definition.
     /// <remarks>Requires the SwaggerExtensionDataOperationProcessor to be used in the Swagger definition generation.</remarks>
     /// <seealso cref="System.Attribute" />
     [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Parameter, AllowMultiple = true)]
     public sealed class SwaggerExtensionDataAttribute : Attribute
     {
-        ///
-        /// Initializes a new instance of the <see cref="SwaggerExtensionDataAttribute"/> class.
-        ///
+        /// Initializes a new instance of the <see cref="SwaggerExtensionDataAttribute"/> class.
         /// <param name="key">The key.</param>
         /// <param name="value">The value.</param>
         public SwaggerExtensionDataAttribute(string key, string value)
         {
-            this.Key = key;
-            this.Value = value;
+            Key = key;
+            Value = value;
         }

-        ///
-        /// Gets the key.
-        ///
-        /// <value>The key.</value>
+        /// Gets the key.
         public string Key { get; }

-        ///
-        /// Gets the value.
-        ///
-        /// <value>The value.</value>
+        /// Gets the value.
         public string Value { get; }
     }
-}+}


Updated variable name and comment

Updated variable name and comment

--- src/Nancy/Bootstrapper/AppDomainAssemblyTypeScanner.cs
+++ src/Nancy/Bootstrapper/AppDomainAssemblyTypeScanner.cs
@@ -34,9 +34,9 @@
         private static IEnumerable<Assembly> assemblies;

         /// <summary>
-        /// Indicates whether the nancy assemblies have already been loaded
-        /// </summary>
-        private static bool nancyAssembliesLoaded;
+        /// Indicates whether the all Assemblies, that references a Nancy assembly, have already been loaded
+        /// </summary>
+        private static bool nancyReferencingAssembliesLoaded;

         private static IEnumerable<Func<Assembly, bool>> assembliesToScan;

@@ -210,7 +210,7 @@
         /// </summary>
         public static void LoadAssembliesWithNancyReferences()
         {
-            if (nancyAssembliesLoaded)
+            if (nancyReferencingAssembliesLoaded)
             {
                 return;
             }
@@ -246,7 +246,7 @@

             UpdateTypes();

-            nancyAssembliesLoaded = true;
+            nancyReferencingAssembliesLoaded = true;
         }

         /// <summary>


Omit the revision number since we're not using it

--- AudioSharp.GUI.Wpf/AboutWindow.xaml.cs
+++ AudioSharp.GUI.Wpf/AboutWindow.xaml.cs
@@ -1,8 +1,9 @@
 using System;
+using System.Diagnostics;
 using System.IO;
-using System.Reflection;
 using System.Windows;
 using System.Windows.Documents;
+using AudioSharp.Utils;

 namespace AudioSharp.GUI.Wpf
 {
@@ -24,7 +25,8 @@
             FlowDocument document = new FlowDocument(paragraph);
             richTextBox.Document = document;

-            versionLabel.Content = $"AudioSharp {Assembly.GetExecutingAssembly().GetName().Version.ToString()}";
+            FileVersionInfo fvi = UpdateUtils.GetCurrentVersion();
+            versionLabel.Content = $"AudioSharp v{string.Join(".", new int[3] { fvi.FileMajorPart, fvi.FileMinorPart, fvi.FileBuildPart })}";
         }

         private void closeButton_Click(object sender, RoutedEventArgs e)


Test finding commits when a.b.c is specified in version.json

Repros bug #340

--- src/NerdBank.GitVersioning.Tests/GitExtensionsTests.cs
+++ src/NerdBank.GitVersioning.Tests/GitExtensionsTests.cs
@@ -248,6 +248,7 @@

     [Theory]
     [InlineData("2.5", "2.5", 0)]
+    [InlineData("2.5.1", "2.5", 0)]
     [InlineData("2.5", "2.5", 5)]
     [InlineData("2.5", "2.5", -1)]
     [InlineData("2.5", "2.0", 0)]


Add system lookup folder fix to the RemoveXInventoryServiceConnector as well since this presumably suffers from the same problem.

--- OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
+++ OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/RemoteXInventoryServiceConnector.cs
@@ -228,6 +228,23 @@
         {
             if (item == null)
                 return false;
+
+            if (UUID.Zero == item.Folder)
+            {
+                InventoryFolderBase f = m_RemoteConnector.GetFolderForType(item.Owner, (AssetType)item.AssetType);
+                if (f != null)
+                {
+                    item.Folder = f.ID;
+                }
+                else
+                {
+                    f = m_RemoteConnector.GetRootFolder(item.Owner);
+                    if (f != null)
+                        item.Folder = f.ID;
+                    else
+                        return false;
+                }
+            }

             return m_RemoteConnector.AddItem(item);
         }


Make null instanceid PR more like java netflix eureka code

--- src/Steeltoe.Discovery.EurekaBase/AppInfo/Application.cs
+++ src/Steeltoe.Discovery.EurekaBase/AppInfo/Application.cs
@@ -78,15 +78,22 @@

         internal void Add(InstanceInfo info)
         {
-            if (info.InstanceId != null)
+            if (!string.IsNullOrEmpty(info.InstanceId))
             {
                 _instanceMap[info.InstanceId] = info;
+            }
+            else if (!string.IsNullOrEmpty(info.HostName))
+            {
+                _instanceMap[info.HostName] = info;
             }
         }

         internal void Remove(InstanceInfo info)
         {
-            _instanceMap.TryRemove(info.InstanceId, out InstanceInfo removed);
+            if (!_instanceMap.TryRemove(info.InstanceId, out InstanceInfo removed))
+            {
+                _instanceMap.TryRemove(info.HostName, out removed);
+            }
         }

         internal ConcurrentDictionary<string, InstanceInfo> InstanceMap