Refs #95.  Tabs voor indentatie.

Refs #95.  Tabs voor indentatie.

git-svn-id: 0ffdc289f568b1e7493e560395a00d06174c8a92@925 99b415e2-69d1-4072-8d93-0ed3a15484ab

--- Solution/Chiro.Gap.Orm/DataInterfaces/ILedenDao.cs
+++ Solution/Chiro.Gap.Orm/DataInterfaces/ILedenDao.cs
@@ -7,33 +7,35 @@

 namespace Chiro.Gap.Orm.DataInterfaces
 {
-    public interface ILedenDao: IDao<Lid>
-    {
-        IList<Lid> AllesOphalen(int groepsWerkJaarID);
+	public interface ILedenDao : IDao<Lid>
+	{
+		IList<Lid> AllesOphalen(int groepsWerkJaarID);

-        IList<Lid> PaginaOphalenVolgensAfdeling(int groepsWerkJaarID, int afdelingsID);
+		IList<Lid> PaginaOphalenVolgensAfdeling(int groepsWerkJaarID, int afdelingsID);

-        /// <summary>
-        /// Zoekt lid op op basis van GelieerdePersoonID en GroepsWerkJaarID
-        /// </summary>
-        /// <param name="gelieerdePersoonID">ID van gelieerde persoon</param>
-        /// <param name="groepsWerkJaarID">ID van groepswerkjaar</param>
-        /// <returns>Lidobject indien gevonden, anders null</returns>
-        Lid Ophalen(int gelieerdePersoonID, int groepsWerkJaarID);
+		/// <summary>
+		/// Zoekt lid op op basis van GelieerdePersoonID en GroepsWerkJaarID
+		/// </summary>
+		/// <param name="gelieerdePersoonID">ID van gelieerde persoon</param>
+		/// <param name="groepsWerkJaarID">ID van groepswerkjaar</param>
+		/// <returns>Lidobject indien gevonden, anders null</returns>
+		Lid Ophalen(int gelieerdePersoonID, int groepsWerkJaarID);

-        /// <summary>
-        /// Haalt lid met gerelateerde entity's op, op basis van
-        /// GelieerdePersoonID en GroepsWerkJaarID
-        /// </summary>
-        /// <param name="gelieerdePersoonID">ID van gelieerde persoon</param>
-        /// <param name="groepsWerkJaarID">ID van groepswerkjaar</param>
-        /// <param name="paths">lambda-expressies die de extra op te halen
-        /// informatie definieren</param>
-        /// <returns>Lidobject indien gevonden, anders null</returns>
-        Lid Ophalen(int gelieerdePersoonID, int groepsWerkJaarID, params Expression<Func<Lid, object>>[] paths);

-        Lid OphalenMetDetails(int lidID);

-        //void LidMaken(int gelieerdeID);
-    }
+		/// <summary>
+		/// Haalt lid met gerelateerde entity's op, op basis van
+		/// GelieerdePersoonID en GroepsWerkJaarID
+		/// </summary>
+		/// <param name="gelieerdePersoonID">ID van gelieerde persoon</param>
+		/// <param name="groepsWerkJaarID">ID van groepswerkjaar</param>
+		/// <param name="paths">lambda-expressies die de extra op te halen
+		/// informatie definieren</param>
+		/// <returns>Lidobject indien gevonden, anders null</returns>
+		Lid Ophalen(int gelieerdePersoonID, int groepsWerkJaarID, params Expression<Func<Lid, object>>[] paths);
+
+		Lid OphalenMetDetails(int lidID);
+
+		//void LidMaken(int gelieerdeID);
+	}
 }


fix decoy skipping (#1303)

fix decoy skipping (#1303)

* fix "cumulative target" skipping numbers

* fix decoy skipping

--- EngineLayer/PeptideSpectralMatch.cs
+++ EngineLayer/PeptideSpectralMatch.cs
@@ -150,7 +150,7 @@
                 _CompactPeptides[cpKey] = new Tuple<int, HashSet<PeptideWithSetModifications>>(_CompactPeptides[cpKey].Item1, matching[cpKey]);
             }
             var pepsWithMods = CompactPeptides.SelectMany(b => b.Value.Item2);
-            IsDecoy = CompactPeptides.Any(b => b.Value.Item2.All(c => c.Protein.IsDecoy));
+            IsDecoy = CompactPeptides.Any(b => b.Value.Item2.Any(c => c.Protein.IsDecoy));
             FullSequence = Resolve(pepsWithMods.Select(b => b.Sequence)).Item2;
             BaseSequence = Resolve(pepsWithMods.Select(b => b.BaseSequence)).Item2;
             PeptideLength = Resolve(pepsWithMods.Select(b => b.Length)).Item2;


création du tableau qui se mélange et des lettres

Signed-off-by: Rime <7bcf22fd95ce97243ed1deb3c47e608eb14bcb27@rpn.ch>

--- Enigmas/UnderKeyboardEnigmaPanel.cs
+++ Enigmas/UnderKeyboardEnigmaPanel.cs
@@ -5,24 +5,32 @@
 using System.Threading.Tasks;
 using Cpln.Enigmos.Enigmas.Components;
 using System.Drawing;
+using Cpln.Enigmos.Utils;
+using System.Reflection.Emit;

 namespace Cpln.Enigmos.Enigmas
 {
     class UnderKeyboardEnigmaPanel : EnigmaPanel
     {
         private List<Touche> touches;
+        private ShuffleList<char> lettres ;
         private int iWidth = 60;
         private int iHeight = 60;
         private int iLocalisationX = 50;
         private int iLocalisationY = 50;
+        private int iLocY;
+        private int iLocX;
+        private char cLettre;

         public UnderKeyboardEnigmaPanel()
         {
             touches = new List<Touche>();
-            int iLocX = iLocalisationX;
-            int iLocY = iLocalisationY;
+            lettres = new ShuffleList<char>();
+            iLocX = iLocalisationX;
+            iLocY = iLocalisationY;
             for (int i = 0; i < 26; i++)
             {
+                lettres.Add('i');
                 iLocX += iWidth;
                 if (i%7 == 0)
                 {
@@ -36,9 +44,9 @@
                 Touche touche = new Touche("", iLocX, iLocY,iWidth,iHeight);
                 touche.BackColor = Color.Black;
                 touche.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
-
                 touches.Add(touche);
                 Controls.Add(touche);
+                touche.Controls.Add(new LiteralControl("some more text!"));
             }
         }
     }


clean up TabControl

clean up TabControl

--- ext/UiaDll/RAutomation.UIA/TabControl.cs
+++ ext/UiaDll/RAutomation.UIA/TabControl.cs
@@ -20,14 +20,19 @@

         public string Selection
         {
-            get { return TabItems.First(x => x.AsSelectionItem().Current.IsSelected).Current.Name; }
+            get { return TabItems.First(IsSelected).Current.Name; }
             set { TabItems.First(x => x.Current.Name == value).AsSelectionItem().Select(); }
         }

         public int SelectedIndex
         {
-            get { return SelectionItems.IndexOf(x => x.Current.IsSelected); }
+            get { return TabItems.IndexOf(IsSelected); }
             set { SelectionItems.ElementAt(value).Select(); }
+        }
+
+        private static bool IsSelected(AutomationElement tabItem)
+        {
+            return tabItem.AsSelectionItem().Current.IsSelected;
         }

         private IEnumerable<AutomationElement> TabItems


parsing hashtag links in private messages

--- JabbR/Commands/CommandManager.cs
+++ JabbR/Commands/CommandManager.cs
@@ -346,6 +346,9 @@
             {
                 throw new InvalidOperationException(String.Format("What did you want to say to '{0}'.", toUser.Name));
             }
+
+            TextTransform transform = new TextTransform(_repository);
+            messageText = transform.Parse(messageText);

             _notificationService.SendPrivateMessage(user, toUser, messageText);
         }


Delete Global.asax.cs

Delete Global.asax.cs

--- ExceptionHandlingApi/Global.asax.cs
+++ ExceptionHandlingApi/Global.asax.cs
@@ -1,17 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Web;
-using System.Web.Http;
-using System.Web.Routing;
-
-namespace ExceptionHandlingApi
-{
-    public class WebApiApplication : System.Web.HttpApplication
-    {
-        protected void Application_Start()
-        {
-            GlobalConfiguration.Configure(WebApiConfig.Register);
-        }
-    }
-}


Changed copyright on executer

Changed copyright on executer

--- Executer/Properties/AssemblyInfo.cs
+++ Executer/Properties/AssemblyInfo.cs
@@ -10,7 +10,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Timothy Baxendale")]
 [assembly: AssemblyProduct("Executer")]
-[assembly: AssemblyCopyright("Copyright © 2014-2016 Timothy Baxendale")]
+[assembly: AssemblyCopyright("Copyright © 2013-2016 Timothy Baxendale")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


Take classic define in benchmark

Take classic define in benchmark

--- Farmhash.Sharp.Benchmarks/Config.cs
+++ Farmhash.Sharp.Benchmarks/Config.cs
@@ -14,7 +14,8 @@
             {
                 Env = { Runtime = Runtime.Core, Jit = Jit.RyuJit, Platform = Platform.X64 }
             });
-#else
+#endif
+#if CLASSIC
             Add(new Job("net-legacy-32bit")
             {
                 Env = { Runtime = Runtime.Clr, Jit = Jit.LegacyJit, Platform = Platform.X86 }


Fix NullReferenceException when configuring CORS

Fix NullReferenceException when configuring CORS caused by Autofac being removed and ServiceProvider no longer being initialized.

--- src/API/Startup.cs
+++ src/API/Startup.cs
@@ -110,7 +110,10 @@
         /// Configures the services for the application.
         /// </summary>
         /// <param name="services">The <see cref="IServiceCollection"/> to use.</param>
-        public void ConfigureServices(IServiceCollection services)
+        /// <returns>
+        /// The <see cref="IServiceProvider"/> to use.
+        /// </returns>
+        public IServiceProvider ConfigureServices(IServiceCollection services)
         {
             services.AddOptions();
             services.Configure<SiteOptions>(Configuration.GetSection("Site"));
@@ -154,6 +157,8 @@
             services.AddSingleton<IClock>((_) => SystemClock.Instance);
             services.AddSingleton((p) => p.GetRequiredService<IOptions<SiteOptions>>().Value);
             services.AddSingleton((_) => ConfigureJsonFormatter(new JsonSerializerSettings()));
+
+            return ServiceProvider = services.BuildServiceProvider();
         }

         /// <summary>


Fix IsCompressed for entries with 1 block

--- FiveLib/Ausar/Module/ModuleEntry.cs
+++ FiveLib/Ausar/Module/ModuleEntry.cs
@@ -104,7 +104,7 @@
                     Checksum = 0, // TODO: There's probably an entry checksum field
                     CompressedOffset = 0,
                     CompressedSize = data.TotalCompressedSize,
-                    IsCompressed = data.TotalCompressedSize == data.TotalUncompressedSize,
+                    IsCompressed = data.TotalCompressedSize != data.TotalUncompressedSize,
                     UncompressedOffset = 0,
                     UncompressedSize = data.TotalUncompressedSize,
                 };


small fix

small fix

--- GA-SDK-MONO-SHARED/State/GAState.cs
+++ GA-SDK-MONO-SHARED/State/GAState.cs
@@ -542,9 +542,13 @@
 					GAEvents.AddSessionEndEvent();
 					SessionStart = 0;
 				}
-				GAThreading.StopThread();
-			}
-		}
+			}
+
+            if(endThread)
+            {
+                GAThreading.StopThread();
+            }
+        }

 #if WINDOWS_UWP || WINDOWS_WSA
         public async static void ResumeSessionAndStartQueue()


Change branch color: Red means viewing commit is branch head, green means viewing commit belongs to that branch but not branch head

--- GitAspx/Views/TreeView/Index.cshtml
+++ GitAspx/Views/TreeView/Index.cshtml
@@ -86,7 +86,7 @@
                     @Resources.Branch
                     @foreach (var loBranch in Model.Branches)
                     {
-                        if (loBranch.Fullname == "refs/heads/master")
+                        if (loBranch.CurrentCommit.Hash == Model.Commit.Hash)
                         {
                             @loBranch.Name
                         }


Rename FakeChangeset to make it more obviously tied to Unshelve.

--- GitTfs.VsCommon/TfsHelper.Common.cs
+++ GitTfs.VsCommon/TfsHelper.Common.cs
@@ -223,7 +223,7 @@
             var wrapperForVersionControlServer =
                 _bridge.Wrap<WrapperForVersionControlServer, VersionControlServer>(VersionControl);
             // TODO - containerify this (no `new`)!
-            var fakeChangeset = new FakeChangeset(shelveset, change, wrapperForVersionControlServer, _bridge);
+            var fakeChangeset = new Unshelveable(shelveset, change, wrapperForVersionControlServer, _bridge);
             var tfsChangeset = new TfsChangeset(remote.Tfs, fakeChangeset, _stdout, null) { Summary = new TfsChangesetInfo { Remote = remote } };
             return tfsChangeset;
         }
@@ -298,7 +298,7 @@

         #region Fake classes for unshelve

-        private class FakeChangeset : IChangeset
+        private class Unshelveable : IChangeset
         {
             private readonly Shelveset _shelveset;
             private readonly PendingSet _pendingSet;
@@ -306,13 +306,13 @@
             private readonly TfsApiBridge _bridge;
             private readonly IChange[] _changes;

-            public FakeChangeset(Shelveset shelveset, PendingSet pendingSet, IVersionControlServer versionControlServer, TfsApiBridge bridge)
+            public Unshelveable(Shelveset shelveset, PendingSet pendingSet, IVersionControlServer versionControlServer, TfsApiBridge bridge)
             {
                 _shelveset = shelveset;
                 _versionControlServer = versionControlServer;
                 _bridge = bridge;
                 _pendingSet = pendingSet;
-                _changes = _pendingSet.PendingChanges.Select(x => new FakeChange(x, _bridge, versionControlServer)).Cast<IChange>().ToArray();
+                _changes = _pendingSet.PendingChanges.Select(x => new UnshelveChange(x, _bridge, versionControlServer)).Cast<IChange>().ToArray();
             }

             public IChange[] Changes
@@ -349,23 +349,23 @@
             {
                 foreach (var change in _changes)
                 {
-                    var item = (FakeItem)change.Item;
+                    var item = (UnshelveItem)change.Item;
                     item.Get(workspace);
                 }
             }
         }

-        private class FakeChange : IChange
+        private class UnshelveChange : IChange
         {
             private readonly PendingChange _pendingChange;
             private readonly TfsApiBridge _bridge;
-            private readonly FakeItem _fakeItem;
-
-            public FakeChange(PendingChange pendingChange, TfsApiBridge bridge, IVersionControlServer versionControlServer)
+            private readonly UnshelveItem _fakeItem;
+
+            public UnshelveChange(PendingChange pendingChange, TfsApiBridge bridge, IVersionControlServer versionControlServer)
             {
                 _pendingChange = pendingChange;
                 _bridge = bridge;
-                _fakeItem = new FakeItem(_pendingChange, _bridge, versionControlServer);
+                _fakeItem = new UnshelveItem(_pendingChange, _bridge, versionControlServer);
             }

             public TfsChangeType ChangeType
@@ -379,14 +379,14 @@
             }
         }

-        private class FakeItem : IItem
+        private class UnshelveItem : IItem
         {
             private readonly PendingChange _pendingChange;
             private readonly TfsApiBridge _bridge;
             private readonly IVersionControlServer _versionControlServer;
             private long _contentLength = -1;

-            public FakeItem(PendingChange pendingChange, TfsApiBridge bridge, IVersionControlServer versionControlServer)
+            public UnshelveItem(PendingChange pendingChange, TfsApiBridge bridge, IVersionControlServer versionControlServer)
             {
                 _pendingChange = pendingChange;
                 _bridge = bridge;


FIXED: System - EnumExtensions.IsSignedEnumValue correctly evaluates the specified enum value on Windows Store platforms.

--- Source/Slash.System/Source/Utils/EnumExtensions.cs
+++ Source/Slash.System/Source/Utils/EnumExtensions.cs
@@ -113,7 +113,7 @@
 #if WINDOWS_STORE
             var enumType = enumValue.GetType();

-            return (enumType == typeof(byte) || enumType == typeof(ushort) || enumType == typeof(uint)
+            return !(enumType == typeof(byte) || enumType == typeof(ushort) || enumType == typeof(uint)
                     || enumType == typeof(ulong));
 #else
             switch (enumValue.GetTypeCode())


Delete Monads.cs

Delete Monads.cs

--- JetBlack.Examples.Monads1/Monads.cs
+++ JetBlack.Examples.Monads1/Monads.cs
@@ -1,77 +0,0 @@
-using System;
-
-namespace JetBlack.Examples.Monads1
-{
-    public class Identity<T>
-    {
-        public T Value { get; private set; }
-
-        public Identity(T value)
-        {
-            Value = value;
-        }
-    }
-
-    public interface Maybe<T> { }
-
-    public class Nothing<T> : Maybe<T>
-    {
-        public override string ToString()
-        {
-            return "Nothing";
-        }
-    }
-
-    public class Just<T> : Maybe<T>
-    {
-        public T Value { get; private set; }
-
-        public Just(T value)
-        {
-            Value = value;
-        }
-
-        public override string ToString()
-        {
-            return Value.ToString();
-        }
-    }
-
-    public static class Extensions
-    {
-        // a function 'Bind', that allows us to compose Identity returning functions
-        public static Identity<B> Bind<A, B>(this Identity<A> a, Func<A, Identity<B>> func)
-        {
-            return func(a.Value);
-        }
-
-        public static Identity<T> ToIdentity<T>(this T value)
-        {
-            return new Identity<T>(value);
-        }
-
-        public static Identity<C> SelectMany<A, B, C>(this Identity<A> a, Func<A, Identity<B>> func, Func<A, B, C> select)
-        {
-            return select(a.Value, func(a.Value).Value).ToIdentity();
-        }
-
-        public static Maybe<T> ToMaybe<T>(this T value)
-        {
-            return new Just<T>(value);
-        }
-
-        public static Maybe<B> Bind<A, B>(this Maybe<A> a, Func<A, Maybe<B>> func)
-        {
-            var justa = a as Just<A>;
-            return
-                justa == null
-                    ? new Nothing<B>()
-                    : func(justa.Value);
-        }
-
-        public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> a, Func<A, Maybe<B>> func, Func<A, B, C> select)
-        {
-            return a.Bind(aval => func(aval).Bind(bval => select(aval, bval).ToMaybe()));
-        }
-    }
-}


Restore console setout before closure in faking cmd line

--- Keyczar/KeyczarTest/Support/Util.cs
+++ Keyczar/KeyczarTest/Support/Util.cs
@@ -133,10 +133,11 @@

                     output.Flush();
                     result = Encoding.UTF8.GetString(stream.ToArray());
+
+                    Console.SetOut(origOut);
                 }
-
                 Console.SetIn(origIn);
-                Console.SetOut(origOut);
+
             }

             Console.WriteLine(result);


Made Log a static class

Made Log a static class

--- Libraries/Revolution/Logging/Log.cs
+++ Libraries/Revolution/Logging/Log.cs
@@ -6,7 +6,7 @@

 namespace Revolution.Logging
 {
-    public class Log
+    public static class Log
     {
         public static bool IsVerbose { get; set; } = false;
         private static ILogger Logger { get; set; } = new ConsoleLogger();


Interim fix for rendering artifacts on blueprint

Issues points to driver/gpu limitations. Or a limitation in Unity. I'm
not certain. But, it seems to relieve us of the issue.

I've looked at BOSS Screenshot plugin and they take the easy way out by
using Unity's built-in super-sampling:
Application.CaptureScreenshot(String nameOfFile, Int
supersamplingFactor);

--- src/KRSVesselShot.cs
+++ src/KRSVesselShot.cs
@@ -20,8 +20,8 @@

         private Camera[] cameras;
         private RenderTexture rt;
-        private int maxWidth = 9999;
-        private int maxHeight = 5000;
+        private int maxWidth = 4096;
+        private int maxHeight = 4096;
         private Bounds shipBounds;
         internal Camera Camera { get; private set; }
         internal Vector3 direction;


Guard against NULL and spelling errors

Guard against NULL and spelling errors

--- src/LibLog/LibLog.cs
+++ src/LibLog/LibLog.cs
@@ -29,7 +29,7 @@
 // Define LIBLOG_PORTABLE conditional compilation symbol for PCL compatibility
 //
 // Define LIBLOG_PUBLIC to enable ability to GET a logger (LogProvider.For<>() etc) from outside this library. NOTE:
-// this can have unintendend consequences of consumers of your library using your library to resolve a logger. If the
+// this can have unintended consequences of consumers of your library using your library to resolve a logger. If the
 // reason is because you want to open this functionality to other projects within your solution,
 // consider [InternalVisibleTo] instead.
 //
@@ -196,6 +196,7 @@

         public static void Error(this ILog logger, Func<string> messageFunc)
         {
+            GuardAgainstNullLogger(logger);
             logger.Log(LogLevel.Error, messageFunc);
         }

@@ -634,7 +635,7 @@
 #else
                 Console.WriteLine(
 #endif
-                    "Exception occured resolving a log provider. Logging for this assembly {0} is disabled. {1}",
+                    "Exception occurred resolving a log provider. Logging for this assembly {0} is disabled. {1}",
                     typeof(LogProvider).GetAssemblyPortable().FullName,
                     ex);
             }
@@ -1846,7 +1847,7 @@
         /// <summary>
         /// Some logging frameworks support structured logging, such as serilog. This will allow you to add names to structured data in a format string:
         /// For example: Log("Log message to {user}", user). This only works with serilog, but as the user of LibLog, you don't know if serilog is actually
-        /// used. So, this class simulates that. it will replace any text in {curlybraces} with an index number.
+        /// used. So, this class simulates that. it will replace any text in {curly braces} with an index number.
         ///
         /// "Log {message} to {user}" would turn into => "Log {0} to {1}". Then the format parameters are handled using regular .net string.Format.
         /// </summary>


Call IsEnabled with Serilog's instead of LibLog's log level

Deduplicate some code by translating the level before branching the code

--- src/LibLog/LibLog.cs
+++ src/LibLog/LibLog.cs
@@ -1630,111 +1630,56 @@

             public bool Log(LogLevel logLevel, Func<string> messageFunc, Exception exception, params object[] formatParameters)
             {
+                var translatedLevel = TranslateLevel(logLevel);
                 if (messageFunc == null)
                 {
-                    return IsEnabled(_logger, logLevel);
-                }
+                    return IsEnabled(_logger, translatedLevel);
+                }
+
+                if (!IsEnabled(_logger, translatedLevel))
+                {
+                    return false;
+                }
+
                 if (exception != null)
                 {
-                    return LogException(logLevel, messageFunc, exception, formatParameters);
-                }
-
+                    LogException(translatedLevel, messageFunc, exception, formatParameters);
+                }
+                else
+                {
+                    LogMessage(translatedLevel, messageFunc, formatParameters);
+                }
+
+                return true;
+            }
+
+            private void LogMessage(object translatedLevel, Func<string> messageFunc, object[] formatParameters)
+            {
+                Write(_logger, translatedLevel, messageFunc(), formatParameters);
+            }
+
+            private void LogException(object logLevel, Func<string> messageFunc, Exception exception, object[] formatParams)
+            {
+                WriteException(_logger, logLevel, exception, messageFunc(), formatParams);
+            }
+
+            private static object TranslateLevel(LogLevel logLevel)
+            {
                 switch (logLevel)
                 {
-                    case LogLevel.Debug:
-                        if (IsEnabled(_logger, DebugLevel))
-                        {
-                            Write(_logger, DebugLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
+                    case LogLevel.Fatal:
+                        return FatalLevel;
+                    case LogLevel.Error:
+                        return ErrorLevel;
+                    case LogLevel.Warn:
+                        return WarningLevel;
                     case LogLevel.Info:
-                        if (IsEnabled(_logger, InformationLevel))
-                        {
-                            Write(_logger, InformationLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Warn:
-                        if (IsEnabled(_logger, WarningLevel))
-                        {
-                            Write(_logger, WarningLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Error:
-                        if (IsEnabled(_logger, ErrorLevel))
-                        {
-                            Write(_logger, ErrorLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Fatal:
-                        if (IsEnabled(_logger, FatalLevel))
-                        {
-                            Write(_logger, FatalLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
+                        return InformationLevel;
+                    case LogLevel.Trace:
+                        return VerboseLevel;
                     default:
-                        if (IsEnabled(_logger, VerboseLevel))
-                        {
-                            Write(_logger, VerboseLevel, messageFunc(), formatParameters);
-                            return true;
-                        }
-                        break;
-                }
-                return false;
-            }
-
-            private bool LogException(LogLevel logLevel, Func<string> messageFunc, Exception exception, object[] formatParams)
-            {
-                switch (logLevel)
-                {
-                    case LogLevel.Debug:
-                        if (IsEnabled(_logger, DebugLevel))
-                        {
-                            WriteException(_logger, DebugLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Info:
-                        if (IsEnabled(_logger, InformationLevel))
-                        {
-                            WriteException(_logger, InformationLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Warn:
-                        if (IsEnabled(_logger, WarningLevel))
-                        {
-                            WriteException(_logger, WarningLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Error:
-                        if (IsEnabled(_logger, ErrorLevel))
-                        {
-                            WriteException(_logger, ErrorLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                    case LogLevel.Fatal:
-                        if (IsEnabled(_logger, FatalLevel))
-                        {
-                            WriteException(_logger, FatalLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                    default:
-                        if (IsEnabled(_logger, VerboseLevel))
-                        {
-                            WriteException(_logger, VerboseLevel, exception, messageFunc(), formatParams);
-                            return true;
-                        }
-                        break;
-                }
-                return false;
+                        return DebugLevel;
+                }
             }
         }
     }


onvesselrollout clarified

onvesselrollout clarified

--- src/GameEvents.cs
+++ src/GameEvents.cs
@@ -456,7 +456,8 @@
 	/// </summary>
 	public static EventData<GameEvents.HostedFromToAction<Vessel, string>> onVesselRename;
 	/// <summary>
-	/// Triggered when vessel is loaded onto the launchpad from the editor/launch window
+	/// Triggered when vessel is loaded onto the launchpad from the editor/launch window;
+	/// called after the transition to flight scene
 	/// </summary>
 	public static EventData<ShipConstruct> OnVesselRollout;
 	/// <summary>


Added Config.GetSetting.

Added Config.GetSetting.

--- src/Core/Config.cs
+++ src/Core/Config.cs
@@ -9,10 +9,8 @@
 {
     public static class Config
     {
-        public static string AzureSearchKey { get; } = CloudConfigurationManager.GetSetting("NETSTANDARDTYPES_SEARCHKEY") ??
-            Environment.GetEnvironmentVariable("NETSTANDARDTYPES_SEARCHKEY");
-        private static string AzureStorageKey { get; } = CloudConfigurationManager.GetSetting("NETSTANDARDTYPES_STORAGEKEY") ??
-            Environment.GetEnvironmentVariable("NETSTANDARDTYPES_STORAGEKEY");
+        private static string AzureSearchKey { get; } = GetSetting("NETSTANDARDTYPES_SEARCHKEY");
+        private static string AzureStorageKey { get; } = GetSetting("NETSTANDARDTYPES_STORAGEKEY");

         private static Uri SearchUri { get; } = new Uri("https://netstandardtypes.search.windows.net");
         private static Uri QueueUri { get; } = new Uri("https://netstandardtypes.queue.core.windows.net/");
@@ -23,5 +21,7 @@
         public static SearchServiceClient CreateSearchServiceClient() => new SearchServiceClient(SearchUri, SearchCredentials, HttpClientHandler);

         public static CloudQueueClient CreateCloudQueueClient() => new CloudQueueClient(QueueUri, StorageCredentials);
+
+        private static string GetSetting(string name) => CloudConfigurationManager.GetSetting(name) ?? Environment.GetEnvironmentVariable(name);
     }
 }


add more error handling, use event approach more consistently

--- LookupAnything/LookupAnythingMod.cs
+++ LookupAnything/LookupAnythingMod.cs
@@ -1,4 +1,5 @@
-using System;
+#define TEST_BUILD
+using System;
 using System.IO;
 using Microsoft.Xna.Framework.Graphics;
 using Microsoft.Xna.Framework.Input;
@@ -78,66 +79,86 @@
             this.TargetFactory = new TargetFactory(this.Metadata);
             this.DebugInterface = new DebugInterface(this.TargetFactory, this.Config);

-            // hook up UI
-            ControlEvents.KeyPressed += (sender, e) => this.ReceiveKeyPress(e.KeyPressed);
-            ControlEvents.ControllerButtonPressed += (sender, e) => this.ReceiveControllerButton(e.ButtonPressed);
-            ControlEvents.ControllerTriggerPressed += (sender, e) => this.ReceiveControllerButton(e.ButtonPressed);
-            MenuEvents.MenuClosed += (sender, e) => this.TryRestorePreviousMenu(e.PriorMenu);
-            GraphicsEvents.OnPostRenderHudEvent += (sender, e) => this.OnInterfaceRendering(Game1.spriteBatch);
+            // hook up events
+            ControlEvents.KeyPressed += (sender, e) => this.ReceiveInput(e.KeyPressed, this.Config.Keyboard);
+            ControlEvents.ControllerButtonPressed += (sender, e) => this.ReceiveInput(e.ButtonPressed, this.Config.Controller);
+            ControlEvents.ControllerTriggerPressed += (sender, e) => this.ReceiveInput(e.ButtonPressed, this.Config.Controller);
+            MenuEvents.MenuClosed += (sender, e) => this.ReceiveMenuClosed(e.PriorMenu);
+            GraphicsEvents.OnPostRenderHudEvent += (sender, e) => this.ReceiveInterfaceRendering(Game1.spriteBatch);
         }

         /*********
         ** Private methods
         *********/
-        /// The method invoked when the player presses a keyboard button.
-        /// <param name="key">The pressed key.</param>
-        private void ReceiveKeyPress(Keys key)
-        {
-            var keyboard = this.Config.Keyboard;
-            if (key == keyboard.Lookup)
-                this.ShowLookup();
-            if (key == keyboard.ScrollUp)
-                (Game1.activeClickableMenu as LookupMenu)?.ScrollUp(this.Config.ScrollAmount);
-            else if (key == keyboard.ScrollDown)
-                (Game1.activeClickableMenu as LookupMenu)?.ScrollDown(this.Config.ScrollAmount);
-            else if (key == keyboard.ToggleDebugInfo)
-                this.DebugInterface.Enabled = !this.DebugInterface.Enabled;
-        }
-
-        /// The method invoked when the player presses a controller button.
-        /// <param name="button">The pressed key.</param>
-        private void ReceiveControllerButton(Buttons button)
-        {
-            var controller = this.Config.Controller;
-            if (button == controller.Lookup)
-                this.ShowLookup();
-            if (button == controller.ScrollUp)
-                (Game1.activeClickableMenu as LookupMenu)?.ScrollUp(this.Config.ScrollAmount);
-            else if (button == controller.ScrollDown)
-                (Game1.activeClickableMenu as LookupMenu)?.ScrollDown(this.Config.ScrollAmount);
-            else if (button == controller.ToggleDebugInfo)
-                this.DebugInterface.Enabled = !this.DebugInterface.Enabled;
+        /****
+        ** Event handlers
+        ****/
+        /// The method invoked when the player presses an input button.
+        /// <typeparam name="TKey">The input type.</typeparam>
+        /// <param name="key">The pressed input.</param>
+        /// <param name="map">The configured input mapping.</param>
+        private void ReceiveInput<TKey>(TKey key, InputMapConfiguration<TKey> map)
+        {
+            try
+            {
+                // perform bound action
+                if (key.Equals(map.Lookup))
+                    this.ShowLookup();
+                if (key.Equals(map.ScrollUp))
+                    (Game1.activeClickableMenu as LookupMenu)?.ScrollUp(this.Config.ScrollAmount);
+                else if (key.Equals(map.ScrollDown))
+                    (Game1.activeClickableMenu as LookupMenu)?.ScrollDown(this.Config.ScrollAmount);
+                else if (key.Equals(map.ToggleDebugInfo))
+                    this.DebugInterface.Enabled = !this.DebugInterface.Enabled;
+            }
+            catch (Exception ex)
+            {
+                this.HandleError(ex, $"handling input '{key}'.");
+            }
+        }
+
+        /// The method invoked when the player closes a displayed menu.
+        /// <param name="closedMenu">The menu which the player just closed.</param>
+        private void ReceiveMenuClosed(IClickableMenu closedMenu)
+        {
+            try
+            {
+                // restore the previous menu if it was hidden to display the lookup UI.
+                if (closedMenu is LookupMenu && this.PreviousMenu != null)
+                {
+                    Game1.activeClickableMenu = this.PreviousMenu;
+                    this.PreviousMenu = null;
+                }
+            }
+            catch (Exception ex)
+            {
+                this.HandleError(ex, "restoring the previous menu");
+            }
         }

         /// The method invoked when the interface is rendering.
         /// <param name="spriteBatch">The sprite batch being drawn.</param>
-        private void OnInterfaceRendering(SpriteBatch spriteBatch)
-        {
-            if (!this.DebugInterface.Enabled)
-                return;
-
-            try
-            {
-                this.DebugInterface.Draw(spriteBatch);
-            }
-            catch (Exception ex)
-            {
-                GameHelper.ShowErrorMessage("Huh. Something went wrong drawing the debug info. The game error log has the technical details.");
-                Log.Error(ex.ToString());
-            }
-        }
-
+        private void ReceiveInterfaceRendering(SpriteBatch spriteBatch)
+        {
+            // render debug interface
+            if (this.DebugInterface.Enabled)
+            {
+                try
+                {
+                    this.DebugInterface.Draw(spriteBatch);
+                }
+                catch (Exception ex)
+                {
+                    GameHelper.ShowErrorMessage("Huh. Something went wrong drawing the debug info. The game error log has the technical details.");
+                    Log.Error(ex.ToString());
+                }
+            }
+        }
+
+        /****
+        ** Helpers
+        ****/
         /// Show the lookup UI for the current target.
         private void ShowLookup()
         {
@@ -155,19 +176,7 @@
             }
             catch (Exception ex)
             {
-                GameHelper.ShowErrorMessage("Huh. Something went wrong looking that up. The game error log has the technical details.");
-                Log.Error(ex.ToString());
-            }
-        }
-
-        /// Restore the previous menu if it was hidden to display the lookup UI.
-        /// <param name="closedMenu">The menu which the player just closed.</param>
-        private void TryRestorePreviousMenu(IClickableMenu closedMenu)
-        {
-            if (closedMenu is LookupMenu && this.PreviousMenu != null)
-            {
-                Game1.activeClickableMenu = this.PreviousMenu;
-                this.PreviousMenu = null;
+                this.HandleError(ex, "looking that up");
             }
         }

@@ -181,7 +190,7 @@
             }
             catch (Exception ex)
             {
-                Log.Error($"Couldn't read {this.DatabaseFileName} file for {this.Manifest.Name} mod; some data may be missing. Error details:\n{ex}");
+                this.HandleError(ex, "loading metadata");
             }
         }

@@ -190,5 +199,14 @@
         {
             GameHelper.ResetCache();
         }
+
+        /// Log an error and warn the user.
+        /// <param name="ex">The exception to handle.</param>
+        /// <param name="verb">The verb describing where the error occurred (e.g. "looking that up").</param>
+        private void HandleError(Exception ex, string verb)
+        {
+            GameHelper.ShowErrorMessage($"Huh. Something went wrong {verb}. The game error log has the technical details.");
+            Log.Error(ex.ToString());
+        }
     }
 }


Fixed bugs.

Fixed bugs.

-Fixed grammar mistakes in the tip...
-Made the Tips's PopDelay time longer.

--- LrcHelper/LrcDownloader.Designer.cs
+++ LrcHelper/LrcDownloader.Designer.cs
@@ -47,16 +47,16 @@
             this.AutoSetcheckBox = new System.Windows.Forms.CheckBox();
             this.AlbumradioButton = new System.Windows.Forms.RadioButton();
             this.AdvancedSettingsgroupBox = new System.Windows.Forms.GroupBox();
+            this.DelayMsecnumericUpDown = new System.Windows.Forms.NumericUpDown();
+            this.DelayMseclabel = new System.Windows.Forms.Label();
             this.LyricsStylenumericUpDown = new System.Windows.Forms.NumericUpDown();
             this.LyricsStylelabel = new System.Windows.Forms.Label();
             this.AdvancedSettingscheckBox = new System.Windows.Forms.CheckBox();
             this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
-            this.DelayMseclabel = new System.Windows.Forms.Label();
-            this.DelayMsecnumericUpDown = new System.Windows.Forms.NumericUpDown();
             this.StatusgroupBox.SuspendLayout();
             this.AdvancedSettingsgroupBox.SuspendLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DelayMsecnumericUpDown)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.LyricsStylenumericUpDown)).BeginInit();
-            ((System.ComponentModel.ISupportInitialize)(this.DelayMsecnumericUpDown)).BeginInit();
             this.SuspendLayout();
             //
             // IDtextBox
@@ -230,6 +230,43 @@
             this.AdvancedSettingsgroupBox.TabStop = false;
             this.AdvancedSettingsgroupBox.Visible = false;
             //
+            // DelayMsecnumericUpDown
+            //
+            this.DelayMsecnumericUpDown.Increment = new decimal(new int[] {
+            50,
+            0,
+            0,
+            0});
+            this.DelayMsecnumericUpDown.Location = new System.Drawing.Point(89, 39);
+            this.DelayMsecnumericUpDown.Maximum = new decimal(new int[] {
+            400,
+            0,
+            0,
+            0});
+            this.DelayMsecnumericUpDown.Minimum = new decimal(new int[] {
+            10,
+            0,
+            0,
+            0});
+            this.DelayMsecnumericUpDown.Name = "DelayMsecnumericUpDown";
+            this.DelayMsecnumericUpDown.Size = new System.Drawing.Size(38, 21);
+            this.DelayMsecnumericUpDown.TabIndex = 16;
+            this.toolTip1.SetToolTip(this.DelayMsecnumericUpDown, "100 is 1sec");
+            this.DelayMsecnumericUpDown.Value = new decimal(new int[] {
+            100,
+            0,
+            0,
+            0});
+            //
+            // DelayMseclabel
+            //
+            this.DelayMseclabel.AutoSize = true;
+            this.DelayMseclabel.Location = new System.Drawing.Point(18, 41);
+            this.DelayMseclabel.Name = "DelayMseclabel";
+            this.DelayMseclabel.Size = new System.Drawing.Size(65, 12);
+            this.DelayMseclabel.TabIndex = 15;
+            this.DelayMseclabel.Text = "DelayMsec:";
+            //
             // LyricsStylenumericUpDown
             //
             this.LyricsStylenumericUpDown.Location = new System.Drawing.Point(89, 16);
@@ -241,8 +278,8 @@
             this.LyricsStylenumericUpDown.Name = "LyricsStylenumericUpDown";
             this.LyricsStylenumericUpDown.Size = new System.Drawing.Size(30, 21);
             this.LyricsStylenumericUpDown.TabIndex = 14;
-            this.toolTip1.SetToolTip(this.LyricsStylenumericUpDown, "0:OriLyrics and TransLyrics will in the different line\r\n1:OriLyrics and TransLyri" +
-        "cs will in the same line if it can");
+            this.toolTip1.SetToolTip(this.LyricsStylenumericUpDown, "0:OriLyrics and TransLyrics will be displayed in the different lines\r\n1:OriLyrics" +
+        " and TransLyrics will be displayed  in the same line if it can");
             //
             // LyricsStylelabel
             //
@@ -268,43 +305,10 @@
             // toolTip1
             //
             this.toolTip1.AutomaticDelay = 100;
-            //
-            // DelayMseclabel
-            //
-            this.DelayMseclabel.AutoSize = true;
-            this.DelayMseclabel.Location = new System.Drawing.Point(18, 41);
-            this.DelayMseclabel.Name = "DelayMseclabel";
-            this.DelayMseclabel.Size = new System.Drawing.Size(65, 12);
-            this.DelayMseclabel.TabIndex = 15;
-            this.DelayMseclabel.Text = "DelayMsec:";
-            //
-            // DelayMsecnumericUpDown
-            //
-            this.DelayMsecnumericUpDown.Increment = new decimal(new int[] {
-            50,
-            0,
-            0,
-            0});
-            this.DelayMsecnumericUpDown.Location = new System.Drawing.Point(89, 39);
-            this.DelayMsecnumericUpDown.Maximum = new decimal(new int[] {
-            400,
-            0,
-            0,
-            0});
-            this.DelayMsecnumericUpDown.Minimum = new decimal(new int[] {
-            10,
-            0,
-            0,
-            0});
-            this.DelayMsecnumericUpDown.Name = "DelayMsecnumericUpDown";
-            this.DelayMsecnumericUpDown.Size = new System.Drawing.Size(38, 21);
-            this.DelayMsecnumericUpDown.TabIndex = 16;
-            this.toolTip1.SetToolTip(this.DelayMsecnumericUpDown, "100 means 1sec");
-            this.DelayMsecnumericUpDown.Value = new decimal(new int[] {
-            100,
-            0,
-            0,
-            0});
+            this.toolTip1.AutoPopDelay = 10000;
+            this.toolTip1.InitialDelay = 100;
+            this.toolTip1.ReshowDelay = 0;
+            this.toolTip1.ShowAlways = true;
             //
             // LrcDownloader
             //
@@ -335,8 +339,8 @@
             this.StatusgroupBox.PerformLayout();
             this.AdvancedSettingsgroupBox.ResumeLayout(false);
             this.AdvancedSettingsgroupBox.PerformLayout();
+            ((System.ComponentModel.ISupportInitialize)(this.DelayMsecnumericUpDown)).EndInit();
             ((System.ComponentModel.ISupportInitialize)(this.LyricsStylenumericUpDown)).EndInit();
-            ((System.ComponentModel.ISupportInitialize)(this.DelayMsecnumericUpDown)).EndInit();
             this.ResumeLayout(false);
             this.PerformLayout();


Fix so HttpRequestValidationExceptions do not stop logging of exceptions

--- src/Elmah/Error.cs
+++ src/Elmah/Error.cs
@@ -20,6 +20,8 @@
 // limitations under the License.
 //
 #endregion
+
+using System.Diagnostics;

 [assembly: Elmah.Scc("$Id: Error.cs 776 2011-01-12 21:09:24Z azizatif $")]

@@ -132,9 +134,25 @@
                 HttpRequest request = context.Request;

                 _serverVariables = CopyCollection(request.ServerVariables);
-                _queryString = CopyCollection(request.QueryString);
-                _form = CopyCollection(request.Form);
                 _cookies = CopyCollection(request.Cookies);
+
+                try
+                {
+                    _queryString = CopyCollection(request.QueryString);
+                    _form = CopyCollection(request.Form);
+                }
+                catch (HttpRequestValidationException requestValidationException)
+                {
+                    //
+                    // .NET 4.0 will raise this exception if dangerous content is
+                    // detected in the request QueryString or Form collections.
+                    // In these cases, we will continue to log the exception without
+                    // the QueryString or Form data.  We cannot get to this data without
+                    // targeting the .NET 4.0 framework and accessing the UnvalidatedRequestValues.
+                    //
+
+                    Trace.WriteLine(requestValidationException);
+                }
             }
         }


Improve functionality of indexers that allow type conversion.

--- src/SilDev/Ini.cs
+++ src/SilDev/Ini.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: Ini.cs
-// Version:  2020-01-25 14:33
+// Version:  2020-01-26 17:06
 //
 // Copyright (c) 2020, Si13n7 Developments(tm)
 // All rights reserved.
@@ -16,9 +16,11 @@
 namespace SilDev
 {
     using System;
+    using System.Collections;
     using System.Collections.Generic;
     using System.Collections.ObjectModel;
     using System.ComponentModel;
+    using System.Drawing;
     using System.IO;
     using System.Linq;
     using System.Runtime.Serialization;
@@ -52,10 +54,6 @@
         public const string ParsePatternStrict = @"^((?:\[)(?<Section>[^\]]*)(?:\])(?:[\r\n]{0,}|\Z))((?!\[)(?<Key>[^=]*?)(?:=)(?<Value>[^\r\n]*)(?:[\r\n]{0,4}))+";

         [NonSerialized]
-        private const string EncodeTagOpen = "<base64 reason=\"LineSeparator\">",
-                             EncodeTagClose = "</base64>";
-
-        [NonSerialized]
         private readonly object _identifier = new object();

         private IDocumentDictionary _document;
@@ -86,7 +84,7 @@
         public bool Sorted { get; private set; }

         /// <summary>
-        ///     Gets or sets a sequence of section names to always be at the top.
+        ///     Gets a sequence of section names that always stay on top.
         ///     <para>
         ///         This option is only available if <see cref="Sorted"/> is
         ///         <see langword="true"/>.
@@ -95,7 +93,7 @@
         public static IReadOnlyList<string> AlwaysOnTopSections { get; private set; }

         /// <summary>
-        ///     Gets or sets a sequence of key names to always be at the top.
+        ///     Gets a sequence of key names that always stay on top.
         ///     <para>
         ///         This option is only available if <see cref="Sorted"/> is
         ///         <see langword="true"/>.
@@ -146,8 +144,11 @@

         /// <summary>
         ///     Gets or sets the value under the specified index of the specified key in
-        ///     the specified section of this instance. The return value is converted to
-        ///     the specified type if possible.
+        ///     the specified section of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the specified type;
+        ///         otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="section">
         ///     The name of the section. Must be <see langword="null"/> to handle values of
@@ -162,9 +163,6 @@
         /// <param name="returnType">
         ///     The type to which the return value should be converted.
         /// </param>
-        /// <exception cref="NotSupportedException">
-        ///     The conversion cannot be performed.
-        /// </exception>
         public object this[string section, string key, int index, Type returnType]
         {
             get
@@ -172,25 +170,110 @@
                 var value = this[section, key, index];
                 if (string.IsNullOrEmpty(value))
                     return null;
-                if (returnType == null)
-                    return value;
-                try
+                var type = returnType;
+                switch (Type.GetTypeCode(type))
                 {
-                    return TypeDescriptor.GetConverter(returnType).ConvertFrom(value);
+                    case TypeCode.Empty:
+                    case TypeCode.DBNull:
+                        return null;
+                    case TypeCode.String:
+                        return value;
+                    case TypeCode.Boolean:
+                        return value.ToBoolean();
+                    case TypeCode.Char:
+                        return value.ToChar();
+                    case TypeCode.SByte:
+                        return value.ToSByte();
+                    case TypeCode.Byte:
+                        return value.ToByte();
+                    case TypeCode.Int16:
+                        return value.ToInt16();
+                    case TypeCode.UInt16:
+                        return value.ToUInt16();
+                    case TypeCode.Int32:
+                        return value.ToInt32();
+                    case TypeCode.UInt32:
+                        return value.ToUInt32();
+                    case TypeCode.Int64:
+                        return value.ToInt64();
+                    case TypeCode.UInt64:
+                        return value.ToUInt64();
+                    case TypeCode.Single:
+                        return value.ToSingle();
+                    case TypeCode.Double:
+                        return value.ToDouble();
+                    case TypeCode.Decimal:
+                        return value.ToDecimal();
+                    case TypeCode.DateTime:
+                        return value.ToDateTime();
+                    default:
+                        if (type == typeof(Rectangle) ||
+                            type == typeof(Rectangle?))
+                            return value.ToRectangle();
+                        if (type == typeof(Point) ||
+                            type == typeof(Point?))
+                            return value.ToPoint();
+                        if (type == typeof(Size) ||
+                            type == typeof(Size?))
+                            return value.ToSize();
+                        if (type == typeof(Version))
+                            return value.ToVersion();
+                        if (type == typeof(IEnumerable<char>))
+                            return value.ToCharArray();
+                        if (type.GetInterfaces().FirstOrDefault(t => t.IsGenericType && t.GetGenericTypeDefinition() == typeof(IEnumerable<>)) != null)
+                        {
+                            var method = typeof(Json).GetMethod("Deserialize")?.MakeGenericMethod(type);
+                            if (method != null)
+                                return method.Invoke(null, new object[]
+                                {
+                                    value,
+                                    null
+                                });
+                        }
+                        try
+                        {
+                            var converter = TypeDescriptor.GetConverter(type);
+                            if (converter.CanConvertFrom(typeof(string)))
+                                return converter.ConvertFrom(value);
+                        }
+                        catch (Exception ex) when (ex.IsCaught())
+                        {
+                            Log.Write(ex);
+                        }
+                        return null;
                 }
-                catch (NotSupportedException ex) when (ex.IsCaught())
+            }
+            set
+            {
+                switch (value)
                 {
-                    Log.Write(ex);
-                    return value;
+                    case null:
+                        this[section, key, index] = null;
+                        return;
+                    case string str:
+                        this[section, key, index] = str;
+                        return;
+                    case IEnumerable<char> chars:
+                        this[section, key, index] = new string(chars.ToArray());
+                        return;
+                    case IDictionary dictionary:
+                        this[section, key, index] = Json.Serialize(dictionary);
+                        return;
+                    case IEnumerable<object> sequence:
+                        this[section, key, index] = Json.Serialize(sequence);
+                        return;
                 }
-            }
-            set => this[section, key, index] = value?.ToString();
+                this[section, key, index] = value.ToString();
+            }
         }

         /// <summary>
         ///     Gets or sets the first value of the specified key in the specified section
-        ///     of this instance. The return value is converted to the specified type if
-        ///     possible.
+        ///     of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the specified type;
+        ///         otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="section">
         ///     The name of the section. Must be <see langword="null"/> to handle values of
@@ -202,9 +285,6 @@
         /// <param name="returnType">
         ///     The type to which the return value should be converted.
         /// </param>
-        /// <exception cref="NotSupportedException">
-        ///     The conversion cannot be performed.
-        /// </exception>
         public object this[string section, string key, Type returnType]
         {
             get => this[section, key, 0, returnType];
@@ -213,8 +293,11 @@

         /// <summary>
         ///     Gets or sets the section-less value under the specified index of the
-        ///     specified key in the specified section of this instance. The return value
-        ///     is converted to the specified type if possible.
+        ///     specified key in the specified section of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the specified type;
+        ///         otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="key">
         ///     The name of the key in the section.
@@ -225,9 +308,6 @@
         /// <param name="returnType">
         ///     The type to which the return value should be converted.
         /// </param>
-        /// <exception cref="NotSupportedException">
-        ///     The conversion cannot be performed.
-        /// </exception>
         public object this[string key, int index, Type returnType]
         {
             get => this[null, key, index, returnType];
@@ -236,8 +316,11 @@

         /// <summary>
         ///     Gets or sets the first section-less value of the specified key in the
-        ///     specified section of this instance. The return value is converted to the
-        ///     specified type if possible.
+        ///     specified section of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the specified type;
+        ///         otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="key">
         ///     The name of the key in the section.
@@ -245,9 +328,6 @@
         /// <param name="returnType">
         ///     The type to which the return value should be converted.
         /// </param>
-        /// <exception cref="NotSupportedException">
-        ///     The conversion cannot be performed.
-        /// </exception>
         public object this[string key, Type returnType]
         {
             get => this[null, key, 0, returnType];
@@ -257,6 +337,10 @@
         /// <summary>
         ///     Gets or sets the value under the specified index of the specified key in
         ///     the specified section of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the type of the specified
+        ///         default object; otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="section">
         ///     The name of the section. Must be <see langword="null"/> to handle values of
@@ -276,13 +360,32 @@
         /// </param>
         public object this[string section, string key, int index, object defValue]
         {
-            get => this[section, key, index, defValue?.GetType()] ?? defValue;
+            get
+            {
+                var type = defValue?.GetType();
+                var value = this[section, key, index, type];
+                if (type == null || type.ContainsGenericParameters || !type.IsValueType || Nullable.GetUnderlyingType(type) != null)
+                    return value ?? defValue;
+                try
+                {
+                    return value == Activator.CreateInstance(type) ? defValue : value;
+                }
+                catch (Exception ex) when (ex.IsCaught())
+                {
+                    Log.Write(ex);
+                    return value ?? defValue;
+                }
+            }
             set => this[section, key, index, defValue?.GetType()] = value;
         }

         /// <summary>
         ///     Gets or sets the first value of the specified key in the specified section
         ///     of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the type of the specified
+        ///         default object; otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="section">
         ///     The name of the section. Must be <see langword="null"/> to handle values of
@@ -299,13 +402,17 @@
         /// </param>
         public object this[string section, string key, object defValue]
         {
-            get => this[section, key, 0, defValue?.GetType()] ?? defValue;
-            set => this[section, key, 0, defValue?.GetType()] = value;
+            get => this[section, key, 0, defValue];
+            set => this[section, key, 0, defValue] = value;
         }

         /// <summary>
         ///     Gets or sets the section-less value under the specified index of the
         ///     specified key of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the type of the specified
+        ///         default object; otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="key">
         ///     The name of the key in the section.
@@ -321,13 +428,17 @@
         /// </param>
         public object this[string key, int index, object defValue]
         {
-            get => this[null, key, index, defValue?.GetType()] ?? defValue;
-            set => this[null, key, index, defValue?.GetType()] = value;
+            get => this[null, key, index, defValue];
+            set => this[null, key, index, defValue] = value;
         }

         /// <summary>
         ///     Gets or sets the first section-less value under the specified index of the
         ///     specified key of this instance.
+        ///     <para>
+        ///         If possible, the return value is converted to the type of the specified
+        ///         default object; otherwise, <see langword="null"/> is returned.
+        ///     </para>
         /// </summary>
         /// <param name="key">
         ///     The name of the key.
@@ -340,8 +451,8 @@
         /// </param>
         public object this[string key, object defValue]
         {
-            get => this[null, key, 0, defValue?.GetType()] ?? defValue;
-            set => this[null, key, 0, defValue?.GetType()] = value;
+            get => this[null, key, 0, defValue];
+            set => this[null, key, 0, defValue] = value;
         }

         private static AlphaNumericComparer SortComparer { get; } = new AlphaNumericComparer();
@@ -474,8 +585,6 @@
                         continue;
                     if (!keys.ContainsKey(key))
                         keys.Add(key, new List<string>());
-                    if (value.Length > EncodeTagOpen.Length + EncodeTagClose.Length && value.StartsWithEx(EncodeTagOpen) && value.EndsWithEx(EncodeTagClose))
-                        value = value.Substring(EncodeTagOpen.Length, value.Length - EncodeTagClose.Length).DecodeString();
                     keys[key].Add(value);
                 }
                 if (keys.Values.All(x => x?.Any() != true))
@@ -598,18 +707,11 @@
                         continue;
                     foreach (var value in pair.Value)
                     {
-                        if (string.IsNullOrWhiteSpace(value))
+                        if (string.IsNullOrWhiteSpace(value) || value.Any(TextEx.IsLineSeparator))
                             continue;
                         sw.Write(pair.Key.Trim());
                         sw.Write('=');
-                        if (!value.Any(TextEx.IsLineSeparator))
-                            sw.Write(value.Trim());
-                        else
-                        {
-                            sw.Write(EncodeTagOpen);
-                            sw.Write(value.Encode());
-                            sw.Write(EncodeTagClose);
-                        }
+                        sw.Write(value.Trim());
                         sw.WriteLine();
                     }
                 }
@@ -1089,7 +1191,7 @@
                 _document.Add(section, new Dictionary<string, IList<string>>(Comparer));
             if (!_document[section].ContainsKey(key))
                 _document[section].Add(key, new List<string>());
-            if (!_document[section][key].Any() || _document[section][key].Count < index)
+            if (!_document[section][key].Any() || _document[section][key].Count <= index)
             {
                 _document[section][key].Add(value);
                 return;


Null reference exception is no longer logged in first logging mode.

--- src/SilDev/Log.cs
+++ src/SilDev/Log.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: Log.cs
-// Version:  2020-01-27 23:22
+// Version:  2020-02-02 11:25
 //
 // Copyright (c) 2020, Si13n7 Developments(tm)
 // All rights reserved.
@@ -525,7 +525,10 @@
                     return;
                 DebugMode = 1;
             }
-            if (DebugMode < 2 && (exception is ArgumentNullException || exception is NotSupportedException || exception is WarningException))
+            if (DebugMode < 2 && (exception is ArgumentNullException ||
+                                  exception is NullReferenceException ||
+                                  exception is NotSupportedException ||
+                                  exception is WarningException))
                 return;
             Write($"Handled {exception}", exitProcess);
         }


Parse id for quotes from /etc/os-release.

--- src/Run/Interop.cs
+++ src/Run/Interop.cs
@@ -23,7 +23,12 @@
                 {
                     if (line.StartsWith(OSId))
                     {
-                        id = line.Substring(OSId.Length, line.Length - OSId.Length);
+                        int startOfVersion = line.IndexOf('"', OSId.Length) + 1;
+                        int endOfVersion = startOfVersion == 0 ? line.Length : line.IndexOf('"', startOfVersion);
+                        if (startOfVersion == 0)
+                            startOfVersion = OSId.Length;
+
+                        id = line.Substring(startOfVersion, endOfVersion - startOfVersion);
                     }
                     else if (line.StartsWith(OSVersionId))
                     {


Changed default of ForceSoftwareRenderer to false.

--- LottieUWP/LottieAnimationView.cs
+++ LottieUWP/LottieAnimationView.cs
@@ -63,7 +63,7 @@

         private string _animationName;
         //private bool wasAnimatingWhenDetached = false;
-        private bool _useHardwareLayer;
+        private bool _useHardwareLayer = true;

         private CancellationTokenSource _compositionTaskCTS;
         /// <summary>


根据 ISequence 接口的变更，调整代码。 :fire: :open_hands:

--- src/RedisSequence.cs
+++ src/RedisSequence.cs
@@ -83,9 +83,9 @@
 				return dictionary.Increment("Value");
 		}

-		public long GetSequenceNumber(string name, int interval)
+		public long GetSequenceNumber(string name, int interval, int seed = 0)
 		{
-			var dictionary = this.GetRedisDictionary(name);
+			var dictionary = this.GetRedisDictionary(name, interval, seed);
 			return dictionary.Increment("Value", interval);
 		}

@@ -104,9 +104,9 @@
 			return this.GetFormattedText(values[1], sequenceNumber);
 		}

-		public string GetSequenceString(string name, int interval)
+		public string GetSequenceString(string name, int interval, int seed = 0, string formatString = null)
 		{
-			var dictionary = this.GetRedisDictionary(name);
+			var dictionary = this.GetRedisDictionary(name, interval, seed, formatString);
 			var sequenceNumber = dictionary.Increment("Value", interval);

 			return this.GetFormattedText(dictionary["FormatString"], sequenceNumber);
@@ -147,18 +147,28 @@

 			var dictionary = this.GetRedisDictionary(name);

-			dictionary.SetRange(new KeyValuePair<string, string>[] {
-				new KeyValuePair<string, string>("Value", value.ToString()),
-				new KeyValuePair<string, string>("Interval", interval.ToString()),
-				new KeyValuePair<string, string>("FormatString", formatString ?? string.Empty),
+			dictionary.SetRange(new Dictionary<string, string> {
+				{ "Value", value.ToString() },
+				{ "Interval", interval == 0 ? "1" : interval.ToString() },
+				{ "FormatString", formatString ?? string.Empty },
 			});
 		}
 		#endregion

 		#region 私有方法
-		private IRedisDictionary GetRedisDictionary(string name)
+		private IRedisDictionary GetRedisDictionary(string name, int interval = 1, int seed = 0, string formatString = null)
 		{
-			return _redis.GetDictionary(this.GetType().FullName + ":" + name);
+			if(string.IsNullOrWhiteSpace(name))
+				throw new ArgumentNullException("name");
+
+			var key = this.GetType().FullName + ":" + name.Trim();
+
+			return _redis.GetDictionary(key, new Dictionary<string, string>
+			{
+				{ "Value", seed.ToString() },
+				{ "Interval", interval == 0 ? "1" : interval.ToString() },
+				{ "FormatString", formatString ?? string.Empty },
+			});
 		}

 		private string GetFormattedText(string formatString, long sequenceNumber)


Add SimpleEntry.ToString()

Add SimpleEntry.ToString()

--- src/SimpleEntry.cs
+++ src/SimpleEntry.cs
@@ -252,6 +252,11 @@
             return entry.entry;
         }

+        public override string ToString()
+        {
+            return string.Format("Entry: {0} => {1}", Path, Id);
+        }
+
         internal struct EntryValue
         {
             public EntryValue(Blob blob, Mode mode)


Traits: This caches values of various environment variables which act as (#42)

.. switches to control features like logging imports. For use with
tests, this caching can be disabled but that is enabled only for DEBUG
builds. Which means that any tests trying to toggle and test those
environment variable dependent features will work only for debug builds.

So, we remove that restriction. And because the condition first checks if we are
running tests and only then looks at

    Environment.GetEnvironmentVariable("MSBUILDRELOADTRAITSONEACHACCESS")

.. it shouldn't affect performance much (untested!).

--- src/Shared/Traits.cs
+++ src/Shared/Traits.cs
@@ -18,12 +18,10 @@
         {
             get
             {
-#if DEBUG
                 if (BuildEnvironmentHelper.Instance.RunningTests && Environment.GetEnvironmentVariable("MSBUILDRELOADTRAITSONEACHACCESS") == "1")
                 {
                     return new Traits();
                 }
-#endif
                 return _instance;
             }
         }


Fix InconsistentNaming warnings.

Fix InconsistentNaming warnings.

--- src/SilDev/WinApi.cs
+++ src/SilDev/WinApi.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: WinApi.cs
-// Version:  2019-06-16 10:37
+// Version:  2019-07-26 05:04
 //
 // Copyright (c) 2019, Si13n7 Developments (r)
 // All rights reserved.
@@ -3759,6 +3759,7 @@
             ///     for the system. If there is no preferred language set for the system, then the system default UI
             ///     language (also known as "install language") is returned.
             /// </summary>
+            [SuppressMessage("ReSharper", "InconsistentNaming")]
             public static ushort GetUserDefaultUILanguage() =>
                 NativeMethods.GetUserDefaultUILanguage();

@@ -8686,6 +8687,7 @@
             ///     page to see if you need to provide an hWind value.
             /// </summary>
 #pragma warning disable IDE1006
+            [SuppressMessage("ReSharper", "InconsistentNaming")]
             public IntPtr hWnd { get; internal set; }
 #pragma warning restore IDE1006
             /// <summary>
@@ -8761,6 +8763,7 @@
         ///     Defines the message parameters passed to a <see cref="Win32HookFlags.WhCallWndProcRet"/>
         ///     hook procedure.
         /// </summary>
+        [SuppressMessage("ReSharper", "InconsistentNaming")]
         [StructLayout(LayoutKind.Sequential)]
         public struct CallWndProcRet
         {
@@ -8800,6 +8803,7 @@
         ///     Contains data to be passed to another application by the
         ///     <see cref="F:SilDev.WinApi.WindowMenuFlags.WmCopyData"/> message.
         /// </summary>
+        [SuppressMessage("ReSharper", "InconsistentNaming")]
         [StructLayout(LayoutKind.Sequential)]
         public struct CopyData : IDisposable
         {


Prevent useless copies of byte array

Prevent useless copies of byte array

--- NBitcoin/BIP158/GolombRiceFilter.cs
+++ NBitcoin/BIP158/GolombRiceFilter.cs
@@ -108,13 +108,11 @@
 		/// <param name="key">Key used for hashing the datalements.</param>
 		/// <param name="data">Data elements to be computed in the list.</param>
 		/// <returns></returns>
-		internal static ulong[] ConstructHashedSet(byte P, int n, uint m, byte[] key, IEnumerable<byte[]> data)
+		internal static ulong[] ConstructHashedSet(byte P, int n, uint m, byte[] key, IEnumerable<byte[]> data, int dataCount)
 		{
 			// N the number of items to be inserted into the set.
-			var dataArrayBytes = data as byte[][] ?? data.ToArray();
-
 			// The list of data item hashes.
-			var values = new ulong[dataArrayBytes.Length];
+			var values = new ulong[dataCount];
 			var valuesIndex = 0;
 			var modP = 1UL << P;
 			var modNP = ((ulong)n) * m;
@@ -125,7 +123,7 @@
 			var k1 = BitConverter.ToUInt64(key, 8);

 			// Process the data items and calculate the 64 bits hash for each of them.
-			foreach(var item in dataArrayBytes )
+			foreach(var item in data)
 			{
 				var hash = SipHash(k0, k1, item);
 				var value = FastReduction(hash, nphi, nplo);
@@ -156,7 +154,18 @@
 		/// <returns>true if the element is in the filter, otherwise false.</returns>
 		public bool Match(byte[] data, byte[] key)
 		{
-			return MatchAny(new []{data}, key);
+			return MatchAny(new[] {data}, 1, key);
+		}
+
+		/// <summary>
+		/// Checks if any of the provided elements is in the filter.
+		/// </summary>
+		/// <param name="data">Data elements to check in the filter.</param>
+		/// <param name="key">Key used for hashing the data elements.</param>
+		/// <returns>true if at least one of the elements is in the filter, otherwise false.</returns>
+		public bool MatchAny(byte[][] data, byte[] key)
+		{
+			return MatchAny(data, data.Length, key);
 		}

 		/// <summary>
@@ -167,10 +176,32 @@
 		/// <returns>true if at least one of the elements is in the filter, otherwise false.</returns>
 		public bool MatchAny(IEnumerable<byte[]> data, byte[] key)
 		{
-			if (data == null || !data.Any())
+			if (data is byte[][] dataArray)
+			{
+				return MatchAny(dataArray, dataArray.Length, key);
+			}
+			else if (data is ICollection<byte[]> dataCollection)
+			{
+				return MatchAny(dataCollection, dataCollection.Count, key);
+			}
+			else
+			{
+				return MatchAny(data, data.Count(), key);
+			}
+		}
+
+		/// <summary>
+		/// Checks if any of the provided elements is in the filter.
+		/// </summary>
+		/// <param name="data">Data elements to check in the filter.</param>
+		/// <param name="key">Key used for hashing the data elements.</param>
+		/// <returns>true if at least one of the elements is in the filter, otherwise false.</returns>
+		internal bool MatchAny(IEnumerable<byte[]> data, int dataCount, byte[] key)
+		{
+			if (data == null || dataCount == 0)
 				throw new ArgumentException("data can not be null or empty array.", nameof(data));

-			var hs = ConstructHashedSet(P, N, M, key, data);
+			var hs = ConstructHashedSet(P, N, M, key, data, dataCount);

 			var lastValue1 = 0UL;
 			var lastValue2 = hs[0];
@@ -482,7 +513,7 @@
 		public GolombRiceFilter Build()
 		{
 			var n = _values.Count;
-			var hs = GolombRiceFilter.ConstructHashedSet(_p, n, _m, _key, _values);
+			var hs = GolombRiceFilter.ConstructHashedSet(_p, n, _m, _key, _values, _values.Count);
 			var filterData = Compress(hs, _p);

 			return new GolombRiceFilter(filterData, n, _p, _m);


Fix port in arguments crashing app

Fix port in arguments crashing app

--- src/Yio/Program.cs
+++ src/Yio/Program.cs
@@ -39,13 +39,13 @@
             }

             StartupUtilities.WriteInfo("starting App");
-            BuildWebHost(args).Run();
+            BuildWebHost().Run();

             Console.ResetColor();
         }

-        public static IWebHost BuildWebHost(string[] args) =>
-            WebHost.CreateDefaultBuilder(args)
+        public static IWebHost BuildWebHost() =>
+            WebHost.CreateDefaultBuilder()
                 .UseUrls("http://0.0.0.0:" + _port.ToString() + "/")
                 .UseStartup<Startup>()
                 .Build();


bump version

bump version

--- NBitcoin/Properties/AssemblyInfo.cs
+++ NBitcoin/Properties/AssemblyInfo.cs
@@ -35,6 +35,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:

-[assembly: AssemblyVersion("2.1.5.10")]
-[assembly: AssemblyFileVersion("2.1.5.10")]
-[assembly: AssemblyInformationalVersion("2.1.5.10")]
+[assembly: AssemblyVersion("2.1.5.11")]
+[assembly: AssemblyFileVersion("2.1.5.11")]
+[assembly: AssemblyInformationalVersion("2.1.5.11")]


Adding trigger to GearVR controller input

--- NewtonVR/Gear/NVRGearInputDevice.cs
+++ NewtonVR/Gear/NVRGearInputDevice.cs
@@ -24,6 +24,7 @@

         protected virtual void SetupButtonMapping()
         {
+            ButtonMapping.Add(NVRButtons.Trigger, OVRInput.Button.PrimaryIndexTrigger);
 			ButtonMapping.Add(NVRButtons.Touchpad, OVRInput.Button.One);
             ButtonMapping.Add(NVRButtons.B, OVRInput.Button.Two);
 			ButtonMapping.Add(NVRButtons.Y, OVRInput.Button.Two);


Further checking when testing archives.

Further checking when testing archives.

--- src/Zip/ZipFile.cs
+++ src/Zip/ZipFile.cs
@@ -1017,10 +1017,10 @@
 				byte[] extraData = new byte[extraDataLength];
 				StreamUtils.ReadFully(baseStream_, extraData);

-				ZipExtraData ed = new ZipExtraData(extraData);
+				ZipExtraData localExtraData = new ZipExtraData(extraData);

 				// Extra data / zip64 checks
-				if (ed.Find(1))
+				if (localExtraData.Find(1))
 				{
 					// TODO Check for tag values being distinct..  Multiple zip64 tags means what?

@@ -1038,8 +1038,8 @@
 						throw new ZipException("Entry sizes not correct for Zip64");
 					}

-					size = ed.ReadLong();
-					compressedSize = ed.ReadLong();
+					size = localExtraData.ReadLong();
+					compressedSize = localExtraData.ReadLong();
 				}
 				else
 				{
@@ -1124,6 +1124,10 @@
 						throw new ZipException("Central header/local header compression method mismatch");
 					}

+					if (entry.Version != extractVersion) {
+						throw new ZipException("Extract version mismatch");
+					}
+
 					// Strong encryption and extract version match
 					if ( (localFlags & ( int )GeneralBitFlags.StrongEncryption) != 0 ) {
 						if ( extractVersion < 62 ) {


Updated Machine Model to tweak a configuration

--- MakerFarm/Models/MachineModel.cs
+++ MakerFarm/Models/MachineModel.cs
@@ -59,6 +59,7 @@
         public string MachineName { get; set; }
         public int CurrentJob { get; set; }
         public bool PoisonJobs { get; set; }
+        public bool PreviouslyCollected { get; set; }
     }
     public class MachineStatusUpdate
     {


Fix integer overflow on large collection files

--- MarcelloDB/Helpers/DataHelper.cs
+++ MarcelloDB/Helpers/DataHelper.cs
@@ -10,30 +10,30 @@
             Int64 targetAddress,
             byte[] targetData)
         {
-            var lengthToCopy = sourceData.Length;
-            var sourceIndex = 0;
-            var targetIndex = 0;
+            Int64 lengthToCopy = sourceData.Length;
+            Int64 sourceIndex = 0;
+            Int64 targetIndex = 0;

             if (sourceAddress < targetAddress)
             {
-                sourceIndex = (int)(targetAddress - sourceAddress);
+                sourceIndex = (targetAddress - sourceAddress);
                 lengthToCopy = sourceData.Length - sourceIndex;
             }

             if (sourceAddress > targetAddress)
             {
-                targetIndex = (int)(sourceAddress - targetAddress);
+                targetIndex = (sourceAddress - targetAddress);
                 lengthToCopy = targetData.Length - targetIndex;
             }

             //max length to copy to not overrun the target array
             lengthToCopy = Math.Min(lengthToCopy, targetData.Length - targetIndex);
-            //max length to copy to not overrrude the source array
+            //max length to copy to not overrrun the source array
             lengthToCopy = Math.Min(lengthToCopy, sourceData.Length - sourceIndex);

             if (lengthToCopy > 0)
             {
-                Array.Copy(sourceData, sourceIndex, targetData, targetIndex, lengthToCopy);
+                Array.Copy(sourceData, (int)sourceIndex, targetData, (int)targetIndex, (int)lengthToCopy);
             }

         }


Fixes bug with updatable sources.

Fixes bug with updatable sources.

--- Mat.Common/CommonQueueManager.cs
+++ Mat.Common/CommonQueueManager.cs
@@ -46,7 +46,10 @@
                                         .Where(m => !_media.Contains(m, new MediaEqualityComparer()))
                                         .OrderBy(i => (~(i.Ordering() & Seed)) & (i.Ordering() | Seed)));
                 }
-                _position = 0;
+                else
+                {
+                    _position = 0;
+                }
             }
             return Current;
         }


Name isn't usable, nor necessary.

Name isn't usable, nor necessary.

Using an empty string as name makes shader
graph generation crash.

#RH-34308

--- Materials/SimpleBrickMaterial.cs
+++ Materials/SimpleBrickMaterial.cs
@@ -68,7 +68,7 @@
 		{
 			get
 			{
-				var name = Name.Replace(" ", "_");
+				var name = "brick";
 				Rhino.Display.Color4f color1;
 				Fields.TryGetValue("color1", out color1);
 				color1 = Rhino.Display.Color4f.ApplyGamma(color1, Gamma);


update help

update help

--- csv/Program.cs
+++ csv/Program.cs
@@ -93,7 +93,7 @@

         static void Help()
         {
-            Console.Error.WriteLine($"csv command [--help] [--in file] [args...]");
+            Console.Error.WriteLine($"csv [--help] [--in file] command [args...] [command args...]");
             Console.Error.WriteLine($"Reads CSV from StdIn or the --in file and outputs CSV.");
             Console.Error.WriteLine($"Command must be one of the following:");
             Console.Error.WriteLine($"\tdiff[erence]    set difference between the input and other file(s)");


Added (WGL|GLX)_ARB_create_context_robustness.

--- OpenGL.Net/Gl.PlatformExtensions.cs
+++ OpenGL.Net/Gl.PlatformExtensions.cs
@@ -46,6 +46,14 @@
 			}

 			/// <summary>
+			/// Support for extension WGL_ARB_create_context_robustness or GLX_ARB_create_context_robustness.
+			/// </summary>
+			public bool CreateContextRobustness_ARB
+			{
+				get { return (Wgl.CurrentExtensions.CreateContextRobustness_ARB || Glx.CurrentExtensions.CreateContextRobustness_ARB); }
+			}
+
+			/// <summary>
 			/// Support for extension WGL_ARB_multisample or GLX_ARB_multisample.
 			/// </summary>
 			public bool Multisample_ARB