Update CustomMapper_Tests.cs

Update CustomMapper_Tests.cs

--- LiteDB.Tests/Database/CustomMapper_Tests.cs
+++ LiteDB.Tests/Database/CustomMapper_Tests.cs
@@ -5,7 +5,7 @@
 using System.Linq;
 using System.Reflection;

-namespace LiteDB.Tests
+namespace LiteDB.Tests.Database
 {
     #region Model

@@ -192,4 +192,4 @@
             }
         }
     }
-}+}


Slight code cleanup

Slight code cleanup

--- LiveSPICE/Controls/ComponentLibrary.xaml.cs
+++ LiveSPICE/Controls/ComponentLibrary.xaml.cs
@@ -95,8 +95,14 @@
                 };
                 content.Children.Add(name);

-                Button button = new Button() { Tag = T, ToolTip = GetDisplayName(T), Content = content };
+                Button button = new Button()
+                {
+                    Tag = T,
+                    ToolTip = GetDisplayName(T),
+                    Content = content,
+                };
                 button.Click += OnClick;
+
                 ((Panel)Group.Content).Children.Add(button);

                 return button;


fix exception on starting application without any profile Initialize last selected row as "invalid" so it can actually select first row on form load

--- Form1.cs
+++ Form1.cs
@@ -454,7 +454,7 @@
         private string _ProfileName = null;
         private int _AttemptsCounter = 0;
         private bool ModifiedFlag = false;
-        private int LastActiveSplit = 0;
+        private int LastActiveSplit = -1;

         public string GetProfileName() { return _ProfileName; }
         public void SetProfileName(string Name)
@@ -516,7 +516,7 @@
         {
             if ((GetSessionProgress() <= Index) || AllowReset)
             {
-                if (!(bool)Rows[Index].Cells["cSP"].Value)
+                if (!GetCellValueOfType<bool>(Rows[Index].Cells["cSP"], false))
                 {
                     ModifiedFlag = true;
                     Rows[Index].Cells["cSP"].Value = true;


add input field for task

add input field for task

--- ForgetTheMilk/ForgetTheMilk/Views/Task/Index.cshtml
+++ ForgetTheMilk/ForgetTheMilk/Views/Task/Index.cshtml
@@ -3,29 +3,8 @@
 }

-
ASP.NET

-
ASP.NET is a free web framework for building great Web sites and Web applications using HTML, CSS and JavaScript.

-
Learn more »

+
Add a task:

+    <form>
+        <input type="text" class="input-lg" name="task"/>
+    </form>

-
-

-

-
Getting started

-

-            ASP.NET MVC gives you a powerful, patterns-based way to build dynamic websites that
-            enables a clean separation of concerns and gives you full control over markup
-            for enjoyable, agile development.
-

-
Learn more »

-

-

-
Get more libraries

-
NuGet is a free Visual Studio extension that makes it easy to add, remove, and update libraries and tools in Visual Studio projects.

-
Learn more »

-

-

-
Web Hosting

-
You can easily find a web hosting company that offers the right mix of features and price for your applications.

-
Learn more »

-

-


Renamed the "WithoutSplashscreen" method to "DisableSplashscreen".

--- GameLibrary/Xemio.GameLibrary/FluentConfigurator.cs
+++ GameLibrary/Xemio.GameLibrary/FluentConfigurator.cs
@@ -34,7 +34,7 @@
         /// <summary>
         /// Disables the splashscreen.
         /// </summary>
-        public FluentConfigurator WithoutSplashscreen()
+        public FluentConfigurator DisableSplashscreen()
         {
             this._configuration.SplashScreen = false;
             return this;


Ok, CreateDelegate supported for real

Ok, CreateDelegate supported for real

I forget Delegate has CreateDelegate :P

I just let that throw whatever is appropiate.

--- Core/Theraot/Core/TypeHelper.util.cs
+++ Core/Theraot/Core/TypeHelper.util.cs
@@ -7,7 +7,6 @@
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Reflection;
-using System.Reflection.Emit;

 namespace Theraot.Core
 {
@@ -78,6 +77,22 @@
                 }
             }
             return true;
+        }
+
+        /// <summary>
+        /// Creates a closed delegate for the given (dynamic)method.
+        /// </summary>
+        public static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType)
+        {
+            return Delegate.CreateDelegate(delegateType, methodInfo);
+        }
+
+        /// <summary>
+        /// Creates a closed delegate for the given (dynamic)method.
+        /// </summary>
+        public static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType, object target)
+        {
+            return Delegate.CreateDelegate(delegateType, target, methodInfo);
         }

         public static MethodInfo FindConversionOperator(MethodInfo[] methods, Type typeFrom, Type typeTo, bool implicitOnly)
@@ -849,42 +864,6 @@
             return true;
         }

-        /// <summary>
-        /// Creates a closed delegate for the given (dynamic)method.
-        /// </summary>
-        internal static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType)
-        {
-            // MethodInfo is abstract, and by itself wont support creating delegates
-            // Futhermore, these are the only public derived types in .NET 2.0 - in theory all I can support :/
-            if (methodInfo is DynamicMethod)
-            {
-                // TODO
-            }
-            else if (methodInfo is MethodBuilder)
-            {
-                // TODO
-            }
-            throw new NotSupportedException();
-        }
-
-        /// <summary>
-        /// Creates a closed delegate for the given (dynamic)method.
-        /// </summary>
-        internal static Delegate CreateDelegate(this MethodInfo methodInfo, Type delegateType, object target)
-        {
-            // MethodInfo is abstract, and by itself wont support creating delegates
-            // Futhermore, these are the only public derived types in .NET 2.0 - in theory all I can support :/
-            if (methodInfo is DynamicMethod)
-            {
-                // TODO
-            }
-            else if (methodInfo is MethodBuilder)
-            {
-                // TODO
-            }
-            throw new NotSupportedException();
-        }
-
         internal static ConstructorInfo GetConstructor(this Type type, Type[] argTypes)
         {
             return GetConstructor(type, BindingFlags.Static | BindingFlags.Public, null, argTypes, null);


feat: 调整分组设置项成员结构名。 :gem:

feat: 调整分组设置项成员结构名。 :gem:

--- src/Data/Grouping.cs
+++ src/Data/Grouping.cs
@@ -36,13 +36,13 @@
 	public class Grouping
 	{
 		#region 成员字段
-		private GroupMember[] _keys;
+		private GroupKey[] _keys;
 		private ICondition _condition;
 		private GroupAggregationCollection _aggregations;
 		#endregion

 		#region 构造函数
-		private Grouping(ICondition condition, params GroupMember[] keys)
+		private Grouping(ICondition condition, params GroupKey[] keys)
 		{
 			if(keys == null || keys.Length == 0)
 				throw new ArgumentNullException(nameof(keys));
@@ -57,7 +57,7 @@
 		/// <summary>
 		/// 获取分组键的成员数组。
 		/// </summary>
-		public GroupMember[] Keys
+		public GroupKey[] Keys
 		{
 			get
 			{
@@ -96,7 +96,7 @@
 		/// <summary>
 		/// 创建一个分组设置。
 		/// </summary>
-		/// <param name="keys">分组键成员数组。</param>
+		/// <param name="keys">分组键成员数组，分组键元素使用冒号分隔成员的名称和别名。</param>
 		/// <returns>返回创建的分组设置。</returns>
 		public static Grouping Group(params string[] keys)
 		{
@@ -107,14 +107,14 @@
 		/// 创建一个分组设置。
 		/// </summary>
 		/// <param name="filter">分组的过滤条件。</param>
-		/// <param name="keys">分组键成员数组。</param>
+		/// <param name="keys">分组键成员数组，分组键元素使用冒号分隔成员的名称和别名。</param>
 		/// <returns>返回创建的分组设置。</returns>
 		public static Grouping Group(ICondition filter, params string[] keys)
 		{
 			if(keys == null || keys.Length < 1)
 				throw new ArgumentNullException(nameof(keys));

-			var members = new List<GroupMember>(keys.Length);
+			var list = new List<GroupKey>(keys.Length);

 			foreach(var key in keys)
 			{
@@ -124,12 +124,12 @@
 				var index = key.IndexOf(':');

 				if(index > 0)
-					members.Add(new GroupMember(key.Substring(0, index), key.Substring(index)));
+					list.Add(new GroupKey(key.Substring(0, index), key.Substring(index)));
 				else
-					members.Add(new GroupMember(key, null));
-			}
-
-			return new Grouping(filter, members.ToArray());
+					list.Add(new GroupKey(key, null));
+			}
+
+			return new Grouping(filter, list.ToArray());
 		}
 		#endregion

@@ -192,12 +192,12 @@
 		#endregion

 		#region 嵌套结构
-		public struct GroupMember
+		public struct GroupKey
 		{
 			public string Name;
 			public string Alias;

-			public GroupMember(string name, string alias)
+			public GroupKey(string name, string alias)
 			{
 				this.Name = name;
 				this.Alias = alias;


bug fix

bug fix

--- src/Evolve/Evolve.cs
+++ src/Evolve/Evolve.cs
@@ -197,8 +197,6 @@
                 }
             }

-            ManageSchemas(db);
-
             var metadata = db.GetMetadataTable(MetadataTableSchema, MetadaTableName);
             var lastAppliedVersion = metadata.GetAllMigrationMetadata().LastOrDefault()?.Version ?? new MigrationVersion("0");
             var scripts = _loader.GetMigrations(Locations, SqlMigrationPrefix, SqlMigrationSeparator, SqlMigrationSuffix)
@@ -258,7 +256,7 @@

             db.WrappedConnection.BeginTransaction();

-            foreach (var schemaName in FindSchemas())
+            foreach (var schemaName in FindSchemas().Reverse())
             {
                 if (metadata.CanDropSchema(schemaName))
                 {
@@ -336,6 +334,8 @@

             _logInfoDelegate(EvolveInitialized);

+            ManageSchemas(db);
+
             return db;
         }

@@ -431,8 +431,8 @@

         private IEnumerable<string> FindSchemas()
         {
-            return new List<string>().Union(Schemas ?? new List<string>())
-                                     .Union(new List<string> { MetadataTableSchema })
+            return new List<string>().Union(new List<string> { MetadataTableSchema ?? string.Empty })
+                                     .Union(Schemas ?? new List<string>())
                                      .Where(s => !s.IsNullOrWhiteSpace())
                                      .Distinct(StringComparer.OrdinalIgnoreCase);
         }


condition

condition

--- src/GalleryExport.cs
+++ src/GalleryExport.cs
@@ -706,7 +706,7 @@
 					bool changed = filters.Convert (orig, final);
 					album.Add (photo, final);

-					if ((final != orig) && changed)
+					if (final != orig)
 						System.IO.File.Delete (final);
 				}


Fixed crash on pause

Fixed crash on pause

--- ReadFullyStream.cs
+++ ReadFullyStream.cs
@@ -57,8 +57,7 @@
 				throw new InvalidOperationException();
 			}
 		}
-
-
+
 		public override int Read(byte[] buffer, int offset, int count)
 		{
 			int bytesRead = 0;
@@ -76,7 +75,14 @@
 				else
 				{
 					readAheadOffset = 0;
-					readAheadLength = sourceStream.Read(readAheadBuffer, 0, readAheadBuffer.Length);
+					try
+					{
+						readAheadLength = sourceStream.Read(readAheadBuffer, 0, readAheadBuffer.Length);
+					}
+					catch (Exception e)
+					{
+						//Read will throw an exception when pausing due to the thread dying, so we just ignore it.
+					}
 					//Debug.WriteLine(String.Format("Read {0} bytes (requested {1})", readAheadLength, readAheadBuffer.Length));
 					if (readAheadLength == 0)
 					{


FileSize operator ulong

FileSize operator ulong

(cherry picked from commit f232826a64fdf0b4857ea53021334d5941a6a84c)

--- MailRuCloud/MailRuCloudApi/Base/FileSize.cs
+++ MailRuCloud/MailRuCloudApi/Base/FileSize.cs
@@ -30,7 +30,7 @@
         /// Gets default size in bytes.
         /// </summary>
         /// <value>File size.</value>
-        public long DefaultValue => _defValue;
+        public long DefaultValue => _defValue; //TODO: make it ulong

         #region == Equality ===================================================================================================================
@@ -42,6 +42,11 @@
         public static implicit operator long(FileSize fsize)
         {
             return fsize.DefaultValue;
+        }
+
+        public static implicit operator ulong(FileSize fsize)
+        {
+            return (ulong)fsize.DefaultValue;
         }

         public static FileSize operator +(FileSize first, FileSize second)


Fixed an issue where exception is thrown if multi-episode ending number is matched at the end of a path string. Removed a conditional operator which is always true. Removed a fix to get a multi-episode directory path to work as it's no longer necessary. Changed a line using LINQ functions to use LINQ syntax. It helps with debugging.

--- MediaBrowser.Naming/TV/EpisodePathParser.cs
+++ MediaBrowser.Naming/TV/EpisodePathParser.cs
@@ -20,16 +20,9 @@

         public EpisodePathParserResult Parse(string path, bool isFolder, bool fillExtendedInfo = true)
         {
-            if (isFolder)
-            {
-                path += ".mp4";
-            }
-
-            var name = path;
-
-            var result = _options.EpisodeExpressions
-                .Select(i => Parse(name, i))
-                .FirstOrDefault(i => i.Success);
+            var query = from expression in _options.EpisodeExpressions
+                        select Parse(path, expression);
+            EpisodePathParserResult result = query.FirstOrDefault(r => r.Success);

             if (result != null && fillExtendedInfo)
             {
@@ -96,38 +89,23 @@
                         result.EpisodeNumber = num;
                     }

-                    var endingNumberGroup = match.Groups["endingepnumber"];
-                    if (endingNumberGroup != null)
+                    Group endingNumberGroup = match.Groups["endingepnumber"];
+                    if (endingNumberGroup.Success)
                     {
-                        bool bEndingNumberValid = true;
+                        // Will only set EndingEpsiodeNumber if the captured number is not followed by additional numbers
+                        // or a 'p' or 'i' as what you would get with a pixel resolution specification.
+                        // It avoids erroneous parsing of something like "series-s09e14-1080p.mkv" as a multi-episode from E14 to E108
                         int nextIndex = endingNumberGroup.Index + endingNumberGroup.Length;
-                        string nextChar = name.Substring(nextIndex, 1).ToLower();
-                        if (("0123456789".Contains(nextChar)))
+                        if (nextIndex >= name.Length || "0123456789iIpP".IndexOf(name[nextIndex]) == -1)
                         {
-                            // The regex expressions look for a number with a length of 2 or 3 charachters
-                            // if the following character is another digit, the parsed ending number would be incorrect anyway
-                            // This will fix erroneous parsing of something like "series-s09e14-1080p.mkv"
-                            // as a multi-episode from E14 to E108
-                            bEndingNumberValid = false;
-                        }
-
-                        if (nextChar == "p" || nextChar == "i")
-                        {
-                            // This will fix erroneous parsing of something like "series-s09e14-720p.mkv"
-                            // as a multi-episode from E14 to E720
-                            // It should be safe to assume that a _real_ ending episode number will never be followed by those letters
-                            bEndingNumberValid = false;
-                        }
-
-                        if (bEndingNumberValid && int.TryParse(endingNumberGroup.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out num))
-                        {
-
-                            result.EndingEpsiodeNumber = num;
+                            if (int.TryParse(endingNumberGroup.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out num))
+                            {
+                                result.EndingEpsiodeNumber = num;
+                            }
                         }
                     }

-                    var seriesGroup = match.Groups["seriesname"];
-                    result.SeriesName = seriesGroup == null ? null : seriesGroup.Value;
+                    result.SeriesName = match.Groups["seriesname"].Value;
                     result.Success = result.EpisodeNumber.HasValue;
                 }
                 else


Bug fixed: カンバン機能でグループ項目が数値項目の場合、未設定のチケットが表示されない問題を解消。

--- Implem.Pleasanter/Libraries/HtmlParts/HtmlKamban.cs
+++ Implem.Pleasanter/Libraries/HtmlParts/HtmlKamban.cs
@@ -113,17 +113,28 @@
                         .ForEach(choices => hb
                             .Table(
                                 siteSettings: siteSettings,
-                                choices: choices.ToDictionary(o => o.Key, o => o.Value),
+                                choices: CorrectedChoices(groupByColumn, choices),
                                 aggregateType: aggregateType,
                                 valueColumn: valueColumn,
                                 data: data,
                                 changedItemId: changedItemId)));
         }

+        private static IEnumerable<KeyValuePair<string, ControlData>> CorrectedChoices(
+            Column groupByColumn,
+            IEnumerable<KeyValuePair<string, ControlData>> choices)
+        {
+            return groupByColumn.TypeName.CsTypeSummary() != Types.CsNumeric
+                ? choices
+                : choices.ToDictionary(
+                    o => o.Key != string.Empty ? o.Key : "0",
+                    o => o.Value);
+        }
+
         private static HtmlBuilder Table(
             this HtmlBuilder hb,
             SiteSettings siteSettings,
-            Dictionary<string, ControlData> choices,
+            IEnumerable<KeyValuePair<string, ControlData>> choices,
             string aggregateType,
             Column valueColumn,
             IEnumerable<KambanElement> data,


Prevent inlining to allow build server to pass

--- GitVersionCore.Tests/ConfigProviderTests.cs
+++ GitVersionCore.Tests/ConfigProviderTests.cs
@@ -88,6 +88,7 @@
     }

     [Test]
+    [MethodImpl(MethodImplOptions.NoInlining)]
     public void CanWriteOutEffectiveConfiguration()
     {
         var config = ConfigurationProvider.GetEffectiveConfigAsString(gitDirectory, fileSystem);


Removed testing calls for lottery dates (now that settings views are in place).

--- GoldenTicket/Controllers/AdminController.cs
+++ GoldenTicket/Controllers/AdminController.cs
@@ -462,15 +462,15 @@

         private DateTime? GetLotteryRunDate()
         {
-            //return db.GlobalConfigs.First().LotteryRunDate; // real call
-            return null; // forced lottery not run
+            return db.GlobalConfigs.First().LotteryRunDate; // real call
+//            return null; // forced lottery not run
             //return new DateTime(2014, 11, 21); // forced lottery run already
         }

         private DateTime? GetLotteryCloseDate()
         {
-            //return db.GlobalConfigs.First().CloseDate; // real call
-            return new DateTime(2014, 11, 20); // forced lottery closed
+            return db.GlobalConfigs.First().CloseDate; // real call
+//            return new DateTime(2014, 11, 20); // forced lottery closed
             //return new DateTime(2014, 11, 30); // forced lottery open
         }


Changed verbiage on battletag stats check

--- HeroesMatchTracker/Views/MainWindow.xaml.cs
+++ HeroesMatchTracker/Views/MainWindow.xaml.cs
@@ -70,7 +70,7 @@
         {
             if (Database.SettingsDb().UserSettings.UserPlayerId < 1)
             {
-                await this.ShowMessageAsync("Statistics", "To view your stats, enter your BattleTag in the Profile menu.");
+                await this.ShowMessageAsync("Statistics", "To view your stats, set your BattleTag in the Profile menu.");
                 return true;
             }
             else


Renamge AddSingle

Renamge AddSingle

--- HeterogeneousDataSources/LookupIdContext.cs
+++ HeterogeneousDataSources/LookupIdContext.cs
@@ -10,7 +10,7 @@
         private readonly Dictionary<Type, object> _lookupIdsByReferenceType = new Dictionary<Type, object>();

-        public void AddSingle<TReference, TId>(TId lookupId) {
+        public void Add<TReference, TId>(TId lookupId) {
             var tReference = typeof(TReference);
             if (!_lookupIdsByReferenceType.ContainsKey(tReference)) {
                 _lookupIdsByReferenceType.Add(tReference, new List<TId>());


Version 2.8.11

Version 2.8.11

--- src/main/csharp/Khipu/Client/Configuration.cs
+++ src/main/csharp/Khipu/Client/Configuration.cs
@@ -17,7 +17,7 @@
         /// Version of the package.
         /// </summary>
         /// <value>Version of the package.</value>
-        public const string Version = "2.8.10";
+        public const string Version = "2.8.11";

         /// <summary>
         /// Gets or sets the default API client for making HTTP calls.
@@ -102,8 +102,8 @@
                      .GetExecutingAssembly()
                      .GetReferencedAssemblies()
                      .Where(x => x.Name == "System.Core").First().Version.ToString()  + "\n";
-            report += "    Version of the API: 2.8.10\n";
-            report += "    SDK Package Version: 2.8.10\n";
+            report += "    Version of the API: 2.8.11\n";
+            report += "    SDK Package Version: 2.8.11\n";

             return report;
         }


Made IShaderAttribute internal.

Made IShaderAttribute internal.

--- IIS.SLSharp/Annotations/IShaderAttribute.cs
+++ IIS.SLSharp/Annotations/IShaderAttribute.cs
@@ -1,6 +1,6 @@
 namespace IIS.SLSharp.Annotations
 {
-    public interface IShaderAttribute
+    internal interface IShaderAttribute
     {
         bool EntryPoint { get; }
     }


Cruft removal.

Cruft removal.

--- Shell.cs
+++ Shell.cs
@@ -506,13 +506,9 @@
   }

   private void ShowEditor() {
-    // TODO: Suss out scrolling and the like.
     GUILayout.BeginHorizontal();
       EditorGUILayout.BeginVertical(GUILayout.Width(35));
         GUILayout.Label(useContinuationPrompt ? "cont>" : "---->", EditorStyles.wordWrappedLabel, GUILayout.Width(35));
-//        if(GUILayout.Button("Clr")) {
-//          history.Clear();
-//        }
       EditorGUILayout.EndVertical();

       // This is a WAG about Unity's box model.  Seems to work though, so...


Fix task execution

Fix task execution

--- src/Mur/Scheduler.cs
+++ src/Mur/Scheduler.cs
@@ -45,12 +45,13 @@
             {
                 var job = jobs[jobSetting.Id];

-                var task = new Task(job.Run).ContinueWith((result) =>
+                Task.Factory.StartNew(() => {
+                    job.Run();
+                })
+                .ContinueWith((result) =>
                 {
                     UpdateLastRun(jobSetting, job, now);
                 });
-
-                task.Start();
             }
         }


[VT-2365] version update

[VT-2365] version update

--- src/Plivo/Version.cs
+++ src/Plivo/Version.cs
@@ -10,7 +10,7 @@
         /// <summary>
         /// DotNet SDK version
         /// </summary>
-        public const string SdkVersion = "4.11.0";
+        public const string SdkVersion = "4.12.0";
         /// <summary>
         /// Plivo API version
         /// </summary>


Implemented a second full-run mode

Implemented a second full-run mode

0 = Normal operating, no full run on startup.
1 = Full run on startup, no unknown apps
2 = Full run on startup, including unknown apps

--- Steam.cs
+++ Steam.cs
@@ -262,8 +262,13 @@
             }
             foreach (var unknownapp in callback.UnknownApps)
             {
-                new System.Threading.Thread(AppPro.ProcessUnknownApp).Start(unknownapp);
-                System.Threading.Thread.Sleep(20);
+                //Only handle when fullrun is disabled or if it specifically is running with mode "2" (full run inc. unknown apps)
+                if (ConfigurationManager.AppSettings["fullrun"].Equals("0") || ConfigurationManager.AppSettings["fullrun"].Equals("2"))
+                {
+                    new System.Threading.Thread(AppPro.ProcessUnknownApp).Start(unknownapp);
+                    System.Threading.Thread.Sleep(20);
+                }
+
             }
             foreach (var unknownpack in callback.UnknownPackages)
             {


Don't attempt to optimize ToString in detriment of debugging

The ToString on a MockSetup is almost surely going to be a debugging
aid only, so optimizing for its rendering by using a Lazy only makes
that debugging worse (requiring "all threads to run" just to render
the string), for no evident gain.

--- src/Sdk/MockSetup.cs
+++ src/Sdk/MockSetup.cs
@@ -4,7 +4,6 @@
 using System.Linq;
 using System.Reflection;
 using System.Text;
-using System.Threading;
 using Moq.Proxy;

 namespace Moq.Sdk
@@ -12,14 +11,12 @@
     public partial class MockSetup : IMockSetup, IEquatable<MockSetup>
     {
         IArgumentMatcher[] matchers;
-        Lazy<string> toDisplay;
         Lazy<IStructuralEquatable> equatable;

         public MockSetup(IMethodInvocation invocation, IArgumentMatcher[] matchers)
         {
             Invocation = invocation;
             this.matchers = matchers;
-            toDisplay = new Lazy<string>(ToDisplay);
             equatable = new Lazy<IStructuralEquatable>(CreateEquatable);
         }

@@ -47,9 +44,7 @@
             return true;
         }

-        public override string ToString() => toDisplay.Value;
-
-        string ToDisplay()
+        public override string ToString()
         {
             var result = new StringBuilder();
             if (Invocation.MethodBase is MethodInfo info)


Use missing 'abstract' modifier for base classes.

--- src/SilDev/Crypto.cs
+++ src/SilDev/Crypto.cs
@@ -5,7 +5,7 @@
 // ==============================================
 //
 // Filename: Crypto.cs
-// Version:  2019-12-16 16:42
+// Version:  2019-12-20 18:43
 //
 // Copyright (c) 2019, Si13n7 Developments (r)
 // All rights reserved.
@@ -1182,7 +1182,7 @@
         ///     Represents the base class from which all implementations of binary-to-text encoding
         ///     algorithms must derive.
         /// </summary>
-        public class BinaryToText
+        public abstract class BinaryToText
         {
             /// <summary>
             ///     Gets the separator.
@@ -1209,11 +1209,7 @@
             ///     true to release all resources used by the input and output <see cref="Stream"/>;
             ///     otherwise, false.
             /// </param>
-            /// <exception cref="NotSupportedException">
-            ///     The current method has no functionality.
-            /// </exception>
-            public virtual void EncodeStream(Stream inputStream, Stream outputStream, int lineLength = 0, bool dispose = false) =>
-                throw new NotSupportedException();
+            public abstract void EncodeStream(Stream inputStream, Stream outputStream, int lineLength = 0, bool dispose = false);

             /// <summary>
             ///     Encodes the specified input stream into the specified output stream.
@@ -1373,11 +1369,7 @@
             ///     true to release all resources used by the input and output <see cref="Stream"/>;
             ///     otherwise, false.
             /// </param>
-            /// <exception cref="NotSupportedException">
-            ///     The current method has no functionality.
-            /// </exception>
-            public virtual void DecodeStream(Stream inputStream, Stream outputStream, bool dispose = false) =>
-                throw new NotSupportedException();
+            public abstract void DecodeStream(Stream inputStream, Stream outputStream, bool dispose = false);

             /// <summary>
             ///     Decodes the specified string into a sequence of bytes.
@@ -2731,7 +2723,7 @@
         ///     Represents the base class from which all implementations of checksum encryption
         ///     algorithms must derive.
         /// </summary>
-        public class Checksum
+        public abstract class Checksum
         {
             /// <summary>
             ///     Encrypts the specified stream with the specified <see cref="HashAlgorithm"/>.
@@ -2766,11 +2758,7 @@
             /// <param name="stream">
             ///     The stream to encrypt.
             /// </param>
-            /// <exception cref="NotSupportedException">
-            ///     The current method has no functionality.
-            /// </exception>
-            public virtual string EncryptStream(Stream stream) =>
-                throw new NotSupportedException();
+            public abstract string EncryptStream(Stream stream);

             /// <summary>
             ///     Encrypts the specified sequence of bytes.
@@ -2821,11 +2809,7 @@
             /// <param name="text">
             ///     The string to encrypt.
             /// </param>
-            /// <exception cref="NotSupportedException">
-            ///     The current method has no functionality.
-            /// </exception>
-            public virtual string EncryptString(string text) =>
-                throw new NotSupportedException();
+            public abstract string EncryptString(string text);

             /// <summary>
             ///     Encrypts the specified file.


Throw exception if rotate image failed

Throw exception if rotate image failed

--- src/Tesseract/Pix.cs
+++ src/Tesseract/Pix.cs
@@ -614,7 +614,7 @@
                 resultHandle = Interop.LeptonicaApi.Native.pixRotate(handle, angle, method, fillColor, width.Value, height.Value);
             }

-            if (resultHandle == IntPtr.Zero) throw new LeptonicaException("Failed to rotate image around it's centre.");
+            if (resultHandle == IntPtr.Zero) throw new LeptonicaException("Failed to rotate image around its centre.");

             return new Pix(resultHandle);
         }
@@ -623,14 +623,14 @@
         /// 90 degree rotation.
         /// </summary>
         /// <param name="direction">1 = clockwise,  -1 = counter-clockwise</param>
-        /// <returns>rotated image, or original on error</returns>
+        /// <returns>rotated image</returns>
         public Pix Rotate90(int direction)
         {
             IntPtr resultHandle = Interop.LeptonicaApi.Native.pixRotate90(handle, direction);

             if (resultHandle == IntPtr.Zero)
             {
-                return this;
+                throw new LeptonicaException("Failed to rotate image.");
             }
             return new Pix(resultHandle);
         }


Change orbit angles to degree

Change orbit angles to degree

--- Assets/Scripts/Planet.cs
+++ Assets/Scripts/Planet.cs
@@ -18,6 +18,8 @@
                                out Vector3 position,
                                out Vector3 normal ) {

+        angle = angle * Mathf.Deg2Rad;
+
         // Polar to cartesian coordinates
         float x = Mathf.Cos( angle ) * distance;
         float y = Mathf.Sin( angle ) * distance;


Added all DPad Cases

Added all DPad Cases

--- Assets/Scripts/Player.cs
+++ Assets/Scripts/Player.cs
@@ -76,7 +76,7 @@
     public void OnDPadUp()
     {
         //Teleport to the Footbal Spawn
-        if( GameManager.QueryFlag("FOOTBALL_TELEPORT") && UpSpawn!=null)
+        if( (GameManager.QueryFlag("FOOTBALL_TELEPORT") || GameManager.QueryFlag("WW2_TELEPORT") ) && UpSpawn!=null)
         {
             UpSpawn.TeleportPlayer(this);
         }
@@ -85,7 +85,7 @@
     public void OnDPadDown()
     {
         //Teleport to Main Hub
-        if(GameManager.QueryFlag("GRANDPA_HEIRLOOM") && DownSpawn!=null)
+        if( (GameManager.QueryFlag("GRANDPA_HEIRLOOM") || GameManager.QueryFlag("CHILD_HEIRLOOM") ) && DownSpawn!=null)
         {
             DownSpawn.TeleportPlayer(this);
         }
@@ -94,7 +94,7 @@
     public void OnDPadLeft()
     {
         //Teleport to Diary
-        if(GameManager.QueryFlag("") && LeftSpawn!=null)
+        if( (GameManager.QueryFlag("DIARY_TELEPORT") || GameManager.QueryFlag("BAR_TELEPORT")) && LeftSpawn!=null)
         {
             LeftSpawn.TeleportPlayer(this);
         }
@@ -103,7 +103,7 @@
     public void OnDPadRight()
     {
         //Teleport to Backyard
-        if(GameManager.QueryFlag("") && RightSpawn!=null)
+        if( (GameManager.QueryFlag("BABY_TELEPORT") || GameManager.QueryFlag("STREET_TELEPORT")) && RightSpawn!=null)
         {
             RightSpawn.TeleportPlayer(this);
         }


add a little test with Xbox1 and PS4 controllers

--- Assets/Scripts/Player.cs
+++ Assets/Scripts/Player.cs
@@ -13,6 +13,9 @@
     Camera viewCamera;
     PlayerController controller;
 	GunController gunController;
+
+    //private int Xbox_One_Controller = 0;
+    //private int PS4_Controller = 0;

     public override void Start()
 	{
@@ -78,16 +81,16 @@

     	// Weapon Input
         // Mouse pressed
-		if (Input.GetMouseButton(0))
+		if (Input.GetMouseButton(0) || Input.GetButtonDown("Fire1"))
 		{
 			gunController.OnTriggerHold();
 		}
         // Mouse release
-        if (Input.GetMouseButtonUp(0))
+        if (Input.GetMouseButtonUp(0) || Input.GetButtonUp("Fire1"))
         {
             gunController.OnTriggerRelease();
         }
-        if (Input.GetKeyDown(KeyCode.R))
+        if (Input.GetKeyDown(KeyCode.R)|| Input.GetButton("Fire2"))
         {
             gunController.Reload();
         }
@@ -95,7 +98,48 @@
         if (transform.position.y < -10)
         {
             TakeDamage(health);
-        }
+        }
+
+        // Xbox1 and PS4 controller detection
+
+        //string[] names = Input.GetJoystickNames();
+        //for (int x = 0; x < names.Length; x++)
+        //{
+        //    print(names[x].Length);
+        //    if (names[x].Length == 19)
+        //    {
+        //        print("PS4 CONTROLLER IS CONNECTED");
+        //        PS4_Controller = 1;
+        //        Xbox_One_Controller = 0;
+        //    }
+        //    if (names[x].Length == 33)
+        //    {
+        //        print("XBOX ONE CONTROLLER IS CONNECTED");
+        //        //set a controller bool to true
+        //        PS4_Controller = 0;
+        //        Xbox_One_Controller = 1;
+
+        //    }
+        //}
+
+
+        //if (Xbox_One_Controller == 1)
+        //{
+        //    //do something
+        //    Debug.Log("Xbox");
+        //}
+        //else if (PS4_Controller == 1)
+        //{
+        //    //do something
+        //    Debug.Log("PS4");
+        //}
+        //else
+        //{
+        //    Debug.Log("No Controller");
+        //    // there is no controllers
+        //}
+
+
     }

     public override void Die()


[SLProxy] wrapped ProxyHTTP in a try/catch (may resolve issue 34)

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

--- SLProxy/SLProxy.cs
+++ SLProxy/SLProxy.cs
@@ -351,7 +351,13 @@

                     try
                     {
-                        Thread connThread = new Thread((ThreadStart)delegate { ProxyHTTP(client); });
+                        Thread connThread = new Thread((ThreadStart)delegate {
+				try {
+					ProxyHTTP(client);
+				} catch (Exception e) {
+					Console.WriteLine("ProxyHTTP: {0}", e.Message);
+				}
+			});
                         connThread.Start();
                     }
                     catch (Exception e)


Changes in BufferExtensions.ToBytes for float and double

--- LiteDB/Utils/Extensions/BufferExtensions.cs
+++ LiteDB/Utils/Extensions/BufferExtensions.cs
@@ -161,10 +161,12 @@
         /// </summary>
         public static unsafe void ToBytes(this Single value, byte[] array, int startIndex)
         {
-            fixed (byte* ptr = &array[startIndex])
-            {
-                *(Single*)ptr = value;
-            }
+            ToBytes(*(UInt32*)(&value), array, startIndex);
+
+            //fixed (byte* ptr = &array[startIndex])
+            //{
+            //    *(Single*)ptr = value;
+            //}
         }

         /// <summary>
@@ -172,10 +174,12 @@
         /// </summary>
         public static unsafe void ToBytes(this Double value, byte[] array, int startIndex)
         {
-            fixed (byte* ptr = &array[startIndex])
-            {
-                *(Double*)ptr = value;
-            }
+            ToBytes(*(UInt64*)(&value), array, startIndex);
+
+            //fixed (byte* ptr = &array[startIndex])
+            //{
+            //    *(Double*)ptr = value;
+            //}
         }

         #endregion


修正 LastOrDefault 方法的 Bug

修正 LastOrDefault 方法的 Bug

--- Ivony.Html/Extensions/ExpandedNavigateExtensions.cs
+++ Ivony.Html/Extensions/ExpandedNavigateExtensions.cs
@@ -76,7 +76,7 @@
         throw new ArgumentNullException( "expression" );

-      return container.Find( expression ).FirstOrDefault() ?? defaultElement;
+      return container.Find( expression ).LastOrDefault() ?? defaultElement;
     }


Adding changes from production.

Adding changes from production.

--- eFormCore/Persistance/SqlController.cs
+++ eFormCore/Persistance/SqlController.cs
@@ -1115,8 +1115,9 @@
                                             {
                                                 if (fieldV.value != "" || fieldV.value != null)
                                                 {
-                                                    entity_items match = db.entity_items.SingleOrDefault(x => x.microting_uid == fieldV.value);
-
+                                                    int id = int.Parse(fieldV.value);
+                                                    entity_items match = db.entity_items.SingleOrDefault(x => x.id == id);
+
                                                     if (match != null)
                                                     {
                                                         new_value = match.name;


Add overload for CreateIndex to IMongoCollectionGeneric to match the implementation class.

--- NoRM/Collections/IMongoCollectionGeneric.cs
+++ NoRM/Collections/IMongoCollectionGeneric.cs
@@ -212,6 +212,23 @@
         /// <param retval="isUnique">True if MongoDB can expect that each document will have a unique combination for this fieldSelectionExpando.
         /// MongoDB will potentially optimize the index based on this being true.</param>
         void CreateIndex(Expando key, String indexName, bool isUnique);
+
+        /// <summary>
+        /// Asynchronously creates an index on this collection.
+        /// </summary>
+        /// <param name="compoundIndexes">This is a collection of the elements in the type you wish to index along with the direction:
+        /// <code>
+        /// new[] {
+        ///     new MongoCollectionCompoundIndex<MyData>(o => o.A.B, IndexOption.Ascending),
+        ///     new MongoCollectionCompoundIndex<MyData>(o => o.C.D, IndexOption.Descending),
+        /// }
+        /// </code>
+        /// This will automatically map the MongoConfiguration aliases.
+        /// </param>
+        /// <param name="indexName">The name of the index as it should appear in the special "system.indexes" child collection.</param>
+        /// <param name="isUnique">True if MongoDB can expect that each document will have a unique combination for this fieldSelectionExpando.
+        /// MongoDB will potentially optimize the index based on this being true.</param>
+        void CreateIndex(IEnumerable<MongoCollectionCompoundIndex<T>> compoundIndexes, string indexName, bool isUnique);

         /// <summary>
         /// Asynchronously creates an index on this collection.


Allow diagnosticsOptions to be set later.

--- Nodejs/Product/Nodejs/Logging/LiveLogger.cs
+++ Nodejs/Product/Nodejs/Logging/LiveLogger.cs
@@ -32,11 +32,19 @@
         private static volatile LiveLogger _instance;
         private static object _loggerLock = new object();

-        private NodejsDiagnosticsOptionsPage _diagnosticsOptions = null;
+        private NodejsDiagnosticsOptionsPage _diagnosticsOptions;

         private LiveLogger() {
-            if (NodejsPackage.Instance != null) {
-                _diagnosticsOptions = NodejsPackage.Instance.DiagnosticsOptionsPage;
+        }
+
+        private NodejsDiagnosticsOptionsPage DiagnosticsOptions {
+            get {
+                if (_diagnosticsOptions == null) {
+                    if (NodejsPackage.Instance != null) {
+                        _diagnosticsOptions = NodejsPackage.Instance.DiagnosticsOptionsPage;
+                    }
+                }
+                return _diagnosticsOptions;
             }
         }

@@ -70,7 +78,7 @@
         private void LogMessage(string message) {
             Debug.WriteLine(message);

-            if (_diagnosticsOptions != null && _diagnosticsOptions.IsLiveDiagnosticsEnabled) {
+            if (DiagnosticsOptions != null && DiagnosticsOptions.IsLiveDiagnosticsEnabled) {
                 var pane = OutputWindowRedirector.Get(VisualStudio.Shell.ServiceProvider.GlobalProvider, LiveDiagnosticLogPaneGuid, LiveDiagnosticLogPaneName);
                 if (pane != null) {
                     pane.WriteLine(message);


Fix for client.Repository.Content.GetAllContents for root not currently possible. #800

The client.Repository.Content.GetAllContents does not allow getting root
folders for Branches. This fix would allow the users to pass null/empty
strings for the path which will address the issue.

--- Octokit/Clients/RepositoryContentsClient.cs
+++ Octokit/Clients/RepositoryContentsClient.cs
@@ -30,7 +30,6 @@
         {
             Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
             Ensure.ArgumentNotNullOrEmptyString(name, "name");
-            Ensure.ArgumentNotNullOrEmptyString(path, "path");

             var url = ApiUrls.RepositoryContent(owner, name, path);

@@ -55,7 +54,6 @@
         {
             Ensure.ArgumentNotNullOrEmptyString(owner, "owner");
             Ensure.ArgumentNotNullOrEmptyString(name, "name");
-            Ensure.ArgumentNotNullOrEmptyString(path, "path");
             Ensure.ArgumentNotNullOrEmptyString(reference, "reference");

             var url = ApiUrls.RepositoryContent(owner, name, path, reference);


Update ObjectDBTest.cs

Update ObjectDBTest.cs

--- BTDBTest/ObjectDBTest.cs
+++ BTDBTest/ObjectDBTest.cs
@@ -1808,5 +1808,63 @@
                 tr.Commit();
             }
         }
+
+        public class UlongGuidKey
+        {
+            public ulong Ulong { get; set; }
+            public Guid Guid { get; set; }
+        }
+
+        public class UlongGuidMap
+        {
+            public IOrderedDictionary<UlongGuidKey, string> Items { get; set; }
+        }
+
+        public class GuidMap
+        {
+            public IOrderedDictionary<Guid, string> Items { get; set; }
+        }
+
+        [Test]
+        public void GuidInKey()
+        {
+            var guid = Guid.NewGuid();
+            using (var tr = _db.StartTransaction())
+            {
+                var items = tr.Singleton<GuidMap>().Items;
+                items[guid] = "a";
+                tr.Commit();
+            }
+            ReopenDb();
+            using (var tr = _db.StartTransaction())
+            {
+                var items = tr.Singleton<GuidMap>().Items;
+                string value;
+                Assert.AreEqual(true, items.TryGetValue(guid, out value));
+
+                Assert.AreEqual("a", value);
+            }
+        }
+
+        [Test]
+        public void GuidInComplexKey()
+        {
+            var guid = Guid.NewGuid();
+            using (var tr = _db.StartTransaction())
+            {
+                var items = tr.Singleton<UlongGuidMap>().Items;
+                items[new UlongGuidKey { Ulong = 1, Guid = guid }] = "a";
+                tr.Commit();
+            }
+            ReopenDb();
+            using (var tr = _db.StartTransaction())
+            {
+                var items = tr.Singleton<UlongGuidMap>().Items;
+                string value;
+                Assert.AreEqual(true, items.TryGetValue(new UlongGuidKey {Ulong = 1, Guid = guid}, out value));
+
+                Assert.AreEqual("a", value);
+            }
+        }
     }
 }


Turns out that fix wasn't needed - that code path could never be hit

Removed the unneeded logic.

--- MimeKit/Encodings/QuotedPrintableEncoder.cs
+++ MimeKit/Encodings/QuotedPrintableEncoder.cs
@@ -177,15 +177,8 @@
 					if (saved != -1) {
 						byte b = (byte) saved;

-						if (b.IsQpSafe ()) {
-							*outptr++ = b;
-							currentLineLength++;
-						} else {
-							*outptr++ = (byte) '=';
-							*outptr++ = hex_alphabet[(saved >> 4) & 0x0f];
-							*outptr++ = hex_alphabet[saved & 0x0f];
-							currentLineLength += 3;
-						}
+						*outptr++ = b;
+						currentLineLength++;
 					}

 					if (currentLineLength > desiredLineLength) {


Context tests for Buckets

Context tests for Buckets

--- MongoFramework.Tests/MongoDbContextTests.cs
+++ MongoFramework.Tests/MongoDbContextTests.cs
@@ -1,4 +1,5 @@
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using MongoFramework.Attributes;
 using System.Linq;
 using System.Threading.Tasks;

@@ -7,16 +8,26 @@
 	[TestClass]
 	public class MongoDbContextTests : TestBase
 	{
-		public class MongoDbContextModel
+		class DbSetModel
 		{
 			public string Id { get; set; }
 		}
+		class BucketGroupModel
+		{
+			public string Name { get; set; }
+		}
+		class BucketSubEntity
+		{
+			public string Label { get; set; }
+		}

-		public class MongoDbContextTestContext : MongoDbContext
+		class MongoDbContextTestContext : MongoDbContext
 		{
 			public MongoDbContextTestContext(IMongoDbContextOptions options) : base(options) { }
 			public MongoDbContextTestContext(string connectionString, string databaseName) : base(connectionString, databaseName) { }
-			public MongoDbSet<MongoDbContextModel> ContextDbSet { get; set; }
+			public MongoDbSet<DbSetModel> DbSet { get; set; }
+			[BucketSetOptions(5)]
+			public MongoDbBucketSet<BucketGroupModel, BucketSubEntity> DbBucketSet { get; set; }
 		}

 		[TestMethod]
@@ -30,10 +41,10 @@

 			using (var context = new MongoDbContextTestContext(options))
 			{
-				context.ContextDbSet.Add(new MongoDbContextModel());
-				Assert.IsFalse(context.ContextDbSet.Any());
+				context.DbSet.Add(new DbSetModel());
+				Assert.IsFalse(context.DbSet.Any());
 				context.SaveChanges();
-				Assert.IsTrue(context.ContextDbSet.Any());
+				Assert.IsTrue(context.DbSet.Any());
 			}
 		}

@@ -44,7 +55,19 @@
 			var databaseName = TestConfiguration.GetDatabaseName();
 			using (var context = new MongoDbContextTestContext(connectionString, databaseName))
 			{
-				Assert.IsNotNull(context.ContextDbSet);
+				Assert.IsNotNull(context.DbSet);
+				Assert.IsNotNull(context.DbBucketSet);
+			}
+		}
+
+		[TestMethod]
+		public void DbSetsHaveOptionsApplied()
+		{
+			var connectionString = TestConfiguration.ConnectionString;
+			var databaseName = TestConfiguration.GetDatabaseName();
+			using (var context = new MongoDbContextTestContext(connectionString, databaseName))
+			{
+				Assert.AreEqual(5, context.DbBucketSet.BucketSize);
 			}
 		}

@@ -55,10 +78,10 @@
 			var databaseName = TestConfiguration.GetDatabaseName();
 			using (var context = new MongoDbContextTestContext(connectionString, databaseName))
 			{
-				context.ContextDbSet.Add(new MongoDbContextModel());
-				Assert.IsFalse(context.ContextDbSet.Any());
+				context.DbSet.Add(new DbSetModel());
+				Assert.IsFalse(context.DbSet.Any());
 				context.SaveChanges();
-				Assert.IsTrue(context.ContextDbSet.Any());
+				Assert.IsTrue(context.DbSet.Any());
 			}
 		}

@@ -69,10 +92,10 @@
 			var databaseName = TestConfiguration.GetDatabaseName();
 			using (var context = new MongoDbContextTestContext(connectionString, databaseName))
 			{
-				context.ContextDbSet.Add(new MongoDbContextModel());
-				Assert.IsFalse(context.ContextDbSet.Any());
+				context.DbSet.Add(new DbSetModel());
+				Assert.IsFalse(context.DbSet.Any());
 				await context.SaveChangesAsync().ConfigureAwait(false);
-				Assert.IsTrue(context.ContextDbSet.Any());
+				Assert.IsTrue(context.DbSet.Any());
 			}
 		}
 	}


Fixed clickMorePicks()...  Was an href versus onclick.  :(

--- MoviePicker.WebApp/Views/Home/Index2.cshtml
+++ MoviePicker.WebApp/Views/Home/Index2.cshtml
@@ -82,7 +82,7 @@

 			<a class="btn btn-info btn-lg"
 			   style="margin-top: 10px;"
-			   href="clickMorePicks()"
+			   onclick="clickMorePicks()"
 			   data-toggle="tooltip"
 			   data-placement="bottom"
 			   title="View the top picks for both bonus ON and OFF (this is a bit slow... please be patient.)">


ejemplo de cambio

ejemplo de cambio

--- MvcBaseBall/Controllers/EquipoController.cs
+++ MvcBaseBall/Controllers/EquipoController.cs
@@ -94,7 +94,7 @@
             ServicioEquipos.SrvEquiposClient equipos = new ServicioEquipos.SrvEquiposClient();
             ViewBag.JugadoresEquipo = equipos.GetJugadoresEquipoAño("ARI", 2014).ToList();

-            //ViewBag.JugadoresLibres = equipos.GetJugadoresLibresAño(2014).ToList();
+            //ViewBag.JugadoresLibres = equipos.GetJugadoresLibresAño(2014).ToList(); Cambio sin importancia

             return View(eq);
         }


Add Pure attributes

Add Pure attributes

--- LanguageExt.Core/TypeClasses/Monad/Monad.Prelude.cs
+++ LanguageExt.Core/TypeClasses/Monad/Monad.Prelude.cs
@@ -21,21 +21,25 @@
         public static MA Return<MONAD, MA, A>(A x) where MONAD : struct, Monad<MA, A> =>
             default(MONAD).Return(_ => x);

+        [Pure]
         public static MB traverse<MonadA, MonadB, MA, MB, A, B>(MA ma, Func<A, B> f)
             where MonadA : struct, Monad<Unit, Unit, MA, A>
             where MonadB : struct, Monad<Unit, Unit, MB, B> =>
             traverse<Unit, Unit, MonadA, MonadB, MA, MB, A, B>(ma, f)(unit);

+        [Pure]
         public static MB traverse<MonadA, MonadB, MA, MB, A, B>(MA ma, Func<A, MB> f)
             where MonadA : struct, Monad<Unit, Unit, MA, A>
             where MonadB : struct, Monad<Unit, Unit, MB, B> =>
             traverse<Unit, Unit, MonadA, MonadB, MA, MB, A, B>(ma, f)(unit);

+        [Pure]
         public static Func<Env, MB> traverse<Env, Out, MonadA, MonadB, MA, MB, A, B>(MA ma, Func<A, B> f)
             where MonadA : struct, Monad<Env, Out, MA, A>
             where MonadB : struct, Monad<Env, Out, MB, B> =>
             default(MonadA).Fold(ma, default(MonadB).Zero(), (s, a) => default(MonadB).Plus(s, default(MonadB).Return(_ => f(a))));

+        [Pure]
         public static Func<Env, MB> traverse<Env, Out, MonadA, MonadB, MA, MB, A, B>(MA ma, Func<A, MB> f)
             where MonadA : struct, Monad<Env, Out, MA, A>
             where MonadB : struct, Monad<Env, Out, MB, B> =>


[binder] Field to property pass created methods now reference the property.

--- binder/Passes/FieldToGetterSetter.cs
+++ binder/Passes/FieldToGetterSetter.cs
@@ -24,15 +24,25 @@

             var @class = field.Namespace as Class;

+            var property = new Property
+            {
+                Name = field.Name,
+                Namespace = field.Namespace,
+                Field = field,
+                QualifiedType = field.QualifiedType,
+                AssociatedDeclaration = field
+            };
+
             var getter = new Method
             {
                 Name = $"get_{field.Name}",
                 Namespace = @class,
                 ReturnType = field.QualifiedType,
                 Access = field.Access,
-                AssociatedDeclaration = field,
+                AssociatedDeclaration = property,
                 IsStatic = field.IsStatic,
             };
+            property.GetMethod = getter;

             var setter = new Method
             {
@@ -40,9 +50,10 @@
                 Namespace = @class,
                 ReturnType = new QualifiedType(new BuiltinType(PrimitiveType.Void)),
                 Access = field.Access,
-                AssociatedDeclaration = field,
+                AssociatedDeclaration = property,
                 IsStatic = field.IsStatic,
             };
+            property.SetMethod = setter;

             var param = new Parameter
             {
@@ -51,21 +62,9 @@
             };
             setter.Parameters.Add(param);

-            var property = new Property
-            {
-                Name = field.Name,
-                Namespace = field.Namespace,
-                GetMethod = getter,
-                SetMethod = setter,
-                Field = field,
-                QualifiedType = field.QualifiedType,
-                AssociatedDeclaration = field
-            };
-
-            field.AssociatedDeclaration = property;
             @class.Declarations.Add(property);

-            Diagnostics.Debug($"Getter/setter property created from field {field.QualifiedName}");
+            Diagnostics.Debug($"Property created from field: '{field.QualifiedName}'");

             return true;
         }


Adds an IfDef to allow us to debug native code

This lets us set a DLL location to load from directly instead of loading
from the temp file.

--- NetworkTablesCore/Native/LoaderUtilities.cs
+++ NetworkTablesCore/Native/LoaderUtilities.cs
@@ -1,4 +1,5 @@
-using System;
+//#define NativeDebug
+using System;
 using System.Diagnostics;
 using System.IO;
 using System.Reflection;
@@ -60,12 +61,17 @@
             }
         }

+#if NativeDebug
+
         private const string Debugx64Windows = @"C:\Users\thad\Documents\GitHub\PeterJohnson\ntcore\build\binaries\ntcoreSharedLibrary\x64\ntcore.dll";
         private const string Debugx32Windows = @"C:\Users\thad\Documents\GitHub\PeterJohnson\ntcore\build\binaries\ntcoreSharedLibrary\x86\ntcore.dll";
         private const bool debug = false;
+#endif

         internal static string ExtractLibrary(OsType type)
         {
+
+#if NativeDebug
             if (debug)
             {
                 switch (type)
@@ -78,6 +84,7 @@
                         break;
                 }
             }
+#endif

             string inputName;


forget

forget

--- LogArchive/ViewModels/Messages/ScreenshotMessage.cs
+++ LogArchive/ViewModels/Messages/ScreenshotMessage.cs
@@ -1,23 +1,23 @@
-using Livet.Messaging;
-using System.Windows;
-
-namespace LogArchive.ViewModels.Messages
-{
-	internal class ScreenshotMessage : ResponsiveInteractionMessage<Processing>
-	{
-		public ScreenshotMessage() { }
-		public ScreenshotMessage(string messageKey) : base(messageKey) { }
-
-		public string Path { get; set; }
-
-		protected override Freezable CreateInstanceCore()
-		{
-			return new ScreenshotMessage()
-			{
-				MessageKey = this.MessageKey,
-				Path = this.Path,
-				Response = this.Response,
-			};
-		}
-	}
-}
+using Livet.Messaging;
+using System.Windows;
+
+namespace LogArchive.ViewModels.Messages
+{
+	internal class ScreenshotMessage : ResponsiveInteractionMessage<Processing>
+	{
+		public ScreenshotMessage() { }
+		public ScreenshotMessage(string messageKey) : base(messageKey) { }
+
+		public string Path { get; set; }
+
+		protected override Freezable CreateInstanceCore()
+		{
+			return new ScreenshotMessage()
+			{
+				MessageKey = this.MessageKey,
+				Path = this.Path,
+				Response = this.Response,
+			};
+		}
+	}
+}


Empfang von MoCoBus-Frames angepasst

Empfang von MoCoBus-Frames angepasst

--- MDKControl.Core/Services/BleMoCoBusDeviceService.cs
+++ MDKControl.Core/Services/BleMoCoBusDeviceService.cs
@@ -15,7 +15,7 @@
     {
         private readonly Ble.IAdapter _adapter;
         private readonly AutoResetEvent _newRxBytesReceived = new AutoResetEvent(false);
-        private readonly ConcurrentQueue<byte> _rxBytesQueue = new ConcurrentQueue<byte>();
+        private readonly ConcurrentQueue<byte[]> _rxBytesQueue = new ConcurrentQueue<byte[]>();
         private Ble.IDevice _device;
         private Ble.ICharacteristic _moCoBusRxCharacteristic;
         private Ble.IService _moCoBusService;
@@ -78,12 +78,9 @@
         private void MoCoBusRxCharacteristicOnValueUpdated(object sender, Ble.CharacteristicReadEventArgs e)
         {
             Debug.Assert(e.Characteristic.Value != null, "e.Characteristic.Value != null");
-
-            foreach (var b in e.Characteristic.Value)
-            {
-                _rxBytesQueue.Enqueue(b);
-            }
             Debug.WriteLine(string.Join(":", e.Characteristic.Value.Select(x => x.ToString("X2")).ToArray()));
+
+            _rxBytesQueue.Enqueue(e.Characteristic.Value);
             _newRxBytesReceived.Set();
         }

@@ -114,10 +111,13 @@
             return await Task.Factory.StartNew(() =>
                 {
                     _newRxBytesReceived.WaitOne();
-                    MoCoBusFrame frame;
-                    if (MoCoBusFrame.TryParse(_rxBytesQueue.ToArray(), out frame))
-                    {
-                        return frame;
+                    byte[] bytes;
+                    if (_rxBytesQueue.TryDequeue(out bytes)) {
+                        MoCoBusFrame frame;
+                        if (MoCoBusFrame.TryParse(bytes, out frame))
+                        {
+                            return frame;
+                        }
                     }
                     return (MoCoBusFrame)null;
                 }).ConfigureAwait(false);