Added support to get files from directory

--- dotnet.common/dotnet.common/files/FilesExtensions.cs
+++ dotnet.common/dotnet.common/files/FilesExtensions.cs
@@ -1,5 +1,8 @@
 using System;
+using System.Collections.Generic;
+using System.Configuration;
 using System.IO;
+using System.Linq;
 using System.Security.Cryptography;

 namespace dotnet.common.files
@@ -42,7 +45,40 @@
             }
         }

-       public static bool MatchFileContent(this string filePath, string otherFilePath)
+        public static IList<string> GetFilesInFolderWithExtension(this string path, string fileExtension,
+            bool includeSubDirectories = false, TimeSpan? onlyFilesOlderThan = null)
+        {
+            if (!fileExtension.StartsWith("."))
+                fileExtension = "." + fileExtension;
+
+            return path.GetFilesInFolderAsPaths(string.Format("*{0}", fileExtension), includeSubDirectories,
+                onlyFilesOlderThan);
+        }
+
+        public static IList<string> GetFilesInFolderAsPaths(this string path,string pattern="*.*",bool includeSubDirectories=false,TimeSpan? onlyFilesOlderThan=null)
+        {
+            if(!Directory.Exists(path))
+                return new List<string>();
+
+            return
+                path.GetFilesInFolder(pattern, includeSubDirectories, onlyFilesOlderThan)
+                    .Select(x => x.FullName)
+                    .ToList();
+        }
+
+        public static IList<FileInfo> GetFilesInFolder(this string path, string pattern = "*.*", bool includeSubDirectories = false, TimeSpan? onlyFilesOlderThan = null)
+        {
+            if (!Directory.Exists(path))
+                return new List<FileInfo>();
+
+            return Directory.GetFiles(path, pattern,
+                includeSubDirectories ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly)
+                .Select(f => new FileInfo(f))
+                .Where(f => onlyFilesOlderThan == null || (DateTime.Now - f.CreationTime) > onlyFilesOlderThan.Value)
+                .ToList();
+        }
+
+        public static bool MatchFileContent(this string filePath, string otherFilePath)
         {
             if (string.IsNullOrWhiteSpace(filePath))
                 throw new ArgumentNullException("filePath is null or empty");
@@ -63,4 +99,4 @@
             }
         }
     }
-}
+    }


fixed recusrive call bug

fixed recusrive call bug

--- Interfacing/StateInterface.cs
+++ Interfacing/StateInterface.cs
@@ -20,7 +20,7 @@

 		public ICommand[] TakeAllCommands()
 		{
-			return TakeAllCommands();
+			return _commandQueue.TakeAllCommands();
 		}

 		public abstract void Enter();


Add missing RestClient.For overloads

Add missing RestClient.For overloads

--- src/RestEase/RestClient.cs
+++ src/RestEase/RestClient.cs
@@ -17,12 +17,15 @@

         private static readonly ImplementationBuilder implementationBuilder = new ImplementationBuilder();

-        private static HttpClient CreateClient(string baseUrl)
+        private static HttpClient CreateClient(string baseUrl, RequestModifier requestModifier = null)
         {
-            return new HttpClient()
-            {
-                BaseAddress = new Uri(baseUrl),
-            };
+            var httpClient = requestModifier == null ?
+                new HttpClient() :
+                new HttpClient(new ModifyingClientHttpHandler(requestModifier));
+
+            httpClient.BaseAddress = new Uri(baseUrl);
+
+            return httpClient;
         }

         /// <summary>
@@ -45,23 +48,7 @@
         /// <returns>An implementation of that interface which you can use to invoke the API</returns>
         public static T For<T>(string baseUrl, RequestModifier requestInterceptor)
         {
-            var httpClient = new HttpClient(new ModifyingClientHttpHandler(requestInterceptor))
-            {
-                BaseAddress = new Uri(baseUrl),
-            };
-
-            return For<T>(httpClient);
-        }
-
-        /// <summary>
-        /// Create a client using the given HttpClient
-        /// </summary>
-        /// <typeparam name="T">Interface representing the API</typeparam>
-        /// <param name="httpClient">HttpClient to use to make requests</param>
-        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
-        public static T For<T>(HttpClient httpClient)
-        {
-            return For<T>(httpClient, jsonSerializerSettings: null);
+            return For<T>(CreateClient(baseUrl, requestInterceptor));
         }

         /// <summary>
@@ -74,6 +61,57 @@
         public static T For<T>(string baseUrl, JsonSerializerSettings jsonSerializerSettings)
         {
             return For<T>(CreateClient(baseUrl), jsonSerializerSettings);
+        }
+
+        /// <summary>
+        /// Create a client using the given base URL and Json.NET serializer settings
+        /// </summary>
+        /// <typeparam name="T">Interface representing the API</typeparam>
+        /// <param name="baseUrl">Base URL</param>
+        /// <param name="requestInterceptor">Delegate called on every request</param>
+        /// <param name="jsonSerializerSettings">Serializer settings to pass to Json.NET</param>
+        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
+        public static T For<T>(string baseUrl, RequestModifier requestInterceptor, JsonSerializerSettings jsonSerializerSettings)
+        {
+            return For<T>(CreateClient(baseUrl, requestInterceptor), jsonSerializerSettings);
+        }
+
+        /// <summary>
+        /// Create a client using the given base URL, and custom serializer and/or deserializer
+        /// </summary>
+        /// <typeparam name="T">Interface representing the API</typeparam>
+        /// <param name="baseUrl">Base URL</param>
+        /// <param name="responseDeserializer">Deserializer to use when deserializing responses</param>
+        /// <param name="requestBodySerializer">Serializer to use when serializing request bodies, for which BodySerializationMethod.Serialized has been selected</param>
+        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
+        public static T For<T>(string baseUrl, IResponseDeserializer responseDeserializer = null, IRequestBodySerializer requestBodySerializer = null)
+        {
+            return For<T>(CreateClient(baseUrl), responseDeserializer, requestBodySerializer);
+        }
+
+        /// <summary>
+        /// Create a client using the given base URL, and custom serializer and/or deserializer
+        /// </summary>
+        /// <typeparam name="T">Interface representing the API</typeparam>
+        /// <param name="baseUrl">Base URL</param>
+        /// <param name="requestInterceptor">Delegate called on every request</param>
+        /// <param name="responseDeserializer">Deserializer to use when deserializing responses</param>
+        /// <param name="requestBodySerializer">Serializer to use when serializing request bodies, for which BodySerializationMethod.Serialized has been selected</param>
+        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
+        public static T For<T>(string baseUrl, RequestModifier requestInterceptor, IResponseDeserializer responseDeserializer = null, IRequestBodySerializer requestBodySerializer = null)
+        {
+            return For<T>(CreateClient(baseUrl, requestInterceptor), responseDeserializer, requestBodySerializer);
+        }
+
+        /// <summary>
+        /// Create a client using the given HttpClient
+        /// </summary>
+        /// <typeparam name="T">Interface representing the API</typeparam>
+        /// <param name="httpClient">HttpClient to use to make requests</param>
+        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
+        public static T For<T>(HttpClient httpClient)
+        {
+            return For<T>(httpClient, jsonSerializerSettings: null);
         }

         /// <summary>
@@ -95,19 +133,6 @@
             };

             return For<T>(httpClient, responseDeserializer, requestBodySerializer);
-        }
-
-        /// <summary>
-        /// Create a client using the given base URL, and custom serializer and/or deserializer
-        /// </summary>
-        /// <typeparam name="T">Interface representing the API</typeparam>
-        /// <param name="baseUrl">Base URL</param>
-        /// <param name="responseDeserializer">Deserializer to use when deserializing responses</param>
-        /// <param name="requestBodySerializer">Serializer to use when serializing request bodies, for which BodySerializationMethod.Serialized has been selected</param>
-        /// <returns>An implementation of that interface which you can use to invoke the API</returns>
-        public static T For<T>(string baseUrl, IResponseDeserializer responseDeserializer = null, IRequestBodySerializer requestBodySerializer = null)
-        {
-            return For<T>(CreateClient(baseUrl), responseDeserializer, requestBodySerializer);
         }

         /// <summary>


Fix broken claims and characters filter

Fix broken claims and characters filter

--- JoinRpg.Services.Impl/ClaimProblemFilters/BrokenClaimsAndCharacters.cs
+++ JoinRpg.Services.Impl/ClaimProblemFilters/BrokenClaimsAndCharacters.cs
@@ -12,7 +12,7 @@
       {
         yield return new ClaimProblem(claim, ClaimProblemType.ClaimActiveButCharacterHasApprovedClaim);
       }
-      if (claim.IsActive &&  (claim.Character == null || !claim.Character.IsActive))
+      if (claim.IsApproved &&  (claim.Character == null || !claim.Character.IsActive))
       {
         yield return new ClaimProblem(claim, ClaimProblemType.NoCharacterOnApprovedClaim);
       }


be liberal in accepting namespaces from msbuild

--HG--
extra : convert_revision : svn%3A10be67ac-ae8e-469c-802c-7edf5013fb60/trunk%40185

--- IronMeta.Generator/Program.cs
+++ IronMeta.Generator/Program.cs
@@ -162,6 +162,7 @@
                         nameSpace = nameSpace.Substring(1);
                     while (nameSpace.Length > 0 && !char.IsLetter(nameSpace[nameSpace.Length - 1]))
                         nameSpace = nameSpace.Substring(0, nameSpace.Length - 1);
+                    nameSpace = nameSpace.Replace('\\', '.').Replace('/', '.');

                     continue;
                 }


Fix accessibility string comparisons

Fix accessibility string comparisons

--- MetaCompilation/MetaCompilation/MetaCompilation/DiagnosticAnalyzer.cs
+++ MetaCompilation/MetaCompilation/MetaCompilation/DiagnosticAnalyzer.cs
@@ -316,7 +316,7 @@
                     return false;
                 }

-                if (_propertySymbol.Name.ToString() != "SupportedDiagnostics" || _propertySymbol.DeclaredAccessibility.ToString() != "Public" ||
+                if (_propertySymbol.Name.ToString() != "SupportedDiagnostics" || _propertySymbol.DeclaredAccessibility != Accessibility.Public ||
                     !_propertySymbol.IsOverride || _propertySymbol.OverriddenProperty.ToString() != "Microsoft.CodeAnalysis.Diagnostics.DiagnosticAnalyzer.SupportedDiagnostics"
                     || _propertySymbol.Type.ToString() != "System.Collections.Immutable.ImmutableArray<Microsoft.CodeAnalysis.DiagnosticDescriptor>")
                 {
@@ -504,7 +504,7 @@
                 List<string> idNames = new List<string>();
                 foreach (IFieldSymbol field in _analyzerFieldSymbols)
                 {
-                    if (field.IsConst && field.IsStatic && field.DeclaredAccessibility.ToString() == "Public" && field.Type.ToString() == "string")
+                    if (field.IsConst && field.IsStatic && field.DeclaredAccessibility == Accessibility.Public && field.Type.ToString() == "string")
                     {
                         if (field.Name == null)
                         {
@@ -536,7 +536,7 @@
                 {
                     //checking method signature
                     ImmutableArray<IParameterSymbol> parameters = _initializeSymbol.Parameters;
-                    if (parameters.Count() != 1 || parameters[0].Type.ToString() != "Microsoft.CodeAnalysis.Diagnostics.AnalysisContext" || parameters[0].Name.ToString() != "context" || _initializeSymbol.DeclaredAccessibility.ToString() != "Public" || !_initializeSymbol.IsOverride || !_initializeSymbol.ReturnsVoid)
+                    if (parameters.Count() != 1 || parameters[0].Type.ToString() != "Microsoft.CodeAnalysis.Diagnostics.AnalysisContext" || parameters[0].Name.ToString() != "context" || _initializeSymbol.DeclaredAccessibility != Accessibility.Public || !_initializeSymbol.IsOverride || !_initializeSymbol.ReturnsVoid)
                     {
                         ReportDiagnostic(context, IncorrectInitSigRule, _initializeSymbol.Locations[0], MissingInitRule.MessageFormat);
                         return new List<object>(new object[] { registerCall, registerArgs, invocExpr });


use name instead of shortened version because shortening is handled by css and having elipses means that @reply shortcuts get generated incorrectly.  Fix #862

--- JabbR/Views/Home/index.cshtml
+++ JabbR/Views/Home/index.cshtml
@@ -46,7 +46,7 @@

                 {{if showUser}}

-
${trimmedName}

+
${name}

                 {{/if}}


Убрал дублирование описаний при выводе в text.csv


laste

laste

--- JabbR/Views/Home/index.cshtml
+++ JabbR/Views/Home/index.cshtml
@@ -4,7 +4,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-    <title>jean0514jabbr01</title>
+    <title>jean0514jabbr0514</title>
     <meta http-equiv="X-UA-Compatible" content="IE=9" />
     <meta name="description" content="A real-time chat application." />
     <meta name="keywords" content="chat,realtime chat,signalr,jabbr" />


Fix Android build errors introduced in 2d89ac8.

--- Joey/Bugsnag/BugsnagClient.cs
+++ Joey/Bugsnag/BugsnagClient.cs
@@ -426,7 +426,7 @@
                     Model = Android.OS.Build.Model,
                     ScreenDensity = androidContext.Resources.DisplayMetrics.Density,
                     ScreenResolution = AndroidInfo.GetScreenResolution (androidContext),
-                    TotalMemory = AndroidInfo.GetMemoryAvailable (),
+                    TotalMemory = (ulong)AndroidInfo.GetMemoryAvailable (),
                     OperatingSystem = "android",
                     OperatingSystemVersion = Android.OS.Build.VERSION.Release,
                     ApiLevel = (int)Android.OS.Build.VERSION.SdkInt,
@@ -448,11 +448,11 @@
             }

             return new Toggl.Joey.Bugsnag.Data.SystemState () {
-                FreeMemory = AndroidInfo.GetFreeMemory (),
+                FreeMemory = (ulong)AndroidInfo.GetFreeMemory (),
                 Orientation = AndroidInfo.GetOrientation (androidContext),
                 BatteryLevel = AndroidInfo.GetBatteryLevel (androidContext),
                 IsCharging = AndroidInfo.CheckBatteryCharging (androidContext),
-                AvailableDiskSpace = AndroidInfo.GetAvailableDiskSpace (),
+                AvailableDiskSpace = (ulong)AndroidInfo.GetAvailableDiskSpace (),
                 LocationStatus = AndroidInfo.GetGpsStatus (androidContext),
                 NetworkStatus = AndroidInfo.GetNetworkStatus (androidContext),
             };


Modified to properly delete items being deleted async.

--- NTierApplications/NTierApplications.Data/Repositories/EfRepository.cs
+++ NTierApplications/NTierApplications.Data/Repositories/EfRepository.cs
@@ -75,11 +75,10 @@
 			if (id == 0)
 				throw new ArgumentNullException("id");

-			TEntity entity = new TEntity() {Id = id};
-
 			try
 			{
-				_dbSet.Remove(entity);
+				var entity = _dbSet.Find(id);
+				_dbContext.Entry(entity).State = EntityState.Deleted;
 				_dbContext.SaveChanges();
 			}
 			catch (DbEntityValidationException ex)


Removed redundant asset fetches on HGAssetMapper. The UuidGatherer already downloads the assets, so we don't need to do it again...

--- OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -71,6 +71,21 @@

         #region Internal functions

+        public AssetMetadata FetchMetadata(string url, UUID assetID)
+        {
+            if (!url.EndsWith("/") && !url.EndsWith("="))
+                url = url + "/";
+
+            AssetMetadata meta = m_scene.AssetService.GetMetadata(url + assetID.ToString());
+
+            if (meta != null)
+                m_log.DebugFormat("[HG ASSET MAPPER]: Fetched metadata for asset {0} of type {1} from {2} ", assetID, meta.Type, url);
+            else
+                m_log.DebugFormat("[HG ASSET MAPPER]: Unable to fetched metadata for asset {0} from {1} ", assetID, url);
+
+            return meta;
+        }
+
         public AssetBase FetchAsset(string url, UUID assetID)
         {
             if (!url.EndsWith("/") && !url.EndsWith("="))
@@ -222,28 +237,19 @@

         public void Get(UUID assetID, UUID ownerID, string userAssetURL)
         {
-            // Get the item from the remote asset server onto the local AssetCache
-            // and place an entry in m_assetMap
-
-            m_log.Debug("[HG ASSET MAPPER]: Fetching object " + assetID + " from asset server " + userAssetURL);
-            AssetBase asset = FetchAsset(userAssetURL, assetID);
-
-            if (asset != null)
-            {
-                // OK, now fetch the inside.
-                Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
-                HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, userAssetURL);
-                uuidGatherer.GatherAssetUuids(asset.FullID, (AssetType)asset.Type, ids);
-                if (ids.ContainsKey(assetID))
-                    ids.Remove(assetID);
-                foreach (UUID uuid in ids.Keys)
-                    FetchAsset(userAssetURL, uuid);
-
-                m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", asset.ID, userAssetURL);
-
-            }
-            else
-                m_log.Warn("[HG ASSET MAPPER]: Could not fetch asset from remote asset server " + userAssetURL);
+            // Get the item from the remote asset server onto the local AssetService
+
+            AssetMetadata meta = FetchMetadata(userAssetURL, assetID);
+            if (meta == null)
+                return;
+
+            // The act of gathering UUIDs downloads the assets from the remote server
+            Dictionary<UUID, AssetType> ids = new Dictionary<UUID, AssetType>();
+            HGUuidGatherer uuidGatherer = new HGUuidGatherer(this, m_scene.AssetService, userAssetURL);
+            uuidGatherer.GatherAssetUuids(assetID, (AssetType)meta.Type, ids);
+
+            m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", assetID, userAssetURL);
+
         }


Deleted extraneous debug message

Deleted extraneous debug message

--- OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
+++ OpenSim/Region/CoreModules/Framework/InventoryAccess/HGAssetMapper.cs
@@ -233,8 +233,6 @@
             HGUuidGatherer uuidGatherer = new HGUuidGatherer(m_scene.AssetService, userAssetURL);
             uuidGatherer.GatherAssetUuids(assetID, (AssetType)meta.Type, ids);

-            m_log.DebugFormat("[HG ASSET MAPPER]: Successfully fetched asset {0} from asset server {1}", assetID, userAssetURL);
-
         }


Squashed 'Externals/Core/' changes from 5939f1f..50b3af3

50b3af3 Updated the OfferDto due to Cyclic reference

git-subtree-dir: Externals/Core
git-subtree-split: 50b3af329ba17c328950a1333e473a572da3ef0e

--- PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Merchant/OfferDto.cs
+++ PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Merchant/OfferDto.cs
@@ -15,7 +15,7 @@
         public string OfferReference { get; set; }

         [DataMember]
-        public OpportunityDto Opportunity { get; set; }
+        public Guid OpportunityGuid { get; set; }

         [DataMember]
         public GatewayOfferDto GatewayOffer { get; set; }


bugfix

bugfix

--- Projects/Server/Sys/SF.Sys.Data.Implements/TransactionScopeManager.cs
+++ Projects/Server/Sys/SF.Sys.Data.Implements/TransactionScopeManager.cs
@@ -163,7 +163,7 @@
 			catch(Exception e)
 			{
 				_Exception = e;
-				throw e;
+				throw;
 			}
 			finally
 			{


added RawMessageEventArgs constructor

added RawMessageEventArgs constructor

--- Midi/Sanford.Multimedia.Midi/Messages/EventArgs/RawMessageEventArgs.cs
+++ Midi/Sanford.Multimedia.Midi/Messages/EventArgs/RawMessageEventArgs.cs
@@ -24,6 +24,11 @@
                     (byte)ShortMessage.UnpackData1(message),
                     (byte)ShortMessage.UnpackData2(message) };
         }
+
+        public RawMessageEventArgs(byte status, byte data1, byte data2)
+        {
+            this.message = new byte[] { status, data1, data2 };
+        }

         public byte[] Message
         {


bugs: infiniminer client sometimes freezes on quit, possibly related to alttabbing, water/lava tends to duplicate when spawned against the border, not sure on cause

--- code/InfiniminerServer/InfiniminerServer.cs
+++ code/InfiniminerServer/InfiniminerServer.cs
@@ -1469,6 +1469,7 @@

             blockList[x, y, z] = blockType;
             blockCreatorTeam[x, y, z] = team;
+            flowSleep[x, y, z] = false;

             // x, y, z, type, all bytes
             NetBuffer msgBuffer = netServer.CreateBuffer();
@@ -1506,12 +1507,13 @@
                     {
                         flowSleep[i, j, k] = false;
                         blockList[i, (ushort)(MAPSIZE - 1 - k), j] = worldData[i, j, k];
-                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 0] = 0;//pipe src x
-                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 1] = 0;//pipe src y
-                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 2] = 0;//pipe dst x
-                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 3] = 0;//pipe dst y
+                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 0] = 0;//content data for blocks, such as pumps
+                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 1] = 0;
+                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 2] = 0;
+                        blockListContent[i,(ushort)(MAPSIZE - 1 - k), j, 3] = 0;
                         blockCreatorTeam[i, j, k] = PlayerTeam.None;
                     }
+
             for (int i = 0; i < MAPSIZE * 2; i++)
             {
                 DoStuff();
@@ -2295,7 +2297,7 @@
             for (ushort i = 0; i < MAPSIZE; i++)
                 for (ushort j = 0; j < MAPSIZE; j++)
                     for (ushort k = 0; k < MAPSIZE; k++)
-                        if (blockList[i, j, k] == BlockType.Water && !flowSleep[i, j, k]|| blockList[i, j, k] == BlockType.Lava && !flowSleep[i, j, k])//should be liquid check, not comparing each block
+                        if (blockList[i, j, k] == BlockType.Water && !flowSleep[i, j, k] || blockList[i, j, k] == BlockType.Lava && !flowSleep[i, j, k])//should be liquid check, not comparing each block
                         {//dowaterstuff //dolavastuff
                             BlockType liquid = blockList[i, j, k];
                             BlockType opposing = BlockType.None;
@@ -2339,7 +2341,7 @@
                                 }
                             }

-                            //check for conflicting lava
+                            //check for conflicting lava//may need to check bounds
                             if (opposing != BlockType.None)
                             {
                                 BlockType transform = BlockType.Rock;


feat(Animated): Adds support for extrapolation

Adds support for the `extrapolate` parameter on the native interpolation node. This is pretty much a 1 to 1 port of the JS implementation.

--- ReactWindows/ReactNative.Shared/Animated/InterpolationAnimatedNode.cs
+++ ReactWindows/ReactNative.Shared/Animated/InterpolationAnimatedNode.cs
@@ -1,12 +1,19 @@
 using Newtonsoft.Json.Linq;
 using System;
+using static System.FormattableString;

 namespace ReactNative.Animated
 {
     class InterpolationAnimatedNode : ValueAnimatedNode
     {
+        public const string ExtrapolateTypeIdentity = "identity";
+        public const string ExtrapolateTypeClamp = "clamp";
+        public const string ExtrapolateTypeExtend = "extend";
+
         private readonly double[] _inputRange;
         private readonly double[] _outputRange;
+        private readonly string _extrapolateLeft;
+        private readonly string _extrapolateRight;

         private ValueAnimatedNode _parent;

@@ -15,6 +22,8 @@
         {
             _inputRange = config.GetValue("inputRange", StringComparison.Ordinal).ToObject<double[]>();
             _outputRange = config.GetValue("outputRange", StringComparison.Ordinal).ToObject<double[]>();
+            _extrapolateLeft = config.Value<string>("extrapolateLeft");
+            _extrapolateRight = config.Value<string>("extrapolateRight");
         }

         protected override void OnAttachedToNode(AnimatedNode parent)
@@ -51,7 +60,7 @@
                     "Trying to update interpolation node that has not been attached to the parent.");
             }

-            Value = Interpolate(_parent.Value, _inputRange, _outputRange);
+            Value = Interpolate(_parent.Value, _inputRange, _outputRange, _extrapolateLeft, _extrapolateRight);
         }

         private static double Interpolate(
@@ -59,13 +68,57 @@
             double inputMin,
             double inputMax,
             double outputMin,
-            double outputMax)
+            double outputMax,
+            string extrapolateLeft,
+            string extrapolateRight)
         {
+            var result = value;
+
+            // Extrapolate
+            if (result < inputMin)
+            {
+                switch (extrapolateLeft)
+                {
+                    case ExtrapolateTypeIdentity:
+                        return result;
+                    case ExtrapolateTypeClamp:
+                        result = inputMin;
+                        break;
+                    case ExtrapolateTypeExtend:
+                        break;
+                    default:
+                        throw new InvalidOperationException(
+                            Invariant($"Invalid extrapolation type '{extrapolateLeft}' for left extrapolation."));
+                }
+            }
+
+            if (result > inputMax)
+            {
+                switch (extrapolateRight)
+                {
+                    case ExtrapolateTypeIdentity:
+                        return result;
+                    case ExtrapolateTypeClamp:
+                        result = inputMax;
+                        break;
+                    case ExtrapolateTypeExtend:
+                        break;
+                    default:
+                        throw new InvalidOperationException(
+                            Invariant($"Invalid extrapolation type '{extrapolateRight} for right extrapolation"));
+                }
+            }
+
             return outputMin + (outputMax - outputMin) *
-                (value - inputMin) / (inputMax - inputMin);
+                (result - inputMin) / (inputMax - inputMin);
         }

-        private static double Interpolate(double value, double[] inputRange, double[] outputRange)
+        private static double Interpolate(
+            double value,
+            double[] inputRange,
+            double[] outputRange,
+            string extrapolateLeft,
+            string extrapolateRight)
         {
             var rangeIndex = FindRangeIndex(value, inputRange);
             return Interpolate(
@@ -73,7 +126,9 @@
                 inputRange[rangeIndex],
                 inputRange[rangeIndex + 1],
                 outputRange[rangeIndex],
-                outputRange[rangeIndex + 1]);
+                outputRange[rangeIndex + 1],
+                extrapolateLeft,
+                extrapolateRight);
         }

         private static int FindRangeIndex(double value, double[] ranges)


v1.4 完善MessageHandler的CancleExecute参数操作说明。

--- Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs
+++ Senparc.Weixin.MP/Senparc.Weixin.MP/MessageHandlers/MessageHandler.cs
@@ -23,6 +23,7 @@
         /// 默认为False。
         /// 如果在执行OnExecuting()执行前设为True，则所有OnExecuting()、Execute()、OnExecuted()代码都不会被执行。
         /// 如果在执行OnExecuting()执行过程中设为True，则后续Execute()及OnExecuted()代码不会被执行。
+        /// 建议在设为True的时候，给ResponseMessage赋值，以返回友好信息。
         /// </summary>
         bool CancelExcute { get; set; }


tweak

tweak

--- King.Service/RecurringTask.cs
+++ King.Service/RecurringTask.cs
@@ -157,7 +157,7 @@
         /// <summary>
         /// Service Name (For Tracing)
         /// </summary>
-        protected string ServiceName
+        protected virtual string ServiceName
         {
             get;
             set;


removed event handling

removed event handling

--- Konstruktor2/LifetimeScope.cs
+++ Konstruktor2/LifetimeScope.cs
@@ -1,6 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.Reflection;

 namespace Konstruktor
 {
@@ -12,7 +11,6 @@
 		readonly uint _level;

 		readonly Dictionary<Type, object> _instances = new Dictionary<Type, object>();
-		readonly Dictionary<Type, Action<object, EventInfo>> _wireEventHandler = new Dictionary<Type, Action<object, EventInfo>>();
 		readonly IList<IDisposable> _objectsToDispose = new List<IDisposable>();

 		public LifetimeScope(IBuilder builder)
@@ -58,7 +56,6 @@
 			}

 			// now we are safe!
-			_wireEventHandler.Clear();
 			_instances.Clear();
 		}


add missing output description (wps3)

add missing output description (wps3)

--- Terradue.Tep/Terradue/Tep/Controller/Service/WpsProcessOfferingTep.cs
+++ Terradue.Tep/Terradue/Tep/Controller/Service/WpsProcessOfferingTep.cs
@@ -215,6 +215,18 @@
                 }
                 description.DataInputs.Add(input);
             }
+
+            //outputs
+            var output = new OutputDescriptionType {
+                Identifier = new CodeType { Value = "result_osd" },
+                Title = new LanguageStringType { Value = "OpenSearch Description to the Results" },
+                Abstract = new LanguageStringType { Value = "OpenSearch Description to the Results" },
+                Item = new SupportedComplexDataType {
+                    Default = new ComplexDataCombinationType { Format = new ComplexDataDescriptionType { MimeType = "application/opensearchdescription+xml" } },
+                    Supported = new List<ComplexDataDescriptionType> { new ComplexDataDescriptionType { MimeType = "application/opensearchdescription+xml" } }
+                }
+            };
+            description.ProcessOutputs.Add(output);

             processDescriptions.ProcessDescription = new List<ProcessDescriptionType> { description };
             return processDescriptions;


extracted processing header

extracted processing header

--- src/Woff.net/WoffReader.cs
+++ src/Woff.net/WoffReader.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Diagnostics.Contracts;
+using System.Diagnostics.Contracts;
 using System.Globalization;
 using System.IO;
 using Mono;
@@ -24,6 +23,13 @@

         public void Process()
+        {
+            Contract.Ensures(HeaderState != null);
+
+            ProcessHeader();
+        }
+
+        private void ProcessHeader()
         {
             var bytes = new byte[WoffHeader.Size];
             if (_binaryReader.Read(bytes, 0, bytes.Length) != WoffHeader.Size)
@@ -51,7 +57,11 @@
             var totalSfntSize = enc.GetUInt32(bytes, 16);
             if (totalSfntSize % 4 != 0)
             {
-                throw new InvalidWoffTotalSfntSizeException(string.Format(CultureInfo.InvariantCulture, "The total sfnt size ({0}) is not a multiple of four.", totalSfntSize));
+                throw new InvalidWoffTotalSfntSizeException(
+                    string.Format(
+                        CultureInfo.InvariantCulture,
+                        "The total sfnt size ({0}) is not a multiple of four.",
+                        totalSfntSize));
             }

             var majorVersion = enc.GetUInt16(bytes, 20);
@@ -62,7 +72,20 @@
             var privOffset = enc.GetUInt32(bytes, 36);
             var privLength = enc.GetUInt32(bytes, 40);

-            _header = new WoffHeader(signature, flavor, length, numTables, reserved, totalSfntSize, majorVersion, minorVersion, metaOffset, metaLength, metaOrigLength, privOffset, privLength);
+            _header = new WoffHeader(
+                signature,
+                flavor,
+                length,
+                numTables,
+                reserved,
+                totalSfntSize,
+                majorVersion,
+                minorVersion,
+                metaOffset,
+                metaLength,
+                metaOrigLength,
+                privOffset,
+                privLength);

             var hasIllegalMetadata = WoffHeaderValidator.HasIllegalMetadata(_header);
             var hasIllegalPrivateData = WoffHeaderValidator.HasIllegalPrivateData(_header);


Refactoring with Contains functions

Refactoring with Contains functions

--- src/YAGLi/DirectedGraph.cs
+++ src/YAGLi/DirectedGraph.cs
@@ -235,24 +235,23 @@

         public override IEnumerable<TEdge> IncidentEdgesOf(TVertex vertex)
         {
-            return !Vertices.Contains(vertex, _verticesComparer) ? Enumerable.Empty<TEdge>() : IncidentEdgesInto(vertex).Concat(IncidentEdgesOutOf(vertex))
+            return !ContainsVertex(vertex) ? Enumerable.Empty<TEdge>() : IncidentEdgesInto(vertex).Concat(IncidentEdgesOutOf(vertex))
                                                                                .Distinct(_edgesComparer);
         }

         public IEnumerable<TEdge> IncidentEdgesInto(TVertex vertex)
         {
-            return !Vertices.Contains(vertex, _verticesComparer) ? Enumerable.Empty<TEdge>() : _incidentEdgesIn[vertex];
+            return !ContainsVertex(vertex) ? Enumerable.Empty<TEdge>() : _incidentEdgesIn[vertex];
         }

         public IEnumerable<TEdge> IncidentEdgesOutOf(TVertex vertex)
         {
-            return !Vertices.Contains(vertex, _verticesComparer) ? Enumerable.Empty<TEdge>() : _incidentEdgesOutOf[vertex];
+            return !ContainsVertex(vertex) ? Enumerable.Empty<TEdge>() : _incidentEdgesOutOf[vertex];
         }

         public override IEnumerable<TVertex> IncidentVerticesOf(TEdge edge)
         {
-            if (!Edges.Contains(edge, _edgesComparer)
-                && !Edges.Contains(edge, new ConsiderDirectionAndDisallowParallelEdges<TVertex, TEdge>(_verticesComparer)))
+            if (!ContainsEdge(edge))
             {
                 return Enumerable.Empty<TVertex>();
             }


Removed PartialTransactionSessionManager from Monitor Imported from Changeset 164

--- src/Stratis.FederatedPeg.Features.FederationGateway/Controllers/FederationGatewayController.cs
+++ src/Stratis.FederatedPeg.Features.FederationGateway/Controllers/FederationGatewayController.cs
@@ -27,8 +27,8 @@

         private IMonitorChainSessionManager monitorChainSessionManager;

-        public FederationGatewayController(IPartialTransactionSessionManager partialTransactionSessionManager,
-        ICounterChainSessionManager counterChainSessionManager, IMonitorChainSessionManager monitorChainSessionManager)
+        public FederationGatewayController(ICounterChainSessionManager counterChainSessionManager,
+            IMonitorChainSessionManager monitorChainSessionManager)
         {
             this.partialTransactionSessionManager = partialTransactionSessionManager;
             this.monitorChainSessionManager = monitorChainSessionManager;


Added missing key value for a test dictionary item

--- src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
+++ src/Umbraco.Tests.Integration/Umbraco.Infrastructure/Packaging/PackageDataInstallationTests.cs
@@ -1,6 +1,7 @@
 // Copyright (c) Umbraco.
 // See LICENSE for more details.

+using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading;
@@ -766,7 +767,7 @@
                 new DictionaryItem("Parent")
                 {
                     // This matches what is in the package.xml file
-                    Key = new System.Guid("28f2e02a-8c66-4fcd-85e3-8524d551c0d3"),
+                    Key = new Guid("28f2e02a-8c66-4fcd-85e3-8524d551c0d3"),
                     Translations = new List<IDictionaryTranslation>
                                     {
                                             new DictionaryTranslation(englishLanguage, expectedEnglishParentValue),
@@ -782,6 +783,8 @@
             LocalizationService.Save(
                 new DictionaryItem("Parent")
                 {
+                    // This matches what is in the package.xml file
+                    Key = new Guid("28f2e02a-8c66-4fcd-85e3-8524d551c0d3"),
                     Translations = new List<IDictionaryTranslation>
                                     {
                                             new DictionaryTranslation(englishLanguage, expectedEnglishParentValue),


Skip empty initializers

Skip empty initializers

--- src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SyntaxNodeExtensions.cs
+++ src/Workspaces/SharedUtilitiesAndExtensions/Compiler/CSharp/Extensions/SyntaxNodeExtensions.cs
@@ -211,7 +211,7 @@
                     return (property.OpenBraceToken, property.CloseBraceToken);
                 case WithExpressionSyntax withExpr:
                     return (withExpr.Initializer.OpenBraceToken, withExpr.Initializer.CloseBraceToken);
-                case ImplicitObjectCreationExpressionSyntax newExpr:
+                case ImplicitObjectCreationExpressionSyntax newExpr when newExpr.Initializer != null:
                     return (newExpr.Initializer.OpenBraceToken, newExpr.Initializer.CloseBraceToken);
             }


Adds square root operation

Adds square root operation

--- RPNCalculator/RPNStack.cs
+++ RPNCalculator/RPNStack.cs
@@ -34,7 +34,8 @@
         SUB,
         DIV,
         MUL,
-        UNARY_MINUS
+        UNARY_MINUS,
+		SQUARE_ROOT
     };

     /// <summary>


Removing empty spaces in DemoLayer

Removing empty spaces in DemoLayer

--- examples/ChipmunkExample/Common/ChipmunkDemoLayer.cs
+++ examples/ChipmunkExample/Common/ChipmunkDemoLayer.cs
@@ -304,7 +304,6 @@
             ChangeActualSubScene(SubScenePlayer.Index);
         }

-
         /// <summary>
         /// Loads next example scene
         /// </summary>
@@ -552,7 +551,6 @@
         protected virtual void Draw()
         {
             m_debugDraw.DebugDraw();
-
             if (CCMouse.Instance.HasPosition)
                 m_debugDraw.DrawCircle(CCMouse.Instance.Position, 2.0f, CCMouse.Instance.mouseJoint != null ? cpColor.WhiteGreen : cpColor.WhiteRed);
         }


For debugging...

For debugging...

--- Core/Theraot/Threading/Needles/Transact.Needle.cs
+++ Core/Theraot/Threading/Needles/Transact.Needle.cs
@@ -29,7 +29,8 @@
                     _transaction = Transact.CurrentTransaction;
                     if (ReferenceEquals(_transaction, null))
                     {
-                        return base.Value;
+                        var tmp = base.Value;
+                        return tmp;
                     }
                     else
                     {


Fix test, we have a custom Exception now that is public.

--- AppSettingsByConventionTests/WhenAnalyzingExportedTypes.cs
+++ AppSettingsByConventionTests/WhenAnalyzingExportedTypes.cs
@@ -1,4 +1,5 @@
-using AppSettingsByConvention;
+using System.Linq;
+using AppSettingsByConvention;
 using FluentAssertions;
 using NUnit.Framework;

@@ -14,12 +15,13 @@
             {
                 typeof(SettingsByConvention),
                 typeof(IConnectionString),
-                typeof(IParser)
+                typeof(IParser),
+                typeof(UnsupportedPropertyTypeException)
             };

             var exportedTypes = typeof (SettingsByConvention).Assembly.GetExportedTypes();

-            exportedTypes.ShouldBeEquivalentTo(whiteList);
+            exportedTypes.ShouldBeEquivalentTo(whiteList, "that is the whitelist, but found unexpected types "+string.Join(", ", exportedTypes.Except(whiteList)));
         }
     }
 }


almost good result!

almost good result!

--- Assets/UnitySpineImporter/Scripts/Editor/Util/SpineUtil.cs
+++ Assets/UnitySpineImporter/Scripts/Editor/Util/SpineUtil.cs
@@ -531,7 +531,7 @@
 					3 * t * (1 - t) * (1 - t) * p1.y +
 					3 * t * t * (1 - t) * p2.y +
 					t * t * t * p3.y;
-			return new Vector2(t,y);
+			return new Vector2(p0.x + t * (p3.x - p0.x) ,y);
 		}

 		// a - start point
@@ -546,45 +546,34 @@

 		//this is not working method
 		public static void setCustomTangents(AnimationCurve curve, int i, int nextI, JsonData tangentArray){
-			float diff = curve[nextI].value - curve[i].value;
-			if (diff == 0)
+			float diffValue = curve[nextI].value - curve[i].value;
+			float diffTime = curve[nextI].time - curve[i].time;
+			if (diffValue == 0)
 				return;
+
+
+
 			float cx1 = parseFloat(tangentArray[0]);
 			float cy1 = parseFloat(tangentArray[1]);
 			float cx2 = parseFloat(tangentArray[2]);
 			float cy2 = parseFloat(tangentArray[3]);
-			Vector2 p0     = new Vector2(0  , 0         );
-			Vector2 p3     = new Vector2(1  , 1      );
-			Vector2 cOrig1 = new Vector2(cx1, cy1);
-			Vector2 cOrig2 = new Vector2(cx2, cy2);
+			Vector2 p0     = new Vector2(0  , 0);
+			Vector2 p3     = new Vector2(diffTime  , diffValue);
+			Vector2 cOrig1 = new Vector2(diffTime * cx1, diffValue * cy1);
+			Vector2 cOrig2 = new Vector2(diffTime * cx2, diffValue * cy2);
+
 			Vector2 p1 = getBezierPoint(p0, cOrig1, cOrig2, p3, 1.0f / 3.0f);
 			Vector2 p2 = getBezierPoint(p0, cOrig1, cOrig2, p3, 2.0f / 3.0f);

-			Vector2 c1,c2;
-			calcControlPoints(p0,p1,p2,p3, out c1, out c2);
-
-			//* test method
-			bool ok = true;
-			for (float test=0.01f; test < 1.0f; test+=0.01f) {
-
-				Vector2 t1 = getBezierPoint(p0,cOrig1,cOrig2,p3, test);
-				Vector2 t2 = getBezierPoint(p0,c1,c2,p3, test);
-				if (t1!=t2){
-					Debug.LogError("t1 = "+t1+"   t2 = "+t2);
-					ok = false;
-				}
-			}
-			Debug.Log("ewerything is "+(ok?"ok":"bad"));
-			//*/
-
-			c2 = c2 - p3;
-
-			float outTangent =  c1.y / c1.x;
-			Debug.Log(c1.x + "  " + (1.0f/3.0f));
-			float inTangent = c2.y / c2.x;
-			Debug.Log(c2.x + "  " + (2.0f/3.0f));
-			if (diff < 0){
+			Vector2 c1,c2,c2orig;
+			calcControlPoints(p0,p1,p2,p3, out c1, out c2orig);
+
+			c2 = c2orig - p3;
+
+			float outTangent = c1.y / c1.x;
+			float inTangent  = c2.y / c2.x;
+			if (diffValue < 0){
 				inTangent  *= -1;
 				outTangent *= -1;
 			}
@@ -610,6 +599,28 @@

 			curve.MoveKey(i, 	 thisKeyframe);
 			curve.MoveKey(nextI, nextKeyframe);
+
+			//* test method
+			bool ok = true;
+			float startTime = thisKeyframe.time;
+			float lastTime = nextKeyframe.time;
+
+
+			for (float j=0; j < 25f; j++) {
+				float timeInS  = j/25;
+				Vector2 t1 = getBezierPoint(p0, cOrig1, cOrig2, p3, timeInS);
+				Vector2 t2 = getBezierPoint(p0,     c1, c2orig, p3, timeInS);
+				t1 *= diffValue;
+				t2 *= diffValue;
+				float curveValue = curve.Evaluate(startTime + diffTime / 25.0f * j);
+				if (t1.y!=t2.y || t1.y!=curveValue || t2.y!=curveValue){
+					Debug.LogError("time = "+ timeInS + "   t1 = "+t1.y+"   t2 = "+t2.y+"    curve"+curveValue);
+					ok = false;
+				}
+			}
+			Debug.Log("ewerything is "+(ok?"ok":"bad"));
+			//*/
+
 		}


Need to load reviewer

Need to load reviewer

--- Battery-Commander.Web/Controllers/EvaluationsController.cs
+++ Battery-Commander.Web/Controllers/EvaluationsController.cs
@@ -26,6 +26,7 @@
                 .Include(_ => _.Ratee)
                 .Include(_ => _.Rater)
                 .Include(_ => _.SeniorRater)
+                .Include(_ => _.Reviewer)
                 .Include(_ => _.Events)
                 .Where(_ => !status.HasValue || _.Status == status)
                 .Where(_ => includeComplete || !_.IsCompleted)


Changed centerpoint on map

Changed centerpoint on map


Named assertion scopes didnt have a valid assertion strategy associated with it.

--- FluentAssertions.Core/Execution/AssertionScope.cs
+++ FluentAssertions.Core/Execution/AssertionScope.cs
@@ -54,7 +54,7 @@
         /// <summary>
         /// Starts a named scope within which multiple assertions can be executed and which will not throw until the scope is disposed.
         /// </summary>
-        public AssertionScope(string context)
+        public AssertionScope(string context) : this()
         {
             AddNonReportable("context", context);
         }


Remove unnecessary using

Remove unnecessary using

--- test/ODataEndToEndTests/Microsoft.Restier.WebApi.Test.Services.Trippin/Domain/TrippinDomain.cs
+++ test/ODataEndToEndTests/Microsoft.Restier.WebApi.Test.Services.Trippin/Domain/TrippinDomain.cs
@@ -6,7 +6,6 @@
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
-using Microsoft.OData.Core;
 using Microsoft.OData.Edm;
 using Microsoft.OData.Edm.Library;
 using Microsoft.OData.Edm.Library.Expressions;


removed gamerservices

removed gamerservices


Remove partially created output files - so deal with having an error. :-)

--- LINQToTTree/TTreeClassGenerator/ClassGenerator.cs
+++ LINQToTTree/TTreeClassGenerator/ClassGenerator.cs
@@ -328,6 +328,12 @@
                             errorMessage.AppendFormat(": {0}", e.Message);
                             ex = e.InnerException;
                         }
+
+                        // Kill off the output file!
+                        output.Close();
+                        outputCSFile.Delete();
+
+                        // Propagate the error upwards.
                         throw new Exception(errorMessage.ToString(), e);
                     }
                 }


Improved(?) dynamic loading of the native SQLite assembly

Hopefully fixes issue #552

--- MimeKit/Cryptography/SqliteCertificateDatabase.cs
+++ MimeKit/Cryptography/SqliteCertificateDatabase.cs
@@ -63,8 +63,7 @@
 		{
 #if __MOBILE__
 			IsAvailable = true;
-#endif
-
+#else // !__MOBILE__
 #if NETFRAMEWORK || NETSTANDARD2_0 || NETCOREAPP3_0
 			var platform = Environment.OSVersion.Platform;
 #endif
@@ -76,14 +75,15 @@
 					sqliteConnectionStringBuilderClass = sqliteAssembly.GetType ("Microsoft.Data.Sqlite.SqliteConnectionStringBuilder");

 					// Make sure that the runtime can load the native sqlite library
-					var builder = Activator.CreateInstance (sqliteConnectionStringBuilderClass);
+					VerifySQLiteAssemblyUsability ();

 					IsAvailable = true;
 					return;
 				}
-			} catch (FileNotFoundException) {
-			} catch (FileLoadException) {
+			} catch (IOException) {
+			} catch (TypeLoadException) {
 			} catch (BadImageFormatException) {
+			} catch (TypeInitializationException) {
 			}
 #endif

@@ -96,16 +96,16 @@
 						sqliteConnectionStringBuilderClass = sqliteAssembly.GetType ("Mono.Data.Sqlite.SqliteConnectionStringBuilder");

 						// Make sure that the runtime can load the native sqlite3 library
-						var builder = Activator.CreateInstance (sqliteConnectionStringBuilderClass);
-						sqliteConnectionStringBuilderClass.GetProperty ("DateTimeFormat").SetValue (builder, 0, null);
+						VerifySQLiteAssemblyUsability ();

 						IsAvailable = true;
 						return;
 					}
 				}
-			} catch (FileNotFoundException) {
-			} catch (FileLoadException) {
+			} catch (IOException) {
+			} catch (TypeLoadException) {
 			} catch (BadImageFormatException) {
+			} catch (TypeInitializationException) {
 			}
 #endif

@@ -116,18 +116,43 @@
 					sqliteConnectionStringBuilderClass = sqliteAssembly.GetType ("System.Data.SQLite.SQLiteConnectionStringBuilder");

 					// Make sure that the runtime can load the native sqlite3 library
-					var builder = Activator.CreateInstance (sqliteConnectionStringBuilderClass);
-					sqliteConnectionStringBuilderClass.GetProperty ("DateTimeFormat").SetValue (builder, 0, null);
+					VerifySQLiteAssemblyUsability ();

 					IsAvailable = true;
 					return;
 				}
-			} catch (FileNotFoundException) {
-			} catch (FileLoadException) {
+			} catch (IOException) {
+			} catch (TypeLoadException) {
 			} catch (BadImageFormatException) {
-			}
-#endif
-		}
+			} catch (TypeInitializationException) {
+			}
+#endif
+#endif // __MOBILE__
+		}
+
+#if !__MOBILE__
+		static void VerifySQLiteAssemblyUsability ()
+		{
+			// Make sure that the runtime can load the native sqlite3 library
+			var dateTimeFormat = sqliteConnectionStringBuilderClass.GetProperty ("DateTimeFormat");
+			var builder = Activator.CreateInstance (sqliteConnectionStringBuilderClass);
+			var fileName = Path.GetTempFileName ();
+
+			try {
+				sqliteConnectionStringBuilderClass.GetProperty ("DataSource").SetValue (builder, fileName, null);
+
+				if (dateTimeFormat != null)
+					dateTimeFormat.SetValue (builder, 0, null);
+
+				var connectionString = (string) sqliteConnectionStringBuilderClass.GetProperty ("ConnectionString").GetValue (builder, null);
+				var connection = (DbConnection) Activator.CreateInstance (sqliteConnectionClass, new[] { connectionString });
+				connection.Dispose ();
+			} catch {
+				File.Delete (fileName);
+				throw;
+			}
+		}
+#endif

 		internal static bool IsAvailable {
 			get; private set;


Downgrades gitversion even more

Downgrades gitversion even more

--- .nyx/build.cake
+++ .nyx/build.cake
@@ -6,7 +6,7 @@
 #addin "nuget:https://www.nuget.org/api/v2?package=Cake.SemVer&version=3.0.0"
 #addin "nuget:https://www.nuget.org/api/v2?package=semver&version=2.0.4"

-#tool "nuget:https://www.nuget.org/api/v2?package=GitVersion.CommandLine&version=3.6.4"
+#tool "nuget:https://www.nuget.org/api/v2?package=GitVersion.CommandLine&version=3.6.1"
 #tool "nuget:?package=WiX"

 BuildParameters parameters = BuildParameters.GetParameters(Context);


Diagnostic Log complete exception with StackTrace

When troubleshooting an error it can sometimes be very hard to find where the error is, especially if it turns out to be internal.
I propose when Verbosity is set to Diagnostic the full exception should be logged with stack trace and all, making it allot easier to locate any issues.

--- src/Cake/CakeApplication.cs
+++ src/Cake/CakeApplication.cs
@@ -53,7 +53,11 @@
             }
             catch (Exception ex)
             {
-                _log.Error("Error: {0}", ex.Message);
+                if (_log.Verbosity == Verbosity.Diagnostic)
+                    _log.Error("Error: {0}", ex);
+                else
+                    _log.Error("Error: {0}", ex.Message);
+
                 return 1;
             }
         }


Connection: CancelPending and thread safe keyspace change

--- src/Cassandra/Connection.cs
+++ src/Cassandra/Connection.cs
@@ -20,7 +20,7 @@
         private const byte _maxConcurrentRequests = 128;
         private TcpSocket _tcpSocket;
         private BoolSwitch _isDisposed = new BoolSwitch();
-        private BoolSwitch _isInitialized = new BoolSwitch();
+        private BoolSwitch _isCanceled = new BoolSwitch();
         /// <summary>
         /// Stores the available stream ids.
         /// </summary>
@@ -47,6 +47,7 @@
         /// </summary>
         private byte[] _minimalBuffer;
         private volatile string _keyspace;
+        private object _keyspaceLock = new object();
         /// <summary>
         /// The event that represents a event RESPONSE from a Cassandra node
         /// </summary>
@@ -92,10 +93,18 @@
                 {
                     return;
                 }
-                this._keyspace = value;
-                var timeout = _tcpSocket.Options.ConnectTimeoutMillis;
-                var request = new QueryRequest("USE " + value, false, QueryProtocolOptions.Default);
-                TaskHelper.WaitToComplete(this.Send(request), timeout);
+                lock (this._keyspaceLock)
+                {
+                    if (value == this._keyspace)
+                    {
+                        return;
+                    }
+                    _logger.Info("Connection to host " + HostAddress + " switching to keyspace " + value);
+                    this._keyspace = value;
+                    var timeout = _tcpSocket.Options.ConnectTimeoutMillis;
+                    var request = new QueryRequest("USE " + value, false, QueryProtocolOptions.Default);
+                    TaskHelper.WaitToComplete(this.Send(request), timeout);
+                }
             }
         }

@@ -115,17 +124,44 @@
         /// </summary>
         protected virtual void CancelPending(Exception ex, SocketError? socketError = null)
         {
-            //TODO: Make it thread safe.
+            if (!_isCanceled.TryTake())
+            {
+                return;
+            }
+            if (_pendingOperations.Count == 0 && _writeQueue.Count == 0)
+            {
+                return;
+            }
             _logger.Info("Canceling pending operations " + _pendingOperations.Count + " and write queue " + _writeQueue.Count);
+            if (ex == null)
+            {
+                if (socketError != null)
+                {
+                    ex = new SocketException((int)socketError.Value);
+                }
+                else
+                {
+                    //It is closing
+                    ex = new SocketException((int)SocketError.NotConnected);
+                }
+            }
             if (_pendingOperations.Count > 0)
             {
-                //TODO: Callback every pending operation
-                throw new NotImplementedException();
+                //Callback for every pending operation
+                foreach (var item in _pendingOperations)
+                {
+                    item.Value.InvokeCallback(ex);
+                }
+                _pendingOperations.Clear();
             }
             if (_writeQueue.Count > 0)
             {
-                //TODO: Callback all the items in the write queue
-                throw new NotImplementedException();
+                //Callback all the items in the write queue
+                OperationState state = null;
+                while (_writeQueue.TryDequeue(out state))
+                {
+                    state.InvokeCallback(ex);
+                }
             }
         }

@@ -157,11 +193,7 @@
         /// <exception cref="SocketException">Throws a SocketException when the connection could not be established with the host</exception>
         public virtual void Init()
         {
-            if (!_isInitialized.TryTake())
-            {
-                //MAYBE: If really necessary, we can Wait on the BeginConnect result.
-                return;
-            }
+            //MAYBE: If really necessary, we can Wait on the BeginConnect result.
             //Cassandra supports up to 128 concurrent requests
             _freeOperations = new ConcurrentStack<byte>(Enumerable.Range(0, _maxConcurrentRequests).Select(s => (byte)s));
             _pendingOperations = new ConcurrentDictionary<int, OperationState>();
@@ -335,6 +367,10 @@
         /// </summary>
         public void Send(IRequest request, Action<Exception, AbstractResponse> callback)
         {
+            if (_isCanceled.IsTaken())
+            {
+                callback(new SocketException((int)SocketError.NotConnected), null);
+            }
             //thread safe write queue
             var state = new OperationState
             {


fix ViewCode-ViewDesigner in right clic menu

--- SampleEditor/VS2013DesignerAndEditor/VS2013DesignerAndEditorPackage.cs
+++ SampleEditor/VS2013DesignerAndEditor/VS2013DesignerAndEditorPackage.cs
@@ -30,15 +30,13 @@
     // This attribute is needed to let the shell know that this package exposes some menus.
     //[ProvideMenuResource("Menus.ctmenu", 1)]

-    [ProvideXmlEditorChooserDesignerView("project1", "xml", LogicalViewID.Designer, 0x60,
-    DesignerLogicalViewEditor = typeof(EditorFactory),
-    Namespace = "http://schemas.pgourlain.fr/developer/project/2015",
-    MatchExtensionAndNamespace = false)]
+    //[ProvideXmlEditorChooserDesignerView("project1", "xml", LogicalViewID.Designer, 0x60,
+    //DesignerLogicalViewEditor = typeof(EditorFactory),
+    //Namespace = "http://schemas.pgourlain.fr/developer/project/2015",
+    //MatchExtensionAndNamespace = false)]
     // We register that our editor supports LOGVIEWID_Designer logical view
-//    [ProvideEditorLogicalView(typeof(EditorFactory), LogicalViewID.TextView)]
-//    [ProvideEditorLogicalView(typeof(EditorFactory), LogicalViewID.Primary)]
     [ProvideEditorLogicalView(typeof(EditorFactory), LogicalViewID.Designer)]
-//    [ProvideEditorLogicalView(typeof(EditorFactory), LogicalViewID.Code)]
+    [ProvideEditorLogicalView(typeof(EditorFactory), LogicalViewID.Code)]
     [ProvideEditorExtension(typeof(EditorFactory), ".xml", 50,
               ProjectGuid = "{A2FE74E1-B743-11d0-AE1A-00A0C90FFFC3}",
               TemplateDir = "Templates",


semicolon

semicolon

--- CodeConnect.Gistify.Extension/CodeAnalysis/CodeAnalyzer.cs
+++ CodeConnect.Gistify.Extension/CodeAnalysis/CodeAnalyzer.cs
@@ -15,7 +15,7 @@
             var tree = document.GetSyntaxTreeAsync().Result;
             var model = document.GetSemanticModelAsync().Result;
             var objectInfos = FindDeclarations(tree, model, startPos, endPos);
-            var gist = GenerateGist(objectInfos, tree, startPos, endPos)
+            var gist = GenerateGist(objectInfos, tree, startPos, endPos);
         }

         /// <summary>


Add single argument description

Add single argument description

--- src/Cr.ArgParse/Argument.cs
+++ src/Cr.ArgParse/Argument.cs
@@ -1,7 +1,23 @@
-namespace Cr.ArgParse
+using System.Collections.Generic;
+
+namespace Cr.ArgParse
 {
+    /// <summary>
+    /// Single argument description
+    /// </summary>
     public class Argument
     {
-
+        /// <summary>
+        /// strings to identify argument. Empty for positional arguments
+        /// </summary>
+        public IList<string> OptionStrings { get; set; }
+        /// <summary>
+        /// Name for storing parsing results
+        /// </summary>
+        public string Destination { get; set; }
+        /// <summary>
+        /// Description of argument
+        /// </summary>
+        public string HelpText { get; set; }
     }
 }


fixed topmost refresh method

fixed topmost refresh method


Remove ChemMasterSystem debug assertions (#11288)

--- Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs
+++ Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs
@@ -196,13 +196,13 @@
             for (var i = 0; i < message.Number; i++)
             {
                 var item = Spawn(PillPrototypeId, Transform(container).Coordinates);
-                DebugTools.Assert(_storageSystem.Insert(container, item, storage));
+                _storageSystem.Insert(container, item, storage);
                 Label(item, message.Label);

                 var itemSolution = _solutionContainerSystem.EnsureSolution(item, SharedChemMaster.PillSolutionName);

-                DebugTools.Assert(_solutionContainerSystem.TryAddSolution(
-                    item, itemSolution, withdrawal.SplitSolution(message.Dosage)));
+                _solutionContainerSystem.TryAddSolution(
+                    item, itemSolution, withdrawal.SplitSolution(message.Dosage));

                 if (TryComp<SpriteComponent>(item, out var spriteComp))
                     spriteComp.LayerSetState(0, "pill" + (chemMaster.PillType + 1));
@@ -232,8 +232,8 @@
                 return;

             Label(container, message.Label);
-            DebugTools.Assert(_solutionContainerSystem.TryAddSolution(
-                container, solution, withdrawal));
+            _solutionContainerSystem.TryAddSolution(
+                container, solution, withdrawal);

             UpdateUiState(chemMaster);
             ClickSound(chemMaster);


Increase pulling modified speed (#10049)

--- Content.Shared/Pulling/Components/SharedPullerComponent.cs
+++ Content.Shared/Pulling/Components/SharedPullerComponent.cs
@@ -5,9 +5,9 @@
     public sealed class SharedPullerComponent : Component
     {
         // Before changing how this is updated, please see SharedPullerSystem.RefreshMovementSpeed
-        public float WalkSpeedModifier => Pulling == default ? 1.0f : 0.75f;
+        public float WalkSpeedModifier => Pulling == default ? 1.0f : 0.9f;

-        public float SprintSpeedModifier => Pulling == default ? 1.0f : 0.75f;
+        public float SprintSpeedModifier => Pulling == default ? 1.0f : 0.9f;

         [ViewVariables]
         public EntityUid? Pulling { get; set; }


..fix error showed on exit

..fix error showed on exit

--- 0xDD/Program.cs
+++ 0xDD/Program.cs
@@ -167,7 +167,7 @@
                 {
                     ErrorCode err = _0xdd.Open(file, ovm, row);

-                    if (err != ErrorCode.Success)
+                    if (err != ErrorCode.Success || err != ErrorCode.Exit)
                         Console.WriteLine(gerrcs(err));

                     return err.Int();


Fixed unittest

Fixed unittest


Minor changes

Minor changes


Refactor creation of post details.

Refactor creation of post details.

--- DapperTesting/Core.Tests/Data/DapperPostRepositoryTests.cs
+++ DapperTesting/Core.Tests/Data/DapperPostRepositoryTests.cs
@@ -77,17 +77,11 @@

             repository.Create(post);

-            const int sequenceNumber = 0;
-            var detail = new PostDetail
-            {
-                PostId = post.Id,
-                SequenceNumber = sequenceNumber,
-                Text = "details"
-            };
+            var detail = _c.CreateDetail(post);

             repository.AddDetail(detail);

-            var createdDetail = repository.GetDetail(post.Id, sequenceNumber);
+            var createdDetail = repository.GetDetail(post.Id, detail.SequenceNumber);

             Assert.AreEqual(detail.Text, createdDetail.Text);
         }
@@ -172,6 +166,24 @@
                 };
             }

+            public PostDetail CreateDetail(Post post)
+            {
+                return CreateDetails(post).First();
+            }
+
+            public IEnumerable<PostDetail> CreateDetails(Post post, int count = 1)
+            {
+                for (var i = 0; i < count; ++i)
+                {
+                    yield return new PostDetail
+                    {
+                        PostId = post.Id,
+                        SequenceNumber = i,
+                        Text = "detail " + i
+                    };
+                }
+            }
+
             public User CreateTestUser()
             {
                 var repository = GetUserRepository();


Fix comments

Fix comments

--- Source/HelixToolkit.SharpDX.Shared/Utilities/ImportExport/StLReader.cs
+++ Source/HelixToolkit.SharpDX.Shared/Utilities/ImportExport/StLReader.cs
@@ -59,10 +59,11 @@
         /// The last color.
         /// </summary>
         private Color lastColor;
+
+#if !NETFX_CORE
         /// <summary>
         /// Initializes a new instance of the <see cref="StLReader" /> class.
         /// </summary>
-#if !NETFX_CORE
         /// <param name="dispatcher">The dispatcher.</param>
         public StLReader(Dispatcher dispatcher = null)
             : base(dispatcher)
@@ -71,6 +72,9 @@
             this.Materials = new List<Material>();
         }
 #else
+        /// <summary>
+        /// Initializes a new instance of the <see cref="StLReader" /> class.
+        /// </summary>
         public StLReader()
         {
             this.Meshes = new List<MeshBuilder>();


Suppresion

Suppresion

--- Framework.Core/System/Threading/Tasks/ParallelLoopState.cs
+++ Framework.Core/System/Threading/Tasks/ParallelLoopState.cs
@@ -2,6 +2,7 @@

 #pragma warning disable CA1815 // Override equals and operator equals on value types
 #pragma warning disable MA0008 // Add StructLayoutAttribute
+#pragma warning disable MA0048 // File name must match type name

 // BASEDON: https://raw.githubusercontent.com/dotnet/corefx/e0ba7aa8026280ee3571179cc06431baf1dfaaac/src/System.Threading.Tasks.Parallel/src/System/Threading/Tasks/ParallelLoopState.cs


Fixed const folding for mult with 0 or 1


Mocking homework finished.

Mocking homework finished.

--- Unit-Testing/Mocking/Cars/Cars.Tests.JustMock/CarsControllerMyTests.cs
+++ Unit-Testing/Mocking/Cars/Cars.Tests.JustMock/CarsControllerMyTests.cs
@@ -8,6 +8,7 @@
     using Contracts;
     using Controllers;
     using Models;
+    using System.Linq;

     [TestFixture]
     public class CarsControllerMyTests
@@ -17,7 +18,7 @@
             new Car { Id = 1, Make = "Audi", Model = "A5", Year = 2005 },
             new Car { Id = 2, Make = "BMW", Model = "325i", Year = 2008 },
             new Car { Id = 3, Make = "BMW", Model = "330d", Year = 2007 },
-            new Car { Id = 4, Make = "Opel", Model = "Astra", Year = 2010 },
+            new Car { Id = 4, Make = "Opel", Model = "Astra", Year = 2010 }
         };
         private readonly Car ValidCar = new Car()
         {
@@ -45,7 +46,7 @@

             var result = (ICollection<Car>)controller.Index().Model;

-            Assert.AreEqual(fakeData.Count, result.Count);
+            Assert.AreEqual(this.fakeData.Count, result.Count);
         }

         [Test]
@@ -150,15 +151,63 @@
             var carsRepoMock = new Mock<ICarsRepository>();
             var controller = new CarsController(carsRepoMock.Object);
             carsRepoMock.Setup(x => x.GetById(It.IsAny<int>())).Returns(ValidCar);
-
-            var model = (Car)controller.Details(1);
+            int validId = 1;
+
+            var model = (Car)controller.Details(validId).Model;
             Assert.IsNotNull(model);
             Assert.AreEqual(model.Id, ValidCar.Id);
             Assert.AreEqual(model.Make, ValidCar.Make);
             Assert.AreEqual(model.Model, ValidCar.Model);
             Assert.AreEqual(model.Year, ValidCar.Year);
         }
-
-
+
+        [Test]
+        public void Search_ValidCondition_ShouldReturnAViewWithData()
+        {
+            var carsRepoMock = new Mock<ICarsRepository>();
+            var controller = new CarsController(carsRepoMock.Object);
+            ICollection<Car> data = fakeData.Where(d => d.Make == "Audi").ToList();
+            carsRepoMock.Setup(x => x.Search(It.IsAny<string>())).Returns(data);
+
+            var foundData = (ICollection<Car>)controller.Search("condition").Model;
+            Assert.AreEqual(data.Count, foundData.Count);
+            Assert.AreEqual(1, foundData.First().Id);
+            Assert.AreEqual("Audi", foundData.First().Make);
+            Assert.AreEqual("A5", foundData.First().Model);
+            Assert.AreEqual(2005, foundData.First().Year);
+        }
+
+        [Test]
+        public void Sort_InvalidParameterPassed_ThrowsException()
+        {
+            var carsRepoMock = new Mock<ICarsRepository>();
+            var controller = new CarsController(carsRepoMock.Object);
+
+            Assert.Throws<ArgumentException>(() => controller.Sort("some param"));
+        }
+
+        [Test]
+        public void Sort_ByMake_ReturnsAViewWithAllData()
+        {
+            var carsRepoMock = new Mock<ICarsRepository>();
+            var controller = new CarsController(carsRepoMock.Object);
+            carsRepoMock.Setup(x => x.SortedByMake()).Returns(fakeData);
+
+            var result = controller.Sort("make").Model as ICollection<Car>;
+
+            Assert.AreEqual(4, result.Count);
+        }
+
+        [Test]
+        public void Sort_ByYear_ReturnsAViewWithAllData()
+        {
+            var carsRepoMock = new Mock<ICarsRepository>();
+            var controller = new CarsController(carsRepoMock.Object);
+            carsRepoMock.Setup(x => x.SortedByYear()).Returns(fakeData);
+
+            var result = controller.Sort("year").Model as ICollection<Car>;
+
+            Assert.AreEqual(4, result.Count);
+        }
     }
 }


Uncommented some inline test data for Guard tests that are now passing.

--- UnitTests/UnitTests.CodeTiger.Core/GuardTests.ArgumentIsWithinRange.cs
+++ UnitTests/UnitTests.CodeTiger.Core/GuardTests.ArgumentIsWithinRange.cs
@@ -217,16 +217,16 @@
                 Assert.Equal(argumentValue, actual);
             }
         }
-
+
         public class ArgumentIsWithinRange_String_Double_Double_Double
         {
             [Theory]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MinValue, (double)-1.79768e+308, (double)1.79768e+308)]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MaxValue, (double)-1.79768e+308, (double)1.79768e+308)]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MinValue, (double)0, (double)0)]
+            [InlineData(double.MinValue, (double)-1.79768e+308, (double)1.79768e+308)]
+            [InlineData(double.MaxValue, (double)-1.79768e+308, (double)1.79768e+308)]
+            [InlineData(double.MinValue, (double)0, (double)0)]
             [InlineData((double)-1, (double)0, (double)0)]
             [InlineData((double)1, (double)0, (double)0)]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MaxValue, (double)0, (double)0)]
+            [InlineData(double.MaxValue, (double)0, (double)0)]
             public void ThrowsArgumentOutOfRangeExceptionWhenArgumentIsOutsideOfRange(double argumentValue,
                 double minimumValue, double maximumValue)
             {
@@ -236,13 +236,13 @@
             }

             [Theory]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MinValue, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData((double)-1.79768e+308, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData((double)-1, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData((double)0, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData((double)1, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData((double)1.79768e+308, double.MinValue, double.MaxValue)]
-            // TODO: Handle this without xunit crashing: [InlineData(double.MaxValue, double.MinValue, double.MaxValue)]
+            [InlineData(double.MinValue, double.MinValue, double.MaxValue)]
+            [InlineData((double)-1.79768e+308, double.MinValue, double.MaxValue)]
+            [InlineData((double)-1, double.MinValue, double.MaxValue)]
+            [InlineData((double)0, double.MinValue, double.MaxValue)]
+            [InlineData((double)1, double.MinValue, double.MaxValue)]
+            [InlineData((double)1.79768e+308, double.MinValue, double.MaxValue)]
+            [InlineData(double.MaxValue, double.MinValue, double.MaxValue)]
             [InlineData((double)-1.79768e+308, (double)-1.79768e+308, 1.79768e+308)]
             [InlineData((double)-1.79767e+308, (double)-1.79768e+308, 1.79768e+308)]
             [InlineData((double)-1, (double)-1.79768e+308, 1.79768e+308)]


Add small delay to CategoryList just to show the loading wheel.

--- src/Money.UI/Views/CategoryList.xaml.cs
+++ src/Money.UI/Views/CategoryList.xaml.cs
@@ -20,6 +20,7 @@
 using Windows.UI.Xaml.Navigation;
 using System.ComponentModel;
 using Money.Services;
+using System.Threading.Tasks;

 namespace Money.Views
 {
@@ -49,6 +50,9 @@
             CategoryListParameter parameter = (CategoryListParameter)e.Parameter;

             ViewModel = new CategoryListViewModel(domainFacade);
+
+            // Just to show the loading wheel.
+            await Task.Delay(100);

             IEnumerable<CategoryModel> models = await queryDispatcher.QueryAsync(new ListAllCategory());
             foreach (CategoryModel model in models)


stream_select() impleentation

stream_select() impleentation

- thanks @proff
- fixes https://github.com/peachpiecompiler/peachpie/issues/590

--- src/Peachpie.Library/Streams/Streams.cs
+++ src/Peachpie.Library/Streams/Streams.cs
@@ -5,6 +5,7 @@
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
+using System.Threading;
 using System.Threading.Tasks;

 /* TODO:
@@ -241,7 +242,7 @@
 	/// Gives access to the stream filter chains.
 	/// </summary>
     [PhpExtension("standard")]
-	public static class PhpFilters
+    public static class PhpFilters
     {
         #region Enums & Constants

@@ -460,7 +461,7 @@
 	/// </summary>
 	/// <threadsafety static="true"/>
     [PhpExtension("Core")]
-	public static class PhpWrappers
+    public static class PhpWrappers
     {
         #region stream_wrapper_register, stream_register_wrapper, stream_get_wrappers

@@ -952,57 +953,80 @@

         #region stream_select

-        /// <summary>Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by tv_sec and tv_usec </summary>
+        /// <summary>Runs the equivalent of the select() system call on the given arrays of streams with a timeout specified by <paramref name="tv_sec"/> and <paramref name="tv_usec"/>.
+        /// </summary>
 		public static int stream_select(ref PhpArray read, ref PhpArray write, ref PhpArray except, int tv_sec, int tv_usec = 0)
         {
-            //if ((read == null || read.Count == 0) && (write == null || write.Count == 0))
-            //    return except == null ? 0 : except.Count;
-
-            //var readResult = new PhpArray();
-            //var writeResult = new PhpArray();
-            //var i = 0;
-            //var timer = Stopwatch.StartNew();
-            //var waitTime = tv_sec * 1000 + tv_usec;
-            //while (true)
-            //{
-            //    if (read != null)
-            //    {
-            //        readResult.Clear();
-            //        foreach (var item in read)
-            //        {
-            //            var stream = item.Value as PhpStream;
-            //            if (stream == null)
-            //                continue;
-            //            if (stream.CanReadWithoutLock())
-            //                readResult.Add(item.Key, item.Value);
-            //        }
-            //    }
-            //    if (write != null)
-            //    {
-            //        writeResult.Clear();
-            //        foreach (var item in write)
-            //        {
-            //            var stream = item.Value as PhpStream;
-            //            if (stream == null)
-            //                continue;
-            //            if (stream.CanWriteWithoutLock())
-            //                writeResult.Add(item.Key, item.Value);
-            //        }
-            //    }
-            //    if (readResult.Count > 0 || writeResult.Count > 0 || except.Count > 0)
-            //        break;
-            //    i++;
-            //    if (timer.ElapsedMilliseconds > waitTime)
-            //        break;
-            //    if (i < 10)
-            //        Thread.Yield();
-            //    else
-            //        Thread.Sleep(Math.Min(i, waitTime));
-            //}
-            //read = readResult;
-            //write = writeResult;
-            //return read.Count + write.Count + (except == null ? 0 : except.Count);
-            throw new NotImplementedException();
+            if ((read == null || read.Count == 0) &&
+                (write == null || write.Count == 0))
+            {
+                // nothing to select:
+                return except == null ? 0 : except.Count;
+            }
+
+            //
+            var startTime = System.DateTime.UtcNow;
+            var waitTime = Math.Max(tv_sec * 1000 + tv_usec / 1000, 1); // [1..)
+
+            //
+            var readResult = new PhpArray();
+            var writeResult = new PhpArray();
+            int count;
+
+            for (int i = 0; ; i++)
+            {
+                //
+                if (read != null)
+                {
+                    readResult.Clear();
+
+                    foreach (var item in read)
+                    {
+                        if (item.Value.Object is PhpStream stream && stream.CanReadWithoutLock)
+                        {
+                            readResult.Add(item);
+                        }
+                    }
+                }
+
+                if (write != null)
+                {
+                    writeResult.Clear();
+
+                    foreach (var item in write)
+                    {
+                        if (item.Value.Object is PhpStream stream && stream.CanWriteWithoutLock)
+                        {
+                            writeResult.Add(item);
+                        }
+                    }
+                }
+
+                // check we found available streams:
+                count = readResult.Count + writeResult.Count + (except != null ? except.Count : 0);
+
+                if (count == 0 && (System.DateTime.UtcNow - startTime).TotalMilliseconds < waitTime)
+                {
+                    // avoids polling CPU without a break:
+
+                    if (i < 8)
+                        // just spin
+                        Thread.Yield();
+                    else
+                        // sleep the thread for [2..100] ms
+                        Thread.Sleep(Math.Min(Math.Min((i + 1) * 2, 100), waitTime));
+                }
+                else
+                {
+                    // found streams or timeout:
+                    break;
+                }
+            }
+
+            // update ref parameters and return:
+            read = readResult;
+            write = writeResult;
+            return count;
         }

         #endregion


refactor to use "AutoFixture"

refactor to use "AutoFixture"

--- PhotoArtSystem/Tests/PhotoArtSystem.Tests.UnitTests/Services/PhotocourseTests/GetById_Should.cs
+++ PhotoArtSystem/Tests/PhotoArtSystem.Tests.UnitTests/Services/PhotocourseTests/GetById_Should.cs
@@ -1,11 +1,13 @@
 namespace PhotoArtSystem.Tests.UnitTests.Services.PhotocourseTests
 {
+    using System;
     using Moq;
     using NUnit.Framework;
     using PhotoArtSystem.Data.Common.EfDbContexts;
     using PhotoArtSystem.Data.Common.Repositories;
     using PhotoArtSystem.Data.Models;
     using PhotoArtSystem.Services.Photocourse;
+    using Ploeh.AutoFixture;

     [TestFixture]
     public class GetById_Should
@@ -14,12 +16,9 @@
         public void ReturnProperlyResultFromRepository()
         {
             // Arange
-            ////Fixture fixture = new Fixture();
-            ////var id = fixture.Create<Guid>();
+            Fixture fixture = new Fixture();
+            var id = fixture.Create<Guid>();
             var mockedModel = new Photocourse();
-            var id = mockedModel.Id;
-            ////mockedModel.Setup(x => x.Id).Returns(id);
-
             var mockedEfDbContext = new Mock<IEfDbContext>();
             var mockedIEfDbRepository = new Mock<IEfDbRepository<Photocourse>>();
             mockedIEfDbRepository.Setup(x => x.GetById(id)).Returns(mockedModel);


- CHG: code cleanups

- CHG: code cleanups

--- MarcelJoachimKloubert.SendNET/Contracts/SendDataService.cs
+++ MarcelJoachimKloubert.SendNET/Contracts/SendDataService.cs
@@ -80,7 +80,7 @@

         #endregion Properties (2)

-        #region Methods (8)
+        #region Methods (7)

         /// <inheriteddoc />
         public byte[] Connect(byte[] meta)
@@ -120,28 +120,6 @@
                     this._crypter = crypter;
                     return rsa.Encrypt(uncryptedResult.ToArray(),
                                        false);
-                }
-            }
-        }
-
-        private byte[] CryptXml(XDocument xml)
-        {
-            var crypter = this._crypter;
-            if (crypter == null)
-            {
-                return null;
-            }
-
-            using (var uncryptedXml = new MemoryStream())
-            {
-                xml.Save(uncryptedXml);
-
-                uncryptedXml.Position = 0;
-                using (var cryptedXml = new MemoryStream())
-                {
-                    crypter.Encrypt(uncryptedXml, cryptedXml);
-
-                    return cryptedXml.ToArray();
                 }
             }
         }
@@ -308,6 +286,6 @@
             }
         }

-        #endregion Methods (6)
+        #endregion Methods (7)
     }
 }


Update Program.cs

Update Program.cs

--- src/Samples/Programmatically/Program.cs
+++ src/Samples/Programmatically/Program.cs
@@ -32,14 +32,14 @@
                 m => Task.FromResult(m.Type == MediaType.TextPlain));

             listener.AddNotificationReceiver(
-                new LambdaNotificationReceiver( (notification, cancellationToken) =>
+                new LambdaNotificationReceiver((notification, cancellationToken) =>
                 {
                     Console.WriteLine("Notification '{0}' received from '{1}': {2}", notification.Id, notification.From, notification.Event);
                     return Task.CompletedTask;
                 }));

             listener.AddCommandReceiver(
-                new LambdaCommandReceiver( (command, cancellationToken) =>
+                new LambdaCommandReceiver((command, cancellationToken) =>
                 {
                     Console.WriteLine("Command '{0}' received from '{1}': {2} {3}", command.Id, command.From, command.Method, command.Uri);
                     return Task.CompletedTask;


Registration of graphql service fixed. Invalidates caching results correctly now.

--- src/Squidex/Config/Domain/ReadModule.cs
+++ src/Squidex/Config/Domain/ReadModule.cs
@@ -56,6 +56,12 @@
                 .AsSelf()
                 .SingleInstance();

+            builder.RegisterType<CachingGraphQLService>()
+                .As<IGraphQLService>()
+                .As<IEventConsumer>()
+                .AsSelf()
+                .InstancePerDependency();
+
             builder.RegisterType<CachingAppProvider>()
                 .As<IAppProvider>()
                 .AsSelf()
@@ -96,11 +102,6 @@
                 .AsSelf()
                 .InstancePerDependency();

-            builder.RegisterType<CachingGraphQLService>()
-                .As<IGraphQLService>()
-                .AsSelf()
-                .InstancePerDependency();
-
             builder.RegisterType<WebhookDequeuer>()
                 .As<IExternalSystem>()
                 .AsSelf()


Raise state changed event after state has been changed

--- src/StateMechanic/StateMachineKernel.cs
+++ src/StateMechanic/StateMachineKernel.cs
@@ -47,7 +47,6 @@
             }

             from.ParentStateMachine.SetCurrentState(to);
-            this.OnTransition(from, to, @event, from.ParentStateMachine, isInnerTransition);

             if (!isInnerTransition)
             {
@@ -63,6 +62,8 @@
                 if (to.ChildStateMachine != null)
                     this.EnterChildStateMachine(to.ChildStateMachine, from, @event);
             }
+
+            this.OnTransition(from, to, @event, from.ParentStateMachine, isInnerTransition);
         }

         private void ExitChildStateMachine(IStateMachine<TState> childStateMachine, TState to, IEvent @event)


1285: fixed color swap

1285: fixed color swap

--- a_mini/projects/Tests/Mini/3_Samples/02_AA_Demo/AADemo_Test4_subpix.cs
+++ a_mini/projects/Tests/Mini/3_Samples/02_AA_Demo/AADemo_Test4_subpix.cs
@@ -78,8 +78,11 @@
             }
             //SwapRB(destImg);
         }
+
+
         void BlendScanline(ActualImage destImg, byte[] expandGreyBuffer,
          PixelFarm.Drawing.Color color, int x, int y, int width)
+
         {
             byte[] rgb = new byte[3]{
                 color.R,
@@ -93,72 +96,45 @@
             int destImgIndex = (x * 4) + (destImg.Stride * y);
             //start img src
             int srcImgIndex = x + (width * y);
-            int spanIndex = srcImgIndex;
-            int i = x % 3;
-
+            int colorIndex = 0;
             int round = 0;
-
-            do
-            {
-                int a0 = expandGreyBuffer[spanIndex] * color.alpha;
-                byte existingColor = destImgBuffer[destImgIndex];
-                byte newValue = (byte)((((rgb[i] - existingColor) * a0) + (existingColor << 16)) >> 16);
-                destImgBuffer[destImgIndex] = newValue;
-                //move to next dest
-                destImgIndex++;
-
-
-                i++;
-                if (i > 2)
-                {
-                    i = 0;//reset
-                }
-                round++;
-                if (round > 2)
-                {
-                    //this is alpha chanel
-                    //so we skip alpha byte to next
-
-                    //and swap rgb of latest write pixel
-                    //--------------------------
-                    //in-place swap
-                    byte r = destImgBuffer[destImgIndex - 1];
-                    byte b = destImgBuffer[destImgIndex - 3];
-                    destImgBuffer[destImgIndex - 3] = r;
-                    destImgBuffer[destImgIndex - 1] = b;
-                    //--------------------------
-
-                    destImgIndex++;
-                    round = 0;
-                }
-                spanIndex++;
-                srcImgIndex++;
-
-
-            } while (--width > 0);
-        }
-        static void SwapRB(ActualImage destImg)
-        {
-            byte[] destImgBuffer = ActualImage.GetBuffer(destImg);
-            int width = destImg.Width;
-            int height = destImg.Height;
-            int destIndex = 0;
-            for (int y = 0; y < height; ++y)
-            {
-                destIndex = (y * destImg.Stride);
-                for (int x = 0; x < width; ++x)
-                {
-                    byte r = destImgBuffer[destIndex];
-                    byte g = destImgBuffer[destIndex + 1];
-                    byte b = destImgBuffer[destIndex + 2];
-                    byte a = destImgBuffer[destIndex + 3];
-                    //swap
-                    destImgBuffer[destIndex + 2] = r;
-                    destImgBuffer[destIndex] = b;
-                    destIndex += 4;
-                }
-            }
-        }
+            byte color_a = color.alpha;
+            while (width > 3)
+            {
+                //try
+                //{
+                int a0 = expandGreyBuffer[srcImgIndex] * color_a;
+                int a1 = expandGreyBuffer[srcImgIndex + 1] * color_a;
+                int a2 = expandGreyBuffer[srcImgIndex + 2] * color_a;
+
+                byte ec0 = destImgBuffer[destImgIndex];//existing color
+                byte ec1 = destImgBuffer[destImgIndex + 1];//existing color
+                byte ec2 = destImgBuffer[destImgIndex + 2];//existing color
+
+
+                byte n0 = (byte)((((rgb[colorIndex] - ec0) * a0) + (ec0 << 16)) >> 16);
+                byte n1 = (byte)((((rgb[colorIndex + 1] - ec1) * a1) + (ec1 << 16)) >> 16);
+                byte n2 = (byte)((((rgb[colorIndex + 2] - ec2) * a2) + (ec2 << 16)) >> 16);
+
+                destImgBuffer[destImgIndex] = n2;//swap on the fly
+                destImgBuffer[destImgIndex + 1] = n1;
+                destImgBuffer[destImgIndex + 2] = n0;//swap  on the fly
+
+                destImgIndex += 4;
+                round = 0;
+                colorIndex = 0;
+                srcImgIndex += 3;
+                width -= 3;
+
+                //}
+                //catch (Exception ex)
+                //{
+
+                //}
+            }
+        }
+
+
         // Swap Blue and Red, that is convert RGB->BGR or BGR->RGB
         ////---------------------------------
         //void swap_rb(unsigned char* buf, unsigned width, unsigned height, unsigned stride)
@@ -232,15 +208,18 @@
             //draw img into that bg
             //---------------
             //convert glyphImg from RGBA to grey Scale buffer
-            //---------------
+            //---------------
             //lcd process ...
             byte[] glyphGreyScale = CreateGreyScaleBuffer(glyphImg);
-            //
-            int newGreyBuffWidth;
-            byte[] expanedGreyScaleBuffer = CreateNewExpandedLcdGrayScale(glyphGreyScale, glyphImg.Width, glyphImg.Height, out newGreyBuffWidth);
+            //---------------
+
+            //swap gray scale
+            int newGreyImgStride;
+            byte[] expanedGreyScaleBuffer = CreateNewExpandedLcdGrayScale(glyphGreyScale, glyphImg.Width, glyphImg.Height, out newGreyImgStride);
+
             //blend lcd
             var aggPainer = (PixelFarm.Agg.AggCanvasPainter)p;
-            Blend(aggPainer.Graphics.DestActualImage, expanedGreyScaleBuffer, newGreyBuffWidth, glyphImg.Height);
+            Blend(aggPainer.Graphics.DestActualImage, expanedGreyScaleBuffer, newGreyImgStride, glyphImg.Height);
             //---------------
             p.DrawImage(glyphImg, 0, 50);
         }


ExampleEntity missing

ExampleEntity missing

--- src/Templates/Entities/ExampleEntity.cs
+++ src/Templates/Entities/ExampleEntity.cs
@@ -1,5 +1,5 @@
+// [[Highway.Onramp.MVC.Data]]
 using System;
-// [[Highway.Onramp.MVC.Data]]
 using System.Collections.Generic;
 using System.Linq;


Added TaskId property for completed items

--- src/Todoist.Net/Models/CompletedItem.cs
+++ src/Todoist.Net/Models/CompletedItem.cs
@@ -27,6 +27,15 @@
         /// </value>
         [JsonProperty("content")]
         public string Content { get; internal set; }
+
+        /// <summary>
+        /// Gets the task id
+        /// </summary>
+        /// <value>
+        /// The task id
+        /// </value>
+        [JsonProperty("task_id")]
+        public long TaskId { get; internal set; }

         /// <summary>
         /// Gets the identifier.


Use an OrdinalIgnoreCase for localdb instance lookups

--- src/Umbraco.Core/Persistence/LocalDb.cs
+++ src/Umbraco.Core/Persistence/LocalDb.cs
@@ -142,7 +142,7 @@
         {
             EnsureAvailable();
             var instances = GetInstances();
-            return instances != null && instances.Contains(instanceName);
+            return instances != null && instances.Contains(instanceName, StringComparer.OrdinalIgnoreCase);
         }

         /// <summary>


[Debugger] Make debug tooltips use the same eval args as pinned watches

Fixes bug #6926.

--- Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
+++ Mono.Debugging/Mono.Debugging.Evaluation/ValueReference.cs
@@ -204,7 +204,7 @@
 		{
 			try {
 				return ctx.Adapter.ObjectValueHasChildren (GetChildrenContext (options), this, Value);
-			} catch (Exception ex) {
+			} catch {
 				return false;
 			}
 		}


HasValue checks for nullables

HasValue checks for nullables

--- src/Valit/ValitRuleBooleanExtensions.cs
+++ src/Valit/ValitRuleBooleanExtensions.cs
@@ -6,13 +6,13 @@
         => rule.Satisfies(p => p);

     public static IValitRule<TObject, bool?> IsTrue<TObject>(this IValitRule<TObject, bool?> rule) where TObject : class
-        => rule.Satisfies(p => p == true);
+        => rule.Satisfies(p => p.HasValue && p == true);

     public static IValitRule<TObject, bool> IsFalse<TObject>(this IValitRule<TObject, bool> rule) where TObject : class
         => rule.Satisfies(p => !p);

     public static IValitRule<TObject, bool?> IsFalse<TObject>(this IValitRule<TObject, bool?> rule) where TObject : class
-        => rule.Satisfies(p => p == false);
+        => rule.Satisfies(p => p.HasValue && p == false);

     public static IValitRule<TObject, bool> IsEqualTo<TObject>(this IValitRule<TObject, bool> rule, bool value) where TObject : class
         => rule.Satisfies(p => p == value);


Add regex-based file ignoring to MakeWixForDirTree

--- Palaso.MSBuildTasks/MakeWixForDirTree/MakeWixForDirTree.cs
+++ Palaso.MSBuildTasks/MakeWixForDirTree/MakeWixForDirTree.cs
@@ -34,6 +34,7 @@
 		private string _outputFilePath;
 		private string[] _filesAndDirsToExclude = null;
 		private Regex _fileMatchPattern = new Regex(@".*");
+		private Regex _ignoreFilePattern = new Regex(@"IGNOREME");

 		//todo: this should just be a list
 		private Dictionary<string, string> m_exclude = new Dictionary<string, string>();
@@ -66,7 +67,7 @@

 		/// <summary>
-		/// Subfolders and files to exclude.
+		/// Subfolders and files to exclude. Kinda wonky. Using Ignore makes more sense.
 		/// </summary>
 		public string[] Exclude
 		{
@@ -91,6 +92,15 @@
 		{
 			get { return _fileMatchPattern.ToString(); }
 			set { _fileMatchPattern = new Regex(value, RegexOptions.IgnoreCase); }
+		}
+
+		/// <summary>
+		/// Will exclude if either the filename or the full path matches the expression.
+		/// </summary>
+		public string IgnoreRegExPattern
+		{
+			get { return _ignoreFilePattern.ToString(); }
+			set { _ignoreFilePattern = new Regex(value, RegexOptions.IgnoreCase); }
 		}

 		/// <summary>
@@ -293,7 +303,7 @@
 			// Build a list of the files in this directory removing any that have been exluded
 			foreach (string f in Directory.GetFiles(dirPath))
 			{
-				if (_fileMatchPattern.IsMatch(f) && !m_exclude.ContainsKey(f.ToLower())
+				if (_fileMatchPattern.IsMatch(f) && !_ignoreFilePattern.IsMatch(f) && !_ignoreFilePattern.IsMatch(Path.GetFileName(f)) && !m_exclude.ContainsKey(f.ToLower())
 					&& !f.Contains(kFileNameOfGuidDatabase) )
 					files.Add(f);
 			}


added linq reference

added linq reference

--- RelhaxModpack/RelhaxModpack/DatabaseComponents/Category.cs
+++ RelhaxModpack/RelhaxModpack/DatabaseComponents/Category.cs
@@ -3,6 +3,7 @@
 using RelhaxModpack.DatabaseComponents;
 using System.Windows.Controls;
 using System;
+using System.Linq;

 namespace RelhaxModpack
 {


add deprecated field to database internal csv generation

--- RelhaxModpack/RelhaxModpack/Windows/ModpackToolbox.xaml.cs
+++ RelhaxModpack/RelhaxModpack/Windows/ModpackToolbox.xaml.cs
@@ -458,7 +458,7 @@
                 Path.Combine(ApplicationConstants.ApplicationStartupPath, "database_user.csv");

             //global dependencies
-            string header = @internal ? "PackageName\tCategory\tPackage\tLevel\tZip\tTags\tDevURL\tEnabled\tVisible\tVersion" : "Category\tMod\tDevURL";
+            string header = @internal ? "PackageName\tCategory\tPackage\tLevel\tZip\tTags\tDeprecated\tDevURL\tEnabled\tVisible\tVersion" : "Category\tMod\tDevURL";
             sb.AppendLine(header);

             if(@internal)
@@ -472,7 +472,9 @@
                         "0",
                         string.IsNullOrWhiteSpace(dp.ZipFile) ? notApplicable : dp.ZipFile,
                         dp.Tags.ToString(),
-                        string.IsNullOrWhiteSpace(dp.DevURLList[0].Trim()) ? "" : "=HYPERLINK(\"" + dp.DevURLList[0].Trim() + "\",\"link\")",
+                        dp.Deprecated.ToString(),
+                        //example google url: =HYPERLINK("http://wwiihwa.blogspot.de/","link")
+                        string.IsNullOrWhiteSpace(dp.DevURLList[0].Trim()) ? string.Empty : "=HYPERLINK(\"" + dp.DevURLList[0].Trim() + "\",\"link\")",
                         dp.Enabled,
                         string.Empty,
                         dp.Version
@@ -487,7 +489,8 @@
                         "0",
                         string.IsNullOrWhiteSpace(dep.ZipFile) ? notApplicable : dep.ZipFile,
                         dep.Tags.ToString(),
-                        string.IsNullOrWhiteSpace(dep.DevURLList[0].Trim()) ? "" : "=HYPERLINK(\"" + dep.DevURLList[0].Trim() + "\",\"link\")",
+                        dep.Deprecated.ToString(),
+                        string.IsNullOrWhiteSpace(dep.DevURLList[0].Trim()) ? string.Empty : "=HYPERLINK(\"" + dep.DevURLList[0].Trim() + "\",\"link\")",
                         dep.Enabled,
                         string.Empty,
                         dep.Version));
@@ -508,7 +511,7 @@
                             nameIndneted = "--" + nameIndneted;
                         }
                         sb.AppendLine(string.Format("{0}\t{1}\t{2}", sp.ParentCategory.Name, nameIndneted,
-                            string.IsNullOrWhiteSpace(sp.DevURLList[0].Trim()) ? "" : "=HYPERLINK(\"" + sp.DevURLList[0].Trim() + "\",\"link\")"));
+                            string.IsNullOrWhiteSpace(sp.DevURLList[0].Trim()) ? string.Empty : "=HYPERLINK(\"" + sp.DevURLList[0].Trim() + "\",\"link\")"));
                     }
                     else
                     {
@@ -519,7 +522,8 @@
                             sp.Level,
                             string.IsNullOrWhiteSpace(sp.ZipFile) ? notApplicable : sp.ZipFile,
                             sp.Tags.ToString(),
-                            string.IsNullOrWhiteSpace(sp.DevURLList[0].Trim()) ? "" : "=HYPERLINK(\"" + sp.DevURLList[0].Trim() + "\",\"link\")",
+                            sp.Deprecated.ToString(),
+                            string.IsNullOrWhiteSpace(sp.DevURLList[0].Trim()) ? string.Empty : "=HYPERLINK(\"" + sp.DevURLList[0].Trim() + "\",\"link\")",
                             sp.Enabled,
                             sp.Visible,
                             sp.Version));


Don't slow down when taking cover.

Don't slow down when taking cover.

--- modules/game/character.cs
+++ modules/game/character.cs
@@ -10,7 +10,7 @@
 }

 function Character::takeCover(%this, %obj, %cover) {
-   %this.goTo(%obj, %cover.getPosition());
+   %this.goTo(%obj, %cover.getPosition(), false);
 }

 function SceneObject::damage(%this, %amount) {