Fix build breaks in Extensions

Fix build breaks in Extensions

--- Assets/HoloToolkit/Utilities/Scripts/Extensions/Extensions.cs
+++ Assets/HoloToolkit/Utilities/Scripts/Extensions/Extensions.cs
@@ -1,6 +1,10 @@
 // Copyright (c) Microsoft Corporation. All rights reserved.
 // Licensed under the MIT License. See LICENSE in the project root for license information.

+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
 using UnityEngine;

 namespace HoloToolkit.Unity
@@ -82,7 +86,7 @@

                 if (effectiveComparer.Compare(element, nextElement) > 0)
                 {
-                    Assert.Fail(DiagnosticContext.Create(), "elements must already be sorted to call this method.");
+                    Debug.Assert(false, "elements must already be sorted to call this method.");
                     break;
                 }
             }
@@ -203,7 +207,7 @@

             public ReverseComparer(IComparer<TElement> originalComparer)
             {
-                Assert.IsTrue(DiagnosticContext.Create(), originalComparer != null, "originalComparer cannot be null.");
+                Debug.Assert(originalComparer != null, "originalComparer cannot be null.");

                 this.originalComparer = originalComparer;
             }


Changed info to v0.8

Changed info to v0.8

--- AngleSharp/Properties/AssemblyInfo.cs
+++ AngleSharp/Properties/AssemblyInfo.cs
@@ -7,10 +7,10 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("AngleVisions")]
 [assembly: AssemblyProduct("AngleSharp")]
-[assembly: AssemblyCopyright("Copyright © Florian Rappl et al. 2013-2014")]
+[assembly: AssemblyCopyright("Copyright © Florian Rappl et al. 2013-2015")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
-[assembly: InternalsVisibleToAttribute("UnitTests")]
-[assembly: AssemblyVersion("0.7.0.*")]
-[assembly: AssemblyFileVersion("0.7.0")]+[assembly: InternalsVisibleToAttribute("AngleSharp.Core.Tests")]
+[assembly: AssemblyVersion("0.8.0.*")]
+[assembly: AssemblyFileVersion("0.8.0")]


Fully quality Carbon.Json instead of System.Text

--- src/Amazon.DynamoDb/DynamoDbClient.cs
+++ src/Amazon.DynamoDb/DynamoDbClient.cs
@@ -5,8 +5,6 @@
 using System.Threading.Tasks;

 using Amazon.Scheduling;
-
-using Carbon.Json;

 namespace Amazon.DynamoDb
 {
@@ -104,8 +102,8 @@
 			}
 			*/

-            var requestJson = new JsonObject {
-                { "RequestItems", new JsonObject(batches.Select(b => b.ToJson())) }
+            var requestJson = new Carbon.Json.JsonObject {
+                { "RequestItems", new Carbon.Json.JsonObject(batches.Select(b => b.ToJson())) }
             };

             var httpRequest = Setup("BatchWriteItem", requestJson);
@@ -198,7 +196,7 @@

             string responseText = await SendAsync(httpRequest).ConfigureAwait(false);

-            return System.Text.Json.JsonSerializer.Deserialize<CountResult>(responseText);
+            return JsonSerializer.Deserialize<CountResult>(responseText);
         }

         public async Task<QueryResult> ScanAsync(ScanRequest request)
@@ -258,9 +256,9 @@

         #region Helpers

-        private async Task<TResult> HandleRequestAsync<TRequest, TResult>(string apiName, TRequest request)
-        {
-            var httpRequest = Setup(apiName, System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(request));
+        private async Task<TResult> HandleRequestAsync<TRequest, TResult>(string action, TRequest request)
+        {
+            var httpRequest = Setup(action, JsonSerializer.SerializeToUtf8Bytes(request));

             return await SendAndReadObjectAsync<TResult>(httpRequest).ConfigureAwait(false);
         }
@@ -278,7 +276,7 @@

             using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);

-            return await System.Text.Json.JsonSerializer.DeserializeAsync<JsonElement>(stream).ConfigureAwait(false);
+            return await JsonSerializer.DeserializeAsync<JsonElement>(stream).ConfigureAwait(false);
         }

         private async Task<T> SendAndReadObjectAsync<T>(HttpRequestMessage request)
@@ -294,17 +292,17 @@

             using var stream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false);

-            return await System.Text.Json.JsonSerializer.DeserializeAsync<T>(stream, serializerOptions).ConfigureAwait(false);
-        }
-
-        private HttpRequestMessage Setup(string action, JsonObject jsonContent)
-        {
-            if (jsonContent == null)
+            return await JsonSerializer.DeserializeAsync<T>(stream, serializerOptions).ConfigureAwait(false);
+        }
+
+        private HttpRequestMessage Setup(string action, Carbon.Json.JsonObject jsonContent)
+        {
+            if (jsonContent is null)
             {
                 return Setup(action, (byte[]?)null);
             }

-            return Setup(action, System.Text.Json.JsonSerializer.SerializeToUtf8Bytes(jsonContent));
+            return Setup(action, JsonSerializer.SerializeToUtf8Bytes(jsonContent));
         }

         private HttpRequestMessage Setup(string action, byte[]? utf8Json)


Implement simulated GetOrder

Implement simulated GetOrder

--- BittrexSharp/BittrexOrderSimulation/BittrexOrderSimulation.cs
+++ BittrexSharp/BittrexOrderSimulation/BittrexOrderSimulation.cs
@@ -153,5 +153,23 @@
                 Currency = currency
             };
         }
+
+        public override async Task<Order> GetOrder(string orderId)
+        {
+            var openOrder = simulatedOpenOrders.SingleOrDefault(o => o.OrderUuid == orderId);
+            if (openOrder == null) return simulatedFinishedOrders.SingleOrDefault(o => o.OrderUuid == orderId);
+
+            return new Order
+            {
+                Closed = openOrder.Closed,
+                Exchange = openOrder.Exchange,
+                Limit = openOrder.Limit,
+                Opened = openOrder.Opened,
+                OrderUuid = openOrder.OrderUuid,
+                Price = openOrder.Price,
+                PricePerUnit = openOrder.PricePerUnit,
+                Quantity = openOrder.Quantity
+            };
+        }
     }
 }


Improved comment

Improved comment

--- BudgetAnalyser.Engine/Reports/CustomAggregateBurnDownGraph.cs
+++ BudgetAnalyser.Engine/Reports/CustomAggregateBurnDownGraph.cs
@@ -3,6 +3,9 @@

 namespace BudgetAnalyser.Engine.Reports
 {
+    /// <summary>
+    /// A data storage to store a burn down graph that combines multiple buckets.
+    /// </summary>
     public class CustomAggregateBurnDownGraph
     {
         [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "Required for serialisation")]


that seemed copy pasted for some reason

that seemed copy pasted for some reason

--- src/AutoMapper/Internal/TypeHelper.cs
+++ src/AutoMapper/Internal/TypeHelper.cs
@@ -1,169 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-
-namespace AutoMapper.Internal
-{
-#if NET45 || NET40
-    using System.Reflection.Emit;
-#endif
-
-    public static class TypeHelper
-    {
-        public static bool Has<TAttribute>(Type type) where TAttribute : Attribute => type.GetTypeInfo().IsDefined(typeof(TAttribute), inherit: false);
-
-        public static Type GetGenericTypeDefinitionIfGeneric(Type type) => type.IsGenericType() ? type.GetGenericTypeDefinition() : type;
-
-        public static Type[] GetGenericArguments(Type type) => type.GetTypeInfo().GenericTypeArguments;
-
-        public static Type[] GetGenericParameters(Type type) => type.GetGenericTypeDefinition().GetTypeInfo().GenericTypeParameters;
-
-        public static IEnumerable<ConstructorInfo> GetDeclaredConstructors(Type type) => type.GetTypeInfo().DeclaredConstructors;
-
-#if NET45 || NET40
-        public static Type CreateType(TypeBuilder type)
-        {
-#if NET40
-            return type.CreateType();
-#else
-            return type.CreateTypeInfo().AsType();
-#endif
-        }
-#endif
-
-        public static IEnumerable<MemberInfo> GetDeclaredMembers(Type type) => type.GetTypeInfo().DeclaredMembers;
-
-        public static IEnumerable<MemberInfo> GetAllMembers(Type type)
-        {
-            while (true)
-            {
-                foreach (var memberInfo in type.GetTypeInfo().DeclaredMembers)
-                {
-                    yield return memberInfo;
-                }
-
-                type = type.BaseType();
-
-                if (type == null)
-                {
-                    yield break;
-                }
-            }
-        }
-
-        public static MemberInfo[] GetMember(Type type, string name)
-        {
-            return type.GetAllMembers().Where(mi => mi.Name == name).ToArray();
-        }
-
-        public static IEnumerable<MethodInfo> GetDeclaredMethods(Type type) => type.GetTypeInfo().DeclaredMethods;
-
-        public static MethodInfo GetDeclaredMethod(Type type, string name)
-        {
-            return type.GetAllMethods().FirstOrDefault(mi => mi.Name == name);
-        }
-
-        public static MethodInfo GetDeclaredMethod(Type type, string name, Type[] parameters)
-        {
-            return type
-                .GetAllMethods()
-                .Where(mi => mi.Name == name)
-                .Where(mi => mi.GetParameters().Length == parameters.Length)
-                .FirstOrDefault(mi => mi.GetParameters().Select(pi => pi.ParameterType).SequenceEqual(parameters));
-        }
-
-        public static ConstructorInfo GetDeclaredConstructor(Type type, Type[] parameters)
-        {
-            return type
-                .GetTypeInfo()
-                .DeclaredConstructors
-                .Where(mi => mi.GetParameters().Length == parameters.Length)
-                .FirstOrDefault(mi => mi.GetParameters().Select(pi => pi.ParameterType).SequenceEqual(parameters));
-        }
-
-        public static IEnumerable<MethodInfo> GetAllMethods(Type type) => type.GetRuntimeMethods();
-
-        public static IEnumerable<PropertyInfo> GetDeclaredProperties(Type type) => type.GetTypeInfo().DeclaredProperties;
-
-        public static PropertyInfo GetDeclaredProperty(Type type, string name)
-            => type.GetTypeInfo().GetDeclaredProperty(name);
-
-        public static object[] GetCustomAttributes(Type type, Type attributeType, bool inherit)
-            => type.GetTypeInfo().GetCustomAttributes(attributeType, inherit).Cast<object>().ToArray();
-
-        public static bool IsStatic(FieldInfo fieldInfo) => fieldInfo?.IsStatic ?? false;
-
-        public static bool IsStatic(PropertyInfo propertyInfo) => propertyInfo?.GetGetMethod(true)?.IsStatic
-                                                                       ?? propertyInfo?.GetSetMethod(true)?.IsStatic
-                                                                       ?? false;
-
-        public static bool IsStatic(MemberInfo memberInfo) => (memberInfo as FieldInfo).IsStatic()
-                                                                   || (memberInfo as PropertyInfo).IsStatic()
-                                                                   || ((memberInfo as MethodInfo)?.IsStatic
-                                                                       ?? false);
-
-        public static bool IsPublic(PropertyInfo propertyInfo) => (propertyInfo?.GetGetMethod(true)?.IsPublic ?? false)
-                                                                       || (propertyInfo?.GetSetMethod(true)?.IsPublic ?? false);
-
-        public static IEnumerable<PropertyInfo> PropertiesWithAnInaccessibleSetter(Type type)
-        {
-            return type.GetDeclaredProperties().Where(pm => pm.HasAnInaccessibleSetter());
-        }
-
-        public static bool HasAnInaccessibleSetter(PropertyInfo property)
-        {
-            var setMethod = property.GetSetMethod(true);
-            return setMethod == null || setMethod.IsPrivate || setMethod.IsFamily;
-        }
-
-        public static bool IsPublic(MemberInfo memberInfo) => (memberInfo as FieldInfo)?.IsPublic ?? (memberInfo as PropertyInfo).IsPublic();
-
-        public static bool IsNotPublic(ConstructorInfo constructorInfo) => constructorInfo.IsPrivate
-                                                                                || constructorInfo.IsFamilyAndAssembly
-                                                                                || constructorInfo.IsFamilyOrAssembly
-                                                                                || constructorInfo.IsFamily;
-
-        public static Assembly Assembly(Type type) => type.GetTypeInfo().Assembly;
-
-        public static Type BaseType(Type type) => type.GetTypeInfo().BaseType;
-
-        public static bool IsAssignableFrom(Type type, Type other) => type.GetTypeInfo().IsAssignableFrom(other.GetTypeInfo());
-
-        public static bool IsAbstract(Type type) => type.GetTypeInfo().IsAbstract;
-
-        public static bool IsClass(Type type) => type.GetTypeInfo().IsClass;
-
-        public static bool IsEnum(Type type) => type.GetTypeInfo().IsEnum;
-
-        public static bool IsGenericType(Type type) => type.GetTypeInfo().IsGenericType;
-
-        public static bool IsGenericTypeDefinition(Type type) => type.GetTypeInfo().IsGenericTypeDefinition;
-
-        public static bool IsInterface(Type type) => type.GetTypeInfo().IsInterface;
-
-        public static bool IsPrimitive(Type type) => type.GetTypeInfo().IsPrimitive;
-
-        public static bool IsSealed(Type type) => type.GetTypeInfo().IsSealed;
-
-        public static bool IsValueType(Type type) => type.GetTypeInfo().IsValueType;
-
-        public static bool IsInstanceOfType(Type type, object o) => o != null && type.GetTypeInfo().IsAssignableFrom(o.GetType().GetTypeInfo());
-
-        public static ConstructorInfo[] GetConstructors(Type type) => type.GetTypeInfo().DeclaredConstructors.ToArray();
-
-        public static PropertyInfo[] GetProperties(Type type) => type.GetRuntimeProperties().ToArray();
-
-#if NET40
-        public static MethodInfo GetGetMethod(PropertyInfo propertyInfo, bool ignored) => propertyInfo.GetGetMethod();
-
-        public static MethodInfo GetSetMethod(PropertyInfo propertyInfo, bool ignored) => propertyInfo.GetSetMethod();
-#else
-        public static MethodInfo GetGetMethod(PropertyInfo propertyInfo, bool ignored) => propertyInfo.GetMethod;
-
-        public static MethodInfo GetSetMethod(PropertyInfo propertyInfo, bool ignored) => propertyInfo.SetMethod;
-#endif
-
-        public static FieldInfo GetField(Type type, string name) => type.GetRuntimeField(name);
-    }
-}


Fix  auto property accessors.

Fix  auto property accessors.

Automatically implemented properties must define both get and set
accessors.

--- src/Autofac.Extras.NLog/NullLogger.cs
+++ src/Autofac.Extras.NLog/NullLogger.cs
@@ -6,14 +6,14 @@
     public class NullLogger :ILogger
     {
         public event EventHandler<EventArgs> LoggerReconfigured;
-        public string Name { get; }
-        public LogFactory Factory { get; }
-        public bool IsTraceEnabled { get; }
-        public bool IsDebugEnabled { get; }
-        public bool IsInfoEnabled { get; }
-        public bool IsWarnEnabled { get; }
-        public bool IsErrorEnabled { get; }
-        public bool IsFatalEnabled { get; }
+        public string Name { get; set; }
+        public LogFactory Factory { get; set; }
+        public bool IsTraceEnabled { get; set; }
+        public bool IsDebugEnabled { get; set; }
+        public bool IsInfoEnabled { get; set; }
+        public bool IsWarnEnabled { get; set; }
+        public bool IsErrorEnabled { get; set; }
+        public bool IsFatalEnabled { get; set; }

         public bool IsEnabled(LogLevel level)
         {


Update for 2.1.401 RTM

Update for 2.1.401 RTM

--- AspNetCoreSdkTests/Util/DotNetUtil.cs
+++ AspNetCoreSdkTests/Util/DotNetUtil.cs
@@ -35,7 +35,6 @@

         public static bool IsPreReleaseSdk =>
             SdkVersion.IsPrerelease ||
-            SdkVersion == new SemanticVersion(2, 1, 401) ||
             SdkVersion == new SemanticVersion(2, 1, 402);

         public static string TargetFrameworkMoniker => $"netcoreapp{RuntimeVersion.Major}.{RuntimeVersion.Minor}";


Pass "--debug:ephemeral-hive" to "dotnet new"

--- AspNetCoreSdkTests/Util/DotNetUtil.cs
+++ AspNetCoreSdkTests/Util/DotNetUtil.cs
@@ -59,7 +59,9 @@
             // Clear all packages sources by default.  May be overridden by NuGetPackageSource parameter.
             File.WriteAllText(Path.Combine(workingDirectory, "NuGet.config"), _clearPackageSourcesNuGetConfig);

-            return RunDotNet($"new {template} --name {template} --output . --no-restore", workingDirectory);
+            // Pass "--debug:ephemeral-hive" to build template contents in-memory, rather than using the default
+            // "%UserProfile%\.templateengine" cache, which may be out-of-date when testing newer builds with the same version.
+            return RunDotNet($"new {template} --name {template} --output . --no-restore --debug:ephemeral-hive", workingDirectory);
         }

         public static string Restore(string workingDirectory, NuGetPackageSource packageSource, RuntimeIdentifier runtimeIdentifier)


fix road enum names

fix road enum names

turns out lots of them are still wrong by the way

--- Assets/MapzenGo/Helpers/Extensions.cs
+++ Assets/MapzenGo/Helpers/Extensions.cs
@@ -18,7 +18,7 @@
             {"country",PlaceType.Country},
             {"farm",PlaceType.Farm},
             {"hamlet",PlaceType.Hamlet},
-            {"historicPlace",PlaceType.HistoricPlace},
+            {"historic_place",PlaceType.HistoricPlace},
             {"isolatedDwelling",PlaceType.IsolatedDwelling},
             {"locality",PlaceType.Locality},
             {"macrohood",PlaceType.Macrohood},
@@ -208,8 +208,8 @@
             {"exit"       , RoadType.Exit},
             {"ferry"      , RoadType.Ferry},
             {"highway"    , RoadType.Highway},
-            {"major_Road" , RoadType.Major_Road},
-            {"minor_Road" , RoadType.Minor_Road},
+            {"major_road" , RoadType.Major_Road},
+            {"minor_road" , RoadType.Minor_Road},
             {"path"       , RoadType.Path},
             {"piste"      , RoadType.Piste},
             {"racetrack"  , RoadType.Racetrack},
@@ -383,6 +383,9 @@

         public static RoadType ConvertToRoadType(this string value)
         {
+            if(value.StartsWith("f"))
+                Debug.Log("here");
+
             if (RoadTypes.ContainsKey(value))
                 return RoadTypes[value];
             return RoadType.Path;


Fixed checkpoint gizmo

Fixed checkpoint gizmo

--- Assets/Scripts/SaveLoad/Checkpoint.cs
+++ Assets/Scripts/SaveLoad/Checkpoint.cs
@@ -23,9 +23,8 @@
 			hitCheckpoint();
 		}
 	}
-
-
-
+
+
 	private void hitCheckpoint()
 	{
 		Debug.Log("Player hit checkpoint '" + gameObject.name + "' with the instanceID " + gameObject.GetInstanceID());
@@ -33,49 +32,32 @@
 		SaveLoad.Save(LevelManager.currentLevelName);
         SaveLoad.SaveToFile(saveFileName);
 	}
-
-
-
+
+
+
+    // Draw the checkpoint gizmo
     protected virtual void OnDrawGizmos()
     {
     	// Variables:
     	float lineHeight = 2f;
     	float triangleLength = lineHeight/4;
-
-		// Starting position:
+        Gizmos.color = Color.red;
+
+		// Positions for the line:
         Vector3 startingPosition = transform.position;
-
-        // Draw line:
-		Vector3 endPosition = startingPosition + new Vector3(0, lineHeight, 0);
-		Gizmos.color = Color.red;
+        Vector3 endPosition = startingPosition + new Vector3(0, lineHeight, 0); // also used for the triangle
+
+        // Positions for the triangle
+        Vector3 triangleTip = new Vector3(endPosition.x + triangleLength, endPosition.y-triangleLength, endPosition.z);
+        Vector3 triangleBottom = new Vector3(endPosition.x, endPosition.y-triangleLength, endPosition.z);
+
+        // Draw the line:
 		Gizmos.DrawLine(startingPosition, endPosition);
-
-		// Draw mesh:
-		Mesh mesh = new Mesh();
-		mesh.vertices = new Vector3[3]
-		{
-			new Vector3(0f, -triangleLength, 0f),
-			new Vector3(triangleLength, 0f, 0f),
-			new Vector3(0f, triangleLength, 0f)
-		};
-		mesh.triangles = new int[]
-		{
-			0, 1, 2
-		};
-		mesh.normals = new Vector3[]
-		{
-			Vector3.forward,
-			Vector3.forward,
-			Vector3.forward
-		};
-		mesh.colors = new Color[]
-		{
-			Color.red,
-			Color.red,
-			Color.red
-		};
-		Graphics.DrawMeshNow(mesh, endPosition, Quaternion.identity);
-		DestroyImmediate(mesh);
+
+        // Draw the triangle
+        Gizmos.DrawLine(endPosition, triangleTip);
+        Gizmos.DrawLine(triangleTip, triangleBottom);
     }

+
 }


Fixed the !bomb chat box not scrolling.

Fixed the !bomb chat box not scrolling.

--- Assets/Scripts/UI/TwitchBombHandle.cs
+++ Assets/Scripts/UI/TwitchBombHandle.cs
@@ -56,6 +56,11 @@
             mainWindowTransform.localPosition -= new Vector3(0, 160.0f * bombID, 0);
             highlightTransform.localPosition -= new Vector3(0, 160.0f * bombID, 0);
         }
+    }
+
+    private void LateUpdate()
+    {
+        messageScroll.verticalNormalizedPosition = 0.0f;
     }
     #endregion


KMGameInfo.State.Gameplay is too late for change widget count.

--- Assets/Scripts/WidgetExpandService.cs
+++ Assets/Scripts/WidgetExpandService.cs
@@ -118,8 +118,6 @@

         KMGameInfo gameInfoComponent = GetComponent<KMGameInfo>();
         gameInfoComponent.OnStateChange += OnStateChange;
-
-        ReadSettings();
     }

     private void LateUpdate()
@@ -143,18 +141,15 @@
     private void OnStateChange(KMGameInfo.State state)
     {
         DebugLog("Game State changed to {0}", state.ToString());
-        _refreshWidgetCount = _refreshWidgetCount || state == KMGameInfo.State.Gameplay;
+        _refreshWidgetCount = _refreshWidgetCount || state == KMGameInfo.State.Transitioning;
         _state = state;

         if (state == KMGameInfo.State.Transitioning)
         {
-
+            ReadSettings();
+            _refreshWidgetCount &= _modSettings.allowWidgetCountChange;
             SetCustomIndicators(_modSettings.allowCustomIndicators);
-        }
-
-        if (_refreshWidgetCount && _modSettings.allowSerialNumberChange)
-        {
-            StartCoroutine(ReplaceSerialNumber());
+            StartCoroutine(ReplaceSerialNumber(_modSettings.allowSerialNumberChange));
         }
     }

@@ -236,11 +231,16 @@
         _refreshWidgetCount = false;
     }

-    IEnumerator ReplaceSerialNumber()
-    {
-        if (_state != KMGameInfo.State.Gameplay) yield break;
+    IEnumerator ReplaceSerialNumber(bool allowed)
+    {
+        if (!allowed) yield break;
         object serialNumber = null;
-        yield return new WaitUntil(() => { serialNumber = FindObjectOfType(_serialNumberType); return serialNumber != null; });
+        yield return new WaitUntil(() =>
+        {
+            serialNumber = FindObjectOfType(_serialNumberType);
+            return serialNumber != null || _state == KMGameInfo.State.Setup || _state == KMGameInfo.State.PostGame;
+        });
+        if (serialNumber == null) yield break;

         DebugLog("Replacing serial number...");
         foreach (var sn in FindObjectsOfType(_serialNumberType))


Improve generated code for method and ctor invocations in C generator.

--- binder/Generators/C/CSources.cs
+++ binder/Generators/C/CSources.cs
@@ -221,13 +221,20 @@
             var methodId = GeneratedIdentifier("method");
             WriteLine ($"static MonoMethod *{methodId} = 0;");

+            NewLine();
+
+            WriteLine($"if (!{methodId})");
+            WriteStartBraceIndent();
+
             var @class = method.Namespace as Class;
+            var classLookupId = GeneratedIdentifier(string.Format("lookup_class_{0}",
+                @class.QualifiedName.Replace('.', '_')));
+            WriteLine($"{classLookupId}();");
+
             var classId = string.Format("{0}_class", @class.QualifiedName);
-
-            var retType = method.ReturnType;
-
-            WriteLine("if ({0} == 0)", methodId);
-            WriteLineIndent ($"{methodId} = __method_lookup ({methodNameId}, {classId});");
+            WriteLine($"{methodId} = __method_lookup({methodNameId}, {classId});");
+
+            WriteCloseBraceIndent();
         }

         public enum MonoObjectFieldUsage
@@ -275,6 +282,7 @@
         public void GenerateMethodInvocation(Method method)
         {
             GenerateMethodGCHandleLookup(method);
+            NewLine();

             var paramsToMarshal = method.Parameters.Where(p => !p.IsImplicit);
             var numParamsToMarshal = paramsToMarshal.Count();
@@ -321,9 +329,10 @@

             WriteLine("{0} = mono_runtime_invoke({1}, {2}, {3}, &{4});", resultId,
                 methodId, instanceId, argsId, exceptionId);
+            NewLine();

             WriteLine("if ({0} != 0)", exceptionId);
-            WriteLineIndent ($"__method_exception_thrown ({exceptionId});");
+            WriteLineIndent ($"__method_exception_thrown({exceptionId});");

             foreach (var marshalContext in contexts)
             {
@@ -340,17 +349,14 @@
             NewLine();
             WriteStartBraceIndent();

-            var @class = method.Namespace as Class;
-            var classLookupId = GeneratedIdentifier(string.Format("lookup_class_{0}",
-                @class.QualifiedName.Replace('.', '_')));
-            WriteLine("{0}();", classLookupId);
-
             GenerateMethodLookup(method);
+            NewLine();

             var retType = method.ReturnType;
             var needsReturn = !retType.Type.IsPrimitiveType(PrimitiveType.Void);

             GenerateMethodInvocation(method);
+            NewLine();

             string returnCode = "0";


Compression: Fix argument check ordering.

--- src/Compression/BZip2DecoderStream.cs
+++ src/Compression/BZip2DecoderStream.cs
@@ -148,14 +148,14 @@
         /// <returns>The number of bytes read.</returns>
         public override int Read(byte[] buffer, int offset, int count)
         {
+            if (buffer == null)
+            {
+                throw new ArgumentNullException("buffer");
+            }
+
             if (buffer.Length < offset + count)
             {
                 throw new ArgumentException("Buffer smaller than declared");
-            }
-
-            if (buffer == null)
-            {
-                throw new ArgumentNullException("buffer");
             }

             if (offset < 0)


Modification such that template PO files (where all msgstr elements are empty) are considered as unavailable. These .PO files are generated by the gettext merge mechanism as a result of the CreateEmptyMessages mechanism and so duping the GetLanguageIfAvailable into thinking valid translation are available when they aren't. At least one msgstr must now exist in a PO file for it to be used.

--- src/i18n/LocalizingService.cs
+++ src/i18n/LocalizingService.cs
@@ -54,27 +54,31 @@

         private static string GetLanguageIfAvailable(string culture)
         {
+        // Note that there is no need to serialize access to HttpRuntime.Cache when just reading from it.
+        //
             culture = culture.ToLowerInvariant();

             var cacheKey = string.Format("po:{0}", culture);

-            lock (Sync)
-            {
-                if (HttpRuntime.Cache[cacheKey] != null)
-                {
-                    // This language is already available
-                    return ((List<I18NMessage>)HttpRuntime.Cache[cacheKey]).Count > 0 ? culture : null;
-                }
-            }
-
-            if (LoadMessages(culture) && ((List<I18NMessage>)HttpRuntime.Cache[cacheKey]).Count > 0)
-            {
-                return culture;
-            }
-
-            // Avoid shredding the disk looking for non-existing files
-            CreateEmptyMessages(culture);
-            return null;
+            List<I18NMessage> messages = (List<I18NMessage>)HttpRuntime.Cache[cacheKey];
+
+            // If messages not yet loaded in for the language
+            if (messages == null)
+            {
+                // Attempt to load messages, and if failed (because PO file doesn't exist)
+                if (!LoadMessages(culture))
+                {
+                    // Avoid shredding the disk looking for non-existing files
+                    CreateEmptyMessages(culture);
+                    return null;
+                }
+
+                // Address messages just loaded.
+                messages = (List<I18NMessage>)HttpRuntime.Cache[cacheKey];
+            }
+
+            // The language is considered to be available if one or more message strings exist.
+            return ((List<I18NMessage>)HttpRuntime.Cache[cacheKey]).Count > 0 ? culture : null;
         }

         /// <summary>
@@ -220,7 +224,12 @@

                             sb.Clear();
                             ParseBody(fs, line, sb, message, quoted);
-                            messages.Add(message);
+                            // Only if a msgstr (translation) is provided for this entry do we add an entry to the cache.
+                            // This conditions facilitates more useful operation of the GetLanguageIfAvailable method,
+                            // which prior to this condition was indicating a language was available when in fact there
+                            // were zero translation in the PO file (it having been autogenerated during gettext merge).
+                            if (!string.IsNullOrWhiteSpace(message.MsgStr)) {
+                                messages.Add(message); }
                         }
                         else if (line.StartsWith("msgid"))
                         {
@@ -228,7 +237,7 @@
                         }
                     }

-                    lock (Sync)
+                    //lock (Sync)
                     {
                         // If the file changes we want to be able to rebuild the index without recompiling
                         HttpRuntime.Cache.Insert(string.Format("po:{0}", culture), messages, new CacheDependency(path));


repaired batch API

repaired batch API

--- BatchGbViewer/BatchGbViewer/Models.cs
+++ BatchGbViewer/BatchGbViewer/Models.cs
@@ -8,8 +8,8 @@
 {
    public class Batch
    {
-      public string ID { get; set; }
-      public string BatchName { get; set; }
+      public string BatchID { get; set; }
+      public string Name { get; set; }
       public string Technology { get; set; }
       public DateTime StartDateFrom { get; set; }
       public DateTime StartDateTo { get; set; }


Scan subdirectories for plugins

Scan subdirectories for plugins

--- BepInEx.Hacknet/HacknetChainloader.cs
+++ BepInEx.Hacknet/HacknetChainloader.cs
@@ -117,7 +117,7 @@
                 var newPluginPath = Path.Combine(info.GetFullFolderPath(), "Plugins");
                 var newConfigPath = Path.Combine(newPluginPath, "Configs");

-                if (Directory.Exists(newPluginPath) && Directory.GetFiles(newPluginPath).Length > 0)
+                if (Directory.Exists(newPluginPath) && Directory.GetFiles(newPluginPath, "*.dll", SearchOption.AllDirectories).Length > 0)
                 {
                     PluginPathSetter.Invoke(null, new object[] { newPluginPath });
                     ConfigPathSetter.Invoke(null, new object[] { newConfigPath });


Fix type in log msgs

Fix type in log msgs

--- Engine/Setup/BrokerageSetupHandler.cs
+++ Engine/Setup/BrokerageSetupHandler.cs
@@ -224,7 +224,7 @@
                 algorithm.Transactions.SetOrderProcessor(transactionHandler);
                 algorithm.PostInitialize();

-                Log.Trace("BrokerageSetupHander.Setup(): Connecting to brokerage...");
+                Log.Trace("BrokerageSetupHandler.Setup(): Connecting to brokerage...");
                 try
                 {
                     // this can fail for various reasons, such as already being logged in somewhere else
@@ -245,7 +245,7 @@
                     return false;
                 }

-                Log.Trace("BrokerageSetupHander.Setup(): Fetching cash balance from brokerage...");
+                Log.Trace("BrokerageSetupHandler.Setup(): Fetching cash balance from brokerage...");
                 try
                 {
                     // set the algorithm's cash balance for each currency
@@ -263,7 +263,7 @@
                     return false;
                 }

-                Log.Trace("BrokerageSetupHander.Setup(): Fetching open orders from brokerage...");
+                Log.Trace("BrokerageSetupHandler.Setup(): Fetching open orders from brokerage...");
                 try
                 {
                     // populate the algorithm with the account's outstanding orders
@@ -283,7 +283,7 @@
                     return false;
                 }

-                Log.Trace("BrokerageSetupHander.Setup(): Fetching holdings from brokerage...");
+                Log.Trace("BrokerageSetupHandler.Setup(): Fetching holdings from brokerage...");
                 try
                 {
                     // populate the algorithm with the account's current holdings
@@ -333,7 +333,7 @@
                     return false;
                 }

-                Log.Trace("BrokerageSetupHander.Setup(): Ensuring currency data feeds present...");
+                Log.Trace("BrokerageSetupHandler.Setup(): Ensuring currency data feeds present...");

                 // call this after we've initialized everything from the brokerage since we may have added some holdings/currencies
                 algorithm.Portfolio.CashBook.EnsureCurrencyDataFeeds(algorithm.Securities, algorithm.SubscriptionManager, SecurityExchangeHoursProvider.FromDataFolder());


Small result fix

Small result fix

Said you lost when you really won


Spelling error

Spelling error


Try fix

Try fix


moving timestamp to ValueData2

moving timestamp to ValueData2


size of icons

size of icons


Skip broken firestore tests.

Skip broken firestore tests.

--- firestore/api/FirestoreTest/FirestoreTest.cs
+++ firestore/api/FirestoreTest/FirestoreTest.cs
@@ -67,8 +67,8 @@
                     GZipEnabled = true,
                     Initializers = { credential },
                 });
-            string uriString = "https://firestore.googleapis.com/v1beta1/projects/"
-            + Environment.GetEnvironmentVariable("FIRESTORE_PROJECT_ID")
+            string uriString = "https://firestore.googleapis.com/v1beta1/projects/"
+            + Environment.GetEnvironmentVariable("FIRESTORE_PROJECT_ID")
             + "/databases/(default)/indexes";
             UriBuilder uri = new UriBuilder(uriString);
             var resultText = http.GetAsync(uri.Uri).Result.Content
@@ -581,7 +581,7 @@
             Assert.DoesNotContain("Document BJ returned by query State=CA and Name=San Francisco", output.Stdout);
         }

-        [Fact]
+        [Fact(Skip = "b/137857855")]
         public void CompositeIndexChainedQueryTest()
         {
             var manageIndexesOutput = RunManageIndexes("create-indexes", Environment.GetEnvironmentVariable("FIRESTORE_PROJECT_ID"));
@@ -649,7 +649,7 @@
             Assert.DoesNotContain("Document BJ returned by order by name descending with limit query", output.Stdout);
         }

-        [Fact]
+        [Fact(Skip = "b/137857855")]
         public void OrderByStateAndPopulationQueryTest()
         {
             var manageIndexesOutput = RunManageIndexes("create-indexes", Environment.GetEnvironmentVariable("FIRESTORE_PROJECT_ID"));
@@ -803,7 +803,7 @@
             Assert.DoesNotContain("Document DC returned by paginated query cursor.", output.Stdout);
         }

-        [Fact]
+        [Fact(Skip = "b/137857855")]
         public void MultipleCursorConditionsTest()
         {
             var manageIndexesOutput = RunManageIndexes("create-indexes", Environment.GetEnvironmentVariable("FIRESTORE_PROJECT_ID"));


Bugfix: WaitForIsComplete should return false when timed out

--- Core/OfficeDevPnP.Core/AppModelExtensions/TenantExtensions.cs
+++ Core/OfficeDevPnP.Core/AppModelExtensions/TenantExtensions.cs
@@ -695,7 +695,7 @@
                 {
                     if (timeoutFunction(operationMessage))
                     {
-                        succeeded = true;
+                        succeeded = false;
                         break;
                     }
                 }


async await?

async await?

--- Dialog/artm.MvxPlugins.Dialog.Droid/Services/DialogService.cs
+++ Dialog/artm.MvxPlugins.Dialog.Droid/Services/DialogService.cs
@@ -93,7 +93,7 @@

         }

-        public Task<List<int>> ShowMultipleChoice(DialogServiceMultiItemsBundle bundle)
+        public async Task<List<int>> ShowMultipleChoice(DialogServiceMultiItemsBundle bundle)
         {
             const string LOGTAG = "DialogService.ShowMultipleChoice: ";

@@ -117,7 +117,7 @@
             }
             viewmodel.ShowAndroidDetails();

-            return LastTcs.Task;
+            return await LastTcs.Task;
         }

         public async Task<List<int>> ShowMultipleChoicePopupAndroid(DialogServiceMultiItemsBundle bundle)


Limit JsonPlaceholder tests to 500

Limit JsonPlaceholder tests to 500

--- DotJEM.Json.Validation.IntegrationTest/Util/TestDataLoader.cs
+++ DotJEM.Json.Validation.IntegrationTest/Util/TestDataLoader.cs
@@ -22,7 +22,7 @@
         ///
         /// The TestDataLoader will fetch the file based on the namespace of the TestClass and the name of the property. If a file is not found for the property, then it tries using the testclass name.
         /// </summary>
-        public static IEnumerable<JObject> LoadFor<T>([CallerMemberName]string caller = null)
+        public static IEnumerable<JObject> LoadFor<T>(int limit = 500, [CallerMemberName]string caller = null)
         {
             //0         1         2         3         4         5         6         7
             //012345678901234567890123456789012345678901234567890123456789012345678901234567890
@@ -37,7 +37,7 @@
             string path = directoryname + "\\" + directory + "\\" + caller + ".json";
             if (File.Exists(path))
             {
-                return LoadJson(path);
+                return LoadJson(path, limit);
             }
             string testName = parts.Last();
             string fileName = testName.Substring(0, testName.Length - 4);
@@ -47,15 +47,15 @@
             path = Directory.GetCurrentDirectory() + "\\" + directory + "\\" + fileName + "s.json";
             if (File.Exists(path))
             {
-                return LoadJson(path);
+                return LoadJson(path, limit);
             }
             throw new FileNotFoundException($"Could not find datafile {path}.", path);
         }

-        private static IEnumerable<JObject> LoadJson(string path)
+        private static IEnumerable<JObject> LoadJson(string path, int limit)
         {
             JObject json = JObject.Parse(File.ReadAllText(path));
-            return json["data"].AsEnumerable().OfType<JObject>();
+            return json["data"].AsEnumerable().OfType<JObject>().Take(limit);
         }
     }


Add Beta  property on FleaHeader event

Add Beta  property on FleaHeader event

--- EDDiscovery/EliteDangerous/JournalEvents/JournalFileHeader.cs
+++ EDDiscovery/EliteDangerous/JournalEvents/JournalFileHeader.cs
@@ -19,5 +19,19 @@
         public string GameVersion { get; set; }
         public string Build { get; set; }
         public string Language { get; set; }
+
+        public bool Beta
+        {
+            get
+            {
+                if (GameVersion.Contains("Beta"))
+                    return true;
+
+                if (GameVersion.Equals("2.2") && Build.Contains("r121645/r0"))
+                    return true;
+
+                return false;
+            }
+        }
     }
 }


Updates AdditionalContent example to be "fully loaded"

--- Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs
+++ Enterwell.Clients.Wpf.Notifications.Sample/MainWindow.xaml.cs
@@ -101,7 +101,10 @@
                 .AnimationInDuration(0.5)
                 .AnimationOutDuration(0.5)
                 .Background("#333")
+                .Foreground("#000")
                 .HasBadge("Info")
+                .HasHeader("Header")
+                .HasMessage("This is the message!")
                 .WithAdditionalContent(ContentLocation.Top, new Border
                 {
                     Height = 25,
@@ -143,6 +146,17 @@
                     Width = 40,
                     Background = Brushes.Indigo
                 })
+                .WithOverlay(new ProgressBar
+                {
+                    VerticalAlignment = VerticalAlignment.Bottom,
+                    HorizontalAlignment = HorizontalAlignment.Stretch,
+                    Height = 3,
+                    BorderThickness = new Thickness(0),
+                    Foreground = new SolidColorBrush(Color.FromArgb(128, 255, 255, 255)),
+                    Background = Brushes.Transparent,
+                    IsIndeterminate = true,
+                    IsHitTestVisible = false
+                })
                 .Dismiss().WithButton("Dismiss", button => { })
                 .Queue();
         }


Use ReactiveUI Events for Click Handler

Use ReactiveUI Events for Click Handler

--- Ets.Mobile/Ets.Mobile.Shared/Views/Pages/Account/LoginPage.cs
+++ Ets.Mobile/Ets.Mobile.Shared/Views/Pages/Account/LoginPage.cs
@@ -3,6 +3,8 @@
 using System;
 using System.Reactive.Linq;
 using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;

 namespace Ets.Mobile.Pages.Account
 {
@@ -35,11 +37,7 @@
                 .Where(x => x != null)
                 .Subscribe(x =>
                 {
-#if DEBUG
-                    ViewModel.UserName = "";
-                    ViewModel.Password = "";
-#endif
-                    Login.Click += (sender, arg) => { ErrorMessage.Visibility = Visibility.Collapsed; };
+                    Login.Events().Click.Subscribe(arg => ErrorMessage.Visibility = Visibility.Collapsed);
                 });

             // Error Handling
@@ -50,9 +48,7 @@

                 return Observable.Return(RecoveryOptionResult.CancelOperation);
             });
-
-            this.BindCommand(ViewModel, x => x.Login, x => x.Login);
-
+
             PartialInitialize();
         }


Added some sample logic to read WorkBooks

--- FurnitureFactory/FurnitureFactory.DataLoad/ExcelDataReader.cs
+++ FurnitureFactory/FurnitureFactory.DataLoad/ExcelDataReader.cs
@@ -54,17 +54,35 @@
             }
         }

+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="filePath"></param>
+        private void ReadExcelFile(string filePath)
+        {
+            foreach (var worksheet in Workbook.Worksheets(filePath))
+            {
+                foreach (var row in worksheet.Rows)
+                {
+                    foreach (var cell in row.Cells)
+                    {
+                        //Do some logic here.
+                    }
+                }
+            }
+        }
+
         // Method that recursively walks through a directory tree from a given path.
         private void RecursiveDirectoryCrawler(DirectoryInfo root)
         {
             FileInfo[] filesToBeLoaded = null;
-
+
             DirectoryInfo[] rootSubDirectories = null;

             try
             {
                 filesToBeLoaded = root.GetFiles("*.*");
-            }
+            }
             catch (DirectoryNotFoundException e)
             {
                 Console.WriteLine(e.Message);
@@ -74,7 +92,7 @@
             {
                 foreach (FileInfo currentFile in filesToBeLoaded)
                 {
-                    Console.WriteLine(currentFile.FullName);
+                    this.ReadExcelFile(currentFile.FullName);
                 }

                 rootSubDirectories = root.GetDirectories();


Update ToArray() test

Update ToArray() test

--- Iced.UnitTests/Intel/InstructionTests/InstructionListTests.cs
+++ Iced.UnitTests/Intel/InstructionTests/InstructionListTests.cs
@@ -346,19 +346,28 @@

 		[Theory]
 		[MemberData(nameof(ToArray_works_Data))]
-		void ToArray_works(Instruction[] instructions) {
+		void ToArray_works(Instruction[] instructions, bool addExtraElem) {
 			var list = new InstructionList(instructions);
-			Assert.Equal(instructions.Length, list.Count);
-			Assert.Equal(instructions.Length, list.Capacity);
+			if (addExtraElem) {
+				var instr = Instruction.Create(Code.Nopw);
+				list.Add(instr);
+				Array.Resize(ref instructions, instructions.Length + 1);
+				instructions[instructions.Length - 1] = instr;
+			}
+			Assert.Equal(instructions.Length, list.Count);
+			Assert.True(instructions.Length <= list.Capacity);
 			var array = list.ToArray();
 			Assert.Equal(list.Count, array.Length);
 			AssertEqual(instructions, array);
 		}
 		public static IEnumerable<object[]> ToArray_works_Data {
 			get {
-				yield return new object[] { Array.Empty<Instruction>() };
-				yield return new object[] { new Instruction[] { Instruction.Create(Code.Nopd) } };
-				yield return new object[] { GetInstructions() };
+				for (int i = 0; i < 2; i++) {
+					bool addExtraElem = i == 1;
+					yield return new object[] { Array.Empty<Instruction>(), addExtraElem };
+					yield return new object[] { new Instruction[] { Instruction.Create(Code.Nopd) }, addExtraElem };
+					yield return new object[] { GetInstructions(), addExtraElem };
+				}
 			}
 		}


we need to be able to emphasize to the restaurant whether it's an ASAP order or not

--- JustEat.Simples.Common/DataModels/OrderContainer/OrderInfo.cs
+++ JustEat.Simples.Common/DataModels/OrderContainer/OrderInfo.cs
@@ -32,5 +32,7 @@
         /// Due (delivery) date. Actual date and time
         /// </summary>
         public DateTime DueDate { get; set; }
+
+        public bool PromptAsap { get; set; }
     }
 }


Fixed the generated C# with 4+ modules and repetitive delegates.

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

--- src/Generator/Passes/DelegatesPass.cs
+++ src/Generator/Passes/DelegatesPass.cs
@@ -38,6 +38,14 @@
             return result;
         }

+        public override bool VisitClassDecl(Class @class)
+        {
+            if (@class.Ignore)
+                return false;
+
+            return base.VisitClassDecl(@class);
+        }
+
         public override bool VisitMethodDecl(Method method)
         {
             if (!base.VisitMethodDecl(method) || !method.IsVirtual || method.Ignore)
@@ -59,7 +67,7 @@

         public override bool VisitParameterDecl(Parameter parameter)
         {
-            if (!base.VisitParameterDecl(parameter) || parameter.Namespace == null ||
+            if (!base.VisitDeclaration(parameter) || parameter.Namespace == null ||
                 parameter.Namespace.Ignore)
                 return false;

@@ -89,13 +97,15 @@
             return new QualifiedType(new TypedefType { Declaration = @delegate });
         }

-        private TypedefDecl GetDelegate(QualifiedType type, ITypedDecl decl)
-        {
-            FunctionType newFunctionType = GetNewFunctionType(decl, type);
+        private TypedefDecl GetDelegate(QualifiedType type, ITypedDecl typedDecl)
+        {
+            FunctionType newFunctionType = GetNewFunctionType(typedDecl, type);

             var delegateName = GetDelegateName(newFunctionType);
-            var access = decl is Method ? AccessSpecifier.Private : AccessSpecifier.Public;
-            var existingDelegate = delegates.SingleOrDefault(t => t.Name == delegateName);
+            var access = typedDecl is Method ? AccessSpecifier.Private : AccessSpecifier.Public;
+            var decl = (Declaration) typedDecl;
+            Module module = decl.TranslationUnit.Module;
+            var existingDelegate = delegates.Find(t => Match(t, delegateName, module));
             if (existingDelegate != null)
             {
                 // Ensure a delegate used for a virtual method and a type is public
@@ -110,12 +120,12 @@

                 // Add a new delegate with the calling convention appended to its name
                 delegateName += '_' + newFunctionType.CallingConvention.ToString();
-                existingDelegate = delegates.SingleOrDefault(t => t.Name == delegateName);
+                existingDelegate = delegates.Find(t => Match(t, delegateName, module));
                 if (existingDelegate != null)
                     return existingDelegate;
             }

-            var namespaceDelegates = GetDeclContextForDelegates(((Declaration) decl).Namespace);
+            var namespaceDelegates = GetDeclContextForDelegates(decl.Namespace);
             var delegateType = new QualifiedType(new PointerType(new QualifiedType(newFunctionType)));
             existingDelegate = new TypedefDecl
                 {
@@ -154,6 +164,13 @@
             return functionType;
         }

+        private static bool Match(TypedefDecl t, string delegateName, Module module)
+        {
+            return t.Name == delegateName &&
+                (module == t.TranslationUnit.Module ||
+                 module.Dependencies.Contains(t.TranslationUnit.Module));
+        }
+
         private DeclarationContext GetDeclContextForDelegates(DeclarationContext @namespace)
         {
             if (Options.IsCLIGenerator)


Added better handling for Count

Added better handling for Count

--- src/Loqu8/Loqu8.KVC.Mac/KVCWrapper.cs
+++ src/Loqu8/Loqu8.KVC.Mac/KVCWrapper.cs
@@ -86,7 +86,7 @@
         public override NSObject ValueForKeyPath(NSString nsKeyPath)
         {
             var keyPath = nsKeyPath.ToString();
-            var keys = keyPath.Split('.');
+			var keys = keyPath.Split('.');

             Object target = _t;
             foreach (var key in keys)
@@ -106,7 +106,7 @@

 			if (!(target is string) && target is IEnumerable) {
 				var items = (IEnumerable)target;
-				return items.ToKVCNSArray ();
+				target = items.ToKVCNSArray ();
 			}

             return target.ToNSObject();
@@ -121,14 +121,13 @@
 				return ValueForKeyPath (nsKey);
 			}

-			var target = ValueForKey(_t, key);
+			var target = ValueForKey(_t, key);
             return target.ToNSObject();
         }
-
+
         protected static Object ValueForKey(Object target, String key)
         {
 			// TODO: target could be an IDictionary, IEnumerable or array, in which case access could be different, what if we get things like First/Last
-
 			if (target is IEnumerable<object> && key == "Count") {
 				var tolist = (IEnumerable<object>)target;
 				target = tolist.ToList ();
@@ -136,7 +135,7 @@

 			if (target == null && key == "Count")
 				return 0;			// for treeController when we are looking at a null collection
-
+
 			var type = target.GetType();
 			PropertyInfo info = type.GetProperty(key);

@@ -147,6 +146,14 @@

 			return value;
         }
+
+//		[Export("count")]
+//		public int Count
+//		{
+//			get {
+//				return 0;
+//			}
+//		}

 		[Export("copyWithZone:")]
 		public NSObject CopyWithZone (IntPtr zone)


Fix accessibility

Fix accessibility

--- src/Lury/Compiling/LLVMConstHelper.cs
+++ src/Lury/Compiling/LLVMConstHelper.cs
@@ -63,35 +63,35 @@

         #region Value Constants

-        private LLVMBool False { get { return @false; } }
+        public LLVMBool False { get { return @false; } }

-        private LLVMBool True { get { return @true; } }
+        public LLVMBool True { get { return @true; } }

         #endregion

         #region Type

-        private LLVMTypeRef VoidType
+        public LLVMTypeRef VoidType
         {
             get { return this.voidType.Pointer != IntPtr.Zero ? this.voidType : (this.voidType = LLVM.VoidTypeInContext(this.llvmHelper.Context)); }
         }

-        private LLVMTypeRef BooleanType
+        public LLVMTypeRef BooleanType
         {
             get { return this.booleanType.Pointer != IntPtr.Zero ? this.booleanType : (this.booleanType = LLVM.Int1TypeInContext(this.llvmHelper.Context)); }
         }

-        private LLVMTypeRef IntegerType
+        public LLVMTypeRef IntegerType
         {
             get { return this.integerType.Pointer != IntPtr.Zero ? this.integerType : (this.integerType = LLVM.Int64TypeInContext(this.llvmHelper.Context)); }
         }

-        private LLVMTypeRef RealType
+        public LLVMTypeRef RealType
         {
             get { return this.realType.Pointer != IntPtr.Zero ? this.realType : (this.realType = LLVM.DoubleTypeInContext(this.llvmHelper.Context)); }
         }

-        private LLVMTypeRef ComplexType
+        public LLVMTypeRef ComplexType
         {
             get { return this.complexType.Pointer != IntPtr.Zero ? this.complexType : (this.complexType = LLVM.VectorType(this.realType, 2)); }
         }


Fix player mob leads.

Fix player mob leads.

--- src/MiNET/MiNET/Entities/PlayerMob.cs
+++ src/MiNET/MiNET/Entities/PlayerMob.cs
@@ -52,6 +52,8 @@
 			metadata[15] = new MetadataByte(NoAi);
 			metadata[16] = new MetadataByte(0); // Player flags
 			//metadata[17] = new MetadataIntCoordinates(0, 0, 0);
+			metadata[23] = new MetadataInt(-1); // Leads EID (target or holder?)
+			metadata[24] = new MetadataByte(0); // Leads on/off

 			return metadata;
 		}
@@ -133,7 +135,7 @@
 				};

 				McpePlayerList playerList = McpePlayerList.CreateObject();
-				playerList.records = new PlayerRemoveRecords { fake };
+				playerList.records = new PlayerRemoveRecords {fake};
 				Level.RelayBroadcast(players, playerList);
 			}


Fix description of DB2400Driver.

Fix description of DB2400Driver.

--- src/NHibernate/Driver/DB2400Driver.cs
+++ src/NHibernate/Driver/DB2400Driver.cs
@@ -8,7 +8,7 @@
 	public class DB2400Driver : ReflectionBasedDriver
 	{
 		/// <summary>
-		/// Initializes a new instance of the <see cref="DB2Driver"/> class.
+		/// Initializes a new instance of the <see cref="DB2400Driver"/> class.
 		/// </summary>
 		/// <exception cref="HibernateException">
 		/// Thrown when the <c>IBM.Data.DB2.iSeries</c> assembly can not be loaded.
@@ -40,4 +40,4 @@
 			get { return false; }
 		}
 	}
-}+}


Added Obsolete attribute to driver class. Replaced by SQLite20Driver.

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@5136

--- src/NHibernate/Driver/SQLiteDriver.cs
+++ src/NHibernate/Driver/SQLiteDriver.cs
@@ -17,6 +17,7 @@
 	/// Please check <a href="http://www.sqlite.org/"> http://www.sqlite.org/ </a> for more information regarding SQLite.
 	/// </p>
 	/// </remarks>
+	[Obsolete("Use NHibernate.Driver.SQLite20Driver"]
 	public class SQLiteDriver : ReflectionBasedDriver
 	{
 		/// <summary>


Added the disabled flag to DHCP server object

--- tik4net.objects/Ip/IpDhcpServer.cs
+++ tik4net.objects/Ip/IpDhcpServer.cs
@@ -594,6 +594,12 @@
         public bool UseRadius { get; set; }

         /// <summary>
+        /// disabled: Whether DHCP server is disabled or not
+        /// </summary>
+        [TikProperty("disabled", DefaultValue = "no")]
+        public bool Disabled { get; set; }
+
+        /// <summary>
         /// ctor
         /// </summary>
         public IpDhcpServer()


revise the deprecated warning to use the 'caution' style and add a line break

--- tools/droiddoc/templates/macros.cs
+++ tools/droiddoc/templates/macros.cs
@@ -98,8 +98,8 @@
 <?cs # Show the red box with the deprecated warning ?><?cs
 def:deprecated_warning(obj) ?><?cs
   if:subcount(obj.deprecated) ?>

-

-      <?cs call:deprecated_text(obj.kind) ?><?cs
+

+      <?cs call:deprecated_text(obj.kind) ?>
 <?cs
       call:tag_list(obj.deprecated) ?>

<?cs
   /if ?><?cs


Add notes about request validation

Add notes about request validation

--- AlertRoster.Web/Controllers/IncomingController.cs
+++ AlertRoster.Web/Controllers/IncomingController.cs
@@ -2,10 +2,12 @@
 using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Options;
 using System.Linq;
 using System.Threading.Tasks;
 using Twilio.AspNet.Common;
 using Twilio.AspNet.Core;
+using Twilio.Security;
 using Twilio.TwiML;

 namespace AlertRoster.Web.Controllers
@@ -15,15 +17,22 @@
         // Messages: Subscribe, Unsubscribe, Content, Add User, List Users?

         private readonly Database db;
+        private readonly IOptions<Settings> settings;

-        public IncomingController(Database db)
+        public IncomingController(Database db, IOptions<Settings> settings)
         {
             this.db = db;
+            this.settings = settings;
         }

         [HttpPost(template: "/api/incoming"), AllowAnonymous]
         public virtual async Task<IActionResult> Handle(SmsRequest request)
         {
+            var validator = new RequestValidator(settings.Value.Twilio.AuthToken);
+
+#if RELEASE
+            // TODO Request validation
+#endif
             var to = request.To;

             var from = request.From;


Fix for EFCore using the same InMemoryDatabase Instance when running tests.

--- AllReadyApp/Web-App/AllReady.UnitTest/TestBase.cs
+++ AllReadyApp/Web-App/AllReady.UnitTest/TestBase.cs
@@ -28,9 +28,9 @@
         var services = new ServiceCollection();

         // set up empty in-memory test db
-        services.AddEntityFramework()
+        services
           .AddEntityFrameworkInMemoryDatabase()
-          .AddDbContext<AllReadyContext>(options => options.UseInMemoryDatabase());
+          .AddDbContext<AllReadyContext>(options => options.UseInMemoryDatabase().UseInternalServiceProvider(services.BuildServiceProvider()));

         // add identity service
         services.AddIdentity<ApplicationUser, IdentityRole>()


Separate if statements and add Translation cutoff

--- Assets/Plugins/Voxelgon/Spacecraft/ShipManager.cs
+++ Assets/Plugins/Voxelgon/Spacecraft/ShipManager.cs
@@ -8,8 +8,8 @@

 public class ShipManager : MonoBehaviour {

-	public float portYawCutoff = 15;
-
+	public float portYawCutoff = 30;	//angle +/- before the port is no longer for rotation
+	public float portTransCutoff = 15;	//angle inside the 90 degree cone for each translation direction
 	//input Variables
 	public float linAxis;
 	public float latAxis;
@@ -62,22 +62,25 @@
 				yawPorts[YawState.YawRight].Add(port.gameObject);
 				//Debug.Log("This port is for turning right!");
 			} else {
-				if((childAngle >= 315) && (childAngle < 45)) {
+				if((childAngle > 315 + portTransCutoff) || (childAngle < 45 - portTransCutoff)) {

 					//0 degrees
 					transPorts[TransState.TransForw].Add(port.gameObject);
+				}

-				} else if((childAngle >= 45) && (childAngle < 135)) {
+				if((childAngle > 45 + portTransCutoff) && (childAngle < 135 - portTransCutoff)) {

 					//90 degrees
 					transPorts[TransState.TransRight].Add(port.gameObject);
+				}

-				} else if((childAngle >= 135) && (childAngle < 225)) {
+				if((childAngle > 135 + portTransCutoff) && (childAngle < 225 - portTransCutoff)) {

 					//180 degrees
 					transPorts[TransState.TransBack].Add(port.gameObject);
+				}

-				} else if((childAngle >= 225) && (childAngle < 315)) {
+				if((childAngle > 225 + portTransCutoff) && (childAngle < 315 - portTransCutoff)) {

 					//270 degrees
 					transPorts[TransState.TransLeft].Add(port.gameObject);


Updated editor skin mesh script, swapped obsolete EditorUtility.SetSelectedWireframeHidden method to use EditorUtility.SetSelectedRenderState instead

--- Assets/SpritesAndBones/Scripts/Editor/SkinMesh.cs
+++ Assets/SpritesAndBones/Scripts/Editor/SkinMesh.cs
@@ -147,7 +147,7 @@
 				EditorUtility.SetDirty(this);
 			}

-			EditorUtility.SetSelectedWireframeHidden(spriteRenderer, true);
+			EditorUtility.SetSelectedRenderState(spriteRenderer, EditorSelectedRenderState.Hidden);

 			if (GUILayout.Button("Update Custom Mesh")) {
 				if (spriteRenderer != null) UpdateMesh();
@@ -283,7 +283,6 @@
         mesh.uv = uv.ToArray();
         mesh.RecalculateNormals();
         mesh.RecalculateBounds();
-        mesh.Optimize();

         //GameObject go = new GameObject();
         //MeshFilter mf = go.AddComponent<MeshFilter>();


* IMPROVEMENT async peak store creation/loading

--- AudioAlign/AudioAlign.Audio/AudioStreamFactory.cs
+++ AudioAlign/AudioAlign.Audio/AudioStreamFactory.cs
@@ -9,9 +9,15 @@
 using AudioAlign.Audio.Project;
 using AudioAlign.Audio.TaskMonitor;
 using AudioAlign.Audio.Streams;
+using System.Collections.Concurrent;

 namespace AudioAlign.Audio {
     public static class AudioStreamFactory {
+
+        private const int SAMPLES_PER_PEAK = 256;
+
+        private static BlockingCollection<Action> peakStoreQueue = new BlockingCollection<Action>();
+        private static volatile int peakStoreQueueThreads = 0;

         private static WaveStream OpenFile(FileInfo fileInfo) {
             if (fileInfo.Extension.Equals(".wav")) {
@@ -58,13 +64,35 @@
         }

         private static PeakStore CreatePeakStore(AudioTrack audioTrack, bool fileSupport) {
-            int SAMPLES_PER_PEAK = 256;
-
             IAudioStream audioInputStream = audioTrack.CreateAudioStream();

             PeakStore peakStore = new PeakStore(SAMPLES_PER_PEAK, audioInputStream.Properties.Channels,
                 (int)Math.Ceiling((float)audioInputStream.Length / audioInputStream.SampleBlockSize / SAMPLES_PER_PEAK));

+            Action peakStoreFillAction = delegate {
+                FillPeakStore(audioTrack, fileSupport, audioInputStream, peakStore);
+            };
+
+            // add task
+            peakStoreQueue.Add(peakStoreFillAction);
+
+            // create consumer/worker threads
+            for (; peakStoreQueueThreads < Environment.ProcessorCount; peakStoreQueueThreads++) {
+                Task.Factory.StartNew(() => {
+                    // process peakstore actions as long as the queue is not empty
+                    Debug.WriteLine("PeakStoreQueue thread started");
+                    while (peakStoreQueue.Count > 0) {
+                        peakStoreQueue.Take().Invoke();
+                    }
+                    peakStoreQueueThreads--;
+                    Debug.WriteLine("PeakStoreQueue thread stopped");
+                });
+            }
+
+            return peakStore;
+        }
+
+        private static void FillPeakStore(AudioTrack audioTrack, bool fileSupport, IAudioStream audioInputStream, PeakStore peakStore) {
             // search for existing peakfile
             if (audioTrack.HasPeakFile && fileSupport) {
                 // load peakfile from disk
@@ -79,82 +107,79 @@
                 float[] max = new float[channels];
                 BinaryWriter[] peakWriters = peakStore.CreateMemoryStreams().WrapWithBinaryWriters();

-                Task.Factory.StartNew(() => {
-                    IProgressReporter progressReporter = ProgressMonitor.GlobalInstance.BeginTask("Generating peaks for " + audioTrack.FileInfo.Name, true);
-                    DateTime startTime = DateTime.Now;
-                    int sampleBlockCount = 0;
-                    int peakCount = 0;
-                    int bytesRead;
-                    long totalSampleBlocks = audioInputStream.Length / audioInputStream.SampleBlockSize;
-                    long totalSamplesRead = 0;
-                    int progress = 0;
+                IProgressReporter progressReporter = ProgressMonitor.GlobalInstance.BeginTask("Generating peaks for " + audioTrack.FileInfo.Name, true);
+                DateTime startTime = DateTime.Now;
+                int sampleBlockCount = 0;
+                int peakCount = 0;
+                int bytesRead;
+                long totalSampleBlocks = audioInputStream.Length / audioInputStream.SampleBlockSize;
+                long totalSamplesRead = 0;
+                int progress = 0;

-                    for (int i = 0; i < channels; i++) {
-                        min[i] = float.MaxValue;
-                        max[i] = float.MinValue;
-                    }
+                for (int i = 0; i < channels; i++) {
+                    min[i] = float.MaxValue;
+                    max[i] = float.MinValue;
+                }

-                    unsafe {
-                        fixed (byte* bufferB = &buffer[0]) {
-                            float* bufferF = (float*)bufferB;
-                            int samplesRead;
-                            int samplesProcessed;
+                unsafe {
+                    fixed (byte* bufferB = &buffer[0]) {
+                        float* bufferF = (float*)bufferB;
+                        int samplesRead;
+                        int samplesProcessed;

-                            while ((bytesRead = StreamUtil.ForceRead(audioInputStream, buffer, 0, buffer.Length)) > 0) {
-                                samplesRead = bytesRead / audioInputStream.Properties.SampleByteSize;
-                                samplesProcessed = 0;
+                        while ((bytesRead = StreamUtil.ForceRead(audioInputStream, buffer, 0, buffer.Length)) > 0) {
+                            samplesRead = bytesRead / audioInputStream.Properties.SampleByteSize;
+                            samplesProcessed = 0;

-                                do {
+                            do {
+                                for (int channel = 0; channel < channels; channel++) {
+                                    if (min[channel] > bufferF[samplesProcessed]) {
+                                        min[channel] = bufferF[samplesProcessed];
+                                    }
+                                    if (max[channel] < bufferF[samplesProcessed]) {
+                                        max[channel] = bufferF[samplesProcessed];
+                                    }
+                                    samplesProcessed++;
+                                    totalSamplesRead++;
+                                }
+
+                                if (++sampleBlockCount % SAMPLES_PER_PEAK == 0 || sampleBlockCount == totalSampleBlocks) {
+                                    // write peak
+                                    peakCount++;
                                     for (int channel = 0; channel < channels; channel++) {
-                                        if (min[channel] > bufferF[samplesProcessed]) {
-                                            min[channel] = bufferF[samplesProcessed];
-                                        }
-                                        if (max[channel] < bufferF[samplesProcessed]) {
-                                            max[channel] = bufferF[samplesProcessed];
-                                        }
-                                        samplesProcessed++;
-                                        totalSamplesRead++;
+                                        peakWriters[channel].Write(new Peak(min[channel], max[channel]));
+                                        // add last sample of previous peak as first sample of current peak to make consecutive peaks overlap
+                                        // this gives the impression of a continuous waveform
+                                        min[channel] = max[channel] = bufferF[samplesProcessed - channels];
                                     }
+                                    //sampleBlockCount = 0;
+                                }
+                            }
+                            while (samplesProcessed < samplesRead);

-                                    if (++sampleBlockCount % SAMPLES_PER_PEAK == 0 || sampleBlockCount == totalSampleBlocks) {
-                                        // write peak
-                                        peakCount++;
-                                        for (int channel = 0; channel < channels; channel++) {
-                                            peakWriters[channel].Write(new Peak(min[channel], max[channel]));
-                                            // add last sample of previous peak as first sample of current peak to make consecutive peaks overlap
-                                            // this gives the impression of a continuous waveform
-                                            min[channel] = max[channel] = bufferF[samplesProcessed - channels];
-                                        }
-                                        //sampleBlockCount = 0;
-                                    }
-                                }
-                                while (samplesProcessed < samplesRead);
-
-                                progressReporter.ReportProgress(100.0f / audioInputStream.Length * audioInputStream.Position);
-                                if ((int)(100.0f / audioInputStream.Length * audioInputStream.Position) > progress) {
-                                    progress = (int)(100.0f / audioInputStream.Length * audioInputStream.Position);
-                                    peakStore.OnPeaksChanged();
-                                }
+                            progressReporter.ReportProgress(100.0f / audioInputStream.Length * audioInputStream.Position);
+                            if ((int)(100.0f / audioInputStream.Length * audioInputStream.Position) > progress) {
+                                progress = (int)(100.0f / audioInputStream.Length * audioInputStream.Position);
+                                peakStore.OnPeaksChanged();
                             }
                         }
                     }
+                }

-                    Debug.WriteLine("generating downscaled peaks...");
-                    peakStore.CalculateScaledData(8, 6);
+                Debug.WriteLine("generating downscaled peaks...");
+                peakStore.CalculateScaledData(8, 6);

-                    Debug.WriteLine("peak generation finished - " + (DateTime.Now - startTime) + ", " + (peakWriters[0].BaseStream.Length * channels) + " bytes");
-                    progressReporter.Finish();
+                Debug.WriteLine("peak generation finished - " + (DateTime.Now - startTime) + ", " + (peakWriters[0].BaseStream.Length * channels) + " bytes");
+                progressReporter.Finish();

-                    if (fileSupport) {
-                        // write peakfile to disk
-                        FileStream peakOutputFile = File.OpenWrite(audioTrack.PeakFile.FullName);
-                        peakStore.StoreTo(peakOutputFile);
-                        peakOutputFile.Close();
-                    }
-                });
+                if (fileSupport) {
+                    // write peakfile to disk
+                    FileStream peakOutputFile = File.OpenWrite(audioTrack.PeakFile.FullName);
+                    peakStore.StoreTo(peakOutputFile);
+                    peakOutputFile.Close();
+                }
             }
-
-            return peakStore;
+            peakStore.OnPeaksChanged();
         }
     }
 }


Rename "CommentDataModel.ContentIndex" -> "CommentDataModel.Progress"

--- Azuria/Api/v1/DataModels/Info/CommentDataModel.cs
+++ Azuria/Api/v1/DataModels/Info/CommentDataModel.cs
@@ -32,7 +32,7 @@
         /// <summary>
         /// </summary>
         [JsonProperty("episode")]
-        public int ContentIndex { get; set; }
+        public int Progress { get; set; }

         /// <summary>
         /// </summary>


Double Add bei Suggest

Double Add bei Suggest

--- BYteWare.XAF.ElasticSearch/ElasticSearchClient.cs
+++ BYteWare.XAF.ElasticSearch/ElasticSearchClient.cs
@@ -1631,7 +1631,6 @@
                                         Fuzzy = modelSuggestField.Fuzzy,
                                         Contexts = field.ContextSettings.ToDictionary(t => t.ContextName, t => GetParameterValue(t.QueryParameter))
                                     };
-                                    suggesters.Add(suggester);
                                     foreach (var modelContext in modelSuggestField.Contexts)
                                     {
                                         if (!string.IsNullOrEmpty(modelContext.Value))


Try to avoid overriding the title

Try to avoid overriding the title

--- Battery-Commander.Web/Views/Shared/_Layout.cshtml
+++ Battery-Commander.Web/Views/Shared/_Layout.cshtml
@@ -1,7 +1,4 @@
 <!DOCTYPE html>
-@{
-    ViewBag.Title = "Battery Commander";
-}
 <html>
 <head>
     <meta charset="utf-8" />


Minor change.

Minor change.

--- BotMessageRouting/MessageRouting/MessageRouter.cs
+++ BotMessageRouting/MessageRouting/MessageRouter.cs
@@ -89,7 +89,7 @@
         /// <param name="conversationReferenceToMessage">The ConversationReference to send the message to.</param>
         /// <param name="messageActivity">The message activity to send (message content).</param>
         /// <returns>A valid ResourceResponse instance, if successful. Null in case of an error.</returns>
-        public async Task<ResourceResponse> SendMessageAsync(
+        public virtual async Task<ResourceResponse> SendMessageAsync(
             ConversationReference conversationReferenceToMessage, IMessageActivity messageActivity)
         {
             ConversationReference botConversationReference = null;
@@ -126,7 +126,8 @@
         /// <param name="ConversationReferenceToMessage">The ConversationReference to send the message to.</param>
         /// <param name="messageText">The message content.</param>
         /// <returns>A valid ResourceResponse instance, if successful. Null in case of an error.</returns>
-        public async Task<ResourceResponse> SendMessageAsync(ConversationReference ConversationReferenceToMessage, string messageText)
+        public virtual async Task<ResourceResponse> SendMessageAsync(
+            ConversationReference ConversationReferenceToMessage, string messageText)
         {
             ConversationReference botConversationReference = null;

@@ -338,7 +339,7 @@
         /// </summary>
         /// <param name="connectedConversationReference">The ConversationReference connected in a conversation.</param>
         /// <returns>Same as Disconnect(ConversationReference, ConnectionProfile)</returns>
-        public IList<MessageRouterResult> Disconnect(ConversationReference connectedConversationReference)
+        public virtual IList<MessageRouterResult> Disconnect(ConversationReference connectedConversationReference)
         {
             IList<MessageRouterResult> disconnectResults = new List<MessageRouterResult>();
             bool wasDisconnected = true;


Fix enum read. (#10)

Fix enum read. (#10)

* fix enum read

* fix merge mistake

--- ClickHouse.Ado/Impl/ColumnTypes/EnumColumnType.cs
+++ ClickHouse.Ado/Impl/ColumnTypes/EnumColumnType.cs
@@ -27,11 +27,13 @@
             if (BaseSize == 8)
             {
                 var vals = new SimpleColumnType<byte>();
+                vals.Read(formatter,rows);
                 Data = vals.Data.Select(x => (int)x).ToArray();
             }
             else if (BaseSize == 16)
             {
                 var vals = new SimpleColumnType<short>();
+                vals.Read(formatter, rows);
                 Data = vals.Data.Select(x => (int) x).ToArray();
             }
             else


Console.ReadLine at the end

Console.ReadLine at the end

--- Client/C#/SampleTaskConsoleApplication/Program.cs
+++ Client/C#/SampleTaskConsoleApplication/Program.cs
@@ -122,6 +122,8 @@

             NuTask task8 = wsdl.GetTask(loggedUser, task5.ExternalId);
             Console.WriteLine(string.Format("task8:'{0}'", task8));
+            Console.WriteLine("Press Enter to close...");
+            Console.ReadLine();
         }
     }
 }


fix Tests for COMBINA function

fix Tests for COMBINA function

--- ClosedXML_Tests/Excel/CalcEngine/MathTrigTests.cs
+++ ClosedXML_Tests/Excel/CalcEngine/MathTrigTests.cs
@@ -41,10 +41,15 @@
         }

         [TestCase(-1, 2)]
-        [TestCase(0, 0)]
+        [TestCase(-3, -2)]
+        [TestCase(2, -2)]
         public void Combina_ThrowsNumExceptionOnInvalidValues(int number, int chosen)
         {
-            Assert.Throws<NumberException>(() => XLWorkbook.EvaluateExpr($"COMBINA({number}, {chosen})"));
+            Assert.Throws<NumberException>(() => XLWorkbook.EvaluateExpr(
+                string.Format(
+                    @"COMBINA({0}, {1})",
+                    number.ToString(CultureInfo.InvariantCulture),
+                    chosen.ToString(CultureInfo.InvariantCulture))));
         }

         [TestCase(1, 0.642092616)]


Prep for February release

Prep for February release

--- Core/OfficeDevPnP.Core/Properties/AssemblyInfo.cs
+++ Core/OfficeDevPnP.Core/Properties/AssemblyInfo.cs
@@ -11,7 +11,7 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("")]
 [assembly: AssemblyProduct("OfficeDevPnP.Core")]
-[assembly: AssemblyCopyright("Copyright © Microsoft 2015")]
+[assembly: AssemblyCopyright("Copyright © Microsoft 2016")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
 [assembly: NeutralResourcesLanguage("en-US")]
@@ -38,7 +38,7 @@
 // Minor version = Sequence...version 0 was with January release...so 1=Feb 2=Mar, 3=Apr, 4=May, 6=Jun, 7=Jul, 8=Aug, 9=Sept,...
 // Third part = version indenpendant showing the release month in YYMM
 // Fourth part = 0 normally or a sequence number when we do an emergency release
-[assembly: AssemblyVersion("2.0.1601.0")]
-[assembly: AssemblyFileVersion("2.0.1601.0")]
+[assembly: AssemblyVersion("2.1.1602.0")]
+[assembly: AssemblyFileVersion("2.1.1602.0")]

 [assembly: InternalsVisibleTo("OfficeDevPnP.Core.Tests")]


Enable open cached model

Enable open cached model

--- Dependinator/ModelViewing/Private/ModelService.cs
+++ Dependinator/ModelViewing/Private/ModelService.cs
@@ -65,13 +65,12 @@

 			ClearAll();

-			//if (File.Exists(dataFilePath))
-			//{
-			//	await parserService.TryDeserialize(
-			//		dataFilePath, items => UpdateDataItems(items, stamp));
-			//}
-			//else
-			if (File.Exists(modelMetadata.ModelFilePath))
+			if (File.Exists(dataFilePath))
+			{
+				await parserService.TryDeserialize(
+					dataFilePath, items => UpdateDataItems(items, stamp));
+			}
+			else if (File.Exists(modelMetadata.ModelFilePath))
 			{
 				await parserService.AnalyzeAsync(
 					modelMetadata.ModelFilePath, items => UpdateDataItems(items, stamp));


Fix "Folder Watcher" loading deleted files

--- DesktopWidgets/Widgets/FolderWatcher/ViewModel.cs
+++ DesktopWidgets/Widgets/FolderWatcher/ViewModel.cs
@@ -152,7 +152,7 @@

         private void CheckFile(bool playMedia = true)
         {
-            if (Settings.CurrentFile == null || !Settings.CurrentFile.Exists)
+            if (Settings.CurrentFile == null || !File.Exists(Settings.CurrentFile.FullName))
                 return;
             if (HandleFileImage())
                 FileType = FileType.Image;


Fix "Folder Watcher" file content detection order

--- DesktopWidgets/Widgets/FolderWatcher/ViewModel.cs
+++ DesktopWidgets/Widgets/FolderWatcher/ViewModel.cs
@@ -109,10 +109,10 @@
                 return;
             if (HandleFileImage())
                 FileType = FileType.Image;
+            else if (HandleFileMedia(playMedia))
+                FileType = FileType.Audio;
             else if (HandleFileContent())
                 FileType = FileType.Text;
-            else if (HandleFileMedia(playMedia))
-                FileType = FileType.Audio;
             else
             {
                 FileType = FileType.Other;


Added link to Kibana.

Added link to Kibana.

--- Chalmers.ILL/Views/ChalmersILL.cshtml
+++ Chalmers.ILL/Views/ChalmersILL.cshtml
@@ -92,7 +92,7 @@

Hjälp

Inställningar

-
Statistik

+
Statistik

Logga ut


Removed invalid bitwise operation

Removed invalid bitwise operation

--- Chraft/World/Blocks/Base/BlockBase.cs
+++ Chraft/World/Blocks/Base/BlockBase.cs
@@ -379,7 +379,7 @@
             chunk.SetBlockAndData(block.Coords, (byte)BlockData.Blocks.Air, 0);
             if (chunk.HeightMap[block.Coords.BlockX, block.Coords.BlockZ] <= block.Coords.BlockY)
                 chunk.RecalculateHeight(block.Coords);
-            chunk.SpreadSkyLightFromBlock((byte)(block.Coords.BlockX), (byte)block.Coords.BlockY, (byte)(block.Coords.BlockZ & 0xf));
+            chunk.SpreadSkyLightFromBlock((byte)(block.Coords.BlockX), (byte)block.Coords.BlockY, (byte)(block.Coords.BlockZ));
             block.World.Update(block.Coords, false);
         }


Fix dragged inventory item from being rendered prematurely

--- EndlessClient/HUD/Inventory/InventoryPanelItem.cs
+++ EndlessClient/HUD/Inventory/InventoryPanelItem.cs
@@ -48,9 +48,10 @@
         // Ru Paul's drag properties
         private bool _beingDragged;
         private Vector2 _oldOffset;
+        private bool dragItemPositioned;

         private bool MousePressed => CurrentMouseState.LeftButton == ButtonState.Pressed && PreviousMouseState.LeftButton == ButtonState.Released;
-
+
         private bool MouseReleased => CurrentMouseState.LeftButton == ButtonState.Released && PreviousMouseState.LeftButton == ButtonState.Pressed;

         private bool MouseHeld => CurrentMouseState.LeftButton == ButtonState.Pressed && PreviousMouseState.LeftButton == ButtonState.Pressed;
@@ -216,6 +217,7 @@
                         else
                             DrawPosition = GetPosition(Slot);

+                        dragItemPositioned = false;
                         _beingDragged = false;
                         _nameLabel.Visible = false;
                     }
@@ -229,6 +231,7 @@
         {
             _spriteBatch.Begin();

+            // draw highlighted area
             if (MouseOver)
             {
                 if (!_beingDragged || InventoryGridArea.Contains(CurrentMouseState.Position))
@@ -244,10 +247,36 @@
                 }
             }

-            _spriteBatch.Draw(_itemGraphic, DrawPositionWithParentOffset, Color.FromNonPremultiplied(255, 255, 255, _beingDragged ? 128 : 255));
+            if (_beingDragged)
+            {
+                // slot based on current mouse position if being dragged
+                var currentSlot = GetCurrentSlotBasedOnPosition();
+                var drawPosition = GetPosition(currentSlot) + (_beingDragged ? _oldOffset : ImmediateParent.DrawPositionWithParentOffset);
+
+                if (!dragItemPositioned)
+                {
+                    if (InventoryGridArea.Contains(DrawArea.WithPosition(drawPosition)))
+                    {
+                        dragItemPositioned = true;
+                    }
+                }
+
+                if (dragItemPositioned)
+                {
+                    _spriteBatch.Draw(_itemGraphic, DrawPositionWithParentOffset, Color.FromNonPremultiplied(255, 255, 255, _beingDragged ? 128 : 255));
+                }
+
+                if (InventoryGridArea.Contains(DrawArea.WithPosition(drawPosition)))
+                {
+                    _spriteBatch.Draw(_itemGraphic, _beingDragged ? (DrawPositionWithParentOffset) : DrawPositionWithParentOffset, Color.FromNonPremultiplied(255, 255, 255, _beingDragged ? 128 : 255));
+                }
+            }
+            else
+            {
+                _spriteBatch.Draw(_itemGraphic, _beingDragged ? (DrawPositionWithParentOffset) : DrawPositionWithParentOffset, Color.FromNonPremultiplied(255, 255, 255, _beingDragged ? 128 : 255));
+            }

             _spriteBatch.End();
-
             base.OnDrawControl(gameTime);
         }

@@ -273,7 +302,7 @@

             if (actualPosition.X + _nameLabel.DrawAreaWithParentOffset.Width + DrawArea.Width > InventoryGridArea.Width)
             {
-                _nameLabel.DrawPosition = new Vector2(actualPosition.X -_nameLabel.DrawArea.Width, actualPosition.Y);
+                _nameLabel.DrawPosition = new Vector2(actualPosition.X - _nameLabel.DrawArea.Width, actualPosition.Y);
             }
             else
             {


Fixed some XML Documentation in the ToggleButtonExclusiveSelectionGroup extension

--- Extensions/ToggleButtonExclusiveSelectionGroup.cs
+++ Extensions/ToggleButtonExclusiveSelectionGroup.cs
@@ -116,7 +116,7 @@
         /// <summary>
         /// Method to toggle a specific control using it index.
         /// </summary>
-        /// <param name="input">The index of the control in the array to turn on.</param>
+        /// <param name="index">The index of the control in the array to turn on.</param>
         /// <returns>True, if the selection is successful</returns>
         /// <remarks>Will unselect the current selection if there is.</remarks>
         public bool Select(int index)
@@ -168,6 +168,10 @@
             return Select(index);
         }

+        /// <summary>
+        /// Method to unselect the whole group
+        /// </summary>
+        /// <returns>True, if the selection is unselected, False if nothing selected.</returns>
         public bool Unselect()
         {
             if (selected == -1)


bumping version

bumping version

--- FirebaseTokenGenerator/Properties/AssemblyInfo.cs
+++ FirebaseTokenGenerator/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.3.0")]
-[assembly: AssemblyFileVersion("1.0.3.0")]
+[assembly: AssemblyVersion("2.0.0.0")]
+[assembly: AssemblyFileVersion("2.0.0.0")]


Wrong column number in TestReadingLines of SourceReaderTest.

--- HCEngine/HCEngine.UnitTesting/SourceReaderTest.cs
+++ HCEngine/HCEngine.UnitTesting/SourceReaderTest.cs
@@ -63,7 +63,7 @@
             Assert.AreEqual(1, reader.Column);
             reader.ReadNext();
             Assert.AreEqual(3, reader.Line);
-            Assert.AreEqual(3, reader.Column);
+            Assert.AreEqual(4, reader.Column);
         }
     }
 }


Prayer fix (#12504)

Prayer fix (#12504)

--- Content.Server/Prayer/PrayerSystem.cs
+++ Content.Server/Prayer/PrayerSystem.cs
@@ -69,7 +69,7 @@
             return;

         _popupSystem.PopupEntity(popupMessage, target.AttachedEntity.Value, Filter.Empty().AddPlayer(target), PopupType.Large);
-        _chatManager.ChatMessageToOne(ChatChannel.Local, messageString, popupMessage + " \"{0}\"", EntityUid.Invalid, false, target.ConnectedClient);
+        _chatManager.ChatMessageToOne(ChatChannel.Local, messageString, popupMessage + " \"{message}\"", EntityUid.Invalid, false, target.ConnectedClient);
     }

     /// <summary>


fix Healther

fix Healther

--- Core/Game/Abilities/Essential/Scan.cs
+++ Core/Game/Abilities/Essential/Scan.cs
@@ -329,14 +329,22 @@
         protected virtual void OnFire()
         {
             long appliedDamage = Damage;
-            Health healther = Agent.GetAbility<Health>();
             LSProjectile projectile = ProjectileManager.Create(
                 ProjCode,
                 this.Agent,
                 this.ProjectileOffset,
                 this.TargetAllegiance,
-                (other) => healther.IsNotNull(),
-                (agent) => healther.TakeRawDamage(appliedDamage));
+				(other) =>
+				{
+					Health healther = other.GetAbility<Health>();
+					return healther.IsNotNull() && healther.HealthAmount > 0;
+				},
+				(other) =>
+				{
+					Health healther = other.GetAbility<Health>();
+					healther.TakeRawDamage(appliedDamage);
+				}
+			);
             projectile.InitializeHoming(this.Target);
             projectile.TargetPlatform = TargetPlatform;
             ProjectileManager.Fire(projectile);


remove the disposable interface

remove the disposable interface

--- Cowboy.Sockets/Tcp/TcpSocketServer.cs
+++ Cowboy.Sockets/Tcp/TcpSocketServer.cs
@@ -8,7 +8,7 @@

 namespace Cowboy.Sockets
 {
-    public class TcpSocketServer : IDisposable
+    public class TcpSocketServer
     {
         #region Fields

@@ -18,7 +18,6 @@
         private readonly ConcurrentDictionary<string, TcpSocketSession> _sessions = new ConcurrentDictionary<string, TcpSocketSession>();
         private readonly object _opsLock = new object();
         private readonly TcpSocketServerConfiguration _configuration;
-        private bool _disposed = false;

         #endregion

@@ -97,6 +96,7 @@
                         CloseSession(session);
                     }
                     _sessions.Clear();
+                    _listener = null;
                 }
                 catch (Exception ex)
                 {
@@ -455,40 +455,5 @@
         }

         #endregion
-
-        #region IDisposable Members
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        protected virtual void Dispose(bool disposing)
-        {
-            if (!this._disposed)
-            {
-                if (disposing)
-                {
-                    try
-                    {
-                        Stop();
-
-                        if (_listener != null)
-                        {
-                            _listener = null;
-                        }
-                    }
-                    catch (SocketException ex)
-                    {
-                        _log.Error(ex.Message, ex);
-                    }
-                }
-
-                _disposed = true;
-            }
-        }
-
-        #endregion
     }
 }


Slight modification to how serial thread

--- CubeController/CubeController/Cube.cs
+++ CubeController/CubeController/Cube.cs
@@ -48,16 +48,16 @@
 			_fontHandler = new FontHandler ();
 			_rgen = new Random ();
             _writeCubeCallback = WriteCube;
-            _serialDriverTimer = new Timer(WriteCube, null, 0, 5);
+            _serialDriverTimer = new Timer(WriteCube, null, 100, 5);
             _serialDriver = new SerialDriver();
             _serialDriver.OpenPort();
 		}

         private void WriteCube(object stateInfo)
         {
-
+            _serialDriver.WriteCube(_cubeState);
         }
-
+
 #region UTILITY

         /// <summary>


fix object not set error on closing due to slow PC

--- DamageMeter.Core/NetworkController.cs
+++ DamageMeter.Core/NetworkController.cs
@@ -95,6 +95,7 @@
             TeraSniffer.Instance.Enabled = false;
             _keepAlive = false;
             Thread.Sleep(500);
+            HudManager.Instance.CurrentBosses.Clear();
             Application.Exit();
         }


Simplify

Simplify

--- DataConverters3D/Object3D/Object3D.cs
+++ DataConverters3D/Object3D/Object3D.cs
@@ -778,7 +778,7 @@
 				}

 				// and replace us with the children
-				var replaceCommand = new ReplaceCommand(new List<IObject3D> { this }, newChildren);
+				var replaceCommand = new ReplaceCommand(new[] { this }, newChildren);
 				if (undoBuffer != null)
 				{
 					undoBuffer.AddAndDo(replaceCommand);
@@ -814,7 +814,7 @@
 					}

 					// and replace us with the children
-					undoBuffer.AddAndDo(new ReplaceCommand(new List<IObject3D> { this }, newTree.Children.ToList()));
+					undoBuffer.AddAndDo(new ReplaceCommand(new[] { this }, newTree.Children.ToList()));
 				}
 				else
 				{


バーの表示改善

バーの表示改善

--- Inferno/InfernoScripts/Player/HUDVehicleHealth.cs
+++ Inferno/InfernoScripts/Player/HUDVehicleHealth.cs
@@ -5,6 +5,7 @@
 using System.Text;
 using System.Threading.Tasks;
 using GTA;
+using GTA.Native;
 using UniRx;

 namespace Inferno
@@ -16,20 +17,15 @@
     {

         private UIContainer _mContainer = null;
-
-        /// <summary>
-        /// 描画するゲージの種類
-        /// </summary>
-        private enum DrawStatus
-        {
-            VheicleHelth,
-            BodyHealth,
-            EngineHealth
-        };
+        private int _screenHeight;
+        private int _screenWidth;

         protected override void Setup()
         {
-            _mContainer = new UIContainer(new Point(0, 0), new Size(500, 20));
+            var screenResolution = NativeFunctions.GetScreenResolution();
+            _screenHeight = (int)screenResolution.Y;
+            _screenWidth = (int)screenResolution.X;
+            _mContainer = new UIContainer(new Point(0, 0), new Size(_screenWidth, _screenHeight));

             OnDrawingTickAsObservable
                 .Where(_ => this.GetPlayerVehicle().IsSafeExist())
@@ -57,9 +53,9 @@
             {
                 vheicleMaxHealth = vheicleHealth;
             }
-            DrawHealthBar(vheicleHealth, vheicleMaxHealth, DrawStatus.VheicleHelth);
-            DrawHealthBar(bodyHealth, 1000.0f, DrawStatus.BodyHealth);
-            DrawHealthBar(engineHealth, 1000.0f, DrawStatus.EngineHealth);
+            DrawHealthBar(vheicleHealth, vheicleMaxHealth, new Point(5, 560), Color.FromArgb(200, 200, 0, 128));
+            DrawHealthBar(bodyHealth, 1000.0f, new Point(5, 570), Color.FromArgb(200, 0, 128, 200));
+            DrawHealthBar(engineHealth, 1000.0f, new Point(5, 580), Color.FromArgb(200, 128, 200, 0));
         }

         /// <summary>
@@ -67,10 +63,9 @@
         /// </summary>
         /// <param name="health"></param>
         /// <param name="maxHealth"></param>
-        /// <param name="drawStatus"></param>
-        private void DrawHealthBar(float health, float maxHealth, DrawStatus drawStatus)
+        /// <param name="vhicleHealthType"></param>
+        private void DrawHealthBar(float health, float maxHealth, Point pos, Color foreGroundColor)
         {
-            var pos = default(Point);
             var width = 180;
             var height = 5;
             var margin = 2;
@@ -79,23 +74,9 @@
             var barPosition = default(Point);
             var barSize = default(Size);
             var backGroundColor = Color.FromArgb(128, 0, 0, 0);
-            var foreGroundColor = default(Color);

-            switch (drawStatus)
-            {
-                case DrawStatus.VheicleHelth:
-                    pos = new Point(5, 560);
-                    foreGroundColor = Color.FromArgb(200, 255, 128, 0);
-                    break;
-                case DrawStatus.BodyHealth:
-                    pos = new Point(5, 570);
-                    foreGroundColor = Color.FromArgb(200, 0, 255, 200);
-                    break;
-                case DrawStatus.EngineHealth:
-                    pos = new Point(5, 580);
-                    foreGroundColor = Color.FromArgb(200, 255, 0, 128);
-                    break;
-            }
+            var t = Function.Call<float>(Hash._GET_SCREEN_ASPECT_RATIO, true);
+            width = (int)(width + (width*(1.75f - t)));

             barLength = (int)(width * (health / maxHealth));
             if (barLength < 0) barLength = 0;


TeamCity build fix

TeamCity build fix

--- InfinniPlatform.Api/TestEnvironment/TestServer.cs
+++ InfinniPlatform.Api/TestEnvironment/TestServer.cs
@@ -9,6 +9,7 @@
 using InfinniPlatform.Api.Threading;
 using InfinniPlatform.Sdk.Environment.Settings;

+using Newtonsoft.Json;

 namespace InfinniPlatform.Api.TestEnvironment
 {


UserLookup fix due to IUserLookup modification.

--- Demos/Demo.Web/Services/UserLookup.cs
+++ Demos/Demo.Web/Services/UserLookup.cs
@@ -11,7 +11,7 @@
 {
     public class UserLookup : IUserLookup
     {
-        public string UserId(MailAddress email)
+        public string UserId(string email)
         {
             return Guid.Empty.ToString();
         }


[Dependencies] Support multi-selection copy

--- Dependencies/DependencyWindow.xaml.cs
+++ Dependencies/DependencyWindow.xaml.cs
@@ -364,24 +364,30 @@
             Debug.WriteLine("Key Pressed : " + e.Key + ". Ctrl Key down : " + CtrlKeyDown);
             if ((e.Key == System.Windows.Input.Key.C) && CtrlKeyDown)
             {
-
-                if (ListView.Name == "ModulesList")
-                {
-                    DisplayModuleInfo ModuleInfo = ListView.SelectedItem as DisplayModuleInfo;
-
-                    System.Windows.Clipboard.Clear();
-                    System.Windows.Clipboard.SetText(ModuleInfo.ModuleName, System.Windows.TextDataFormat.Text);
-                }
-                else if (ListView.Name == "ImportList")
-                {
-                    DisplayPeImport PeInfo = ListView.SelectedItem as DisplayPeImport;
-                    PeInfo.CopyValue.Execute(PeInfo.Name);
-                }
-                else if (ListView.Name == "ExportList")
-                {
-                    DisplayPeExport PeInfo = ListView.SelectedItem as DisplayPeExport;
-                    PeInfo.CopyValue.Execute(PeInfo.Name);
-                }
+                List<string> StrToCopy = new List<string>();
+                foreach (object SelectItem in ListView.SelectedItems)
+                {
+                    if (ListView.Name == "ModulesList")
+                    {
+                        DisplayModuleInfo ModuleInfo = SelectItem as DisplayModuleInfo;
+                        StrToCopy.Add(ModuleInfo.ModuleName);
+
+                    }
+                    else if (ListView.Name == "ImportList")
+                    {
+                        DisplayPeImport PeInfo = SelectItem as DisplayPeImport;
+                        StrToCopy.Add(PeInfo.Name);
+                    }
+                    else if (ListView.Name == "ExportList")
+                    {
+                        DisplayPeExport PeInfo = SelectItem as DisplayPeExport;
+                        StrToCopy.Add(PeInfo.Name);
+                    }
+                }
+
+                System.Windows.Clipboard.Clear();
+                System.Windows.Clipboard.SetText(String.Join("\n", StrToCopy.ToArray()), System.Windows.TextDataFormat.Text);
+
             }
         }


Fixed daily leaderboard deltas, made type more clear

--- DiscordBotNew/Commands/Leaderboard.cs
+++ DiscordBotNew/Commands/Leaderboard.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+using System.Threading;
 using System.Threading.Tasks;
 using Discord;
 using DiscordBotNew.CommandLoader;
@@ -83,6 +84,8 @@
             {
                 today = DateTimeOffset.Now - TimeSpan.FromDays(1);
                 yesterday = today - TimeSpan.FromDays(1);
+                oldLeaderboard = new Leaderboard { TimeGenerated = yesterday };
+                leaderboard.OldLeaderboard = oldLeaderboard;
             }

             var channels = await guild.GetTextChannelsAsync();
@@ -220,8 +223,21 @@

         public override string ToString()
         {
-            var builder = new StringBuilder("**Messages Leaderboard**\n```\n");
-            builder.AppendLine("Channels");
+            var builder = new StringBuilder($"**Messages Leaderboard**\n");
+            switch (Type)
+            {
+                case LeaderboardType.Full:
+                    builder.AppendLine("For messages sent from the beginning of time");
+                    break;
+                case LeaderboardType.Today:
+                    builder.AppendLine("For messages since midnight PT");
+                    break;
+                case LeaderboardType.Past24Hours:
+                    builder.AppendLine("For messages in the last 24 hours");
+                    break;
+            }
+
+            builder.AppendLine("```\nChannels");
             foreach (var channel in OrderedChannelMessages)
             {
                 if (OldLeaderboard == null)