Remove UnicodeBindable

Remove UnicodeBindable

--- osu.Framework/Localisation/LocalisationManager_UnicodeBindable.cs
+++ osu.Framework/Localisation/LocalisationManager_UnicodeBindable.cs
@@ -1,58 +0,0 @@
-// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
-// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE
-
-using osu.Framework.Configuration;
-
-namespace osu.Framework.Localisation
-{
-    public partial class LocalisationManager
-    {
-        private class UnicodeBindableString : Bindable<string>, IUnicodeBindableString
-        {
-            private readonly IBindable<bool> preferUnicode = new Bindable<bool>();
-
-            private string unicodeText;
-            private string nonUnicodeText;
-
-            public UnicodeBindableString(string unicodeText, string nonUnicodeText, IBindable<bool> preferUnicode)
-            {
-                this.unicodeText = unicodeText;
-                this.nonUnicodeText = nonUnicodeText;
-                this.preferUnicode.BindTo(preferUnicode);
-                this.preferUnicode.BindValueChanged(_ => updateValue(), true);
-            }
-
-            string IUnicodeBindableString.UnicodeText
-            {
-                set
-                {
-                    if (unicodeText == value)
-                        return;
-                    unicodeText = value;
-
-                    updateValue();
-                }
-            }
-
-            string IUnicodeBindableString.NonUnicodeText
-            {
-                set
-                {
-                    if (nonUnicodeText == value)
-                        return;
-                    nonUnicodeText = value;
-
-                    updateValue();
-                }
-            }
-
-            private void updateValue()
-            {
-                if (preferUnicode.Value)
-                    Value = unicodeText ?? nonUnicodeText ?? string.Empty;
-                else
-                    Value = nonUnicodeText ?? unicodeText ?? string.Empty;
-            }
-        }
-    }
-}


tried to fix the port binding issue of the test case ClientTest.TestBindLocalEndPoint

--- test/SuperSocket.Tests/ClientTest.cs
+++ test/SuperSocket.Tests/ClientTest.cs
@@ -123,12 +123,28 @@
                 };

                 var client = hostConfigurator.ConfigureEasyClient(pipelineFilter, options);
-
-                var localPort = _rd.Next(40000, 50000);
-
-                client.LocalEndPoint = new IPEndPoint(IPAddress.Loopback, localPort);
-
-                var connected = await client.ConnectAsync(new IPEndPoint(IPAddress.Loopback, hostConfigurator.Listener.Port));
+                var connected = false;
+                var localPort = 0;
+
+                for (var i = 0; i < 3; i++)
+                {
+                    localPort = _rd.Next(40000, 50000);
+                    client.LocalEndPoint = new IPEndPoint(IPAddress.Loopback, localPort);
+
+                    try
+                    {
+                        connected = await client.ConnectAsync(new IPEndPoint(IPAddress.Loopback, hostConfigurator.Listener.Port));
+                    }
+                    catch (SocketException e)
+                    {
+                        if (e.SocketErrorCode == SocketError.AccessDenied || e.SocketErrorCode == SocketError.AddressAlreadyInUse)
+                            continue;
+
+                        throw e;
+                    }
+
+                    break;
+                }

                 Assert.True(connected);


For consistency, AsFunction returns a IFunction adapter and AsFunc returns a Func.

--- WmcSoft.Mathematics/Arithmetics/IInterpolation.cs
+++ WmcSoft.Mathematics/Arithmetics/IInterpolation.cs
@@ -2,6 +2,11 @@

 namespace WmcSoft.Arithmetics
 {
+    /// <summary>
+    /// Represents an algorithm to interpolate a value.
+    /// </summary>
+    /// <typeparam name="T">The type of the value.</typeparam>
+    /// <typeparam name="U">The type of the result.</typeparam>
     public interface IInterpolation<T, U>
     {
         U Interpolate(T value);
@@ -9,9 +14,39 @@

     public static class InterpolationExtensions
     {
-        public static Func<T, U> AsFunction<T, U>(this IInterpolation<T, U> interpolation)
+        public static Func<T, U> AsFunc<T, U>(this IInterpolation<T, U> interpolation)
         {
-            return (t) => interpolation.Interpolate(t);
+            return interpolation.Interpolate;
+        }
+
+        public static InterpolationAdapter<T> AsFunction<T>(this IInterpolation<T, T> interpolation)
+        {
+            return new InterpolationAdapter<T>(interpolation);
         }
     }
+
+    public struct InterpolationAdapter<T> : IFunction<T>
+    {
+        private readonly IInterpolation<T, T> underlying;
+
+        public InterpolationAdapter(IInterpolation<T, T> interpolation)
+        {
+            underlying = interpolation;
+        }
+
+        public T Eval(T x)
+        {
+            return underlying.Interpolate(x);
+        }
+
+        public bool Equals(IFunction<T> other)
+        {
+            if (other is InterpolationAdapter<T> that) {
+                return underlying.Equals(that.underlying);
+            }
+            return false;
+        }
+
+
+    }
 }


Strategy. Process child order for risk management.


Added some methods to the ExtendedBinary Reader/Writer.

--- HedgeLib/ExtendedBinary.cs
+++ HedgeLib/ExtendedBinary.cs
@@ -69,6 +69,12 @@
             JumpAhead(jumpAmount);
         }

+        public string ReadSignature(uint length = 4)
+        {
+            var chars = ReadChars(4);
+            return new string(chars);
+        }
+
         public string ReadNullTerminatedString()
         {
             char curChar;
@@ -318,6 +324,17 @@
             BaseStream.Position = curPos;
         }

+        public void FillInOffset(string name)
+        {
+            var curPos = BaseStream.Position;
+            BaseStream.Position = Offsets[name];
+
+            Write((uint)curPos);
+            Offsets.Remove(name);
+
+            BaseStream.Position = curPos;
+        }
+
         public void FillInOffset(string name, uint value)
         {
             var curPos = BaseStream.Position;


remove CWL. Driver is only for CLR (console app).

--- samples/PortMidiPlayer.cs
+++ samples/PortMidiPlayer.cs
@@ -14,15 +14,12 @@

 namespace Commons.Music.Midi.Player
 {
+#if !Moonlight
 	public class Driver
 	{
 		public static void Main (string [] args)
 		{
-#if Moonlight
-			var output = IntPtr.Zero;
-#else
 			var output = MidiDeviceManager.OpenOutput (MidiDeviceManager.DefaultOutputDeviceID);
-#endif

 			bool syncMode = false;

@@ -88,6 +85,7 @@
 			}
 		}
 	}
+#endif

 	public enum PlayerState
 	{
@@ -159,7 +157,6 @@
 					HandleEvent (events [event_idx++]);
 				}
 			} catch (ThreadAbortException ex) {
-				Console.WriteLine ("Aborted player loop");
 				// FIXME: call pause (to shut down all notes)
 				// FIXME: call ResetAbort()
 			}
@@ -284,7 +281,6 @@
 		public void PlayAsync ()
 		{
 TextWriter.Null.WriteLine ("STATE: " + State); // FIXME: mono somehow fails to initialize this auto property.
-
 			switch (State) {
 			case PlayerState.Playing:
 				return; // do nothing


code cleanup

code cleanup

--- AppMetrics/LogEvent.ashx.cs
+++ AppMetrics/LogEvent.ashx.cs
@@ -66,9 +66,6 @@
 			{
 				context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
 				ReportLog(exc);
-#if DEBUG
-				context.Response.Write(exc);
-#endif
 			}
 		}


Add the guest system info as push action

--- Espera.Network/PushAction.cs
+++ Espera.Network/PushAction.cs
@@ -6,6 +6,7 @@
         UpdateCurrentPlaylist = 1,
         UpdatePlaybackState = 2,
         UpdateRemainingVotes = 3,
-        UpdateCurrentPlaybackTime = 4
+        UpdateCurrentPlaybackTime = 4,
+        UpdateGuestSystemInfo = 5
     }
 }


code tidy up

code tidy up

--- FTAnalyser/Forms/MainForm.cs
+++ FTAnalyser/Forms/MainForm.cs
@@ -698,10 +698,7 @@
         }

         #region DataErrors
-        void CkbDataErrors_SelectedIndexChanged(object sender, EventArgs e)
-        {
-            UpdateDataErrorsDisplay();
-        }
+        void CkbDataErrors_SelectedIndexChanged(object sender, EventArgs e) => UpdateDataErrorsDisplay();

         void UpdateDataErrorsDisplay()
         {
@@ -2300,7 +2297,7 @@
                 string factType = list.Items[index].ToString();
                 list.SetItemChecked(index, selected);
                 try
-                {
+                {
                     Application.UserAppDataRegistry.SetValue(registryPrefix + factType, selected);
                 }
                 catch (IOException)


change.

change.

--- tools/TWCore.Diagnostics.Api/MessageHandlers/RavenDb/RavenDbQueryHandler.cs
+++ tools/TWCore.Diagnostics.Api/MessageHandlers/RavenDb/RavenDbQueryHandler.cs
@@ -195,9 +195,9 @@
             public DateTime Timestamp { get; set; }
             public string Tags { get; set; }
         }
-        public Task<List<NodeTraceItem>> GetTracesByGroupIdAsync(string environment, string groupName)
-        {
-            return RavenHelper.ExecuteAndReturnAsync(session =>
+        public async Task<List<NodeTraceItem>> GetTracesByGroupIdAsync(string environment, string groupName)
+        {
+            var value = await RavenHelper.ExecuteAndReturnAsync(session =>
             {
                 var documentQuery = session.Advanced.AsyncDocumentQuery<NodeTraceItem>();
                 var query = documentQuery
@@ -206,8 +206,13 @@
                     .OrderBy(x => x.Timestamp);
                 return query.ToListAsync();
             });
-        }
-
+
+            foreach (var item in value)
+                item.Timestamp = new DateTime(item.Timestamp.Ticks, DateTimeKind.Utc).ToLocalTime();
+
+            return value;
+        }
+

         //Others


refactored board objects and board state

--- Assets/Scripts/GameBoard.cs
+++ Assets/Scripts/GameBoard.cs
@@ -12,7 +12,7 @@
 using System.Collections.Generic;
 namespace AssemblyCSharp
 {
-	public class GameBoard
+	public class GameBoardData
 	{
 		public static IntVector2[] directions = new IntVector2[]{new IntVector2(1,0), new IntVector2(0,1), new IntVector2(-1,0), new IntVector2(0,-1)};
 		private bool[,] board;


Past-Pat was bad at things.

Past-Pat was bad at things.

--- Assets/Teak/TeakSettings.cs
+++ Assets/Teak/TeakSettings.cs
@@ -48,15 +48,14 @@
                     string properPath = Path.Combine(Application.dataPath, teakSettingsPath);
                     if (!Directory.Exists(properPath))
                     {
-                        AssetDatabase.CreateFolder("Assets/Teak", "Resources");
+                        AssetDatabase.CreateFolder(Application.dataPath, teakSettingsPath);
                     }

-                    string fullPath = Path.Combine(Path.Combine("Assets", teakSettingsPath),
-                                                   teakSettingsAssetName + teakSettingsAssetExtension
-                                                  );
+                    string relativePath = Path.Combine(Path.Combine("Assets", teakSettingsPath),
+                        teakSettingsAssetName + teakSettingsAssetExtension);
                     if(mInstance == null) throw new NullReferenceException("mInstance is null somehow");
-                    if(String.IsNullOrEmpty(fullPath)) throw new ArgumentNullException("fullPath is null or empty somehow.");
-                    AssetDatabase.CreateAsset(mInstance, fullPath);
+                    if(String.IsNullOrEmpty(relativePath)) throw new ArgumentNullException("relativePath is null or empty somehow.");
+                    AssetDatabase.CreateAsset(mInstance, relativePath);
 #endif
                 }
             }


More refactoring, clean up naming/positions of methods.

--- Aurora/BotManager/RexBot.cs
+++ Aurora/BotManager/RexBot.cs
@@ -44,14 +44,13 @@
         private bool m_allowJump = false;
         private bool m_UseJumpDecisionTree = true;

-        public enum RexBotState { Idle, Walking, Flying, Unknown }
+        public enum BotState { Idle, Walking, Flying, Unknown }

         private static readonly ILog m_log = log4net.LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
         private Vector3 DEFAULT_START_POSITION = new Vector3(128, 128, 128);

         private uint m_movementFlag = 0;
         private Quaternion m_bodyDirection = Quaternion.Identity;
-        private short m_frameCount = 0;

         private UUID m_myID = UUID.Random();
         private Scene m_scene;
@@ -59,8 +58,8 @@
         private AgentCircuitData m_circuitData;
         public AuroraEventManager EventManager = new AuroraEventManager ();

-        private RexBotState m_currentState = RexBotState.Idle;
-        public RexBotState State
+        private BotState m_currentState = BotState.Idle;
+        public BotState State
         {
             get { return m_currentState; }
             set
@@ -69,6 +68,7 @@
                 m_currentState = value;
             }
         }
+
         #region Jump Settings

         public bool AllowJump
@@ -97,26 +97,12 @@

         #endregion

-        private RexBotState m_previousState = RexBotState.Idle;
+        private BotState m_previousState = BotState.Idle;

         private Vector3 m_destination;

         private System.Timers.Timer m_frames;
         private System.Timers.Timer m_startTime;
-
-        #region Path declares
-
-        public int cornerStoneX = 128;
-        public int cornerStoneY = 128;
-        int[,] currentMap = new int[5, 5];
-        public bool ShouldFly = false;
-
-        public bool IsOnAPath = false;
-        public List<Vector3> WayPoints = new List<Vector3> ();
-        public int CurrentWayPoint = 0;
-        private float m_closeToPoint = 1;
-
-        #endregion

         #region IClientAPI properties

@@ -269,7 +255,7 @@
             if (!Util.IsZeroVector(destination - m_scenePresence.AbsolutePosition))
             {
                 walkTo(destination);
-                State = RexBotState.Walking;
+                State = BotState.Walking;

                 m_destination = destination;
             }
@@ -282,7 +268,7 @@
             {
                 flyTo(destination);
                 m_destination = destination;
-                State = RexBotState.Flying;
+                State = BotState.Flying;
             }
             else
             {
@@ -505,8 +491,71 @@

         #endregion

-
-        #region Path Following Code
+        #region Update Event
+
+        public void Update ()
+        {
+            if (m_scenePresence == null)
+                return;
+            //Tell any interested modules that we are ready to go
+            EventManager.FireGenericEventHandler ("Update", null);
+
+            //Now move the avatar
+            if (State != BotState.Idle)
+            {
+                bool CheckFly = State == BotState.Flying;
+                if (!ShouldFly && CheckFly)
+                    ShouldFly = CheckFly;
+                Vector3 diffPos = m_destination - m_scenePresence.AbsolutePosition;
+                if (Math.Abs (diffPos.X) < m_closeToPoint && Math.Abs (diffPos.Y) < m_closeToPoint &&
+                    (!CheckFly || (ShouldFly && Math.Abs (diffPos.Z) < m_closeToPoint))) //If we are flying, Z checking matters
+                {
+                    State = BotState.Idle;
+                    //Restart the start time
+                    m_startTime.Stop ();
+                    m_startTime.Start ();
+                }
+                else
+                {
+                    //Move to the position!
+                    switch (State)
+                    {
+                        case BotState.Walking:
+                            walkTo (m_destination);
+                            break;
+
+                        case BotState.Flying:
+                            flyTo (m_destination);
+                            break;
+                    }
+                }
+            }
+
+            if (State == BotState.Idle)
+            {
+                //We arn't going anywhere, stop movement
+                OnBotAgentUpdate (m_movementFlag, m_bodyDirection);
+            }
+        }
+
+        #endregion
+
+
+        #region A* Path Following Code
+
+        #region Path declares
+
+        public int cornerStoneX = 128;
+        public int cornerStoneY = 128;
+        int[,] currentMap = new int[5, 5];
+        public bool ShouldFly = false;
+
+        public bool IsOnAPath = false;
+        public List<Vector3> WayPoints = new List<Vector3> ();
+        public int CurrentWayPoint = 0;
+        private float m_closeToPoint = 1;
+
+        #endregion

         #region AStarBot memebers

@@ -642,56 +691,6 @@

         #endregion

-        #region Update Event
-
-        public void Update ()
-        {
-            if (m_scenePresence == null)
-                return;
-            //Tell any interested modules that we are ready to go
-            EventManager.FireGenericEventHandler ("Update", null);
-
-            //Now move the avatar
-            if (State != RexBotState.Idle)
-            {
-                bool CheckFly = State == RexBotState.Flying;
-                if (!ShouldFly && CheckFly)
-                    ShouldFly = CheckFly;
-                Vector3 diffPos = m_destination - m_scenePresence.AbsolutePosition;
-                if (Math.Abs (diffPos.X) < m_closeToPoint && Math.Abs (diffPos.Y) < m_closeToPoint &&
-                    (!CheckFly || (ShouldFly && Math.Abs (diffPos.Z) < m_closeToPoint))) //If we are flying, Z checking matters
-                {
-                    State = RexBotState.Idle;
-                    //Restart the start time
-                    m_startTime.Stop ();
-                    m_startTime.Start ();
-                }
-                else
-                {
-                    //Move to the position!
-                    switch (State)
-                    {
-                        case RexBotState.Walking:
-                            walkTo (m_destination);
-                            break;
-
-                        case RexBotState.Flying:
-                            flyTo (m_destination);
-                            break;
-                    }
-                }
-            }
-
-            if (State == RexBotState.Idle)
-            {
-                //We arn't going anywhere
-                OnBotAgentUpdate (m_movementFlag, m_bodyDirection);
-            }
-            m_frameCount++;
-        }
-
-        #endregion
-
         #region Following Code

         #region Following declares
@@ -784,7 +783,7 @@
                     else
                     {
                         //Stop the bot then
-                        State = RexBotState.Idle;
+                        State = BotState.Idle;
                         m_startTime.Stop ();
                     }
                     //Reset the time


Add support for alertFilter and areaLabelFilter syntax

--- BugReport/Reports/Config.cs
+++ BugReport/Reports/Config.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
 using System.Linq;
@@ -75,23 +76,25 @@

             LoadUsers();

-            AreaLabels = LoadLabels("area").Distinct().ToList();
+            Organizations = LoadOrganizations();
+            Teams = LoadTeams();
+
+            IEnumerable<AreaLabel> allAreaLabels = LoadAreaLabels().Distinct().ToList();
+            AreaLabels = FilterAreaLabels(allAreaLabels, LoadAreaLabelFilters(allAreaLabels)).ToList();
             IssueTypeLabels = LoadLabels("issueType").ToList();
             UntriagedLabels = LoadLabels("untriaged").ToList();

             LabelAliases = LoadLabelAliases();
             MilestoneAliases = LoadMilestoneAliases();

-            Organizations = LoadOrganizations();
-            Teams = LoadTeams();
-
             UntriagedExpression = new ExpressionUntriaged(
                 IssueTypeLabels,
-                AreaLabels,
+                allAreaLabels.Select(labelInfo => labelInfo.Label),
                 UntriagedLabels);
             var customIsValues = new Dictionary<string, Expression>() { { "untriaged", UntriagedExpression } };

-            Alerts = LoadAlerts(customIsValues).ToList();
+            IEnumerable<Alert> allAlerts = LoadAlerts(customIsValues);
+            Alerts = FilterAlerts(allAlerts, LoadAlertFilters(allAlerts).ToList()).ToList();
             Queries = LoadQueryReports(customIsValues).ToList();
         }

@@ -207,6 +210,64 @@
             }
         }

+        private class AlertFilter
+        {
+            private Team _team;
+            private string _alertName;
+
+            public AlertFilter(Team team, string alertName)
+            {
+                _team = team;
+                _alertName = alertName;
+            }
+
+            public bool IsMatch(Alert alert)
+            {
+                if (_team != null)
+                {
+                    return (_team == alert.Team);
+                }
+                Debug.Assert(_alertName != null);
+                return _alertName == alert.Name;
+            }
+        }
+
+        private IEnumerable<AlertFilter> LoadAlertFilters(IEnumerable<Alert> alerts)
+        {
+            foreach (ConfigFile configFile in _configFiles)
+            {
+                foreach (XElement alertsNode in configFile.Root.Descendants("alertFilters"))
+                {
+                    foreach (XElement alertNode in alertsNode.Descendants("alertFilter"))
+                    {
+                        string teamName = alertNode.Attribute("team")?.Value;
+                        string alertName = alertNode.Attribute("name")?.Value;
+
+                        if ((teamName == null) && (alertName == null))
+                        {
+                            throw new InvalidDataException("Invalid alert filter - either 'name' or 'team' attribute has to be defined.");
+                        }
+                        if ((teamName != null) && (alertName != null))
+                        {
+                            throw new InvalidDataException($"Invalid alert filter '{alertName}' for team '{teamName}' - cannot filter on both 'name' and 'team' attributes at once.");
+                        }
+                        if ((alertName != null) &&
+                            alerts.Where(alert => (alert.Name == alertName)).None())
+                        {
+                            throw new InvalidDataException($"Invalid alert filter on name '{alertName}' - cannot find alert with that name");
+                        }
+
+                        yield return new AlertFilter(FindTeam(teamName), alertName);
+                    }
+                }
+            }
+        }
+
+        private IEnumerable<Alert> FilterAlerts(IEnumerable<Alert> alerts, IEnumerable<AlertFilter> filters)
+        {
+            return alerts.Where(alert => filters.Where(filter => filter.IsMatch(alert)).Any());
+        }
+
         private IEnumerable<NamedQuery> LoadQueryReports(IReadOnlyDictionary<string, Expression> customIsValues)
         {
             foreach (ConfigFile configFile in _configFiles)
@@ -266,6 +327,100 @@
             }
         }

+        private class AreaLabel
+        {
+            public Label Label { get; private set; }
+            public Team Team { get; private set; }
+
+            public AreaLabel(string labelName, Team team)
+            {
+                Label = new Label(labelName);
+                Team = team;
+            }
+        }
+
+        private IEnumerable<AreaLabel> LoadAreaLabels()
+        {
+            foreach (ConfigFile configFile in _configFiles)
+            {
+                foreach (XElement labelsNode in
+                    configFile.Root.Descendants("labels").Where(n => n.Attribute("kind")?.Value == "area"))
+                {
+                    foreach (XElement labelNode in labelsNode.Descendants("label"))
+                    {
+                        yield return new AreaLabel(
+                            labelNode.Attribute("name").Value,
+                            FindTeam(labelNode.Attribute("team")?.Value));
+                    }
+                }
+            }
+        }
+
+        private class AreaLabelFilter
+        {
+            private Team _team;
+            private string _labelName;
+
+            public AreaLabelFilter(Team team, string labelName)
+            {
+                Debug.Assert((team != null) || (labelName != null));
+                _team = team;
+                _labelName = labelName;
+            }
+
+            public bool IsMatch(AreaLabel areaLabel)
+            {
+                if (_team != null)
+                {
+                    if (_labelName != null)
+                    {
+                        return ((areaLabel.Team == _team) && (areaLabel.Label.Name == _labelName));
+                    }
+                    return (areaLabel.Team == _team);
+                }
+                Debug.Assert(_labelName != null);
+                return (areaLabel.Label.Name == _labelName);
+            }
+        }
+
+        private IEnumerable<AreaLabelFilter> LoadAreaLabelFilters(IEnumerable<AreaLabel> areaLabels)
+        {
+            // Teams have to load first
+            Debug.Assert(Teams != null);
+
+            foreach (ConfigFile configFile in _configFiles)
+            {
+                foreach (XElement alertsNode in configFile.Root.Descendants("areaLabelFilters"))
+                {
+                    foreach (XElement alertNode in alertsNode.Descendants("areaLabelFilter"))
+                    {
+                        string teamName = alertNode.Attribute("team")?.Value;
+                        string labelName = alertNode.Attribute("name")?.Value;
+
+                        if ((teamName == null) && (labelName == null))
+                        {
+                            throw new InvalidDataException("Invalid area label filter - either 'name' or 'team' attribute has to be defined.");
+                        }
+                        if ((labelName != null) &&
+                            areaLabels.Where(areaLabel => (areaLabel.Label.Name == labelName)).None())
+                        {
+                            throw new InvalidDataException($"Invalid areal label filter on name '{labelName}' - cannot find label with that name");
+                        }
+
+                        yield return new AreaLabelFilter(FindTeam(teamName), labelName);
+                    }
+                }
+            }
+        }
+
+        private IEnumerable<Label> FilterAreaLabels(IEnumerable<AreaLabel> areaLabels, IEnumerable<AreaLabelFilter> filters)
+        {
+            return areaLabels
+                .Where(areaLabel =>
+                    filters.Where(filter => filter.IsMatch(areaLabel)).Any())
+                .Select(areaLabel => areaLabel.Label);
+        }
+
         private Dictionary<string, Label> LoadLabelAliases()
         {
             Dictionary<string, Label> labelAliases = new Dictionary<string, Label>();


Fix to issue 5; Allow absolute paths for video filenames.

--- CH2/Helpers/PlayerHelper.cs
+++ CH2/Helpers/PlayerHelper.cs
@@ -57,17 +57,21 @@
         private static void startPlayingRound(XElement round)
         {
             double startPos = ((DateTime)round.Element("StartTime")).TimeOfDay.TotalSeconds;
-            string URI = SoftPath + "\\" + round.Parent.Element("Filename").Value;
+            string URI = round.Parent.Element("Filename").Value;
             startPlayingURL(URI, startPos);
         }

         private static void startPlayingVideo(XElement video)
         {
-            startPlayingURL(SoftPath + "\\" + video.Element("Filename").Value, 0);
+            startPlayingURL(video.Element("Filename").Value, 0);
         }

         private static void startPlayingURL(string URL, double startPos)
         {
+            if (!PathHelper.IsFullPath(URL))
+            {
+                URL = SoftPath + "\\" + URL;
+            }
             Player.URL = URL;
             Player.Ctlcontrols.currentPosition = startPos;
             Player.Ctlcontrols.play();
@@ -105,7 +109,12 @@

         internal static bool CheckFileExists(string filename_i)
         {
-            string filename = SoftPath + "\\" + filename_i;
+            string filename = "";
+            if (!PathHelper.IsFullPath(filename_i))
+            {
+                filename = SoftPath + "\\";
+            }
+            filename += filename_i;
             Console.WriteLine("checking path {0}", filename);
             return File.Exists(filename);
         }


Added back tests

Added back tests

--- test/Leto.OpenSslFacts/BadMessageFacts.cs
+++ test/Leto.OpenSslFacts/BadMessageFacts.cs
@@ -8,22 +8,22 @@
 {
     public class BadMessageFacts
     {
-        //[Fact]
-        //public async Task ClientHelloWithExtraBytes()
-        //{
-        //    using (var listener = new OpenSsl11.OpenSslSecurePipeListener(Data.Certificates.RSACertificate))
-        //    {
-        //        await CommonFacts.BadHelloFacts.SendHelloWithExtraTrailingBytes(listener);
-        //    }
-        //}
+        [Fact]
+        public async Task ClientHelloWithExtraBytes()
+        {
+            using (var listener = new OpenSsl11.OpenSslSecurePipeListener(Data.Certificates.RSACertificate))
+            {
+                await CommonFacts.BadHelloFacts.SendHelloWithExtraTrailingBytes(listener);
+            }
+        }

-        //[Fact]
-        //public async Task StartWithApplicationRecord()
-        //{
-        //    using (var listener = new OpenSsl11.OpenSslSecurePipeListener(Data.Certificates.RSACertificate))
-        //    {
-        //        await CommonFacts.BadHelloFacts.StartWithApplicationRecord(listener);
-        //    }
-        //}
+        [Fact]
+        public async Task StartWithApplicationRecord()
+        {
+            using (var listener = new OpenSsl11.OpenSslSecurePipeListener(Data.Certificates.RSACertificate))
+            {
+                await CommonFacts.BadHelloFacts.StartWithApplicationRecord(listener);
+            }
+        }
     }
 }


Font size tweaks

Font size tweaks

--- CardGenerator/image-lib.csx
+++ CardGenerator/image-lib.csx
@@ -27,7 +27,7 @@
         const int namePosX       = 25;
         const int namePosY       = 25;
         const int titlePosY      = 50;
-        const int nameWidth      = 230;
+        const int nameWidth      = 245;
         const int scoreLeftX     = 314;
         const int scoreRightX    = 342;
         const int scoreLeftPosY  = 45;
@@ -77,7 +77,7 @@
 static void RenderText(Graphics graphics, int xPos, int yPos, int width, string text)
 {
     var brush = new SolidBrush(Color.Black);
-    var fontSize = 22;
+    var fontSize = 14;
     var font = new Font("Microsoft Sans Serif", fontSize, FontStyle.Bold);
     SizeF size;

@@ -93,7 +93,7 @@
 static void RenderScores(Graphics graphics, int xPos, int yPos, int width, string score)
 {
   var brush = new SolidBrush(Color.Black);
-  var fontSize = 20;
+  var fontSize = 16;
   var font = new Font("Microsoft Sans Serif", fontSize, FontStyle.Bold);
   SizeF size = graphics.MeasureString(score, font);


Symbol.Equals(obj) now accepts sid struct

--- Common/Symbol.cs
+++ Common/Symbol.cs
@@ -88,6 +88,13 @@
                     return ID.Equals(sid);
                 }
             }
+
+            // compare a sid just as you would a symbol object
+            if (obj is SecurityIdentifier)
+            {
+                return ID.Equals((SecurityIdentifier) obj);
+            }
+
             if (ReferenceEquals(null, obj)) return false;
             if (ReferenceEquals(this, obj)) return true;
             if (obj.GetType() != GetType()) return false;


TSI-963  .NET Search Module now picks up new search.queryURL setting (obtained from Topology Manager) if available (TSI-1190)

--- webapp-net/Search/Providers/SI4TSearchProvider.cs
+++ webapp-net/Search/Providers/SI4TSearchProvider.cs
@@ -43,7 +43,13 @@

         protected virtual string GetSearchIndexUrl(Localization localization)
         {
-            return localization.GetConfigValue("search." + (localization.IsStaging ? "staging" : "live") + "IndexConfig");
+            // First try the new search.queryURL setting provided by DXA 1.3 TBBs if the Search Query URL can be obtained from Topology Manager.
+            string result = localization.GetConfigValue("search.queryURL");
+            if (string.IsNullOrEmpty(result))
+            {
+                result = localization.GetConfigValue("search." + (localization.IsStaging ? "staging" : "live") + "IndexConfig");
+            }
+            return result;
         }

         protected abstract SearchResults ExecuteQuery(string searchIndexUrl, NameValueCollection parameters);


[Modify] Edit it

[Modify] Edit it

--- websocket-sharp/Server/WebSocketServiceManager.cs
+++ websocket-sharp/Server/WebSocketServiceManager.cs
@@ -800,19 +800,36 @@
     }

     /// <summary>
-    /// Sends a Ping with the specified <paramref name="message"/> to every client in
-    /// the WebSocket services.
+    /// Sends a ping with the specified <paramref name="message"/> to
+    /// every client in the WebSocket services.
     /// </summary>
     /// <returns>
-    /// A <c>Dictionary<string, Dictionary<string, bool>></c> that contains
-    /// a collection of pairs of a service path and a collection of pairs of a session ID
-    /// and a value indicating whether the manager received a Pong from each client in a time,
-    /// or <see langword="null"/> if this method isn't available or <paramref name="message"/>
-    /// is invalid.
+    ///   <para>
+    ///   A <c>Dictionary<string, Dictionary<string, bool>></c>.
+    ///   </para>
+    ///   <para>
+    ///   It contains a collection of pairs of a service path and
+    ///   another collection of pairs of a session ID and a value
+    ///   indicating whether a pong has been received within a time
+    ///   from a client.
+    ///   </para>
     /// </returns>
     /// <param name="message">
     /// A <see cref="string"/> that represents the message to send.
-    /// </param>
+    /// The size must be 125 bytes or less in UTF-8.
+    /// </param>
+    /// <exception cref="InvalidOperationException">
+    /// The current state of the manager is not Start.
+    /// </exception>
+    /// <exception cref="ArgumentNullException">
+    /// <paramref name="message"/> is <see langword="null"/>.
+    /// </exception>
+    /// <exception cref="ArgumentException">
+    /// <paramref name="message"/> could not be UTF-8-encoded.
+    /// </exception>
+    /// <exception cref="ArgumentOutOfRangeException">
+    /// The size of <paramref name="message"/> is greater than 125 bytes.
+    /// </exception>
     public Dictionary<string, Dictionary<string, bool>> Broadping (string message)
     {
       if (_state != ServerState.Start) {


Ignored test

Ignored test

--- BuildMonitorWpf.Test/ToastNotificationsTests/CreateToastNotificationTests.cs
+++ BuildMonitorWpf.Test/ToastNotificationsTests/CreateToastNotificationTests.cs
@@ -14,6 +14,7 @@
    public class CreateToastNotificationTests
    {
       [TestMethod]
+      [Ignore]
       public void CreateToastNotificationErrorDesignTest()
       {
          var result = new BuildResult { Name = "Product-Main", Status = BuildStatus.Failed, RequestedBy = "Some user" };


Create a Parallel.For loop to speed up collision detection algorithm

--- DetectCollisions/Program.cs
+++ DetectCollisions/Program.cs
@@ -21,6 +21,7 @@
 using System;
 using System.Collections.Generic;
 using System.Security.Cryptography;
+using System.Threading.Tasks;

 namespace DetectCollisions
 {
@@ -33,6 +34,7 @@
       ulong counter = 0;
       bool collisionfound = false;
       string source = CreateName();
+      // To first test
       for (int i = 0; i < 5; i++)
       {
         string collision = CreateName();
@@ -50,24 +52,37 @@
         counter++;
       }

-      while (!collisionfound)
-      {
-        string collision = CreateName();
-        display(string.Format("The source {0} has not collided in {1:n0} loops with this one: {2}", source, counter, collision));
-        if (collision == source)
+      // final search method
+      //while (!collisionfound)
+      //{
+      //  string collision = CreateName();
+      //  display(string.Format("The source {0} has not collided in {1:n0} loops with this one: {2}", source, counter, collision));
+      //  if (collision == source)
+      //  {
+      //    collisionfound = true;
+      //  }
+
+      //  if (counter < ulong.MaxValue)
+      //  {
+      //    counter++;
+      //  }
+      //  else
+      //  {
+      //    break;
+      //  }
+      //}
+
+      // optimized method with ParallelFor
+      const long start = 0; //long.MinValue;
+      const long end = long.MaxValue;
+      ulong counter3 = 0;
+      Parallel.For(start, end, delegate (long counter2)
         {
-          collisionfound = true;
-        }
-
-        if (counter < ulong.MaxValue)
-        {
-          counter++;
-        }
-        else
-        {
-          break;
-        }
-      }
+          string collision = CreateName();
+          counter3++;
+          display(string.Format("The source {0} has not collided in {1:n0} loops with this one: {2}", source, counter3, collision));
+          if (collision == source) collisionfound = true;
+        });

       display(collisionfound
         ? string.Format("The source has collided after {0} generations", counter)


Change Previous & Next Key Codes

Change Previous & Next Key Codes

--- Devices/ADBRemoteControl.cs
+++ Devices/ADBRemoteControl.cs
@@ -33,8 +33,6 @@
         KEYCODE_MEDIA_PLAY_PAUSE = 126,
         KEYCODE_MEDIA_PREVIOUS = 88,
         KEYCODE_MEDIA_REWIND = 89,
-        KEYCODE_MEDIA_SKIP_BACKWARD = 273,
-        KEYCODE_MEDIA_SKIP_FORWARD = 272,
         KEYCODE_MEDIA_STOP = 86,
         KEYCODE_SLEEP = 223,
         KEYCODE_WAKEUP = 224,
@@ -69,8 +67,8 @@
             AddCommand(new ADBShellSendEventCommand(CommandName.MediaPlayPause, 164));
             AddCommand(new ADBShellKeyEventCommand(CommandName.MediaPrevious, AdbShellKeys.KEYCODE_MEDIA_PREVIOUS));
             AddCommand(new ADBShellSendEventCommand(CommandName.MediaRewind, 168));
-            AddCommand(new ADBShellKeyEventCommand(CommandName.MediaSkipBackward, AdbShellKeys.KEYCODE_MEDIA_SKIP_BACKWARD));
-            AddCommand(new ADBShellKeyEventCommand(CommandName.MediaSkipForward, AdbShellKeys.KEYCODE_MEDIA_SKIP_FORWARD));
+            AddCommand(new ADBShellKeyEventCommand(CommandName.MediaSkipBackward, AdbShellKeys.KEYCODE_MEDIA_PREVIOUS));
+            AddCommand(new ADBShellKeyEventCommand(CommandName.MediaSkipForward, AdbShellKeys.KEYCODE_MEDIA_NEXT));
             AddCommand(new ADBShellSendEventCommand(CommandName.MediaStop, 128));
             AddCommand(new ADBShellKeyEventCommand(CommandName.PowerOff, AdbShellKeys.KEYCODE_SLEEP));
             AddCommand(new ADBShellKeyEventCommand(CommandName.PowerOn, AdbShellKeys.KEYCODE_WAKEUP));


Updated option name to be more descriptive.


Use KeyEventFlags

Use KeyEventFlags

More cleaning up required.


Updated a comment so it's clear what it does.


renamed field on event

renamed field on event

--- DotNetRules.Events/Event.cs
+++ DotNetRules.Events/Event.cs
@@ -23,7 +23,7 @@

         public string Author { get; set; }

-        public string BoundedContextType { get; set; }
+        public string EntityContextType { get; set; }

         public string EventType { get; set; }

@@ -34,7 +34,7 @@
             var baseType = typeof(TEvent).BaseType;
             if (baseType != null)
             {
-                this.BoundedContextType = baseType.AssemblyQualifiedName;
+                this.EntityContextType = baseType.AssemblyQualifiedName;
             }

             this.EventType = typeof(TEvent).AssemblyQualifiedName;


Logwork period feature added.

Logwork period feature added.

--- Jirabox/ViewModel/LogWorkViewModel.cs
+++ Jirabox/ViewModel/LogWorkViewModel.cs
@@ -118,13 +118,27 @@
         private async Task LogWork()
         {
             var issueKey = navigationService.GetNavigationParameter().ToString();
-            while (StartDate.ToShortDateString() != EndDate.ToShortDateString())
+            if (IsPeriod)
             {
-                var date = String.Format("{0:s}", StartDate);
+                while (StartDate.ToShortDateString() != EndDate.ToShortDateString())
+                {
+                    var formattedDate = StartDate.ToString("O");
+                    var dateIndex = formattedDate.LastIndexOf(":");
+                    var date = formattedDate.Remove(dateIndex, 1);
+                    var timeSpent = String.Format("{0}h {1}m", Hour, minute);
+                    var result = await jiraService.LogWork(issueKey, date, timeSpent, Comment);
+                    StartDate = StartDate.AddDays(1);
+                }
+            }
+            else
+            {
+                //TODO:Convert date format
+                var dateIndex = StartDate.ToString("O").LastIndexOf(":");
+                var date = StartDate.ToString("O").Remove(dateIndex, 1);
                 var timeSpent = String.Format("{0}h {1}m", Hour, minute);
                 var result = await jiraService.LogWork(issueKey, date, timeSpent, Comment);
-                StartDate = StartDate.AddDays(1);
-            }
+            }
+            navigationService.GoBack();
         }
     }
 }


Update Mono.Nat/Pmp/Searchers/PmpSearcher.cs

Co-authored-by: Marius Ungureanu <33933fdea3ec7583bb5b2e4db6520296ea66620a@gmail.com>


Improved the captcha control a bit.

Improved the captcha control a bit.

--- yafsrc/YAF.Classes/YAF.Classes.UI/CaptchaImage.cs
+++ yafsrc/YAF.Classes/YAF.Classes.UI/CaptchaImage.cs
@@ -29,6 +29,8 @@
   /// </summary>
   public class CaptchaImage : IDisposable
   {
+    private Random random;
+
     // Public properties (all read-only).
     /// <summary>
     /// The family name.
@@ -74,10 +76,8 @@
     /// The height.
     /// </param>
     public CaptchaImage(string s, int width, int height)
-    {
-      this.text = s;
-      SetDimensions(width, height);
-      GenerateImage();
+      : this(s, width, height, string.Empty)
+    {
     }

@@ -103,6 +103,7 @@
     public CaptchaImage(string s, int width, int height, string familyName)
     {
       this.text = s;
+      random = new Random((int)DateTime.Now.Ticks);
       SetDimensions(width, height);
       SetFamilyName(familyName);
       GenerateImage();
@@ -210,7 +211,7 @@
       // If the named font is not installed, default to a system font.
       try
       {
-        var font = new Font(this.familyName, 12F);
+        var font = new Font(this.familyName, 14F);
         this.familyName = familyName;
         font.Dispose();
       }
@@ -238,8 +239,10 @@
       g.SmoothingMode = SmoothingMode.AntiAlias;
       var rect = new Rectangle(0, 0, this.width, this.height);

+      var randomLineColor = random.Next(40) + 200;
+
       // Fill in the background.
-      var hatchBrush = new HatchBrush(HatchStyle.SmallConfetti, Color.LightGray, Color.White);
+      var hatchBrush = new HatchBrush(HatchStyle.SmallConfetti, Color.FromArgb(randomLineColor, randomLineColor, randomLineColor), Color.White);
       g.FillRectangle(hatchBrush, rect);

       // Set up the text font.
@@ -254,7 +257,7 @@
         font = new Font(this.familyName, fontSize, FontStyle.Bold);
         size = g.MeasureString(this.text, font);
       }
- while (size.Width > rect.Width);
+      while (size.Width > rect.Width);

       // Set up the text format.
       var format = new StringFormat();
@@ -263,35 +266,70 @@

       // Create a path using the text and warp it randomly.
       var path = new GraphicsPath();
-      path.AddString(this.text, font.FontFamily, (int) font.Style, font.Size, rect, format);
+      path.AddString(this.text, font.FontFamily, (int)font.Style, font.Size, rect, format);
       float v = 4F;
       PointF[] points = {
-                          new PointF(r.Next(rect.Width)/v, r.Next(rect.Height)/v), new PointF(rect.Width - r.Next(rect.Width)/v, r.Next(rect.Height)/v),
-                          new PointF(r.Next(rect.Width)/v, rect.Height - r.Next(rect.Height)/v),
-                          new PointF(rect.Width - r.Next(rect.Width)/v, rect.Height - r.Next(rect.Height)/v)
+                          new PointF(r.Next(rect.Width) / v, r.Next(rect.Height) / v),
+                          new PointF(rect.Width - r.Next(rect.Width) / v, r.Next(rect.Height) / v),
+                          new PointF(r.Next(rect.Width) / v, rect.Height - r.Next(rect.Height) / v),
+                          new PointF(rect.Width - r.Next(rect.Width) / v, rect.Height - r.Next(rect.Height) / v)
                         };
       var matrix = new Matrix();
       matrix.Translate(0F, 0F);
       path.Warp(points, rect, matrix, WarpMode.Perspective, 0F);

+      var randomColor = Color.FromArgb(random.Next(100) + 100, random.Next(100) + 100, random.Next(100) + 100);
+      var randomBackground = Color.FromArgb(20 + random.Next(100), 20 + random.Next(100), 20 + random.Next(100));
+
       // Draw the text.
-      hatchBrush = new HatchBrush(HatchStyle.LargeConfetti, Color.LightSkyBlue, Color.DarkGray);
+      hatchBrush = new HatchBrush(HatchStyle.LargeConfetti, randomColor, randomBackground);
       g.FillPath(hatchBrush, path);

       // Add some random noise.
       int m = Math.Max(rect.Width, rect.Height);
-      for (int i = 0; i < (int) (rect.Width*rect.Height/30F); i++)
+      for (int i = 0; i < (int)(rect.Width * rect.Height / 30F); i++)
       {
         int x = r.Next(rect.Width);
         int y = r.Next(rect.Height);
-        int w = r.Next(m/50);
-        int h = r.Next(m/50);
+        int w = r.Next(m / (random.Next(1000) + 50));
+        int h = r.Next(m / (random.Next(1000) + 50));
+
         g.FillEllipse(hatchBrush, x, y, w, h);
+      }
+
+      double noise = random.Next(35) + 35;
+
+      int maxDim = Math.Max(rect.Width, rect.Height);
+      int radius = (int)(maxDim * noise / 3000);
+      int maxGran = (int)(rect.Width * rect.Height
+          / (100 - (noise >= 90 ? 90 : noise)));
+      for (int i = 0; i < maxGran; i++)
+      {
+        g.FillEllipse(
+          hatchBrush, random.Next(rect.Width), random.Next(rect.Height), random.Next(radius), random.Next(radius));
+      }
+
+      double _lines = random.Next(25) + 15;
+
+      if (_lines > 0)
+      {
+        int lines = ((int)_lines / 30) + 1;
+        using (Pen pen = new Pen(hatchBrush, 1))
+          for (int i = 0; i < lines; i++)
+          {
+            var pointsLine = new PointF[lines > 2 ? lines - 1 : 2];
+            for (int j = 0; j < pointsLine.Length; j++)
+            {
+              pointsLine[j] = new PointF(random.Next(rect.Width), random.Next(rect.Height));
+            }
+            g.DrawCurve(pen, pointsLine, 1.75F);
+          }
       }

       // Clean up.
       font.Dispose();
       hatchBrush.Dispose();
+
       g.Dispose();

       // Set the image.


[FIXED] count only approved posts

[FIXED] count only approved posts

--- yafsrc/YAF.Core/Model/UserRepositoryExtensions.cs
+++ yafsrc/YAF.Core/Model/UserRepositoryExtensions.cs
@@ -293,6 +293,7 @@
                                            select m.UserID as ID, Count(m.UserID) as NumOfPosts
                                            from {expression.Table<Message>()} m
                                            where m.Posted >= '{startDate.ToString(CultureInfo.InvariantCulture)}'
+                                           and m.IsApproved = 1
                                            group by m.UserID
                                          ) as counter on {expression.Column<User>(u => u.ID, true)} = counter.ID ")
                       .Where<User>((u) => u.BoardID == boardId && u.ID != guestUserId).Select(


Log KCODE

Log KCODE

--- Merlin/Main/Languages/Ruby/Ruby/Runtime/Globals/SpecialGlobalVariableInfo.cs
+++ Merlin/Main/Languages/Ruby/Ruby/Runtime/Globals/SpecialGlobalVariableInfo.cs
@@ -18,6 +18,7 @@
 using Microsoft.Scripting.Utils;
 using IronRuby.Builtins;
 using System.Text;
+using System.Diagnostics;

 namespace IronRuby.Runtime {
     internal sealed class SpecialGlobalVariableInfo : GlobalVariable {
@@ -117,7 +118,9 @@
                 case GlobalVariableId.KCode:
 #if !SILVERLIGHT
                     if (context.RubyOptions.Compatibility == RubyCompatibility.Ruby18) {
-                        return MutableString.Create(KCoding.GetKCodeName(context.KCode));
+                        var kcode = KCoding.GetKCodeName(context.KCode);
+                        Utils.Log("KCODE set to " + kcode, "KCODE");
+                        return MutableString.Create(kcode);
                     }
 #endif
                     context.ReportWarning("variable $KCODE is no longer effective");


Versions.

Versions.

--- PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Merchant/OfferVersionDto.cs
+++ PS.Mothership.Core/PS.Mothership.Core.Common/Dto/Merchant/OfferVersionDto.cs
@@ -14,6 +14,6 @@
         public Guid OfferGuid { get; set; }

         [DataMember]
-        public string Version { get; set; }
+        public DateTimeOffset UpdateDate { get; set; }
     }
 }


Fix build error.

Fix build error.


Move ignore up to fixture to kick off new full build for windows and mono.

--- PalasoUIWindowsForms.Tests/WritingSystems/Tree/WritingSystemTreeItemTests.cs
+++ PalasoUIWindowsForms.Tests/WritingSystems/Tree/WritingSystemTreeItemTests.cs
@@ -8,7 +8,7 @@

 namespace PalasoUIWindowsForms.Tests.WritingSystems
 {
-	[TestFixture]
+	[TestFixture, Ignore("Not Yet")]
 	public class WritingSystemTreeItemTests
 	{
 	   [Test, Ignore("Not Yet")]


Fixing VipNode's type to NodeType

Fixing VipNode's type to NodeType

--- PowershellModule/CloudCompute.Powershell/Mcp20/GetCaasVipPoolMemberCmdlet.cs
+++ PowershellModule/CloudCompute.Powershell/Mcp20/GetCaasVipPoolMemberCmdlet.cs
@@ -31,7 +31,7 @@
         ///     Gets or sets VIP Node.
         /// </summary>
         [Parameter(Mandatory = false, ParameterSetName = "Filtered", HelpMessage = "The VIP Node")]
-        public PoolType VipNode { get; set; }
+        public NodeType VipNode { get; set; }

         /// <summary>
         ///     Gets or sets VIP Pool.


[RCT] Cancel operation if tdocs finds no tables

--- Rant.Tools/Commands/DicDocsCommand.cs
+++ Rant.Tools/Commands/DicDocsCommand.cs
@@ -8,7 +8,7 @@

 namespace Rant.Tools.Commands
 {
-	[CommandName("tdocs", Description = "Generates a Markdown documentation file all table files in the current directory.")]
+	[CommandName("tdocs", Description = "Generates a Markdown documentation file all table files in the specified directory.")]
 	[CommandParam("out", false, "Specifies the output path for the generated file. (Default: ./dictionary.md)")]
 	internal class DicDocsCommand : Command
 	{
@@ -19,7 +19,14 @@
 			var outputPath = CmdLine.Property("out", Path.Combine(workingDir, "dictionary.md"));
 			var tables = Directory.GetFiles(workingDir, "*.table", SearchOption.AllDirectories)
 				.Select(dir => RantDictionaryTable.FromStream(dir, File.Open(dir, FileMode.Open)))
-				.OrderBy(table => table.Name);
+				.OrderBy(table => table.Name)
+				.ToList();
+
+			if (tables.Count == 0)
+			{
+				Console.WriteLine("No tables found.");
+				return;
+			}

 			using (var writer = new StreamWriter(outputPath))
 			{


Removed commented code.

Removed commented code.

--- ksi-net-api-test/Integration/ExtendIntegrationTests.cs
+++ ksi-net-api-test/Integration/ExtendIntegrationTests.cs
@@ -65,8 +65,7 @@
         [Test, TestCaseSource(typeof(IntegrationTests), nameof(KsiList))]
         public void ExtendAndVerifyTest(Ksi ksi)
         {
-            //PublicationBasedVerificationPolicy policy = new PublicationBasedVerificationPolicy();
-            CalendarBasedVerificationPolicy policy = new CalendarBasedVerificationPolicy();
+            PublicationBasedVerificationPolicy policy = new PublicationBasedVerificationPolicy();

             IKsiSignature ksiSignature = TestUtil.GetSignature();
             IKsiSignature extendedSignature = ksi.Extend(ksiSignature);


change order of validation for error messages in unit tests

--- SnapMD.ConnectedCare.Sdk.Tests/ModelTests/NewPatientRequestValidationTest.cs
+++ SnapMD.ConnectedCare.Sdk.Tests/ModelTests/NewPatientRequestValidationTest.cs
@@ -25,13 +25,14 @@

             target.Email = "test@mail.com";
             thrown = Assert.Throws<Exception>(() => target.ValidateModel(m => new Exception(m)));
-            Assert.AreEqual("Date of birth required.", thrown.Message);
-
-            target.Dob = new DateTime(2015, 1, 1);
-            thrown = Assert.Throws<Exception>(() => target.ValidateModel(m => new Exception(m)));
             Assert.AreEqual("Address required.", thrown.Message);

             target.Address = "I.R. Address";
+            thrown = Assert.Throws<Exception>(() => target.ValidateModel(m => new Exception(m)));
+            Assert.AreEqual("Date of birth required.", thrown.Message);
+
+
+            target.Dob = new DateTime(2015, 1, 1);
             thrown = Assert.Throws<Exception>(() => target.ValidateModel(m => new Exception(m)));
             Assert.AreEqual("ProviderId required.", thrown.Message);


Simplified generated VisualBasic project loops

--- Source/Libraries/ECAClientUtilities/Template/VisualBasic/ProjectGenerator.cs
+++ Source/Libraries/ECAClientUtilities/Template/VisualBasic/ProjectGenerator.cs
@@ -119,8 +119,7 @@
                     mappingCode.AppendLine($"                Dim list As New List(Of {GetDataTypeName(underlyingType)})");
                     mappingCode.AppendLine($"                Dim count As Integer = GetUDTArrayTypeMappingCount(arrayMapping)");
                     mappingCode.AppendLine();
-                    mappingCode.AppendLine($"                For j As Integer = 1 To count");
-                    mappingCode.AppendLine($"                    Dim i As Integer = j - 1");
+                    mappingCode.AppendLine($"                For i As Integer = 0 To count - 1");
                     mappingCode.AppendLine($"                    Dim nestedMapping As TypeMapping = GetUDTArrayTypeMapping(arrayMapping, i)");
                     mappingCode.AppendLine($"                    list.Add(Create{underlyingType.Category}{underlyingType.Identifier}(nestedMapping))");
                     mappingCode.AppendLine($"                Next");
@@ -152,8 +151,7 @@
                     mappingCode.AppendLine($"                Dim list As New List(Of {GetDataTypeName(underlyingType)})");
                     mappingCode.AppendLine($"                Dim count As Integer = GetArrayMeasurementCount(arrayMapping)");
                     mappingCode.AppendLine();
-                    mappingCode.AppendLine($"                For j As Integer = 1 To count");
-                    mappingCode.AppendLine($"                    Dim i As Integer = j - 1");
+                    mappingCode.AppendLine($"                For i As Integer = 0 To count - 1");
                     mappingCode.AppendLine($"                    Dim measurement As IMeasurement = GetArrayMeasurement(i)");
                     mappingCode.AppendLine($"                    list.Add({conversionFunction}(measurement.Value{(forceToString ? ".ToString()" : "")}))");
                     mappingCode.AppendLine($"                Next");


FIXED: Configuration - Correctly loading multiple binary blueprint files.

--- Source/Slash.Unity.Common/Source/Configuration/GameConfigurationBehaviour.cs
+++ Source/Slash.Unity.Common/Source/Configuration/GameConfigurationBehaviour.cs
@@ -109,7 +109,6 @@
         {
             var blueprintManager = new BlueprintManager();
             XmlSerializer blueprintManagerSerializer = null;
-            BinaryDeserializer binaryDeserializer = null;

             Object[] blueprintAssets = Resources.LoadAll(this.BlueprintAssetsFolder);

@@ -142,10 +141,7 @@
                     }
                     else
                     {
-                        if (binaryDeserializer == null)
-                        {
-                            binaryDeserializer = new BinaryDeserializer(blueprintStream);
-                        }
+                        BinaryDeserializer binaryDeserializer = new BinaryDeserializer(blueprintStream);
                         subBlueprintManager = binaryDeserializer.Deserialize<BlueprintManager>();
                     }


added weather UI

added weather UI


Add Connect to Cognitive Services page test

--- Source/Test/Microsoft.Deployment.Site.Test/Microsoft-TwitterTemplateTests.cs
+++ Source/Test/Microsoft.Deployment.Site.Test/Microsoft-TwitterTemplateTests.cs
@@ -54,6 +54,8 @@
             Given_CorrectCredentials_When_AzureAuth_Then_Success();
             Thread.Sleep(new TimeSpan(0, 0, 5));
             HelperMethods.ClickButton("Next");
+            HelperMethods.WaitForPage();
+            ConnectToCognitiveServices();
             Given_CorrectSqlCredentials_When_ExistingSqlSelected_Then_PageValidatesSuccessfully();
             HelperMethods.WaitForPage();
             HelperMethods.ClickButton("Next");
@@ -108,6 +110,16 @@
             Assert.IsTrue(validated.Text == "Successfully validated");

             HelperMethods.SelectSqlDatabase(database);
+        }
+
+        public void ConnectToCognitiveServices()
+        {
+
+            var checkBox = driver.FindElementsByCssSelector("input[class='au-target']").First(e => e.GetAttribute("type") == "checkbox");
+            var js = (IJavaScriptExecutor)driver;
+            js.ExecuteScript("arguments[0].click()", checkBox);
+
+            HelperMethods.ClickButton("Next");
         }

         public void Given_CorrectTwitterCredentials_When_Authenticating_Then_Success()


Factored out SetLightColors from ResizeLights and made it Invoke()able (in theory)

--- managed/LCD-Lights/LCD-Lights/Form1.cs
+++ managed/LCD-Lights/LCD-Lights/Form1.cs
@@ -11,15 +11,18 @@
 {
 	public partial class Form1 : Form
 	{
+		public delegate void UpdateLightsDelegate();
 		private const int cLights = 7;
 		private const int lightStep = 28; // 255/9
-
+
+		public UpdateLightsDelegate UpdateLights;
 		private Panel[] pnlLights = new Panel[cLights];
 		private int[] lightValue = new int[cLights];

 		public Form1()
 		{
 			InitializeComponent();
+			UpdateLights = new UpdateLightsDelegate(SetLightColors);
 		}

 		private void Form1_Load(object sender, EventArgs e)
@@ -33,6 +36,7 @@
 			}

 			ResizeLights();
+			SetLightColors();
 		}

 		private void Form1_ResizeEnd(object sender, EventArgs e)
@@ -47,17 +51,24 @@

 			for (int iLight = 0; iLight < pnlLights.Length; iLight++)
 			{
-				int brightness = lightValue[iLight] * lightStep;
-
 				pnlLights[iLight].Left = left;
 				pnlLights[iLight].Top = 0;
 				pnlLights[iLight].Width = increment;
 				pnlLights[iLight].Height = this.Height;
-				pnlLights[iLight].BackColor = Color.FromArgb(brightness, brightness, brightness);

 				left += increment;
 			}
 		}

+		private void SetLightColors()
+		{
+			for (int iLight = 0; iLight < pnlLights.Length; iLight++)
+			{
+				int brightness = lightValue[iLight] * lightStep;
+
+				pnlLights[iLight].BackColor = Color.FromArgb(brightness, brightness, brightness);
+			}
+		}
+
 	}
 }


Added logic for validating CountryId when editing university

--- Source/Web/Interapp.Web/Areas/Director/Controllers/UniversitiesController.cs
+++ Source/Web/Interapp.Web/Areas/Director/Controllers/UniversitiesController.cs
@@ -94,6 +94,15 @@
         [HttpPost]
         public ActionResult Edit(int id, UniversityViewModel model)
         {
+            var cachedCountries = GetCountries();
+
+            var countryExists = cachedCountries.Any(c => c.Id == model.CountryId);
+
+            if (!countryExists)
+            {
+                this.ModelState.AddModelError("Nonexisting country", "No such country exists.");
+            }
+
             var university = this.universities.GetById(id);
             var userId = this.User.Identity.GetUserId();


Removed commented code

Removed commented code

--- AnApiOfIceAndFire/Views/Documentation/Index.cshtml
+++ AnApiOfIceAndFire/Views/Documentation/Index.cshtml
@@ -25,7 +25,4 @@
         @Html.Markdown("~/Content/Documentation/DOCUMENTATION.md")

-

-
-
-@*les.Render("~/Content/css")*@+


Fix list shifting error in ReduceTextSpans

--- StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1027UseTabsCorrectly.cs
+++ StyleCop.Analyzers/StyleCop.Analyzers/SpacingRules/SA1027UseTabsCorrectly.cs
@@ -246,15 +246,7 @@
                 {
                     // Increment currentIndex this iteration
                     currentIndex++;
-
-                    // Only increment nextIndex this iteration if necessary to ensure nextIndex > currentIndex on the
-                    // next iteration. At this point we already incremented currentIndex, but haven't incremented
-                    // nextIndex.
-                    if (currentIndex > nextIndex)
-                    {
-                        nextIndex--;
-                    }
-
+                    sortedTextSpans[currentIndex] = next;
                     continue;
                 }


Ignored unsupported test

Ignored unsupported test

--- ApiExamples/CSharp/ApiExamples/ExMailMergeEvent.cs
+++ ApiExamples/CSharp/ApiExamples/ExMailMergeEvent.cs
@@ -272,8 +272,10 @@
             Assert.IsNotNull(logoImage);
             Assert.IsTrue(logoImage.HasImage);
         }
+
 #if !(NETSTANDARD2_0 || __MOBILE__)
         [Test]
+        [Ignore("Test need to be reworked")]
         public void MailMergeImageFromBlob()
         {
             //ExStart


GestureManager.cs put OnRecognitionStarted into the check for focus changed

--- Assets/HoloToolkit/Input/Scripts/GestureManager.cs
+++ Assets/HoloToolkit/Input/Scripts/GestureManager.cs
@@ -284,8 +284,8 @@
                 if (focusedChanged)
                 {
                     OnTap();
+                    OnRecognitionStarted();
                 }
-                OnRecognitionStarted();
             }
 #endif
         }


fix show everything check

fix show everything check

--- Assets/MapzenGo/Models/Factories/LanduseFactory.cs
+++ Assets/MapzenGo/Models/Factories/LanduseFactory.cs
@@ -71,7 +71,7 @@
             foreach (var geo in items.Where(x => Query(x)))
             {
                 var kind = geo["properties"]["kind"].str.ConvertToEnum<LanduseKind>();
-                if (!_settings.HasSettingsFor(kind) && JustDrawEverythingFam)
+                if (!_settings.HasSettingsFor(kind) && !JustDrawEverythingFam)
                     continue;

                 var typeSettings = _settings.GetSettingsFor(kind);


you now die in 8 turns instead of 4 from perish song

--- Assets/Scripts/Game/Defined/Serialized/BuffList.cs
+++ Assets/Scripts/Game/Defined/Serialized/BuffList.cs
@@ -266,14 +266,14 @@
     public class DelayedDeath : DelayedEffectSong {
         private static readonly StatType AFFECTED_STAT = StatType.HEALTH;

-        public DelayedDeath() : base(4, "skull-crack", AFFECTED_STAT, "Curse: Death") {
+        public DelayedDeath() : base(8, "skull-crack", AFFECTED_STAT, "Curse: Death") {
         }
     }

     public class DelayedHyperDeath : DelayedEffectSong {
         private static readonly StatType AFFECTED_STAT = StatType.VITALITY;

-        public DelayedHyperDeath() : base(4, "skull-crossed-bones", AFFECTED_STAT, "Curse: Hyperdeath") {
+        public DelayedHyperDeath() : base(8, "skull-crossed-bones", AFFECTED_STAT, "Curse: Hyperdeath") {
         }
     }
 }


Allow to serialize sub types of types with special converters. Fixes RectTransform serialization

--- Assets/Unium/Core/gw.proto.utils/JsonSerialiser.cs
+++ Assets/Unium/Core/gw.proto.utils/JsonSerialiser.cs
@@ -2,6 +2,7 @@

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

 namespace gw.proto.utils
 {
@@ -65,16 +66,23 @@

         public bool HasOverride( Type type )
         {
-            return mConverters.ContainsKey( type );
+            return FindFirstConverter (type) != null;
+        }
+
+        // note doesn't take into account if there's a better converter down the class hierarchy
+        private JsonSerialiser FindFirstConverter(Type type) {
+            Type t = mConverters.Keys.FirstOrDefault (item => item.IsAssignableFrom (type));
+            return t != null ? mConverters [t] : null;
         }

         public string Serialise( object o )
         {
             var type = o.GetType();

-            if( mConverters.ContainsKey( type ) )
+            JsonSerialiser serializer = FindFirstConverter (type);
+            if( serializer != null )
             {
-                return mConverters[ type ].Convert( o );
+                return serializer.Convert( o );
             }

             return SerialiseValueType( o );


Fix foldout line items not allowing click to open file/line

--- Assets/pb_Profiler/Editor/pb_Profiler_Interface.cs
+++ Assets/pb_Profiler/Editor/pb_Profiler_Interface.cs
@@ -117,7 +117,7 @@
 				row_visibility.Clear();

 			resolution = (Resolution) EditorGUILayout.EnumPopup("Resolution", resolution);
-
+
 		GUILayout.EndHorizontal();

 		// DRAW
@@ -144,7 +144,7 @@
 	string TickToString(long tick)
 	{
 		switch(resolution)
-		{
+		{
 			case Resolution.Nanosecond:
 				return string.Format("{0} n", pb_Profiler.TicksToNanosecond(tick));

@@ -224,7 +224,7 @@
 		EditorGUI.BeginChangeCheck();

 		GUILayout.BeginHorizontal(chartStyle);
-
+
 			int n = 0;

 			GUI.backgroundColor = column_colors[n++ % 2];
@@ -232,11 +232,12 @@
 			GUILayout.BeginHorizontal(entryStyle);

 				GUILayout.Space(indent * (childCount > 0 ? 10 : 14));
-
+
+				// don't use a Foldout control because it always eats the current event, which breaks clicking to follow stack trace
 				if(childCount > 0)
-					row_visibility[key] = EditorGUILayout.Foldout(row_visibility[key], sample.name);
-				else
-					GUILayout.Label(sample.name);
+					row_visibility[key] = EditorGUILayout.Toggle(row_visibility[key], EditorStyles.foldout, GUILayout.MaxWidth(14));
+
+				GUILayout.Label(sample.name);

 			GUILayout.EndHorizontal();

@@ -269,18 +270,12 @@
 			GUI.backgroundColor = column_colors[n++ % 2];

 		GUILayout.EndHorizontal();
-
+
 		Rect lastRect = GUILayoutUtility.GetLastRect();

 		bool changed = EditorGUI.EndChangeCheck();

-/*
-		if(currentEvent.type != EventType.Layout && currentEvent.type != EventType.Repaint && currentEvent.type != EventType.MouseMove)
-		{
-			UnityEngine.Debug.Log(changed + "\n" + currentEvent.type + lastRect.Contains(currentEvent.mousePosition).ToString());
-		}
-*/
-		if(	(currentEvent.type == EventType.MouseUp || (!changed && currentEvent.type == EventType.Used && sample.children.Count > 0)) &&
+		if(	(currentEvent.type == EventType.MouseDown && currentEvent.clickCount > 1) &&
 			lastRect.Contains(currentEvent.mousePosition) )
 		{
 			StackFrame frame = sample.stackTrace.GetFrame(0);
@@ -308,7 +303,7 @@
 				wantsRepaint = true;
 			}
 		}
-
+
 		if(row_visibility[key])
 		{
 			indent++;


cleanup

cleanup

--- FMOD/MoreLinq.cs
+++ FMOD/MoreLinq.cs
@@ -97,15 +97,15 @@
         }
         public static IEnumerable<TSource> TakeEvery<TSource>(this IEnumerable<TSource> source, int step)
         {
-            if (source == null) throw new ArgumentNullException("source");
-            if (step <= 0) throw new ArgumentOutOfRangeException("step");
+            if (source == null) throw new ArgumentNullException(nameof(source));
+            if (step <= 0) throw new ArgumentOutOfRangeException(nameof(step));
             return source.Where((e, i) => i % step == 0);
         }

         public static IEnumerable<IEnumerable<TSource>> Window<TSource>(this IEnumerable<TSource> source, int size)
         {
-            if (source == null) throw new ArgumentNullException("source");
-            if (size <= 0) throw new ArgumentOutOfRangeException("size");
+            if (source == null) throw new ArgumentNullException(nameof(source));
+            if (size <= 0) throw new ArgumentOutOfRangeException(nameof(size));

             return WindowedImpl(source, size);
         }


updated comment

updated comment

--- BuildingCoder/BuildingCoder/CmdNewSpotElevation.cs
+++ BuildingCoder/BuildingCoder/CmdNewSpotElevation.cs
@@ -109,7 +109,7 @@
 #endif // 0
     #endregion // Language Independent View Type Id

-    #region Revit 2013 What's New sample code
+    #region Create Isometric View from Revit 2013 What's New sample code
     /// <summary>
     /// Sample code from Revit API help file What's New
     /// section on View API and View Creation.
@@ -151,7 +151,7 @@
       view.SetOrientation( new ViewOrientation3D(
         eyePosition, upDirection, forwardDirection ) );
     }
-    #endregion // Revit 2013 What's New sample code
+    #endregion // Create Isometric View from Revit 2013 What's New sample code

     /// <summary>
     /// Simulate VSTA macro Application class member variable:


Exp runner another tiny issue

Exp runner another tiny issue

--- ExperimentRunner/Program.cs
+++ ExperimentRunner/Program.cs
@@ -175,6 +175,7 @@
                     foreach (var str in profileArg)
                     {
                         var kv = str.Split('=');
+                        kv[1] = kv[1].ToLower();
                         if (kv[0] == "alg")
                         {
                             switch (kv[1])
@@ -230,11 +231,11 @@
                         {
                             switch (kv[1])
                             {
-                                case "True":
+                                case "true":
                                     bccinit = "True";
                                     break;
-                                case "False":
-                                    bccinit = "Flase";
+                                case "false":
+                                    bccinit = "False";
                                     break;
                             }
                         }


코드 정리

코드 정리

--- ExtractIpInWinform/Form1.cs
+++ ExtractIpInWinform/Form1.cs
@@ -25,8 +25,6 @@

             lv_ipResult.Columns.Add("IP");
             lv_ipResult.Columns.Add("IP의 개수");
-
-
         }

         private void Form1_Load(object sender, EventArgs e)


fix errant colour chars in summaries

fix errant colour chars in summaries

--- EyeInTheSky/RecentChange.cs
+++ EyeInTheSky/RecentChange.cs
@@ -6,6 +6,7 @@
     public class RecentChange
     {
         const string fullstringregex = @"14\[\[07(?<title>.*)14\]\]4 (?<flag>.*)10 02(?<url>[^ ]*) 5\* 03(?<user>.*) 5\* (?:\((?<szdiff>.*)\))? 10(?<comment>.*)";
+        private const string anticolourparse = @"[01]?[0-9]";

         private RecentChange()
         {
@@ -22,6 +23,7 @@
         }

         private static Regex dataregex;
+        private static Regex colsregex;

         public string Page
         {
@@ -58,6 +60,11 @@
             return dataregex ?? (dataregex = new Regex(fullstringregex));
         }

+        private static Regex getColourRegex()
+        {
+            return colsregex ?? (colsregex = new Regex(anticolourparse));
+        }
+
         public static RecentChange parse(string data)
         {
             Match m = getRegex().Match(data);
@@ -66,12 +73,17 @@

             RecentChange rc = new RecentChange
                                   {
-                                      comment = m.Groups["comment"].Value,
                                       user = m.Groups["user"].Value,
                                       url = m.Groups["url"].Value,
                                       flag = m.Groups["flag"].Value,
                                       title = m.Groups["title"].Value
                                   };
+
+            string comment = m.Groups["comment"].Value;
+            if (getColourRegex().Match(comment).Success)
+                comment = getColourRegex().Replace(comment, "");
+            rc.comment = comment;
+
             try
             {
                 rc.szdiff = m.Groups["szdiff"].Value == "" ? 0 : int.Parse(m.Groups["szdiff"].Value.Trim(''));


Plane constructor using 3 points

Plane constructor using 3 points

Better matching with unity's Plane, and easier for beginners

--- EzySlice/Framework/Plane.cs
+++ EzySlice/Framework/Plane.cs
@@ -45,6 +45,17 @@
             this.m_normal = norm;
             this.m_dist = dot;

+            // this is for editor debugging only!
+#if UNITY_EDITOR
+            trans_ref = null;
+#endif
+        }
+
+        public Plane(Vector3 a, Vector3 b, Vector3 c)
+        {
+            m_normal = Vector3.Normalize(Vector3.Cross(b - a, c - a));
+            m_dist = -Vector3.Dot(Normal, a);
+
             // this is for editor debugging only!
 #if UNITY_EDITOR
             trans_ref = null;
@@ -128,4 +139,4 @@
 #endif
         }
     }
-}+}


Fixed rotation list error (new data)

Fixed rotation list error (new data)

--- Common/src/HetsData/Helpers/RentalRequestHelper.cs
+++ Common/src/HetsData/Helpers/RentalRequestHelper.cs
@@ -416,7 +416,8 @@
                             x.Equipment.BlockNumber == block &&
                             x.WasAsked == true &&
                             x.IsForceHire != true)
-                .OrderByDescending(x => x.RentalRequestId).ThenByDescending(x => x.RotationListSortOrder)
+                .OrderByDescending(x => x.RentalRequestId)
+                .ThenByDescending(x => x.RotationListSortOrder)
                 .FirstOrDefault();

             // return the equipment record that was last asked for this block
@@ -585,6 +586,8 @@
                 {
                     for (int j = 0; j < rentalRequest.HetRentalRequestRotationList.Count; j++)
                     {
+                        if (rentalRequest.HetRentalRequestRotationList.ElementAt(j).BlockNumber != (b + 1)) continue; // move to next record
+
                         if (!IsEquipmentHired(rentalRequest.HetRentalRequestRotationList.ElementAt(j).EquipmentId, context))
                         {
                             int temp = rentalRequest.HetRentalRequestRotationList.ElementAt(j).EquipmentId ?? -1;
@@ -593,6 +596,8 @@
                             {
                                 nextRecordToAskId[b] = temp;
                                 nextRecordToAskBlock[b] = b;
+
+                                break;
                             }
                         }
                     }


ArticulatedRoot documentation.

ArticulatedRoot documentation.

--- AGXUnity/ArticulatedRoot.cs
+++ AGXUnity/ArticulatedRoot.cs
@@ -1,11 +1,25 @@
-using System;
-using System.Linq;
-using UnityEngine;
+using UnityEngine;

 namespace AGXUnity
 {
+  /// <summary>
+  /// Hierarchal root component of articulated models, such as robots.
+  /// This component enables one or more rigid body instances in the
+  /// hierarchy tree, i.e, one or more rigid bodies as children to
+  /// another rigid body.
+  ///
+  /// Normally, if a rigid body instance finds another rigid body as
+  /// its parent, the rigid body throws an exception because it's
+  /// unknown when the transforms are written. This component handles
+  /// these transform updates, assuring each parent transform has been
+  /// written before its children.
+  /// </summary>
   public class ArticulatedRoot : ScriptComponent
   {
+    /// <summary>
+    /// All (child) rigid body instances belonging to this articulated root.
+    /// This array of bodies is cached during runtime.
+    /// </summary>
     [AllowRecursiveEditing]
     public RigidBody[] RigidBodies
     {
@@ -21,6 +35,11 @@
       }
     }

+    /// <summary>
+    /// Finds all child rigid bodies using GetComponentsInChildren.
+    /// </summary>
+    /// <returns>Array of child rigid bodies.</returns>
+    /// <seealso cref="RigidBodies"/>
     public RigidBody[] GetRigidBodies()
     {
       return GetComponentsInChildren<RigidBody>();


#ADN-7 fixed

#ADN-7 fixed

--- AIMPDotNet/Logger/Logger.cs
+++ AIMPDotNet/Logger/Logger.cs
@@ -150,22 +150,24 @@

         private void FlushLog()
         {
-            while (_logQueue.Count > 0)
+            string logPath = string.Format("{0}{1}_{2}", _logDir, DateTime.Now.ToString("yyyy-MM-dd"), _fileName);
+
+            if (!File.Exists(logPath))
             {
-                Log entry = _logQueue.Dequeue();
-                string logPath = _logDir + entry.LogDate + "_" + _fileName;
+                File.Create(logPath);
+            }

-                if (!File.Exists(logPath))
+            using (var stream = new FileStream(logPath, FileMode.OpenOrCreate))
+            {
+                stream.Seek(stream.Length, SeekOrigin.Begin);
+                using (var sw = new StreamWriter(stream))
                 {
-                    File.Create(logPath);
+                    while (_logQueue.Count > 0)
+                    {
+                        var entry = _logQueue.Dequeue();
+                        sw.WriteLine("{0}\t{1}", entry.LogTime, entry.Message);
+                    }
                 }
-
-                // This could be optimised to prevent opening and closing the file for each write
-                using (var log = File.AppendText(logPath))
-                {
-                    log.WriteLine("{0}\t{1}", entry.LogTime, entry.Message);
-                }
-
             }
         }
     }


Add being able to force a test to pool

Add being able to force a test to pool

--- Content.IntegrationTests/ContentIntegrationTest.cs
+++ Content.IntegrationTests/ContentIntegrationTest.cs
@@ -193,9 +193,9 @@
                 return false;
             }

-            if (options.Pool == false)
-            {
-                return false;
+            if (options.Pool.HasValue)
+            {
+                return options.Pool.Value;
             }

             if (server)


Logging must now be enabled via the EnableLogging property.

--- Assets/Mixpanel/Mixpanel.cs
+++ Assets/Mixpanel/Mixpanel.cs
@@ -12,6 +12,9 @@

 	// Set this to the distinct ID of the current user.
 	public static string DistinctID;
+
+	// Set to true to enable debug logging.
+	public static bool EnableLogging;

 	// Add any custom "super properties" to this dictionary. These are properties sent with every event.
 	public static Dictionary<string, object> SuperProperties = new Dictionary<string, object>();
@@ -82,7 +85,8 @@
 		jsonDict.Add("event", eventName);
 		jsonDict.Add("properties", propsDict);
 		string jsonStr = JsonMapper.ToJson(jsonDict);
-		Debug.Log("Sending mixpanel event: " + jsonStr);
+		if(EnableLogging)
+			Debug.Log("Sending mixpanel event: " + jsonStr);
 		string jsonStr64 = EncodeTo64(jsonStr);
 		string url = string.Format(API_URL_FORMAT, jsonStr64);
 		_urlQueue.Enqueue(url);
@@ -120,11 +124,9 @@
 					Debug.LogWarning("Error sending mixpanel event: " + www.error);
 				else if(www.text.Trim() == "0")
 					Debug.LogWarning("Error on mixpanel processing event: " + www.text);
-				else
-				{
+				else if(EnableLogging)
 					Debug.Log("Mixpanel processed event: " + www.text);
-					_urlQueue.Dequeue();
-				}
+				_urlQueue.Dequeue();
 			}
 			else
 			{


Show Role. Shuffle always if game is on.

Show Role when guessing name and vice versa.
When changing guessing target (first, last, role, full name) sort by
criteriea only if game is not on, else shuffle.

--- Assets/Scripts/FaceCards.cs
+++ Assets/Scripts/FaceCards.cs
@@ -215,13 +215,14 @@
 		faceSpriteCrnt.card.FlipShowFront();

 		guiTextName.color = new Color(1, 1, 1, 1);
-        guiTextRole.text = (faceSpriteCrnt.collected || showAllFaces) ? (FaceSprite.iGuessNameIndex == 3 ? faceSpriteCrnt.fullName : faceSpriteCrnt.role) :  "";
-
-		//Invoke("ShowGallows", timeTransitionShowFace);
-
+        //guiTextRole.text = (faceSpriteCrnt.collected || showAllFaces) ? (FaceSprite.iGuessNameIndex == 3 ? faceSpriteCrnt.fullName : faceSpriteCrnt.role) :  "";
+        guiTextRole.text = (FaceSprite.iGuessNameIndex == 3 ? faceSpriteCrnt.fullName : faceSpriteCrnt.role);
+
+        //Invoke("ShowGallows", timeTransitionShowFace);
+
     }

-	void ShowGallows()
+    void ShowGallows()
 	{
 		guiTextGallows.enabled = true;
 	}
@@ -817,17 +818,21 @@
 			{
                 iGuessnamePrevious = FaceSprite.iGuessNameIndex;
 				FaceSprite.iGuessNameIndex = selectedItemIndex;
-				if (!showAllFaces)
-					RestartGame();
-				else
-				{
-					ReturnFaceToYearbook(faceSpriteCrnt);
-					guiTextName.text = "";
-					guiTextRole.text = "";
-					if (!AreAllCollected())
-						DisplayFaceSprite();
-				}
-				SortByGuessName();
+                if (!showAllFaces)
+                {
+                    Randomize();
+                    RestartGame();
+                }
+                else
+                {
+                    ReturnFaceToYearbook(faceSpriteCrnt);
+                    guiTextName.text = "";
+                    guiTextRole.text = "";
+                    if (!AreAllCollected())
+                        DisplayFaceSprite();
+                }
+                if (showAllFaces || isYearBookMode)
+				    SortByGuessName();
 			}

 			rectText = guiTextName.GetScreenRect(Camera.main);
@@ -921,7 +926,7 @@
 			}

 			// Version
-			GUI.Label(new Rect(Screen.width-40, Screen.height-16, 48, 16), "V 1.0", guiStyleVersion);
+			GUI.Label(new Rect(Screen.width-40, Screen.height-16, 48, 16), "V 1.1", guiStyleVersion);
 		}
     }
 }


Made name color yellow when hangman died.

--- Assets/Scripts/FaceCards.cs
+++ Assets/Scripts/FaceCards.cs
@@ -322,7 +322,7 @@
 				{
 					faceSpriteCrnt.countRevealed += faceSpriteCrnt.fullName.Length - guiTextName.text.Length;
 					guiTextName.text = faceSpriteCrnt.fullName;
-					guiTextName.color = colorCorrect;
+					guiTextName.color = Color.yellow;
                     guiTextRole.text = faceSpriteCrnt.role;
                 }
             }
@@ -332,6 +332,8 @@
 				{
 					++faceSpriteCrnt.countRevealed;
 					AddChar();
+					if (IsHangManDead())
+						guiTextName.color = Color.yellow;
 				}
 			}
 			else if (GetKeyRepeatable(KeyCode.LeftArrow))
@@ -462,14 +464,18 @@
 	int indexHangMan;
 	float timeTwitchedHangManDeath;
 	int countHangManAnim;
-	bool IsHangManDead() { return indexHangMan >= 6; }
+	int GetHangManLimbCount()
+	{
+		//return faceSpriteCrnt.collected ? 0 : (faceSpriteCrnt.countRevealed == 0 ? faceSpriteCrnt.countWrongChars : 6);		// Lose for any reveal
+		return faceSpriteCrnt.collected ? 0 : faceSpriteCrnt.countRevealed * 3 + faceSpriteCrnt.countWrongChars; // Reveal cost 3 body parts.
+	}
+	bool IsHangManDead() { return GetHangManLimbCount() >= 6; }
 	void UpdateHangMan()
 	{
 		indexHangMan = 0;
 		if (doneLoading && faceSpriteCrnt != null)
 		{
-			//indexHangMan = faceSpriteCrnt.collected ? 0 : (faceSpriteCrnt.countRevealed == 0 ? faceSpriteCrnt.countWrongChars : 6);		// Lose for any reveal
-			indexHangMan = faceSpriteCrnt.collected ? 0 : faceSpriteCrnt.countRevealed * 3 + faceSpriteCrnt.countWrongChars;	// Reveal cost 3 body parts.
+			indexHangMan = GetHangManLimbCount();
 			indexHangMan = Mathf.Min(6, indexHangMan);
 			if (indexHangMan < 6)
 			{


custom body formatter for logs

custom body formatter for logs

--- FakeHttpService/ConstantMemberEvaluationVisitor.cs
+++ FakeHttpService/ConstantMemberEvaluationVisitor.cs
@@ -1,5 +1,6 @@
 using System;
-using System.Linq;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.Linq.Expressions;
 using System.Reflection;

@@ -7,19 +8,56 @@
 {
     public class ConstantMemberEvaluationVisitor : ExpressionVisitor
     {
+        private class CustomMethodCallExpression : Expression
+        {
+            public override ExpressionType NodeType => _original.NodeType;
+            public override Type Type => _original.Type;
+
+
+            private readonly MethodCallExpression _original;
+            private readonly string _label;
+
+            public CustomMethodCallExpression(MethodCallExpression original, string label = null)
+            {
+                _original = original;
+                _label = label;
+            }
+
+            public override string ToString()
+            {
+                return _label ?? _original.Method.ReturnType.ToString();
+            }
+        }
+        protected override Expression VisitMethodCall(MethodCallExpression node)
+        {
+            var methodName = node.Method.Name;
+            var declaringType = node.Method.DeclaringType.FullName;
+            var filterName = typeof(FilterBuilders.RequestFilterExpressionBuilder).FullName;
+
+            switch (methodName)
+            {
+                case "Body" when declaringType == filterName:
+                    return  new CustomMethodCallExpression(node, node.Method.IsGenericMethod? $"Body<{node.Method.ReturnType}>": "Body");
+                case "Json" when declaringType == filterName:
+                    return new CustomMethodCallExpression(node,  "Body<Json>");
+            }
+
+            return base.VisitMethodCall(node);
+        }
+
         protected override Expression VisitMember(MemberExpression node)
         {
             if (node.Expression.NodeType != ExpressionType.Constant) return base.VisitMember(node);
-            var constantExpression = ((ConstantExpression) node.Expression).Value;
+            var constantExpression = ((ConstantExpression)node.Expression).Value;
             object constantValue = null;

             switch (node.Member.MemberType)
             {
                 case MemberTypes.Property:
-                    constantValue = ((PropertyInfo) node.Member).GetValue(constantExpression, null);
+                    constantValue = ((PropertyInfo)node.Member).GetValue(constantExpression, null);
                     break;
                 case MemberTypes.Field:
-                    constantValue = ((FieldInfo) node.Member).GetValue(constantExpression);
+                    constantValue = ((FieldInfo)node.Member).GetValue(constantExpression);
                     break;
             }


add ability to get random key from a dictionary

--- Assets/Scripts/Misc/Util.cs
+++ Assets/Scripts/Misc/Util.cs
@@ -418,6 +418,16 @@
     public static float ConvertToPercent(this int integer) {
         return (integer + 0.0f) / 100f;
     }
+
+    // Modified to get keys from https://stackoverflow.com/questions/1028136/random-entry-from-dictionary
+    public static IEnumerable<TKey> RandomValues<TKey, TValue>(this IDictionary<TKey, TValue> dict) {
+        System.Random rand = new System.Random();
+        List<TKey> keys = Enumerable.ToList(dict.Keys);
+        int size = dict.Count;
+        while (true) {
+            yield return keys[rand.Next(size)];
+        }
+    }
 }

 public static class IListExtensions {


Using test cases for different modes

Using test cases for different modes

--- AsyncTransactions/Script.cs
+++ AsyncTransactions/Script.cs
@@ -121,7 +121,10 @@

         [Test]
         [MethodImpl(MethodImplOptions.NoInlining)]
-        public async Task StoreAsync()
+        [TestCase(DatabaseMode.Synchronous)]
+        [TestCase(DatabaseMode.Dangerous)]
+        [TestCase(DatabaseMode.AsyncBlocking)]
+        public async Task StoreAsync(DatabaseMode mode)
         {
             var slide = new Slide(title: "Store Async");
             await slide
@@ -129,14 +132,40 @@

                 .Sample(async () =>
                 {
-                    var database = new Database("StoreAsync.received.txt");
-
-                    for (int i = 0; i < 10; i++)
-                    {
-                        database.Store(new Customer { Name = "Daniel" + i });
-                    }
-
-                    await database.SaveAsync().ConfigureAwait(false);
+                    var database = new Database("StoreAsync.received.txt", mode);
+                    StoringTenSwissGuysInTheDatabase(database);
+
+                    try
+                    {
+                        await database.SaveAsync().ConfigureAwait(false);
+                    }
+                    finally
+                    {
+                        database.Close();
+                    }
+                });
+        }
+
+        [Test]
+        [MethodImpl(MethodImplOptions.NoInlining)]
+        [TestCase(DatabaseMode.Synchronous)]
+        [TestCase(DatabaseMode.Dangerous)]
+        [TestCase(DatabaseMode.AsyncBlocking)]
+        public async Task StoreAsyncSupportsAmbientTransactionComplete(DatabaseMode mode)
+        {
+            var slide = new Slide(title: "Store Async supports ambient transactions - complete");
+            await slide
+                .Sample(async () =>
+                {
+                    var database = new Database("StoreAsyncSupportsAmbientTransactionComplete.received.txt", mode);
+                    StoringTenSwissGuysInTheDatabase(database);
+
+                    using (var tx = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
+                    {
+                        await database.SaveAsync().ConfigureAwait(false);
+
+                        tx.Complete();
+                    }

                     database.Close();
                 });
@@ -144,44 +173,17 @@

         [Test]
         [MethodImpl(MethodImplOptions.NoInlining)]
-        public async Task StoreAsyncSupportsAmbientTransactionComplete()
-        {
-            var slide = new Slide(title: "Store Async supports ambient transactions - complete");
-            await slide
-                .Sample(async () =>
-                {
-                    var database = new Database("StoreAsyncSupportsAmbientTransactionComplete.received.txt");
-
-                    for (int i = 0; i < 10; i++)
-                    {
-                        database.Store(new Customer {Name = "Daniel" + i});
-                    }
-
-                    using (var tx = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
-                    {
-                        await database.SaveAsync().ConfigureAwait(false);
-
-                        tx.Complete();
-                    }
-
-                    database.Close();
-                });
-        }
-
-        [Test]
-        [MethodImpl(MethodImplOptions.NoInlining)]
-        public async Task StoreAsyncSupportsAmbientTransactionRollback()
+        [TestCase(DatabaseMode.Synchronous)]
+        [TestCase(DatabaseMode.Dangerous)]
+        [TestCase(DatabaseMode.AsyncBlocking)]
+        public async Task StoreAsyncSupportsAmbientTransactionRollback(DatabaseMode mode)
         {
             var slide = new Slide(title: "Store Async supports ambient transactions - rollback");
             await slide
                 .Sample(async () =>
                 {
-                    var database = new Database("StoreAsyncSupportsAmbientTransactionRollback.received.txt");
-
-                    for (int i = 0; i < 10; i++)
-                    {
-                        database.Store(new Customer {Name = "Daniel" + i});
-                    }
+                    var database = new Database("StoreAsyncSupportsAmbientTransactionRollback.received.txt", mode);
+                    StoringTenSwissGuysInTheDatabase(database);

                     using (var tx = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
                     {
@@ -228,5 +230,13 @@
                 .BulletPoint("Working with Transactions (EF6 Onwards)" +
                              "https://msdn.microsoft.com/en-us/data/dn456843.aspx");
         }
+
+        private static void StoringTenSwissGuysInTheDatabase(Database database)
+        {
+            for (int i = 0; i < 10; i++)
+            {
+                database.Store(new Customer {Name = "Daniel" + i});
+            }
+        }
     }
 }


Documented AtomEntry.ReadFrom method.

Documented AtomEntry.ReadFrom method.

--- AtomEventStore/AtomEntry.cs
+++ AtomEventStore/AtomEntry.cs
@@ -347,6 +347,25 @@
                 l.WriteTo(xmlWriter);
         }

+        /// <summary>
+        /// Creates an <see cref="AtomEntry" /> instance from XML.
+        /// </summary>
+        /// <param name="xmlReader">
+        /// The <see cref="XmlReader" /> containing the XML representation of
+        /// the Atom Entry.
+        /// </param>
+        /// <param name="serializer">
+        /// The <see cref="IContentSerializer" /> used to serialize custom XML
+        /// content.
+        /// </param>
+        /// <returns>
+        /// A new instance of <see cref="AtomEntry" /> containing the data from
+        /// the XML representation of the Atom Entry contained in
+        /// <paramref name="xmlReader" />.
+        /// </returns>
+        /// <exception cref="System.ArgumentNullException">
+        /// <paramref name="serializer" /> is <see langword="null" />.
+        /// </exception>
         public static AtomEntry ReadFrom(
             XmlReader xmlReader,
             IContentSerializer serializer)


Fixing code style

Fixing code style

--- Fluent.Ribbon/Controls/RibbonContextualTabGroup.cs
+++ Fluent.Ribbon/Controls/RibbonContextualTabGroup.cs
@@ -144,10 +144,7 @@

             var titleBar = group.Parent as RibbonTitleBar;

-            if (titleBar != null)
-            {
-                titleBar.InvalidateMeasure();
-            }
+            titleBar?.InvalidateMeasure();
         }

         /// <summary>


Fixed a problem with the ortho camera mode that resulted in the projection matrix never being set.

git-svn-id: 53f2a8ff3606f182ef4420064c1f4a5cdcbe6bb1@406 bb9bf1cf-960d-0410-9a3a-baeba60cf407

--- Axiom/Engine/Core/Camera.cs
+++ Axiom/Engine/Core/Camera.cs
@@ -183,7 +183,7 @@
                     } break;
                     case Projection.Orthographic: {
 						// ORTHOGRAPHIC projection, API specific
-						Root.Instance.RenderSystem.MakeOrthoMatrix(
+						projectionMatrix = Root.Instance.RenderSystem.MakeOrthoMatrix(
 							fieldOfView, aspectRatio, nearDistance, farDistance);

 						float thetaY = MathUtil.DegreesToRadians(fieldOfView * 0.5f);


[V2] Logic for applying tool settings was evaluating wrong. It needs to be for any collection or standalone file

--- Bam.Core/DependencyGraph.cs
+++ Bam.Core/DependencyGraph.cs
@@ -288,7 +288,8 @@
             if (m.Tool != null)
             {
                 m.Requires(m.Tool);
-                if (!(m is IChildModule))
+                var child = m as IChildModule;
+                if ((null == child) || (null == child.Parent))
                 {
                     // children inherit the settings from their parents
                     m.UsePublicPatches(m.Tool);


설정한 줄 수를 초과하는 성경 구절 슬라이드 분할

설정한 줄 수를 초과하는 성경 구절 슬라이드 분할

--- Bible2PPT/PPT/PPTManager.cs
+++ Bible2PPT/PPT/PPTManager.cs
@@ -84,15 +84,17 @@
         }

         public void AppendVerse(IEnumerable<Verse> eachVerse, Verse mainVerse, Book book, Chapter chapter, CancellationToken token) =>
-            AppendVerse(eachVerse.Select(verse => verse.Text), mainVerse, book, chapter, token);
+            AppendVerse(eachVerse.Select(verse => verse?.Text).ToList(), mainVerse, book, chapter, token);

         private void AppendVerse(IEnumerable<string> eachVerseText, Verse mainVerse, Book book, Chapter chapter, CancellationToken token)
         {
             var slide = AppendTemplateSlide();
-            foreach (var textShape in
-                slide.Shapes.Cast<PowerPoint.Shape>()
+            var textShapes = slide.Shapes.Cast<PowerPoint.Shape>()
                     .Where(i => i.HasTextFrame == MsoTriState.msoTrue)
-                    .Select(i => i.TextFrame.TextRange))
+                    .Select(i => i.TextFrame.TextRange)
+                    .ToList();
+
+            foreach (var textShape in textShapes)
             {
                 var text = textShape.Text;

@@ -102,16 +104,55 @@
                 //text = text.Replace("[CPAS]", $"{startVerseNumber}");
                 //text = text.Replace("[CPAE]", $"{endVerseNumber}");
                 text = text.Replace("[PARA]", $"{mainVerse.Number}");
-                text = text.Replace("[BODY]", eachVerseText.First());
+
+                textShape.Text = text;
+            }
+
+            // 설정한 줄 수를 초과하는 성경 구절을 새 슬라이드로 분할하도록 동작
+            var overflowedEachVerseText = new string[9];
+
+            foreach (var textShape in textShapes.Where(textShape => Regex.IsMatch(textShape.Text, @"\[BODY[1-9]?\]")))
+            {
+                ReplaceVerseTextAndProcessOverflow(textShape, null, eachVerseText.First());

                 var verseEnumerator = eachVerseText.GetEnumerator();
                 for (var i = 1; i <= 9; i++)
                 {
                     var verse = verseEnumerator.MoveNext() ? verseEnumerator.Current : null;
-                    text = text.Replace($"[BODY{i}]", verse);
-                }
-
-                textShape.Text = text;
+                    ReplaceVerseTextAndProcessOverflow(textShape, i, verse);
+                }
+            }
+
+            if (!overflowedEachVerseText.All(string.IsNullOrEmpty))
+            {
+                AppendVerse(overflowedEachVerseText, mainVerse, book, chapter, token);
+            }
+
+            void ReplaceVerseTextAndProcessOverflow(TextRange textShape, int? index, string text)
+            {
+                // 치환자가 위치한 줄은 치환할 예정이므로 계산에 미포함하여 -1
+                var lineCount = textShape.Lines().Count - 1;
+
+                // 성경 구절을 PPT로 만들 때 몇 줄인지 계산할 수 있게 치환
+                var replacedText = textShape.Text.Replace($"[BODY{index}]", text);
+                textShape.Text = replacedText;
+
+                // 슬라이드 분할 기능을 사용하지 않으면 이대로 종료
+                if (Job.NumberOfLinesPerSlide < 1)
+                {
+                    return;
+                }
+
+                // 설정한 줄 수를 초과하지 않게 뒷 부분을 잘라냄
+                var trimmedText = textShape.Lines(Length: lineCount + Job.NumberOfLinesPerSlide).Text;
+                textShape.Text = trimmedText;
+
+                // 잘라낸 뒷 부분을 새 슬라이드로 추가하도록 저장
+                var overflowedText = replacedText.Substring(trimmedText.Length).Trim();
+                if (!string.IsNullOrEmpty(overflowedText))
+                {
+                    overflowedEachVerseText[(index ?? 1) - 1] = overflowedText;
+                }
             }
         }


rcheckin : correct fail to checkin if changeset has been fetched

Take into account newly fetched changesets by updating parentChangeset variable

--- GitTfs/Commands/Rcheckin.cs
+++ GitTfs/Commands/Rcheckin.cs
@@ -95,6 +95,7 @@
                 if (Quick && AutoRebase)
                 {
                     tfsRemote.Repository.CommandNoisy("rebase", "--preserve-merges", tfsRemote.RemoteRef);
+                    parentChangeset = _globals.Repository.GetTfsCommit(parentChangeset.Remote.MaxCommitHash);
                 }
                 else
                 {


utility function

utility function

--- Gui/GUIWidget.cs
+++ Gui/GUIWidget.cs
@@ -1636,6 +1636,11 @@
 			return null;
 		}

+		public bool PositionWithinLocalBounds(Vector2 postion)
+		{
+			return PositionWithinLocalBounds(postion.X, postion.Y);
+		}
+
 		public virtual bool PositionWithinLocalBounds(double x, double y)
 		{
 			if (LocalBounds.Contains(x, y))