minor fix for static unit test stub data in Unity

--- unity/3.4/Standalone/UnityUnitTest/Assets/UnitTests/PubnubUnitTest.cs
+++ unity/3.4/Standalone/UnityUnitTest/Assets/UnitTests/PubnubUnitTest.cs
@@ -102,7 +102,7 @@
         private Dictionary<string, string> LoadWhenAMessageIsPublishedThenSecretKeyWithEncryptPublishShouldReturnSuccessCodeAndInfo()
         {
             Dictionary<string, string> data = new Dictionary<string, string>();
-            data.Add("/publish/demo/demo/3f75435fcd800f5d0476fc0fb5b572d1/hello_my_channel/0/%22f42pIQcWZ9zbTbH8cyLwB%2FtdvRxjFLOYcBNMVKeHS54%3D%22", "[1,\"Sent\",\"13559014566792817\"]");
+            data.Add("/publish/demo/demo/f2df042fa9883d95d1f0ce5c42b69b27/hello_my_channel/0/%22f42pIQcWZ9zbTbH8cyLwB%2FtdvRxjFLOYcBNMVKeHS54%3D%22", "[1,\"Sent\",\"13559014566792817\"]");
             data.Add("/v2/history/sub-key/demo/channel/hello_my_channel", "[[\"f42pIQcWZ9zbTbH8cyLwB/tdvRxjFLOYcBNMVKeHS54=\"],13559191494674157,13559191494674157]");
             return data;
         }
@@ -110,8 +110,8 @@
         private Dictionary<string, string> LoadWhenAMessageIsPublishedThenComplexMessageObjectShouldReturnSuccessCodeAndInfo()
         {
             Dictionary<string, string> data = new Dictionary<string, string>();
-            data.Add("/publish/demo/demo/0/hello_my_channel/0/%7B%22VersionID%22%3A3%2E4%2C%22Timetoken%22%3A13601488652764619%2C%22OperationName%22%3A%22Publish%22%2C%22Channels%22%3A%5B%22ch1%22%5D%2C%22DemoMessage%22%3A%7B%22DefaultMessage%22%3A%22%7E%21%40%23%24%25%5E%26%2A%28%29_%2B%20%601234567890-%3D%20qwertyuiop%5B%5D%5C%5C%20%7B%7D%7C%20asdfghjkl%3B%27%20%3A%5C%22%20zxcvbnm%2C%2E%2F%20%3C%3E%3F%20%22%7D%2C%22CustomMessage%22%3A%7B%22DefaultMessage%22%3A%22Welcome%20to%20the%20world%20of%20Pubnub%20for%20Publish%20and%20Subscribe%2E%20Hah%21%22%7D%2C%22SampleXml%22%3A%7B%22DemoRoot%22%3A%7B%22Person%22%3A%5B%7B%22%40ID%22%3A%22ABCD123%22%2C%22Name%22%3A%7B%22First%22%3A%22John%22%2C%22Middle%22%3A%22P%2E%22%2C%22Last%22%3A%22Doe%22%7D%2C%22Address%22%3A%7B%22Street%22%3A%22123%20Duck%20Street%22%2C%22City%22%3A%22New%20City%22%2C%22State%22%3A%22New%20York%22%2C%22Country%22%3A%22United%20States%22%7D%7D%2C%7B%22%40ID%22%3A%22ABCD456%22%2C%22Name%22%3A%7B%22First%22%3A%22Peter%22%2C%22Middle%22%3A%22Z%2E%22%2C%22Last%22%3A%22Smith%22%7D%2C%22Address%22%3A%7B%22Street%22%3A%2212%20Hollow%20Street%22%2C%22City%22%3A%22Philadelphia%22%2C%22State%22%3A%22Pennsylvania%22%2C%22Country%22%3A%22United%20States%22%7D%7D%5D%7D%7D%7D", "[1,\"Sent\",\"13602210467298480\"]");
-            data.Add("/v2/history/sub-key/demo/channel/hello_my_channel", "[[{\"VersionID\":3.4,\"Timetoken\":\"13601488652764619\",\"OperationName\":\"Publish\",\"Channels\":[\"ch1\"],\"DemoMessage\":{\"DefaultMessage\":\"~!@#$%^&*()_+ `1234567890-= qwertyuiop[]\\\\ {}| asdfghjkl;' :\\\" zxcvbnm,./ <>? \"},\"CustomMessage\":{\"DefaultMessage\":\"Welcome to the world of Pubnub for Publish and Subscribe. Hah!\"},\"SampleXml\":{\"DemoRoot\":{\"Person\":[{\"@ID\":\"ABCD123\",\"Name\":{\"First\":\"John\",\"Middle\":\"P.\",\"Last\":\"Doe\"},\"Address\":{\"Street\":\"123 Duck Street\",\"City\":\"New City\",\"State\":\"New York\",\"Country\":\"United States\"}},{\"@ID\":\"ABCD456\",\"Name\":{\"First\":\"Peter\",\"Middle\":\"Z.\",\"Last\":\"Smith\"},\"Address\":{\"Street\":\"12 Hollow Street\",\"City\":\"Philadelphia\",\"State\":\"Pennsylvania\",\"Country\":\"United States\"}}]}}}],13602274270564989,13602274270564989]");
+            data.Add("/publish/demo/demo/0/hello_my_channel/0/%7B%22VersionID%22%3A3%2E4%2C%22Timetoken%22%3A%2213601488652764619%22%2C%22OperationName%22%3A%22Publish%22%2C%22Channels%22%3A%5B%22ch1%22%5D%2C%22DemoMessage%22%3A%7B%22DefaultMessage%22%3A%22%7E%21%40%23%24%25%5E%26%2A%28%29_%2B%20%601234567890-%3D%20qwertyuiop%5B%5D%5C%5C%20%7B%7D%7C%20asdfghjkl%3B%27%20%3A%5C%22%20zxcvbnm%2C%2E%2F%20%3C%3E%3F%20%22%7D%2C%22CustomMessage%22%3A%7B%22DefaultMessage%22%3A%22Welcome%20to%20the%20world%20of%20Pubnub%20for%20Publish%20and%20Subscribe%2E%20Hah%21%22%7D%2C%22SampleXml%22%3A%5B%7B%22Name%22%3A%7B%22First%22%3A%22John%22%2C%22Middle%22%3A%22P%2E%22%2C%22Last%22%3A%22Doe%22%7D%2C%22Address%22%3A%7B%22Street%22%3A%22123%20Duck%20Street%22%2C%22City%22%3A%22New%20City%22%2C%22State%22%3A%22New%20York%22%2C%22Country%22%3A%22United%20States%22%7D%2C%22ID%22%3A%22ABCD123%22%7D%2C%7B%22Name%22%3A%7B%22First%22%3A%22Peter%22%2C%22Middle%22%3A%22Z%2E%22%2C%22Last%22%3A%22Smith%22%7D%2C%22Address%22%3A%7B%22Street%22%3A%2212%20Hollow%20Street%22%2C%22City%22%3A%22Philadelphia%22%2C%22State%22%3A%22Pennsylvania%22%2C%22Country%22%3A%22United%20States%22%7D%2C%22ID%22%3A%22ABCD456%22%7D%5D%7D", "[1,\"Sent\",\"13602210467298480\"]");
+            data.Add("/v2/history/sub-key/demo/channel/hello_my_channel", "[[{\"VersionID\":3.4,\"Timetoken\":\"13601488652764619\",\"OperationName\":\"Publish\",\"Channels\":[\"ch1\"],\"DemoMessage\":{\"DefaultMessage\":\"~!@#$%^&*()_+ `1234567890-= qwertyuiop[]\\\\ {}| asdfghjkl;' :\\\" zxcvbnm,./ <>? \"},\"CustomMessage\":{\"DefaultMessage\":\"Welcome to the world of Pubnub for Publish and Subscribe. Hah!\"},\"SampleXml\":[{\"Name\":{\"First\":\"John\",\"Middle\":\"P.\",\"Last\":\"Doe\"},\"Address\":{\"Street\":\"123 Duck Street\",\"City\":\"New City\",\"State\":\"New York\",\"Country\":\"United States\"},\"ID\":\"ABCD123\"},{\"Name\":{\"First\":\"Peter\",\"Middle\":\"Z.\",\"Last\":\"Smith\"},\"Address\":{\"Street\":\"12 Hollow Street\",\"City\":\"Philadelphia\",\"State\":\"Pennsylvania\",\"Country\":\"United States\"},\"ID\":\"ABCD456\"}]}],13735400879163600,13735400879163600]");
             return data;
         }


Improvement ListMailboxes

Improvement ListMailboxes

Deal with weird MS Exchange Server responses

--- ImapClient.cs
+++ ImapClient.cs
@@ -560,8 +560,14 @@
 							if (a.ToLower() == @"\noselect")
 								add = false;
 						}
-						if (add)
-							mailboxes.Add(m.Groups[3].Value.Trim('"'));
+						if (add) {
+							string name = m.Groups[3].Value;
+							// MS Exchange Server has the weird habit of returning names that
+							// contain quote characters in a new line.
+							if (Regex.IsMatch(name, @"^{(\d+)}$"))
+								name = GetResponse();
+							mailboxes.Add(name.Trim('"'));
+						}
 					}
 					response = GetResponse();
 				}


Simplify return

Simplify return

--- osu.Framework/Graphics/Textures/TextureStore.cs
+++ osu.Framework/Graphics/Textures/TextureStore.cs
@@ -55,15 +55,8 @@
                 //Laziness ensure we are only ever creating the texture once (and blocking on other access until it is done).
                 new AsyncLazy<TextureGL>(async () => (await getTextureAsync(name))?.TextureGL, LazyThreadSafetyMode.ExecutionAndPublication)).Value;

-            if (cachedTex == null) return null;
-
             //use existing TextureGL (but provide a new texture instance).
-            var tex = new Texture(cachedTex)
-            {
-                ScaleAdjust = ScaleAdjust
-            };
-
-            return tex;
+            return cachedTex == null ? null : new Texture(cachedTex) { ScaleAdjust = ScaleAdjust };
         }

         /// <summary>


Give enums descriptions, change acronym and remove icon

--- osu.Game.Rulesets.Osu/Mods/OsuModFreezeFrame.cs
+++ osu.Game.Rulesets.Osu/Mods/OsuModFreezeFrame.cs
@@ -3,8 +3,8 @@

 using System;
 using System.Linq;
+using System.ComponentModel;
 using osu.Framework.Bindables;
-using osu.Framework.Graphics.Sprites;
 using osu.Framework.Localisation;
 using osu.Game.Beatmaps;
 using osu.Game.Configuration;
@@ -20,17 +20,15 @@
     {
         public override string Name => "Freeze Frame";

-        public override string Acronym => "FF";
+        public override string Acronym => "FR";

         public override double ScoreMultiplier => 1;

-        public override LocalisableString Description => "Burn the notes into your memory";
+        public override LocalisableString Description => "Burn the notes into your memory.";

         public override ModType Type => ModType.Fun;

-        public override IconUsage? Icon => FontAwesome.Solid.Camera;
-
-        [SettingSource("Measure", "How often the hit-circles should be Grouped to freeze")]
+        [SettingSource("Beat Divisor", "How often the hitobjects should be grouped according to BPM")]
         public Bindable<BeatDivisor> Divisor { get; } = new Bindable<BeatDivisor>(BeatDivisor.Single_Measure);

         public void ApplyToDrawableRuleset(DrawableRuleset<OsuHitObject> drawableRuleset)
@@ -88,15 +86,22 @@
             }
         }

-        //Todo: find better way to represent these Enums to the player
         public enum BeatDivisor
         {
+            [Description("1/4")]
             Quarter_Measure,
+
+            [Description("1/2")]
             Half_Measure,
+
+            [Description("1")]
             Single_Measure,
+
+            [Description("2")]
             Double_Measure,
+
+            [Description("4")]
             Quadruple_Measure
         }
     }
 }
-


Fix `OnlinePlayScreen` sub-screens not loaded asynchronously

--- osu.Game/Screens/OnlinePlay/OnlinePlayScreen.cs
+++ osu.Game/Screens/OnlinePlay/OnlinePlayScreen.cs
@@ -30,17 +30,19 @@
     [Cached]
     public abstract class OnlinePlayScreen : OsuScreen, IHasSubScreenStack
     {
-        public override bool CursorVisible => (screenStack.CurrentScreen as IOnlinePlaySubScreen)?.CursorVisible ?? true;
+        public override bool CursorVisible => (screenStack?.CurrentScreen as IOnlinePlaySubScreen)?.CursorVisible ?? true;

         // this is required due to PlayerLoader eventually being pushed to the main stack
         // while leases may be taken out by a subscreen.
         public override bool DisallowExternalBeatmapRulesetChanges => true;

-        private readonly MultiplayerWaveContainer waves;
-
-        private readonly OsuButton createButton;
-        private readonly LoungeSubScreen loungeSubScreen;
-        private readonly ScreenStack screenStack;
+        private MultiplayerWaveContainer waves;
+
+        private OsuButton createButton;
+
+        private ScreenStack screenStack;
+
+        private LoungeSubScreen loungeSubScreen;

         private readonly IBindable<bool> isIdle = new BindableBool();

@@ -54,7 +56,7 @@
         private readonly Bindable<FilterCriteria> currentFilter = new Bindable<FilterCriteria>(new FilterCriteria());

         [Cached]
-        private OngoingOperationTracker ongoingOperationTracker { get; set; }
+        private readonly OngoingOperationTracker ongoingOperationTracker = new OngoingOperationTracker();

         [Resolved(CanBeNull = true)]
         private MusicController music { get; set; }
@@ -66,10 +68,13 @@
         protected IAPIProvider API { get; private set; }

         [Resolved(CanBeNull = true)]
+        private IdleTracker idleTracker { get; set; }
+
+        [Resolved(CanBeNull = true)]
         private OsuLogo logo { get; set; }

-        private readonly Drawable header;
-        private readonly Drawable headerBackground;
+        private Drawable header;
+        private Drawable headerBackground;

         protected OnlinePlayScreen()
         {
@@ -78,6 +83,14 @@
             RelativeSizeAxes = Axes.Both;
             Padding = new MarginPadding { Horizontal = -HORIZONTAL_OVERFLOW_PADDING };

+            RoomManager = CreateRoomManager();
+        }
+
+        private readonly IBindable<APIState> apiState = new Bindable<APIState>();
+
+        [BackgroundDependencyLoader]
+        private void load()
+        {
             var backgroundColour = Color4Extensions.FromHex(@"3e3a44");

             InternalChild = waves = new MultiplayerWaveContainer
@@ -144,42 +157,42 @@
                         };
                         button.Action = () => OpenNewRoom();
                     }),
-                    RoomManager = CreateRoomManager(),
-                    ongoingOperationTracker = new OngoingOperationTracker()
+                    RoomManager,
+                    ongoingOperationTracker,
                 }
             };

+            // a lot of the functionality in this class depends on loungeSubScreen being in a ready to go state.
+            // as such, we intentionally load this inline so it is ready alongside this screen.
+            LoadComponent(loungeSubScreen = CreateLounge());
+        }
+
+        private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
+        {
+            if (state.NewValue != APIState.Online)
+            {
+                Logger.Log("API connection was lost, can't continue with online play", LoggingTarget.Network, LogLevel.Important);
+                Schedule(forcefullyExit);
+            }
+        });
+
+        protected override void LoadComplete()
+        {
+            base.LoadComplete();
+
             screenStack.ScreenPushed += screenPushed;
             screenStack.ScreenExited += screenExited;

-            screenStack.Push(loungeSubScreen = CreateLounge());
-        }
-
-        private readonly IBindable<APIState> apiState = new Bindable<APIState>();
-
-        [BackgroundDependencyLoader(true)]
-        private void load(IdleTracker idleTracker)
-        {
+            screenStack.Push(loungeSubScreen);
+
             apiState.BindTo(API.State);
             apiState.BindValueChanged(onlineStateChanged, true);

             if (idleTracker != null)
+            {
                 isIdle.BindTo(idleTracker.IsIdle);
-        }
-
-        private void onlineStateChanged(ValueChangedEvent<APIState> state) => Schedule(() =>
-        {
-            if (state.NewValue != APIState.Online)
-            {
-                Logger.Log("API connection was lost, can't continue with online play", LoggingTarget.Network, LogLevel.Important);
-                Schedule(forcefullyExit);
-            }
-        });
-
-        protected override void LoadComplete()
-        {
-            base.LoadComplete();
-            isIdle.BindValueChanged(idle => UpdatePollingRate(idle.NewValue), true);
+                isIdle.BindValueChanged(idle => UpdatePollingRate(idle.NewValue), true);
+            }
         }

         protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)


Ensure online play subscreen is loaded before forwarding `OnExiting`

Closes https://github.com/ppy/osu-framework/issues/4619 (actually not a
framework issue; the framework correctly guards against this scenario,
see
https://github.com/ppy/osu-framework/blob/4e29504384bb78bbccc0d492de58124f17270eb2/osu.Framework/Screens/ScreenStack.cs#L277).

Added the assertions to be very explicit about the nested stack's state
at this point. Both of those events can only be triggered if the stack
has a loaded screen (as far as I can tell), making this check
unnecessary in those cases.

--- osu.Game/Screens/OnlinePlay/OnlinePlayScreen.cs
+++ osu.Game/Screens/OnlinePlay/OnlinePlayScreen.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System.Diagnostics;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
 using osu.Framework.Extensions.Color4Extensions;
@@ -222,7 +223,9 @@
             this.FadeIn(250);
             this.ScaleTo(1, 250, Easing.OutSine);

-            screenStack.CurrentScreen?.OnResuming(last);
+            Debug.Assert(screenStack.CurrentScreen != null);
+            screenStack.CurrentScreen.OnResuming(last);
+
             base.OnResuming(last);

             UpdatePollingRate(isIdle.Value);
@@ -233,14 +236,16 @@
             this.ScaleTo(1.1f, 250, Easing.InSine);
             this.FadeOut(250);

-            screenStack.CurrentScreen?.OnSuspending(next);
+            Debug.Assert(screenStack.CurrentScreen != null);
+            screenStack.CurrentScreen.OnSuspending(next);

             UpdatePollingRate(isIdle.Value);
         }

         public override bool OnExiting(IScreen next)
         {
-            if (screenStack.CurrentScreen?.OnExiting(next) == true)
+            var subScreen = screenStack.CurrentScreen as Drawable;
+            if (subScreen?.IsLoaded == true && screenStack.CurrentScreen.OnExiting(next))
                 return true;

             RoomManager.PartRoom();


Thread safe services in Game

Thread safe services in Game

--- Fusion/Game.cs
+++ Fusion/Game.cs
@@ -105,8 +105,7 @@
 		ContentManager		content				;
 		Invoker				invoker				;

-		Dictionary<Type, GameService>	serviceMap	=	new Dictionary<Type,GameService>();
-		List<GameService>				serviceList	=	new List<GameService>();
+		List<GameService>	serviceList	=	new List<GameService>();
 		GameTime	gameTimeInternal;

 		GameParameters	gameParams = new GameParameters();
@@ -227,14 +226,17 @@
 			}

 			if (disposing) {
-				//	shutdown registered services in reverse order:
-				serviceList.Reverse();
-
-				foreach ( var svc in serviceList ) {
-					Log.Message("Disposing : {0}", svc.GetType().Name );
-					svc.Dispose();
-				}
-				serviceList.Clear();
+
+				lock ( serviceList ) {
+					//	shutdown registered services in reverse order:
+					serviceList.Reverse();
+
+					foreach ( var svc in serviceList ) {
+						Log.Message("Disposing : {0}", svc.GetType().Name );
+						svc.Dispose();
+					}
+					serviceList.Clear();
+				}

 				content.Dispose();

@@ -305,9 +307,13 @@

 			//	init game :
 			Log.Message("");
-			Initialize();
-
-			initialized = true;
+
+
+			lock ( serviceList ) {
+				Initialize();
+				initialized = true;
+			}
+

 			Log.Message("---------------------------------------");
 			Log.Message("");
@@ -422,7 +428,13 @@
 		/// <param name="gameTime"></param>
 		protected virtual void Update ( GameTime gameTime )
 		{
-			foreach ( var svc in serviceList.OrderBy( a => a.UpdateOrder ) ) {
+			GameService[] svcList;
+
+			lock (serviceList) {
+				svcList = serviceList.OrderBy( a => a.UpdateOrder ).ToArray();
+			}
+
+			foreach ( var svc in svcList ) {

 				if ( svc.Enabled ) {
 					svc.Update( gameTime );
@@ -440,7 +452,14 @@
 		/// <param name="stereoEye"></param>
 		protected virtual void Draw ( GameTime gameTime, StereoEye stereoEye )
 		{
-			foreach ( var svc in serviceList.OrderBy( a => a.DrawOrder ) ) {
+			GameService[] svcList;
+
+			lock (serviceList) {
+				svcList = serviceList.OrderBy( a => a.DrawOrder ).ToArray();
+			}
+
+
+			foreach ( var svc in svcList ) {

 				if ( svc.Visible ) {
 					GraphicsDevice.ResetStates();
@@ -491,12 +510,28 @@
 		/// <param name="service"></param>
 		public void AddService ( GameService service )
 		{
-			if (IsInitialized) {
-				throw new InvalidOperationException("Game service must be added before Game.Initialize called");
-			}
-
-			serviceMap.Add( service.GetType(), service );
-			serviceList.Add( service );
+			lock (serviceList) {
+				if (IsInitialized) {
+					service.Initialize();
+				}
+
+				serviceList.Add( service );
+			}
+		}
+
+
+
+		/// <summary>
+		///
+		/// </summary>
+		public void RemoveService ( GameService service )
+		{
+			lock (serviceList) {
+
+				service.Dispose();
+
+				serviceList.Remove( service );
+			}
 		}

@@ -509,10 +544,6 @@
 		/// <param name="drawable"></param>
 		public void AddService ( GameService service, bool enabled, bool visible, int updateOrder, int drawOrder )
 		{
-			if (IsInitialized) {
-				throw new InvalidOperationException("Game service must be added before Game.Initialize called");
-			}
-
 			service.Enabled		=	enabled;
 			service.Visible		=	visible;
 			service.DrawOrder	=	drawOrder;
@@ -530,11 +561,16 @@
 		/// <returns></returns>
 		public T GetService<T> () where T : GameService
 		{
-			GameService service = null;
-			if ( !serviceMap.TryGetValue( typeof(T), out service ) ) {
+			lock (serviceList) {
+
+				foreach ( var svc in serviceList ) {
+					if (svc is T) {
+						return (T)svc;
+					}
+				}
+
 				throw new InvalidOperationException(string.Format("Game service of type \"{0}\" is not added", typeof(T).ToString()));
 			}
-			return (T)service;
 		}

@@ -546,13 +582,16 @@
 		/// <returns></returns>
 		internal GameService GetServiceByName( string name )
 		{
-			var obj = serviceMap.FirstOrDefault( svc => svc.Value.GetType().Name.ToLower() == name.ToLower() ).Value;
-
-			if (obj==null) {
-				throw new InvalidOperationException(string.Format("Service '{0}' not found", name) );
-			}
-
-			return (GameService)obj;
+			lock (serviceList) {
+
+				var obj = serviceList.FirstOrDefault( svc => svc.GetType().Name.ToLower() == name.ToLower() );
+
+				if (obj==null) {
+					throw new InvalidOperationException(string.Format("Service '{0}' not found", name) );
+				}
+
+				return (GameService)obj;
+			}
 		}

@@ -577,8 +616,16 @@
 		/// <returns></returns>
 		public bool IsServiceExist<T>() where T : GameService
 		{
-			GameService service = null;
-			return serviceMap.TryGetValue( typeof(T), out service );
+			lock (serviceList) {
+
+				foreach ( var svc in serviceList ) {
+					if (svc is T) {
+						return true;
+					}
+				}
+
+				return false;
+			}
 		}

 		/*-----------------------------------------------------------------------------------------


Working copy of game without the ability of any piece to take another piece

--- GameManager.cs
+++ GameManager.cs
@@ -12,81 +12,95 @@
 			GameManager game = new GameManager();
 			game.initialize();
 			game.printNodes();
-
-
+			game.playGame();
+		}
+
+
+		// Global variables
+		bool team1Turn = true;
+
+		// To play the game
+		public void playGame(){
+			Console.WriteLine("Blue Goes first");
+
+			bool execute = false;
 			while(true){
 				Console.WriteLine("Enter Start Location");
 				string Start = Console.ReadLine();
 				Console.WriteLine("Enter End Location");
 				string End = Console.ReadLine();

-				int[] startCoordinates = game.getFormattedCoordinate(Start);
-				int[] endCoordinates = game.getFormattedCoordinate(End);
-
-				bool status = game.checkMoveValidity(startCoordinates,endCoordinates);
-
-				Console.WriteLine("Move from "+Start+" to "+End+" is: ");
-
-				if(status){
-					Console.WriteLine("Valid!");
-					game.movePiece(startCoordinates[0],startCoordinates[1],endCoordinates[0],endCoordinates[1]);
-					game.printNodes();
+				int[] startCoordinates = getFormattedCoordinate(Start);
+				int[] endCoordinates = getFormattedCoordinate(End);
+
+				// Get team of piece to check if it's their turn
+				String teamName = grid[startCoordinates[0],startCoordinates[1]].getTeamName();
+
+				if(teamName=="Team1" && team1Turn){
+					execute=true;
+				}else if(teamName=="Team2" && !team1Turn){
+					execute=true;
+				}
+
+				if(execute){
+					bool status = checkMoveValidity(startCoordinates,endCoordinates);
+
+					Console.WriteLine("Move from "+Start+" to "+End+" is: ");
+
+					if(status){
+						Console.WriteLine("Valid!");
+						movePiece(startCoordinates[0],startCoordinates[1],endCoordinates[0],endCoordinates[1]);
+						printNodes();
+
+						if(team1Turn){
+							team1Turn=false;
+							}else{
+							team1Turn=true;
+						}
+
+
+					}else{
+						Console.WriteLine("Invalid!");
+						printNodes();
+					}
+					// reset variables
+					execute=false;
+
 				}else{
-					Console.WriteLine("Invalid!");
-				}
-
-			}
-
-
-			//string Start = "G1";
-			//string End = "F3";
-
-
-
-			// Get what piece is at the input location
-			//string pieceName = (grid[startCoordinates[0],startCoordinates[1]]).getName();
-			//Console.WriteLine(startCoordinates[0]+" "+startCoordinates[1]);
-			//Console.WriteLine(endCoordinates[0]+" "+endCoordinates[1]);
-
-
-			// We get an input such as "A3 --> A5". Ex. A8 Sequence is (8,A)--> 8,0
-
-		}
+					Console.Write("You cannot move. It is ");
+					if(team1Turn){
+						Console.Write(" Blues Turn\n");
+					}else{
+						Console.Write(" Reds Turn\n");
+					}
+					printNodes();
+				}
+
+			}
+		}
+

 		// To see if move valid
 		public bool checkMoveValidity(int[] startCoordinates, int[] endCoordinates){
 			bool isValidMove = false;

 			// Get piece at input location
-
 			ChessPiece startPiece = grid[startCoordinates[0],startCoordinates[1]];
 			ChessPiece endPiece = grid[endCoordinates[0],endCoordinates[1]];

-
-
 			// To hold object values
 			string startPieceName;
 			string startPieceTeam;
 			string endPieceTeam;
 			bool attemptMoveCheck = false;

-			// To hold if possible to move there or not
-			bool placementValid = false;
-
 			// To break if objects in the way
 			bool objectsInWay = false;
-
-			// To hold onto movement vectors
-			int vectorX;
-			int vectorY;
-
-
-			List<int[]> allowedMoveSets = new List<int[]>();
-			List<int[]> specialMoveSets = new List<int[]>();

 			// // check if valid move then check if anything blocking seperatly
 			if (startPiece != null){
 				startPieceName = startPiece.getName();
+				Console.WriteLine(startPieceName);
 				startPieceTeam = startPiece.getTeamName();

@@ -94,7 +108,7 @@
 				if(endPiece != null){
 					// if is not a friently piece can move there
 					endPieceTeam = endPiece.getTeamName();
-					if(endPieceTeam!=startPieceName){
+					if(endPieceTeam!=startPieceTeam){
 						attemptMoveCheck = true;
 					}

@@ -104,9 +118,6 @@
 				if(attemptMoveCheck){
 					// This tile is empty, we can look into moving here
 					List<int[]> allowedMoveVectors = startPiece.getAllowedMotionVector();
-
-					// generate a list of allowed moves
-					List<int[]>  allowedTiles = new List<int[]>();

 					// given start and end coordinates, let us subtract to get vector
 					int xVector = endCoordinates[0]-startCoordinates[0];
@@ -124,10 +135,6 @@
 						}else{
 							// All of these can have variants of allowed movement vectors
 							foreach (int[] vector in allowedMoveVectors){
-								// Check to make sure coordinates are multiples
-								//Console.WriteLine(xVector+" "+yVector);
-								//Console.WriteLine(vector[0]+" "+vector[1]);
-								//Console.WriteLine("mod "+5%3+" "+vector[1]%yVector);

 								if(startPieceName=="Bishop"){
 									if(xVector!=0 && yVector !=0){
@@ -135,9 +142,6 @@
 											// Check for collisions here
 											if(checkCollisions(startCoordinates,endCoordinates,vector)){
 												isValidMove=true;
-												break;
-											}else{
-												objectsInWay=true;
 												break;
 											}

@@ -157,71 +161,41 @@

 												isValidMove=true;
 												break;
-											}else{
+											}
+										}
+									}else if((xVector==0 && yVector!=0)||(yVector==0 && xVector!=0)){
+										//Console.WriteLine("X Dir");
+
+										if(checkCollisions(startCoordinates,endCoordinates,vector)){
+
+
+											isValidMove = true;
+											break;
+										}
+
+									}
+								}
+
+								if(startPieceName=="Rook"){
+									if((xVector==0 && yVector!=0)||(yVector==0 && xVector!=0)){
+
+										// Only run if relevant to this particular search
+
+											if(checkCollisions(startCoordinates,endCoordinates,vector)){
+												isValidMove = true;
+												break;
+											}
+											/*
+											else{
 												objectsInWay=true;
 												break;
 											}
-										}
-									}else if(xVector==0 && yVector!=0){
-										//Console.WriteLine("X Dir");
-										if(checkCollisions(startCoordinates,endCoordinates,vector)){
-
-
-											isValidMove = true;
-											break;
-										}else{
-											objectsInWay=true;
-											break;
-										}
-
-									}else if(yVector==0 && xVector!=0){
-										//Console.WriteLine("Y Dir");
-										if(checkCollisions(startCoordinates,endCoordinates,vector)){
-
-
-											isValidMove=true;
-											break;
-
-										}else{
-											objectsInWay=true;
-											break;
-										}
+											*/
+
+

 									}
-								}
-
-								if(startPieceName=="Rook"){
-									if(xVector==0 && yVector!=0){
-										//Console.WriteLine("X Dir");
-										if(checkCollisions(startCoordinates,endCoordinates,vector)){
-
-
-											isValidMove = true;
-											break;
-										}else{
-											objectsInWay=true;
-											break;
-										}
-
-									}else if(yVector==0 && xVector!=0){
-										//Console.WriteLine("Y Dir");
-										if(checkCollisions(startCoordinates,endCoordinates,vector)){
-
-
-											isValidMove=true;
-											break;
-
-										}else{
-											objectsInWay=true;
-											break;
-										}
-
-									}
-								}
-
-
-
-
+								}

 							}
 						}
@@ -232,20 +206,12 @@
 						}
 					}

-
-
-
-
 				}

 			}else{
 				Console.WriteLine("Piece 1 doesn't exist. Valid input needed to proceed");
 			}

-
-
-			//string startPiece = grid[startCoordinates[0],startCoordinates[1]].getName();
-			//string endPiece = grid[endCoordinates[0],endCoordinates[1]].getName();
 			return isValidMove;

@@ -256,6 +222,8 @@
 		// output if any collisions. True if okay to move
 		public bool checkCollisions(int[] startCoordinates,int[] endCoordinates,int[] vector){
 			bool ableToMove = true;
+
+

 			int xIncrementer=0;
 			int yIncrementer=0;
@@ -276,39 +244,45 @@
 				yIncrementer=0;
 			}

-			if(Math.Abs(vector[0])>Math.Abs(vector[1])){
-				incrementsNeededToCheck=Math.Abs(vector[0]);
+			// The vectors above depend on the team
+			// Currently configured for team2, so much switch if team 1
+			/*
+			if(grid[startCoordinates[0],startCoordinates[1]].getTeamName()=="Team1"){
+				xIncrementer = xIncrementer*-1;
+				yIncrementer = yIncrementer*-1;
+			}
+			*/
+
+			if(Math.Abs(endCoordinates[0]-startCoordinates[0])>Math.Abs(endCoordinates[1]-startCoordinates[1])){
+				incrementsNeededToCheck=Math.Abs(endCoordinates[0]-startCoordinates[0]);
 			}else{
-				incrementsNeededToCheck=Math.Abs(vector[1]);
-			}
-
-			Console.WriteLine("incrementsNeededToCheck "+incrementsNeededToCheck);
-			Console.WriteLine("xdir "+xIncrementer);
-			Console.WriteLine("ydir "+yIncrementer);
-			Console.WriteLine("startX "+startCoordinates[0]+" startY "+startCoordinates[1]);
-			Console.WriteLine("endX "+endCoordinates[0]+" endY "+endCoordinates[1]);
-
+				incrementsNeededToCheck=Math.Abs(endCoordinates[1]-startCoordinates[1]);
+			}
+
+
 			int X = startCoordinates[0];
 			int Y = startCoordinates[1];
+			Console.WriteLine("Original "+X+" "+Y);
+			Console.WriteLine("Incrementers "+xIncrementer+" "+yIncrementer);
 			for(int i=0; i< incrementsNeededToCheck;i++){
 				X += xIncrementer;
 				Y += yIncrementer;
+				Console.WriteLine(X+" "+Y);
+
+				// ensure values in grid()
+				if(X<0 || X>7 || Y<0 || Y>7){
+					ableToMove=false;
+					break;
+				}
+
+
 				if(grid[X,Y]!=null){
+					Console.WriteLine(grid[X,Y].getName());
 					Console.WriteLine("Stuff in WAY!");
 					ableToMove=false;
 					break;
 				}
 			}
-			/*
-			for(int i=startCoordinates[0];i!=endCoordinates[0];i+=xIncrementer){
-				for(int j=startCoordinates[1];j!=endCoordinates[1];j+=yIncrementer){
-					Console.WriteLine(i+" "+j);
-					if(grid[i,j]!=null){
-						ableToMove=false;
-					}
-				}
-			}
-			*/

 			return ableToMove;
 		}
@@ -451,7 +425,6 @@
 			int ASCIIA = 64;

 			for(int k=-1; k< grid.GetLength(0);k++){
-				string output = "";
 				for(int j=-1; j < grid.GetLength(1);j++){
 					if (k==-1){
 						if(j==-1){


Only fix timing method if the new one is Real Time

--- LiveSplit/LiveSplit.Core/Model/LiveSplitState.cs
+++ LiveSplit/LiveSplit.Core/Model/LiveSplitState.cs
@@ -214,7 +214,8 @@
                 {
                     if (Run.Metadata.Game != null)
                     {
-                        CurrentTimingMethod = SpeedrunCom.ToLiveSplitTimingMethod(Run.Metadata.Game.Ruleset.DefaultTimingMethod);
+                        if (Run.Metadata.Game.Ruleset.DefaultTimingMethod == SpeedrunComSharp.TimingMethod.RealTime)
+                            CurrentTimingMethod = TimingMethod.RealTime;
                     }
                 }
                 catch (Exception ex)


Made "Other..." button grayed out midrun

--- LiveSplit/LiveSplit.View/View/RunEditorDialog.cs
+++ LiveSplit/LiveSplit.View/View/RunEditorDialog.cs
@@ -280,6 +280,7 @@
                 btnInsert.Enabled = false;
                 btnMoveDown.Enabled = false;
                 btnMoveUp.Enabled = false;
+                btnOther.Enabled = false;
             }
             else
             {


incorporate Transport Line Rendering Fix

--- LoadingExtension.cs
+++ LoadingExtension.cs
@@ -141,6 +141,9 @@
                 var transportInfo = PrefabCollection<TransportInfo>.FindLoaded("Metro");
                 transportInfo.m_netLayer = ItemClass.Layer.Default | ItemClass.Layer.MetroTunnels;
                 transportInfo.m_stationLayer = ItemClass.Layer.Default | ItemClass.Layer.MetroTunnels;
+                transportInfo.m_secondaryLayer = 9;
+                transportInfo.m_secondaryLineMaterial = transportInfo.m_lineMaterial;
+                transportInfo.m_secondaryLineMaterial2 = transportInfo.m_lineMaterial2;
             }
             else if (mode == LoadMode.NewAsset || mode == LoadMode.LoadAsset)
             {


Show OtherPaymentInfo on details page

Show OtherPaymentInfo on details page

--- Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
+++ Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
@@ -82,17 +82,38 @@

     Payment Method
-    @if(Model.Order.PaymentType != PaymentTypeCodes.CreditCard)
-    {
-        UC Account: @Model.OrderDetails.Payment.Account
-        @if(!string.IsNullOrWhiteSpace(Model.OrderDetails.Payment.AccountName))
-         {
-              (@Model.OrderDetails.Payment.AccountName)
-         }
-    }
-    else
+    @if (Model.Order.PaymentType == PaymentTypeCodes.CreditCard)
     {
         Credit Card
+    }
+
+    @if (Model.Order.PaymentType == PaymentTypeCodes.Other)
+    {
+        Other Payment (@Model.OrderDetails.OtherPaymentInfo.PaymentType)

+        Company Name: @Model.OrderDetails.OtherPaymentInfo.CompanyName

+        Account Contact Name: @Model.OrderDetails.OtherPaymentInfo.AcName

+        Account Contact Address: @Model.OrderDetails.OtherPaymentInfo.AcAddr

+        Account Contact Email: @Model.OrderDetails.OtherPaymentInfo.AcEmail

+        Account Contact Phone Number: @Model.OrderDetails.OtherPaymentInfo.AcPhone

+        PO Number: @Model.OrderDetails.OtherPaymentInfo.PoNum
+    }
+    @if (Model.Order.PaymentType == PaymentTypeCodes.UcOtherAccount)
+    {
+        UC Account: @Model.OrderDetails.Payment.Account

+        Campus Name: @Model.OrderDetails.OtherPaymentInfo.CompanyName

+        Account Contact Name: @Model.OrderDetails.OtherPaymentInfo.AcName

+        Account Contact Address: @Model.OrderDetails.OtherPaymentInfo.AcAddr

+        Account Contact Email: @Model.OrderDetails.OtherPaymentInfo.AcEmail

+        Account Contact Phone Number: @Model.OrderDetails.OtherPaymentInfo.AcPhone
+    }
+    @if (Model.Order.PaymentType == PaymentTypeCodes.UcDavisAccount)
+    {
+        UC Davis Account: @Model.OrderDetails.Payment.Account
+        @if (!string.IsNullOrWhiteSpace(Model.OrderDetails.Payment.AccountName))
+        {
+             (@Model.OrderDetails.Payment.AccountName)
+
+        }
     }


Added algorithm to the list

Added algorithm to the list

--- AdaptiveUIDemo/AdaptiveUIDemo/ViewModel/AdaptiveUIViewModel.cs
+++ AdaptiveUIDemo/AdaptiveUIDemo/ViewModel/AdaptiveUIViewModel.cs
@@ -68,6 +68,7 @@
             Algorithms.Add(new DumbAlgorithm());
             Algorithms.Add(new BoundedLearner());
             Algorithms.Add(new SeanAlgorithm());
+            Algorithms.Add(new ForgetfulLearner());
             CurrentAlgo = Algorithms[0];
         }
         #endregion


spotted a few typos in SolverBodyLock when looking through the Diff

--- Assets/HoloToolkit/Utilities/Scripts/Solvers/SolverBodyLock.cs
+++ Assets/HoloToolkit/Utilities/Scripts/Solvers/SolverBodyLock.cs
@@ -32,7 +32,7 @@

         #region public members
         [Tooltip("The desired orientation of this object. Default sets the object to face the TrackedObject/TargetTransform. CameraFacing sets the object to always face the user.")]
-        public OrientationReference Orrientation = OrientationReference.Default;
+        public OrientationReference Orientation = OrientationReference.Default;
         [Tooltip("XYZ offset for this object in relation to the TrackedObject/TargetTransform")]
         public Vector3 offset;
         [Tooltip("RotationTether snaps the object to be in front of TrackedObject regardless of the object's local rotation.")]
@@ -49,7 +49,7 @@

             if (RotationTether)
             {
-                float targetYRotation = GetOreintationRef().eulerAngles.y;
+                float targetYRotation = GetOrientationRef().eulerAngles.y;
                 float tetherYRotation = desiredRot.eulerAngles.y;
                 float angleDiff = Mathf.DeltaAngle(targetYRotation, tetherYRotation);
                 float tetherAngleLimit = 360f / TetherAngleSteps;
@@ -72,9 +72,9 @@
             UpdateWorkingRotToGoal();
         }

-        private Transform GetOreintationRef()
+        private Transform GetOrientationRef()
         {
-            if (Orrientation == OrientationReference.CameraFacing)
+            if (Orientation == OrientationReference.CameraFacing)
             {
                 return CameraCache.Main.transform;
             }


Constrained a code fragment to 80 chars width.

--- AtomEventStore.UnitTests/DataContractContentSerializerTests.cs
+++ AtomEventStore.UnitTests/DataContractContentSerializerTests.cs
@@ -125,7 +125,8 @@
         public void ScanCorrectlySerializesAttributedClassInstance(
             DataContractTestEventX @event)
         {
-            var actual = DataContractContentSerializer.Scan(@event.GetType().Assembly);
+            var actual =
+                DataContractContentSerializer.Scan(@event.GetType().Assembly);

            var expected = XDocument.Parse(
                 "<test-event-x xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://grean.rocks/dc\">" +


Greenfield: Human friendly error if webhook or delivery not found

--- BTCPayServer/Controllers/GreenField/StoreWebhooksController.cs
+++ BTCPayServer/Controllers/GreenField/StoreWebhooksController.cs
@@ -48,7 +48,7 @@
             {
                 var w = await StoreRepository.GetWebhook(CurrentStoreId, webhookId);
                 if (w is null)
-                    return NotFound();
+                    return WebhookNotFound();
                 return Ok(FromModel(w, false));
             }
         }
@@ -70,7 +70,7 @@
             var webhookId = await StoreRepository.CreateWebhook(CurrentStoreId, ToModel(create));
             var w = await StoreRepository.GetWebhook(CurrentStoreId, webhookId);
             if (w is null)
-                return NotFound();
+                return WebhookNotFound();
             return Ok(FromModel(w, true));
         }

@@ -88,7 +88,7 @@
                 return this.CreateValidationError(ModelState);
             var w = await StoreRepository.GetWebhook(CurrentStoreId, webhookId);
             if (w is null)
-                return NotFound();
+                return WebhookNotFound();
             await StoreRepository.UpdateWebhook(storeId, webhookId, ToModel(update));
             return await ListWebhooks(webhookId);
         }
@@ -97,9 +97,18 @@
         {
             var w = await StoreRepository.GetWebhook(CurrentStoreId, webhookId);
             if (w is null)
-                return NotFound();
+                return WebhookNotFound();
             await StoreRepository.DeleteWebhook(CurrentStoreId, webhookId);
             return Ok();
+        }
+
+        IActionResult WebhookNotFound()
+        {
+            return this.CreateAPIError(404, "webhook-not-found", "The webhook was not found");
+        }
+        IActionResult WebhookDeliveryNotFound()
+        {
+            return this.CreateAPIError(404, "webhookdelivery-not-found", "The webhook delivery was not found");
         }
         private WebhookBlob ToModel(StoreWebhookBaseData create)
         {
@@ -133,7 +142,7 @@
             {
                 var delivery = await StoreRepository.GetWebhookDelivery(CurrentStoreId, webhookId, deliveryId);
                 if (delivery is null)
-                    return NotFound();
+                    return WebhookDeliveryNotFound();
                 return Ok(FromModel(delivery));
             }
         }
@@ -142,7 +151,7 @@
         {
             var delivery = await StoreRepository.GetWebhookDelivery(CurrentStoreId, webhookId, deliveryId);
             if (delivery is null)
-                return NotFound();
+                return WebhookDeliveryNotFound();
             return this.Ok(new JValue(await WebhookNotificationManager.Redeliver(deliveryId)));
         }

@@ -151,7 +160,7 @@
         {
             var delivery = await StoreRepository.GetWebhookDelivery(CurrentStoreId, webhookId, deliveryId);
             if (delivery is null)
-                return NotFound();
+                return WebhookDeliveryNotFound();
             return File(delivery.GetBlob().Request, "application/json");
         }


add ObjectEx and Choice<T1, T2>

add ObjectEx and Choice<T1, T2>

--- LightWands.cs
+++ LightWands.cs
@@ -1359,6 +1359,190 @@

     #endregion

+
+    #region ObjectEx
+
+#if USE_INTERNAL
+    internal
+#else
+    public
+#endif
+    static class ObjectEx
+    {
+        /// Null-safe method for GetHashCode.
+        public static int GetHashCode<T>(T value)
+        {
+            if (value == null) return 0;
+            return value.GetHashCode();
+        }
+
+        /// Null-safe method for ToString.
+        public static string ToString<T>(T value)
+        {
+            Contract.Ensures(Contract.Result<string>() != null);
+
+            return ToString(value, "Null");
+        }
+
+        ///
+        /// Null-safe method for ToString.
+        ///
+        /// <param name="nullString">Returning string value when vakue is null.</param>
+        public static string ToString<T>(T value, string nullString)
+        {
+            Contract.Requires<ArgumentNullException>(nullString != null);
+            Contract.Ensures(Contract.Result<string>() != null);
+
+            if (value == null) return nullString;
+            return value.ToString();
+        }
+    }
+
+    #endregion
+
+
+    #region Choice
+
+    /// F# の判別共用体を再現した機能を提供します。
+    #if USE_INTERNAL
+    internal
+#else
+    public
+#endif
+    sealed class Choice<T1, T2> : IEquatable<Choice<T1, T2>>
+    {
+        readonly int valueIndex;
+        readonly T1 value1;
+        readonly T2 value2;
+
+        public Choice(T1 value1)
+        {
+            this.value1 = value1;
+        }
+
+        public Choice(T2 value2)
+        {
+            this.value2 = value2;
+            this.valueIndex = 1;
+        }
+
+        [ContractInvariantMethod]
+        [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1822:MarkMembersAsStatic", Justification = "Required for code contracts.")]
+        private void ObjectInvariant()
+        {
+            Contract.Invariant(0 <= valueIndex && valueIndex <= 1);
+        }
+
+        public static Choice<T1, T2> Create(T1 value1)
+        {
+            Contract.Ensures(Contract.Result<Choice<T1, T2>>() != null);
+
+            return new Choice<T1, T2>(value1);
+        }
+
+        public static Choice<T1, T2> Create(T2 value2)
+        {
+            Contract.Ensures(Contract.Result<Choice<T1, T2>>() != null);
+
+            return new Choice<T1, T2>(value2);
+        }
+
+        /// 戻り値のあるパターンマッチを行います。
+        public T Match<T>(Func<T1, T> convert1, Func<T2, T> convert2)
+        {
+            switch (valueIndex)
+            {
+                case 0:
+                    if (convert1 == null) throw new InvalidOperationException();
+                    return convert1(value1);
+                case 1:
+                    if (convert2 == null) throw new InvalidOperationException();
+                    return convert2(value2);
+                default:
+                    throw new Exception();
+            }
+        }
+
+        /// 戻り値のないパターンマッチを行います。
+        public void Action(Action<T1> action1, Action<T2> action2)
+        {
+            switch (valueIndex)
+            {
+                case 0:
+                    if (action1 == null) throw new InvalidOperationException();
+                    action1(value1);
+                    return;
+                case 1:
+                    if (action2 == null) throw new InvalidOperationException();
+                    action2(value2);
+                    return;
+                default:
+                    throw new Exception();
+            }
+        }
+
+        public override bool Equals(object obj)
+        {
+            return Equals(obj as Choice<T1, T2>);
+        }
+
+        public bool Equals(Choice<T1, T2> other)
+        {
+            return Equals(other, null, null);
+        }
+
+        public bool Equals(Choice<T1, T2> other, Func<T1, T1, bool> comparer1)
+        {
+            return Equals(other, comparer1, null);
+        }
+
+        public bool Equals(Choice<T1, T2> other, Func<T2, T2, bool> comparer2)
+        {
+            return Equals(other, null, comparer2);
+        }
+
+        public bool Equals(Choice<T1, T2> other, Func<T1, T1, bool> comparer1, Func<T2, T2, bool> comparer2)
+        {
+            if (other == null) return false;
+            if (this.valueIndex != other.valueIndex) return false;
+
+            switch (valueIndex)
+            {
+                case 0:
+                    if (comparer1 == null)
+                    {
+                        return Object.Equals(this.value1, other.value1);
+                    }
+                    else
+                    {
+                        return comparer1(this.value1, other.value1);
+                    }
+                case 1:
+                    if (comparer2 == null)
+                    {
+                        return Object.Equals(this.value2, other.value2);
+                    }
+                    else
+                    {
+                        return comparer2(this.value2, other.value2);
+                    }
+                default:
+                    throw new Exception();
+            }
+        }
+
+        public override int GetHashCode()
+        {
+            return Match(v => ObjectEx.GetHashCode(v), v => ObjectEx.GetHashCode(v));
+        }
+
+        public override string ToString()
+        {
+            return Match(v => ObjectEx.ToString(v), v => ObjectEx.ToString(v));
+        }
+    }
+
+    #endregion
 #endif

 #if NET45_WINRT45_WP8 || TESTS


optimize documentation for assembly class

--- Mono.Debugging/Mono.Debugging.Client/Assembly.cs
+++ Mono.Debugging/Mono.Debugging.Client/Assembly.cs
@@ -26,41 +26,11 @@
 using System;
 namespace Mono.Debugging.Client
 {
+	/// <summary>
+	/// Represents the assembly loaded during the debugging session.
+	/// </summary>
 	public class Assembly
 	{
-		/// <summary>
-		/// Represent the assembly loaded during the debugging session. This dataclass will be used in the modules pad view for display.
-		/// </summary>
-		/// <param name="name"></param>
-		/// String represent the name of the assembly.
-		/// <param name="path"></param>
-		/// String represent the local path of the assembly is loaded from.
-		/// <param name="optimized"></param>
-		/// Boolean shows if the assembly has been optimized, true if the assembly is optimized.
-		/// <param name="userCode"></param>
-		/// Boolean show if the assembly is considered 'user code' by a debugger that supports 'Just My Code'.True if it's considered.
-		/// <param name="symbolStatus"></param>
-		/// String represent the Description on if symbols were found for the assembly (ex: 'Symbols Loaded', 'Symbols not found', etc.
-		/// <param name="symbolFile"></param>
-		/// String represent the Logical full path to the symbol file. The exact definition is implementation defined.
-		/// <param name="order"></param>
-		/// Integer indicating the order in which the assembly was loaded.
-		/// <param name="version"></param>
-		/// String represent the version of assembly.
-		/// <param name="timestamp"></param>
-		/// String represent the time when the assembly was built in the units of UNIX timestamp formatted as a 64-bit unsigned decimal number in a string.
-		/// <param name="address"></param>
-		/// String resent the Address where the assembly was loaded as a 64-bit unsigned decimal number.
-		/// <param name="process"></param>
-		/// String represent the process name and process ID the assembly is loaded.
-		/// <param name="appdomain"></param>
-		/// String indicates the name of the AppDomain where the assembly is loaded.
-		/// <param name="processId"></param>
-		/// Long represent the process ID the assembly is loaded.
-		/// <param name="hasSymbol"></param
-		/// Bool value indicate if the assembly has symbol file. Mainly use for mono project.
-		/// <param name="isDynamic"></param>
-		/// Bool value indicate if the assembly is a dynamic. Mainly use for mono project.
 		public Assembly (string name, string path, bool optimized, bool userCode, string symbolStatus, string symbolFile, int? order, string version, string timestamp, string address, string process, string appdomain, long? processId, bool hasSymbol = false, bool isDynamic = false)
 		{
 			Name = name;
@@ -79,39 +49,85 @@
 			IsDynamic = isDynamic;
 			HasSymbols = hasSymbol;
 		}
+
 		public Assembly (string path)
 		{
 			Path = path;
 		}

+		/// <summary>
+		/// Represents the name of the assembly.
+		/// </summary>
 		public string Name { get; private set; }

+		/// <summary>
+		/// Represents the local path of the assembly is loaded from.
+		/// </summary>
 		public string Path { get; private set; }

+		/// <summary>
+		/// Shows if the assembly has been optimized, true if the assembly is optimized.
+		/// </summary>
 		public bool Optimized { get; private set; }

+		/// <summary>
+		/// Shows if the assembly is considered 'user code' by a debugger that supports 'Just My Code'.True if it's considered.
+		/// </summary>
 		public bool UserCode { get; private set; }

+		/// <summary>
+		/// Represents the Description on if symbols were found for the assembly (ex: 'Symbols Loaded', 'Symbols not found', etc.
+		/// </summary>
 		public string SymbolStatus { get; private set; }

+		/// <summary>
+		/// Represents the Logical full path to the symbol file. The exact definition is implementation defined.
+		/// </summary>
 		public string SymbolFile { get; private set; }

+		/// <summary>
+		/// Represents the order in which the assembly was loaded.
+		/// </summary>
 		public int Order { get; private set; } = -1;

+		/// <summary>
+		/// Represents the version of assembly.
+		/// </summary>
 		public string Version { get; private set; }

+		/// <summary>
+		/// Represents the time when the assembly was built in the units of UNIX timestamp formatted as a 64-bit unsigned decimal number in a string.
+		/// </summary>
 		public string TimeStamp { get; private set; }

+		/// <summary>
+		/// Represents the Address where the assembly was loaded as a 64-bit unsigned decimal number.
+		/// </summary>
 		public string Address { get; private set; }

+		/// <summary>
+		/// Represent the process name and process ID the assembly is loaded.
+		/// </summary>
 		public string Process { get; private set; }

+		/// <summary>
+		/// Represent the name of the AppDomain where the assembly is loaded.
+		/// </summary>
 		public string AppDomain { get; private set; }

+		/// <summary>
+		/// Represent the process ID the assembly is loaded.
+		/// </summary>
 		public long? ProcessId { get; private set; } = -1;

+		/// <summary>
+		/// Indicates if the assembly has symbol file. Mainly use for mono project.
+		/// </summary>
 		public bool HasSymbols { get; private set; }

+		/// <summary>
+		/// Indicate if the assembly is a dynamic. Mainly use for mono project.
+		/// </summary>
 		public bool IsDynamic { get; private set; }
 	}
 }


Better error reporting for bulk

Better error reporting for bulk

--- NElasticsearch/Commands/MultiDocumentCommands.cs
+++ NElasticsearch/Commands/MultiDocumentCommands.cs
@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.Net;
 using System.Text;
 using NElasticsearch.Helpers;
 using NElasticsearch.Models;
@@ -32,6 +33,9 @@
             // TODO
             if (response.ErrorException != null)
                 throw response.ErrorException;
+
+            if (response.StatusCode == HttpStatusCode.BadRequest)
+                throw ElasticsearchException.CreateFromResponseBody(response.Content);
         }

         // TODO Bulk UDP API


Make lazy loading of Declarations visualization. Fix.

--- Nitra.Visualizer/MainWindow.xaml.Declarations.cs
+++ Nitra.Visualizer/MainWindow.xaml.Declarations.cs
@@ -1,4 +1,5 @@
-using System.Windows.Input;
+using System.Reflection;
+using System.Windows.Input;
 using Nitra.Declarations;

 using System;
@@ -52,7 +53,7 @@
         var t      = obj.GetType();
         var props  = t.GetProperties();

-        if (props.Length > 0)
+        if (props.Any(p => !IsIgnoredProperty(p)))
           tvi.Items.Add(obj);

         return tvi;
@@ -101,17 +102,17 @@

         foreach (var prop in props)//.OrderBy(p => p.Name))
         {
-          switch (prop.Name)
+          if (IsIgnoredProperty(prop))
+            continue;
+          try
           {
-            case "File":
-            case "Span":
-            case "IsAmbiguous":
-            case "Parent": continue;
-
+            var value = prop.GetValue(declaration, null);
+            tvi.Items.Add(ObjectToItem(prop.Name, value));
           }
-
-          var value = prop.GetValue(declaration, null);
-          tvi.Items.Add(ObjectToItem(prop.Name, value));
+          catch (Exception e)
+          {
+            tvi.Items.Add(ObjectToItem(prop.Name, e.Message));
+          }
         }
         return;
       }
@@ -123,6 +124,19 @@
           tvi.Items.Add(ObjectToItem("", item));
         return;
       }
+    }
+
+    private static bool IsIgnoredProperty(PropertyInfo prop)
+    {
+      switch (prop.Name)
+      {
+        case "File":
+        case "Span":
+        case "IsAmbiguous":
+        case "Parent":
+          return true;
+      }
+      return false;
     }

     private void UpdateDeclarations(DeclarationRoot<IDeclarationPart> declarationRoot)
@@ -136,12 +150,14 @@
       //}
     }

-    private static string RenderXamlForDeclaration(string name, IDeclarationPart declatation)
-    {
+    private static string RenderXamlForDeclaration(string name, IDeclarationPart ast)
+    {
+      var declatation = ast as IDeclaration;
+      var suffix = declatation == null ? null : (": " + declatation.Name);
       return @"

 " + (string.IsNullOrWhiteSpace(name) ? null : ("" + name + ": "))
-             + declatation.ToXaml() + @"
+             + ast.ToXaml() + suffix + @"
 ";
     }


Change the QueueTime to an hour again

Change the QueueTime to an hour again

--- NoAdsHere/Services/Penalties/DeleteMessageJob.cs
+++ NoAdsHere/Services/Penalties/DeleteMessageJob.cs
@@ -25,7 +25,7 @@
                 .Build();

             var trigger = TriggerBuilder.Create()
-                .StartAt(DateTimeOffset.Now.AddSeconds(10))
+                .StartAt(DateTimeOffset.Now.AddHours(1))
                 .ForJob(job)
                 .Build();
             trigger.JobDataMap["message"] = message;


Version 0.6.7

Version 0.6.7

--- CustomRules.cs
+++ CustomRules.cs
@@ -704,7 +704,7 @@
         public static void EKFiddleVersionCheck()
         {
             // Set EKFiddle local version in 'Preferences'
-            string EKFiddleVersion = "0.6.6";
+            string EKFiddleVersion = "0.6.7";
             FiddlerApplication.Prefs.SetStringPref("fiddler.ekfiddleversion", EKFiddleVersion);
             // Update Fiddler's window title
             FiddlerApplication.UI.Text="Progress Telerik Fiddler" + " | " + "@EKFiddle v." + EKFiddleVersion;
@@ -778,7 +778,7 @@
                     // Compare both
                     if (RegexesLocalVersion != RegexesLatestVersion)
                     {   // Prompt to download latest regexes
-                        DialogResult dialogRegexesUpdate = MessageBox.Show("You are running Regexes version " + RegexesLocalVersion + ". A new version (" + RegexesLatestVersion
+                        DialogResult dialogRegexesUpdate = MessageBox.Show("You are running MasterRegexes.txt (open-source rules) version " + RegexesLocalVersion + ". A new version (" + RegexesLatestVersion
                          + ") is available!" + "\n" + "\n" + "Would you like to download it now?", "EKFiddle Regexes update", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
                         if(dialogRegexesUpdate == DialogResult.Yes)
                         {
@@ -786,7 +786,44 @@
                             regexesWebClient.DownloadFile("https://raw.githubusercontent.com/malwareinfosec/EKFiddle/master/Regexes/MasterRegexes.txt", @EKFiddleRegexesPath + "MasterRegexes.txt");
                             // Reload CustomRules
                             FiddlerObject.ReloadScript();
-                            MessageBox.Show("Regexes have been updated to version " + RegexesLatestVersion + "!!", "EKFiddle", MessageBoxButtons.OK, MessageBoxIcon.Information);
+                            // Gather information about Master regexes file
+                            var URIRegexCount = 0;
+                            var sourceCodeRegexCount = 0;
+                            var IPRegexCount = 0;
+                            var headersRegexCount = 0;
+                            // Read Master regexes file
+                            using (var reader = new System.IO.StreamReader(@EKFiddleRegexesPath + "MasterRegexes.txt"))
+                            {
+                                while (!reader.EndOfStream)
+                                {
+                                    var line = reader.ReadLine();
+                                    // Count number of URI regexes
+                                    if (line.StartsWith("URI"))
+                                    {
+                                        URIRegexCount+=1;
+                                    }
+                                    // Count number of SourceCode regexes
+                                    if (line.StartsWith("SourceCode"))
+                                    {
+                                        sourceCodeRegexCount+=1;
+                                    }
+                                    // Count number of IP regexes
+                                    if (line.StartsWith("IP"))
+                                    {
+                                        IPRegexCount+=1;
+                                    }
+                                    // Count number of Headers regexes
+                                    if (line.StartsWith("Headers"))
+                                    {
+                                        headersRegexCount+=1;
+                                    }
+                                }
+                                reader.Close();
+                            }
+                            MessageBox.Show("MasterRegexes.txt has been updated to the latest version (" + RegexesLatestVersion + ")!" +
+                            "\n" + "\n" + "Total number of regexes: " + (URIRegexCount + sourceCodeRegexCount + IPRegexCount + headersRegexCount) + "\n" +
+                            "-> URI: " + URIRegexCount + "\n" + "-> Source Code: " + sourceCodeRegexCount + "\n" + "-> IP: " + IPRegexCount + "\n" + "-> Headers: " + headersRegexCount,
+                            "EKFiddle Regexes update", MessageBoxButtons.OK, MessageBoxIcon.Information);
                             return true;
                         }
                         else
@@ -1711,7 +1748,8 @@

                         // Check against source code patterns
                         if (detectionName == "" && (arrSessions[x].oResponse.headers.ExistsAndContains("Content-Type","text/html")
-                         || arrSessions[x].oResponse.headers.ExistsAndContains("Content-Type","text/javascript")))
+                         || arrSessions[x].oResponse.headers.ExistsAndContains("Content-Type","text/javascript")
+                         || arrSessions[x].oResponse.headers.ExistsAndContains("Content-Type","application/javascript")))
                         {
                             detectionName = checkSourceCodeRegexes(sourceCodeRegexesList, sourceCode);
                         }
@@ -1805,7 +1843,7 @@
                 }

                 // Gather information about Master regex file
-                var masteRegexCount = 0;
+                var masterRegexCount = 0;
                 var fileVersion = "N/A";
                 using (var reader = new System.IO.StreamReader(@EKFiddleRegexesPath + "MasterRegexes.txt"))
                 {
@@ -1813,9 +1851,9 @@
                     {
                         var line = reader.ReadLine();
                         // Count number of regexes in master list
-                        if (line.StartsWith("Headers") || line.StartsWith("SourceCode") || line.StartsWith("URI"))
+                        if (line.StartsWith("URI") || line.StartsWith("SourceCode") || line.StartsWith("IP") || line.StartsWith("Headers"))
                         {
-                            masteRegexCount+=1;
+                            masterRegexCount+=1;
                         }
                         // Find master list version
                         if (line.StartsWith("## Last updated: "))
@@ -1823,8 +1861,9 @@
                             fileVersion = line.Replace("## Last updated: ", "");
                         }
                     }
-                }
-                // Gather information about custom regex file
+                    reader.Close();
+                }
+                // Gather information about Custom regex file
                 var customRegexCount = 0;
                 DateTime lastModified = System.IO.File.GetLastWriteTime(@EKFiddleRegexesPath + "CustomRegexes.txt");
                 using (var reader = new System.IO.StreamReader(@EKFiddleRegexesPath + "CustomRegexes.txt"))
@@ -1832,24 +1871,24 @@
                     while (!reader.EndOfStream)
                     {
                         var line = reader.ReadLine();
-                        // Count number of regexes in master list
-                        if (line.StartsWith("Headers") || line.StartsWith("SourceCode") || line.StartsWith("URI"))
+                        // Count number of regexes in custom list
+                        if (line.StartsWith("URI") || line.StartsWith("SourceCode") || line.StartsWith("IP") || line.StartsWith("Headers"))
                         {
                             customRegexCount+=1;
                         }
                     }
+                    reader.Close();
                 }
                 // Show user dialog
-                DialogResult dialogEKFiddleUninstallation = MessageBox.Show("## EKFiddle Regexes ##" + "\n" + "\n"
-                 + "MasterRegexes.txt (open-source rules)" + "\n"
-                 + " -> Number of Regexes: " + masteRegexCount + "\n"
+                DialogResult dialogEKFiddleUninstallation = MessageBox.Show("MasterRegexes.txt (open-source rules)" + "\n"
+                 + " -> Number of Regexes: " + masterRegexCount + "\n"
                  + " -> Last updated: " + fileVersion + " " + updateStatus + "\n"
                  + "\n"
                  + "CustomRegexes.txt (your own custom rules)" + "\n"
                  + " -> Number of Regexes: " + customRegexCount + "\n"
                  + " -> Last updated: " + lastModified.ToString("yyyy-MM-dd") + "\n"
                  + "\n" + "\n"
-                 + "Would you like to open them in your default text editor?", "EKFiddle", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
+                 + "Would you like to open them in your default text editor?", "EKFiddle Regexes", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

                 if(dialogEKFiddleUninstallation == DialogResult.Yes)
                 {


Extring various reload hierarchy methods to make code more readable.

--- Nodejs/Product/Nodejs/Project/NodeModulesNode.cs
+++ Nodejs/Product/Nodejs/Project/NodeModulesNode.cs
@@ -385,32 +385,43 @@
             if (null == controller)
                 return;

-            if (null != RootPackage) {
-                var dev = GetDevPackages(controller);
-                _devModulesNode.Packages = dev;
-                ReloadHierarchy(_devModulesNode, dev);
-
-                var optional = GetOptionalPackages(controller);
-                _optionalModulesNode.Packages = optional;
-                ReloadHierarchy(_optionalModulesNode, optional);
-
-                var root = GetRootPackages(controller);
-                ReloadHierarchy(this, root);
-            }
-
+            ReloadDevPackageHierarchy(controller);
+            ReloadOptionalPackageHierarchy(controller);
+            ReloadRootPackageHierarchy(controller);
+            ReloadGlobalPackageHierarchy(controller);
+
+            if (_firstHierarchyLoad) {
+                controller.FinishedRefresh += NpmController_FinishedRefresh;
+                _firstHierarchyLoad = false;
+            }
+        }
+
+        private void ReloadGlobalPackageHierarchy(INpmController controller) {
             var global = controller.GlobalPackages;
             if (null != global) {
                 _globalModulesNode.GlobalPackages = global;
                 ReloadHierarchy(_globalModulesNode, global.Modules);
             }
-
-            if (_firstHierarchyLoad) {
-                controller.FinishedRefresh += NpmController_FinishedRefresh;
-                _firstHierarchyLoad = false;
-            }
-        }
-
-#endregion
+        }
+
+        private void ReloadRootPackageHierarchy(INpmController controller) {
+            var root = GetRootPackages(controller);
+            ReloadHierarchy(this, root);
+        }
+
+        private void ReloadOptionalPackageHierarchy(INpmController controller) {
+            var optional = GetOptionalPackages(controller);
+            _optionalModulesNode.Packages = optional;
+            ReloadHierarchy(_optionalModulesNode, optional);
+        }
+
+        private void ReloadDevPackageHierarchy(INpmController controller) {
+            var dev = GetDevPackages(controller);
+            _devModulesNode.Packages = dev;
+            ReloadHierarchy(_devModulesNode, dev);
+        }
+
+        #endregion

 #region HierarchyNode implementation

@@ -689,14 +700,20 @@
         }

         private static IEnumerable<IPackage> GetDevPackages(INpmController controller) {
+            if (controller == null || controller.RootPackage == null)
+                return Enumerable.Empty<IPackage>();
             return controller.RootPackage.Modules.Where(package => package.IsDevDependency);
         }

         private static IEnumerable<IPackage> GetOptionalPackages(INpmController controller) {
+            if (controller == null || controller.RootPackage == null)
+                return Enumerable.Empty<IPackage>();
             return controller.RootPackage.Modules.Where(package => package.IsOptionalDependency);
         }

         private static IEnumerable<IPackage> GetRootPackages(INpmController controller) {
+            if (controller == null || controller.RootPackage == null)
+                return Enumerable.Empty<IPackage>();
             return controller.RootPackage.Modules.Where(package =>
                 package.IsDependency ||
                 !package.IsListedInParentPackageJson);


Update CommonAssemblyInfo

Update CommonAssemblyInfo

--- src/CommonAssemblyInfo.cs
+++ src/CommonAssemblyInfo.cs
@@ -2,9 +2,9 @@
 using System.Runtime.InteropServices;

 [assembly: AssemblyCompany("Yevgeniy Shunevych")]
-[assembly: AssemblyProduct("Atata")]
+[assembly: AssemblyProduct("Atata Framework")]
 [assembly: AssemblyCopyright("Copyright © Yevgeniy Shunevych 2016")]
 [assembly: AssemblyCulture("")]
 [assembly: ComVisible(false)]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("0.11.0")]
+[assembly: AssemblyFileVersion("0.11.0")]


Bump version

Bump version

--- src/CommonAssemblyInfo.cs
+++ src/CommonAssemblyInfo.cs
@@ -24,5 +24,5 @@

 internal static class CommonAssemblyInfo
 {
-    public const string Version = "0.0.1.0";
+    public const string Version = "0.1.0.0";
 }


version 0.4.0

version 0.4.0

--- src/CommonAssemblyInfo.cs
+++ src/CommonAssemblyInfo.cs
@@ -18,7 +18,7 @@
 [assembly: AssemblyFileVersion("0.0.0.0")]

 // NOTE (adamralph): this is used for the NuGet package version
-[assembly: AssemblyInformationalVersion("0.3.0")]
+[assembly: AssemblyInformationalVersion("0.4.0")]

 [assembly: ComVisible(false)]
 [assembly: CLSCompliant(true)]


Correction to separate allocations from clean-up when accessing secret as a string.

--- src/CryptKeeper/Secret.cs
+++ src/CryptKeeper/Secret.cs
@@ -256,8 +256,7 @@

             var bytes = new byte[this.size];
             RuntimeHelpers.PrepareConstrainedRegions();
-            try { }
-            finally
+            try { } finally
             {
                 IntPtr ptr = Marshal.SecureStringToCoTaskMemUnicode(this.secureValue);
                 Marshal.Copy(ptr, bytes, 0, this.size);
@@ -275,19 +274,25 @@
                 return string.Empty;
             }

-            var chars = new char[this.size];
-            RuntimeHelpers.PrepareConstrainedRegions();
-            try { }
-            finally
-            {
-                IntPtr ptr = Marshal.SecureStringToCoTaskMemUnicode(this.secureValue);
-                Marshal.Copy(ptr, chars, 0, this.size);
-                Marshal.ZeroFreeCoTaskMemUnicode(ptr);
-            }
-
-            var clearValue = new string(chars);
-            Array.Clear(chars, 0, chars.Length);
-            return clearValue;
+            char[] chars = null;
+            RuntimeHelpers.PrepareConstrainedRegions();
+            try
+            {
+                chars = new char[this.size];
+                RuntimeHelpers.PrepareConstrainedRegions();
+                try { } finally
+                {
+                    IntPtr ptr = Marshal.SecureStringToCoTaskMemUnicode(this.secureValue);
+                    Marshal.Copy(ptr, chars, 0, this.size);
+                    Marshal.ZeroFreeCoTaskMemUnicode(ptr);
+                }
+
+                return new string(chars);
+            }
+            finally
+            {
+                chars.ConstrainedClear();
+            }
         }

         private void ThrowIfDisposed()


Preserve EventColorToCategoryMappings when editing options

--- CalDavSynchronizer/Ui/Options/Models/EventMappingConfigurationModel.cs
+++ CalDavSynchronizer/Ui/Options/Models/EventMappingConfigurationModel.cs
@@ -55,6 +55,7 @@
     private bool _mapEventColorToCategory;
     private bool _mapCustomProperties;
     private bool _isCategoryFilterSticky;
+    private ColorCategoryMapping[] _eventColorToCategoryMappings;

     public EventMappingConfigurationModel(EventMappingConfiguration data)
     {
@@ -343,6 +344,7 @@
       _mapEventColorToCategory = mappingConfiguration.MapEventColorToCategory;
       _mapCustomProperties = mappingConfiguration.MapCustomProperties;
       _isCategoryFilterSticky = mappingConfiguration.IsCategoryFilterSticky;
+      _eventColorToCategoryMappings = mappingConfiguration.EventColorToCategoryMappings;

       if (mappingConfiguration.UserDefinedCustomPropertyMappings != null)
         Array.ForEach(mappingConfiguration.UserDefinedCustomPropertyMappings, m => Mappings.Add(new PropertyMappingModel(m)));
@@ -377,7 +379,8 @@
         MapEventColorToCategory = _mapEventColorToCategory,
         MapCustomProperties = _mapCustomProperties,
         UserDefinedCustomPropertyMappings = Mappings.Select(m => m.GetData()).ToArray(),
-        IsCategoryFilterSticky = _isCategoryFilterSticky
+        IsCategoryFilterSticky = _isCategoryFilterSticky,
+        EventColorToCategoryMappings = _eventColorToCategoryMappings
       };
     }


removes unused usingstatements

removes unused usingstatements

--- Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs
+++ Content.Server/GameObjects/Components/Chemistry/ChemMasterComponent.cs
@@ -1,12 +1,10 @@
 #nullable enable
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Threading.Tasks;
 using Content.Server.GameObjects.Components.GUI;
 using Content.Server.GameObjects.Components.Items.Storage;
 using Content.Server.GameObjects.Components.Power.ApcNetComponents;
-using Content.Server.GameObjects.EntitySystems;
 using Content.Server.Interfaces.GameObjects.Components.Items;
 using Content.Server.Utility;
 using Content.Shared.Chemistry;
@@ -26,7 +24,6 @@
 using Robust.Shared.GameObjects.Systems;
 using Robust.Shared.Interfaces.GameObjects;
 using Robust.Shared.Localization;
-using Robust.Shared.Serialization;
 using Robust.Shared.ViewVariables;

 namespace Content.Server.GameObjects.Components.Chemistry


CustomBlocks: minor fix at CompressionTunnelBase

--- CustomBlocks/DataTransfer/Compression/Private/CompressionTunnelBase.cs
+++ CustomBlocks/DataTransfer/Compression/Private/CompressionTunnelBase.cs
@@ -134,8 +134,9 @@

 		public async Task<int> WriteDataAsync(int sz, byte[] buffer, int offset = 0)
 		{
-			if(sz == 0)
-				return 0;
+			//if requested size is zero - perform null-write to uplink, so it may trigger other data-processing logic
+			if (sz == 0)
+				return await uplink.WriteDataAsync(0, writeBuffCompr, 0);
 			if(sz > writeCompr.MaxBlockSZ)
 				sz = writeCompr.MaxBlockSZ;
 			//compress data


Optimize ALiasHelperIntegrationTests

Optimize ALiasHelperIntegrationTests

--- ElasticUp/ElasticUp.Tests/Migration/Meta/AliasHelperIntegrationTest.cs
+++ ElasticUp/ElasticUp.Tests/Migration/Meta/AliasHelperIntegrationTest.cs
@@ -11,7 +11,7 @@
     public class AliasHelperIntegrationTest : AbstractIntegrationTest
     {
         public AliasHelperIntegrationTest()
-            : base(ElasticServiceStartup.StartupForEach)
+            : base(ElasticServiceStartup.OneTimeStartup)
         {
         }

@@ -42,8 +42,8 @@
         public void AddAliasOnIndices_ThrowsWhenAliasCreationFailes()
         {
             // GIVEN
-            const string indexName = "sample-index";
-            const string aliasName = "sample-alias";
+            const string indexName = "sample-index2";
+            const string aliasName = "sample-alias2";

             var sampleObjects = Enumerable
                 .Range(1, 100)
@@ -60,8 +60,8 @@
         public void RemoveAliasOnIndices_DeletesAliasFromGivenIndex()
         {
             // GIVEN
-            const string indexName = "sample-index";
-            const string aliasName = "sample-alias";
+            const string indexName = "sample-index3";
+            const string aliasName = "sample-alias3";

             var sampleObjects = Enumerable
                 .Range(1, 100)
@@ -83,7 +83,7 @@
         public void RemoveAliasOnIndices_ThrowsWhenAliasDeletionFailes()
         {
             // GIVEN
-            const string indexName = "sample-index";
+            const string indexName = "sample-index4";

             var sampleObjects = Enumerable
                 .Range(1, 100)


refactoring processors

refactoring processors

--- GridDomain.Node/Actors/CommandPipe/Processors/MessageActorProcessor.cs
+++ GridDomain.Node/Actors/CommandPipe/Processors/MessageActorProcessor.cs
@@ -7,14 +7,16 @@
     {
         protected MessageActorProcessor(IActorRef actorRef)
         {
-            ActorRef = actorRef;
+            _actorRef = actorRef;
         }
-        public IActorRef ActorRef { get; }
+
+        private readonly IActorRef _actorRef;
+        public IActorRef ActorRef => _actorRef;

         public abstract Task Process(object message, Task workInProgress = null);
         protected Task<T> AskActor<T>(object message)
         {
-            return ActorRef.Ask<T>(message);
+            return _actorRef.Ask<T>(message);
         }
     }
 }


Update version

Update version

--- JeremyAnsel.Media.An8/JeremyAnsel.Media.An8/Properties/AssemblyInfo.cs
+++ JeremyAnsel.Media.An8/JeremyAnsel.Media.An8/Properties/AssemblyInfo.cs
@@ -43,3 +43,4 @@
 // [assembly: AssemblyVersion("1.0.*")]
 [assembly: AssemblyVersion("1.0.0.0")]
 [assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyInformationalVersion("1.0.0.0")]


Minor test

Minor test

--- NuGet.Services.Dashboard.FrontEnd/Filters/EnsureTeamClaimsAttribute.cs
+++ NuGet.Services.Dashboard.FrontEnd/Filters/EnsureTeamClaimsAttribute.cs
@@ -36,7 +36,7 @@

             filterContext.Result = new ContentResult { Content = @"

-                    <title>You didn't say the magic word.</title>
+                    <title>You didn't say the magic word, " + filterContext.HttpContext.User.Identity.Name + @".</title>

401 - Unauthorized

You did not say the magic word.


from 7 sec -> 700ms

from 7 sec -> 700ms

--- tests/NLog.UnitTests/Targets/FileTargetTests.cs
+++ tests/NLog.UnitTests/Targets/FileTargetTests.cs
@@ -1610,7 +1610,7 @@
                 {
                     FileName = logFile,
                     ArchiveFileName = Path.Combine(tempPath, "archive" + slash + "{####}.txt"),
-                    ArchiveAboveSize = 1000,
+                    ArchiveAboveSize = 100,
                     LineEnding = LineEndingMode.LF,
                     ArchiveNumbering = ArchiveNumberingMode.Rolling,
                     Layout = "${message}",
@@ -1621,36 +1621,37 @@

                 // we emit 5 * 250 * (3 x aaa + \n) bytes
                 // so that we should get a full file + 4 archives
-                Generate1000BytesLog('a');
-                Generate1000BytesLog('b');
-                Generate1000BytesLog('c');
-                Generate1000BytesLog('d');
-                Generate1000BytesLog('e');
-
-                LogManager.Configuration = null;
-
+                Generate100BytesLog('a');
+                Generate100BytesLog('b');
+                Generate100BytesLog('c');
+                Generate100BytesLog('d');
+                Generate100BytesLog('e');
+
+                LogManager.Configuration = null;
+
+                var times = 25;
                 AssertFileContents(logFile,
-                    StringRepeat(250, "eee\n"),
+                    StringRepeat(times, "eee\n"),
                     Encoding.UTF8);

                 AssertFileContents(
                     Path.Combine(tempPath, "archive" + slash + "0000.txt"),
-                    StringRepeat(250, "ddd\n"),
+                    StringRepeat(times, "ddd\n"),
                     Encoding.UTF8);

                 AssertFileContents(
                     Path.Combine(tempPath, "archive" + slash + "0001.txt"),
-                    StringRepeat(250, "ccc\n"),
+                    StringRepeat(times, "ccc\n"),
                     Encoding.UTF8);

                 AssertFileContents(
                     Path.Combine(tempPath, "archive" + slash + "0002.txt"),
-                    StringRepeat(250, "bbb\n"),
+                    StringRepeat(times, "bbb\n"),
                     Encoding.UTF8);

                 AssertFileContents(
                     Path.Combine(tempPath, "archive" + slash + "0003.txt"),
-                    StringRepeat(250, "aaa\n"),
+                    StringRepeat(times, "aaa\n"),
                     Encoding.UTF8);
             }
             finally


fixed tags not being updated when editing an instrument

--- QDMSServer/ViewModels/EditInstrumentViewModel.cs
+++ QDMSServer/ViewModels/EditInstrumentViewModel.cs
@@ -70,7 +70,7 @@
                 var underlyingSymbols = client.GetUnderlyingSymbols();
                 var datasources = client.GetDatasources();

-                await Task.WhenAll(tags, sessionTemplates, exchanges, underlyingSymbols, datasources);
+                await Task.WhenAll(tags, sessionTemplates, exchanges, underlyingSymbols, datasources).ConfigureAwait(true);

                 var responses = new ApiResponse[] { tags.Result, sessionTemplates.Result, exchanges.Result, underlyingSymbols.Result, datasources.Result };
                 if (await responses.DisplayErrors(this, DialogCoordinator).ConfigureAwait(true)) return;
@@ -78,6 +78,7 @@
                 foreach (var tag in tags.Result.Result.Select(x => new CheckBoxTag(x, model.Tags.Contains(x))))
                 {
                     AllTags.Add(tag);
+                    tag.PropertyChanged += Tag_PropertyChanged;
                 }

                 Exchanges.AddRange(exchanges.Result.Result);
@@ -131,7 +132,7 @@
             , saveCanExecute);
             Save.Subscribe(async result =>
             {
-                var errors = await result.DisplayErrors(this, DialogCoordinator);
+                var errors = await result.DisplayErrors(this, DialogCoordinator).ConfigureAwait(true);
                 if (!errors)
                 {
                     AddedInstrument = result.Result;
@@ -140,6 +141,23 @@
             });

             this.Validate();
+        }
+
+        private void Tag_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
+        {
+            //fires when a tag is checked
+            var checkbox = sender as CheckBoxTag;
+            if (checkbox == null) return;
+
+            if(checkbox.IsChecked && !Model.Tags.Contains(checkbox.Item))
+            {
+                Model.Tags.Add(checkbox.Item);
+            }
+
+            if(!checkbox.IsChecked)
+            {
+                Model.Tags.Remove(checkbox.Item);
+            }
         }

         private void ClearSessions()


Fixing typo

Fixing typo

--- Core/System/Runtime/CompilerServices/DynamicAttribute.net35.cs
+++ Core/System/Runtime/CompilerServices/DynamicAttribute.net35.cs
@@ -21,7 +21,7 @@
         {
             if (transformFlags == null)
             {
-                throw new ArgumentNullException("tranformFlags");
+                throw new ArgumentNullException("transformFlags");
             }
             _transformFlags = transformFlags;
         }


Fix for Visual Studio 2008

Fix for Visual Studio 2008

Visual Studio was unable to infer the generic type arguments

--- Core/Theraot/Collections/Specialized/EnumerableFromDelegate.cs
+++ Core/Theraot/Collections/Specialized/EnumerableFromDelegate.cs
@@ -15,7 +15,8 @@

         public EnumerableFromDelegate(Func<IEnumerator> getEnumerator)
         {
-            _getEnumerator = getEnumerator.ChainConversion(ConvertEnumerator);
+            // Specify the type arguments explicitly
+            _getEnumerator = getEnumerator.ChainConversion<IEnumerator, IEnumerator<T>>(ConvertEnumerator);
         }

         public IEnumerator<T> GetEnumerator()


Fix runtime crash under IL2CPP.

Fix runtime crash under IL2CPP.

--- RenderTiming/Assets/RenderTiming/RenderTiming.cs
+++ RenderTiming/Assets/RenderTiming/RenderTiming.cs
@@ -66,6 +66,7 @@
   private CommandBuffer commandBufferEnd;
   private Coroutine loggingCoroutine;

+  [AOT.MonoPInvokeCallback(typeof(MyDelegate))]
   static void DebugCallback(string str) {
     Debug.LogWarning("RenderTimingPlugin: " + str);
   }


Add DragDropCommand

Add DragDropCommand

Add DragDropCommand

--- DevelopmentInProgress.WPFControls/FilterTree/XamlFilterTree.cs
+++ DevelopmentInProgress.WPFControls/FilterTree/XamlFilterTree.cs
@@ -18,6 +18,7 @@
         private static readonly DependencyProperty AddItemCommandProperty;
         private static readonly DependencyProperty RemoveItemCommandProperty;
         private static readonly DependencyProperty SelectItemCommandProperty;
+        private static readonly DependencyProperty DragDropCommandProperty;

         /// <summary>
         /// Static constructor for registering dependency properties.
@@ -41,6 +42,9 @@
                 typeof (XamlFilterTree));

             SelectItemCommandProperty = DependencyProperty.Register("SelectItemCommand", typeof (ICommand),
+                typeof (XamlFilterTree));
+
+            DragDropCommandProperty = DependencyProperty.Register("DragDropCommand", typeof(ICommand),
                 typeof (XamlFilterTree));
         }

@@ -98,5 +102,15 @@
             get { return (ICommand)GetValue(SelectItemCommandProperty); }
             set { SetValue(SelectItemCommandProperty, value); }
         }
+
+        /// <summary>
+        /// Gets or sets the drag drop command which is executed when an item is
+        /// dragged and dropped onto a target item in the <see cref="XamlFilterTree"/>.
+        /// </summary>
+        public ICommand DragDropCommand
+        {
+            get { return (ICommand)GetValue(DragDropCommandProperty); }
+            set { SetValue(DragDropCommandProperty, value); }
+        }
     }
 }


Updating ExtensionManager version number.

--- DotSpatial.Plugins.ExtensionManager/Properties/AssemblyInfo.cs
+++ DotSpatial.Plugins.ExtensionManager/Properties/AssemblyInfo.cs
@@ -39,4 +39,4 @@
 // [assembly: AssemblyVersion("1.0.*")]

 [assembly: AssemblyVersion("0.11.9.8")]
-[assembly: AssemblyFileVersion("1.0.1189")]+[assembly: AssemblyFileVersion("1.0.1190")]


Fix DefaultSettings.json always being overwritten when opening the SettingsForm.

--- Sandra.UI.WF.Chess/MdiContainerForm.UIActions.cs
+++ Sandra.UI.WF.Chess/MdiContainerForm.UIActions.cs
@@ -145,9 +145,12 @@
             {
                 if (openDefaultSettingsForm == null)
                 {
-                    // Before opening the possibly non-existent file, write to it.
-                    // Ignore exceptions, may be caused by insufficient access rights.
-                    Program.DefaultSettings.WriteToFile();
+                    if (!File.Exists(Program.DefaultSettings.AbsoluteFilePath))
+                    {
+                        // Before opening the possibly non-existent file, write to it.
+                        // Ignore exceptions, may be caused by insufficient access rights.
+                        Program.DefaultSettings.WriteToFile();
+                    }

                     // Rely on exception handler in call stack, so no try-catch here.
                     openDefaultSettingsForm = CreateSettingsForm(


Fix comments

Fix comments

--- SchoolOfCSharp/Generics/GenericConstrainsTest.cs
+++ SchoolOfCSharp/Generics/GenericConstrainsTest.cs
@@ -52,7 +52,7 @@
     }
 }

-internal class Disposer<TDisposer> where TDisposer : IDisposable // You can set conditions on the Generic Type in order to perform more activities with give instance at runtime
+internal class Disposer<TDisposer> where TDisposer : IDisposable // You can set conditions on the Generic Type in order to perform more activities with the given instance at runtime
 {
     public bool Dispose(TDisposer item)
     {


Test selecting object with sub-objects.

Test selecting object with sub-objects.

--- Silk.Data.SQL.ORM.Tests/FlattenEmbeddingTests.cs
+++ Silk.Data.SQL.ORM.Tests/FlattenEmbeddingTests.cs
@@ -403,6 +403,39 @@
 		}

 		[TestMethod]
+		public async Task SelectFlattenedPocoWithConventionsWithoutWhere()
+		{
+			var dataModel = _conventionModel;
+
+			foreach (var table in dataModel.Schema.Tables)
+			{
+				await table.CreateAsync(TestDb.Provider);
+			}
+
+			try
+			{
+				var modelInstance = new ObjectWithPocoSubModels
+				{
+					ModelA = new SubModelA { Data = "Hello World" },
+					ModelB1 = new SubModelB { Data = 5 },
+					ModelB2 = new SubModelB { Data = 10 }
+				};
+				await dataModel.Insert(modelInstance)
+					.ExecuteAsync(TestDb.Provider);
+
+				var selectResults = await dataModel.Select()
+					.ExecuteAsync(TestDb.Provider);
+			}
+			finally
+			{
+				foreach (var table in dataModel.Schema.Tables)
+				{
+					await table.DropAsync(TestDb.Provider);
+				}
+			}
+		}
+
+		[TestMethod]
 		public void FlattenPocoInDataModelWithViewModel()
 		{
 			var dataModel = _viewModelModel;


Fixing auto-complete issue with drawings.

--- Source/CsDebugScript.Scripting/ScriptCompiler.cs
+++ Source/CsDebugScript.Scripting/ScriptCompiler.cs
@@ -60,6 +60,7 @@

             assemblyReferences.Add(typeof(System.Object).Assembly.Location);
             assemblyReferences.Add(typeof(System.Linq.Enumerable).Assembly.Location);
+            assemblyReferences.Add(typeof(CsDebugScript.Drawing.Interfaces.IGraphics).Assembly.Location);
             assemblyReferences.Add(typeof(CsDebugScript.Variable).Assembly.Location);
             assemblyReferences.Add(typeof(CsDebugScript.InteractiveScriptBase).Assembly.Location);


Added documentation for PackageInstaller

--- Source/OpenIIoT.Core/Package/PackageInstaller.cs
+++ Source/OpenIIoT.Core/Package/PackageInstaller.cs
@@ -1,16 +1,58 @@
-using System;
-using System.Collections.Generic;
+/*
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀  ▀  ▀      ▀▀
+      █
+      █      ▄███████▄                                                               ▄█
+      █     ███    ███                                                              ███
+      █     ███    ███   ▄█████   ▄██████    █  █▄     ▄█████     ▄████▄     ▄█████ ███▌ ██▄▄▄▄    ▄█████     ██      ▄█████   █        █          ▄█████    █████
+      █     ███    ███   ██   ██ ██    ██   ██ ▄██▀    ██   ██   ██    ▀    ██   █  ███▌ ██▀▀▀█▄   ██  ▀  ▀███████▄   ██   ██ ██       ██         ██   █    ██  ██
+      █   ▀█████████▀    ██   ██ ██    ▀    ██▐█▀      ██   ██  ▄██        ▄██▄▄    ███▌ ██   ██   ██         ██  ▀   ██   ██ ██       ██        ▄██▄▄     ▄██▄▄█▀
+      █     ███        ▀████████ ██    ▄  ▀▀████     ▀████████ ▀▀██ ███▄  ▀▀██▀▀    ███  ██   ██ ▀███████     ██    ▀████████ ██       ██       ▀▀██▀▀    ▀███████
+      █     ███          ██   ██ ██    ██   ██ ▀██▄    ██   ██   ██    ██   ██   █  ███  ██   ██    ▄  ██     ██      ██   ██ ██▌    ▄ ██▌    ▄   ██   █    ██  ██
+      █    ▄████▀        ██   █▀ ██████▀    ▀█   ▀█▀   ██   █▀   ██████▀    ███████ █▀    █   █   ▄████▀     ▄██▀     ██   █▀ ████▄▄██ ████▄▄██   ███████   ██  ██
+      █
+ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄▄  ▄▄ ▄▄   ▄▄▄▄ ▄▄     ▄▄     ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄
+ █████████████████████████████████████████████████████████████ ███████████████ ██  ██ ██   ████ ██     ██     ████████████████ █ █
+      ▄
+      █  Installs Package files.
+      █
+      █▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀     ▀▀               ▀
+      █  The GNU Affero General Public License (GNU AGPL)
+      █
+      █  Copyright (C) 2016-2017 JP Dillingham (jp@dillingham.ws)
+      █
+      █  This program is free software: you can redistribute it and/or modify
+      █  it under the terms of the GNU Affero General Public License as published by
+      █  the Free Software Foundation, either version 3 of the License, or
+      █  (at your option) any later version.
+      █
+      █  This program is distributed in the hope that it will be useful,
+      █  but WITHOUT ANY WARRANTY; without even the implied warranty of
+      █  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+      █  GNU Affero General Public License for more details.
+      █
+      █  You should have received a copy of the GNU Affero General Public License
+      █  along with this program.  If not, see <http://www.gnu.org/licenses/>.
+      █
+      ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀  ▀▀ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀██
+                                                                                ██
+                                                                                ▀█▄ ██ ▄█▀
+                                                                                ▀████▀
+                                                                                ▀▀                            */
+
+using System;
 using System.IO;
 using NLog;
 using NLog.xLogger;
 using OpenIIoT.SDK.Package;
-using OpenIIoT.SDK.Packaging.Manifest;
 using OpenIIoT.SDK.Packaging.Operations;
+using OpenIIoT.SDK.Platform;
 using Utility.OperationResult;
-using OpenIIoT.SDK.Platform;

 namespace OpenIIoT.Core.Package
 {
+    /// <summary>
+    ///     Installs <see cref="Package"/> files.
+    /// </summary>
     public class PackageInstaller
     {
         #region Private Fields
@@ -24,6 +66,10 @@

         #region Public Constructors

+        /// <summary>
+        ///     Initializes a new instance of the <see cref="PackageInstaller"/> class.
+        /// </summary>
+        /// <param name="platform">The IPlatform instance with which to carry out the installation.</param>
         public PackageInstaller(IPlatform platform)
         {
             Platform = platform;
@@ -33,13 +79,34 @@

         #region Public Properties

+        /// <summary>
+        ///     Gets or sets the IPlatform instance with which to carry out the installation.
+        /// </summary>
         private IPlatform Platform { get; set; }

         #endregion Public Properties

         #region Public Methods

-        public IResult InstallPackage(IPackage package, PackageInstallOptions options, string publicKey = "")
+        /// <summary>
+        ///     Installs the specified <see cref="IPackage"/> with the specified <see cref="PackageInstallOptions"/>.
+        /// </summary>
+        /// <param name="package">The Package to install.</param>
+        /// <param name="options">The installation options with which the Package is to be installed.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        public IResult InstallPackage(IPackage package, PackageInstallOptions options)
+        {
+            return InstallPackage(package, options, string.Empty);
+        }
+
+        /// <summary>
+        ///     Installs the specified <see cref="IPackage"/> with the specified <see cref="PackageInstallOptions"/>.
+        /// </summary>
+        /// <param name="package">The Package to install.</param>
+        /// <param name="options">The installation options with which the Package is to be installed.</param>
+        /// <param name="publicKey">The PGP Public Key to use when verifying the Package prior to installation.</param>
+        /// <returns>A Result containing the result of the operation.</returns>
+        public IResult InstallPackage(IPackage package, PackageInstallOptions options, string publicKey)
         {
             logger.EnterMethod(xLogger.Params(package, options, publicKey));
             IResult retVal = new Result();


:bug: Dispose

:bug: Dispose

--- Source/Orion.UWP/ViewModels/MainPageViewModel.cs
+++ Source/Orion.UWP/ViewModels/MainPageViewModel.cs
@@ -40,7 +40,7 @@
             SelectedMiddleItem = new ReactiveProperty<HamburgerMenuItem>();
             SelectedOptions = new ReactiveProperty<HamburgerMenuItem>();
             SelectedMiddleItem.Merge(SelectedOptions).Where(w => w != null).Subscribe(w => _dialogService.ShowDialogAsync(w.TargetPageType)).AddTo(this);
-            Timelines = _timelineService.Timelines.ToReadOnlyReactiveCollection(w => new TimelineViewModel(globalNotifier, w));
+            Timelines = _timelineService.Timelines.ToReadOnlyReactiveCollection(w => new TimelineViewModel(globalNotifier, w)).AddTo(this);
         }

         public override async void OnNavigatedTo(NavigatedToEventArgs e, Dictionary<string, object> viewModelState)


added test

added test

--- HackerRank.Tests/InsertionSortPart2/InsertionSortPart2Tests.cs
+++ HackerRank.Tests/InsertionSortPart2/InsertionSortPart2Tests.cs
@@ -59,5 +59,16 @@
 			//assert
 			CollectionAssert.AreEqual(new[] { 1, 2, 4, 5, 7, 12, 13, 15, 23, 42, 51, 191 }, sortedList);
 		}
+
+		[Test]
+		public void ShouldSortAnUnorderedListWithLastElementSmallest()
+		{
+			//arrange
+			var unorderedList = new[] { 191, 51, 12, 15, 2, 13, 5, 4, 23, 42, 7, 1 };
+			//act
+			var sortedList = Solution2.TestableInsertionSort(unorderedList);
+			//assert
+			CollectionAssert.AreEqual(new[] { 1, 2, 4, 5, 7, 12, 13, 15, 23, 42, 51, 191 }, sortedList);
+		}
 	}
 }


Auto page switch disabled -> closing the caption dialog does not change the play/pause button Auto page switch enabled -> closing the caption dialog and audio playing is finished will switch to the next page, if audio is not finished it will not switch Remark: "isAudioPlaying" and "isAudioPlayingFinished" can both be false (if playing is just paused)

--- HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
+++ HiPMobile/HiPMobile.Droid/Activities/ExhibitDetailsActivity.cs
@@ -574,7 +574,8 @@
                 closeBtn.Click += (sender, args) => {
                     isCaptionShown = false;
                     dialog.Dismiss ();
-                    ReactToAudioCompletion(sender, args);
+                    if(isAudioPlayingFinished)
+                        SwitchToNextPageBasedOnSetting();
                 };

             dialog.Show ();
@@ -642,6 +643,11 @@
         ///     Indicates whether audio is currently played (true) or not (false)
         /// </summary>
         private bool isAudioPlaying;
+
+        /// <summary>
+        ///     Indicates whether audio playing is finished
+        /// </summary>
+        private bool isAudioPlayingFinished;

         /// <summary>
         ///     Indicates whether the audio toolbar is currently displayed (true) or not (false)
@@ -769,9 +775,16 @@
         public void ReactToAudioCompletion(object sender, EventArgs args)
         {
             isAudioPlaying = false;
+            isAudioPlayingFinished = true;
             UpdatePlayPauseButtonIcon();
-            if (sharedPreferences.GetBoolean (Resources.GetString (Resource.String.pref_auto_page_switch_key), false) && !isCaptionShown)
-                DisplayNextExhibitPage ();
+            if(!isCaptionShown)
+                SwitchToNextPageBasedOnSetting();
+        }
+
+        private void SwitchToNextPageBasedOnSetting ()
+        {
+            if (sharedPreferences.GetBoolean(Resources.GetString(Resource.String.pref_auto_page_switch_key), false))
+                DisplayNextExhibitPage();
         }

         private void UpdateProgressbar ()
@@ -822,6 +835,7 @@
             {
             }
             isAudioPlaying = false;
+            isAudioPlayingFinished = false;
         }

         #endregion