PHPDoc improvements
- colon, semicolon and parenthesis after tag name handled
- @license tag
- @private tag -> @access private

git-tfs-id: [http://falcon:8080/tfs/Projects]$/Phalanger/Main;C5680

--- Source/Core.Parsers/PHPDocBlock.cs
+++ Source/Core.Parsers/PHPDocBlock.cs
@@ -173,7 +173,8 @@
                 Debug.Assert(line[0] == PHPDocTagChar);

                 int endIndex = 1;
-                while (endIndex < line.Length && !char.IsWhiteSpace(line[endIndex]))
+                char c;
+                while (endIndex < line.Length && !char.IsWhiteSpace(c = line[endIndex]) && c != ':' && c != '(' && c != ';')
                     endIndex++;

                 string tagName = (endIndex < line.Length) ? line.Remove(endIndex) : line;
@@ -432,7 +433,8 @@
         /// </summary>
         public sealed class AccessTag : Element
         {
-            public const string Name = "@access";
+            public const string Name1 = "@access";
+            public const string Name2 = "@private";

             private const string IsPublic = "public";
             private const string IsPrivate = "private";
@@ -459,17 +461,36 @@

             public AccessTag(string/*!*/line)
             {
-                if (line.Length > Name.Length)
-                    // public, private or protected
-                    switch (line.Substring(Name.Length + 1).Trim().ToLowerInvariant())
+                if (line.StartsWith(Name1))
+                {
+                    if (line.Length > Name1.Length)
                     {
-                        case IsPublic: attributes = PhpMemberAttributes.Public; break;
-                        case IsPrivate: attributes = PhpMemberAttributes.Private; break;
-                        case IsProtected: attributes = PhpMemberAttributes.Protected; break;
-                        default:
-                            System.Diagnostics.Debug.WriteLine("Unexpected access modifier in PHPDoc @access tag, line:" + line);
-                            break;
+                        var access = line.Substring(Name1.Length + 1).Trim().ToLowerInvariant();
+
+                        // public, private or protected
+                        switch (access)
+                        {
+                            case IsPublic: attributes = PhpMemberAttributes.Public; break;
+                            case IsPrivate: attributes = PhpMemberAttributes.Private; break;
+                            case IsProtected: attributes = PhpMemberAttributes.Protected; break;
+                            default:
+                                Debug.WriteLine("Unexpected access modifier in PHPDoc @access tag, line:" + line);
+                                break;
+                        }
                     }
+                    else
+                    {
+                        attributes = PhpMemberAttributes.Public;
+                    }
+                }
+                else if (line.StartsWith(Name2))
+                {
+                    attributes = PhpMemberAttributes.Private;
+                }
+                else
+                {
+                    Debug.Fail("Unexpected " + line);
+                }
             }

             internal override void ParseLine(string line, out Element next)
@@ -480,7 +501,7 @@

             public override string ToString()
             {
-                return Name + " " + AccessString;
+                return Name1 + " " + AccessString;
             }
         }

@@ -920,7 +941,19 @@
             public TextTag(string/*!*/tagName, string/*!*/line)
             {
                 Debug.Assert(line.StartsWith(tagName));
-                this.Text = line.Substring(tagName.Length).TrimStart(null);
+                int index = tagName.Length;
+
+                if (index < line.Length)
+                {
+                    var c = line[index];
+                    if (c == ':' || c == '(' || c == ';') index++;
+                }
+
+                // trim leading whitespaces
+                while (index < line.Length && char.IsWhiteSpace(line[index]))
+                    index++;
+
+                this.Text = (index < line.Length) ? line.Substring(index) : string.Empty;
             }

             internal override void  ParseLine(string line, out Element next)
@@ -1221,6 +1254,24 @@
             public const string Name = "@link";

             public LinkTag(string/*!*/line)
+                : base(Name, line)
+            {
+            }
+
+            public override string ToString()
+            {
+                return Name + " " + Text;
+            }
+        }
+
+        /// <summary>
+        /// Documents a license information.
+        /// </summary>
+        public sealed class LicenseTag : TextTag
+        {
+            public const string Name = "@license";
+
+            public LicenseTag(string/*!*/line)
                 : base(Name, line)
             {
             }


Fixed formatting.

Fixed formatting.

--- Source/Linq/Builder/JoinBuilder.cs
+++ Source/Linq/Builder/JoinBuilder.cs
@@ -121,7 +121,7 @@

 				var inner = (GroupJoinSubQueryContext)innerContext;

-				inner.Join       = join.JoinedTable;
+				inner.Join          = join.JoinedTable;
 				inner.CounterSelect = counterSql;
 				return new GroupJoinContext(
 					buildInfo.Parent, selector, context, inner, methodCall.Arguments[1], outerKeyLambda, innerKeyLambda);


- Fixed strange bug in LinkedList

- Fixed strange bug in LinkedList

--- Source/Mosa.ClassLib/LinkedList.cs
+++ Source/Mosa.ClassLib/LinkedList.cs
@@ -7,6 +7,7 @@
  *  Phil Garcia (tgiphil) <phil@thinkedge.com>
  */

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

 namespace Mosa.ClassLib
@@ -424,8 +425,9 @@
 		/// </returns>
 		IEnumerator<T> IEnumerable<T>.GetEnumerator()
 		{
+			return new Enumerator(this);/*
 			for (LinkedListNode<T> cur = first; cur != null; cur = cur.next)
-				yield return cur.value;
+				yield return cur.value;*/
 		}

 		/// <summary>
@@ -436,10 +438,79 @@
 		/// </returns>
 		System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
 		{
+			return new Enumerator(this);/*
 			for (LinkedListNode<T> cur = first; cur != null; cur = cur.next)
-				yield return cur.value;
-		}
-
-
+				yield return cur.value;*/
+		}
+
+		public struct Enumerator : IEnumerator<T>, IEnumerator
+		{
+			const string VersionKey = "version";
+			const string IndexKey = "index";
+			const string ListKey = "list";
+
+			LinkedList<T> list;
+			LinkedListNode<T> current;
+			int index;
+
+			internal Enumerator(LinkedList<T> parent)
+			{
+				this.list = parent;
+				current = null;
+				index = -1;
+			}
+
+			public T Current
+			{
+				get
+				{
+					return current.value;
+				}
+			}
+
+			object IEnumerator.Current
+			{
+				get { return null; }
+			}
+
+			public bool MoveNext()
+			{
+				if (list == null)
+					return false;
+
+				if (current == null)
+					current = list.first;
+				else
+				{
+					current = current.next;
+					if (current == list.first)
+						current = null;
+				}
+				if (current == null)
+				{
+					index = -1;
+					return false;
+				}
+				++index;
+				return true;
+			}
+
+			void IEnumerator.Reset()
+			{
+				if (list == null)
+					return;
+
+				current = null;
+				index = -1;
+			}
+
+			public void Dispose()
+			{
+				if (list == null)
+					return;
+				current = null;
+				list = null;
+			}
+		}
 	}
 }


Fix typo.

Fix typo.

--- NtApiDotNet/Win32/Win32Process.cs
+++ NtApiDotNet/Win32/Win32Process.cs
@@ -713,7 +713,7 @@
         /// </summary>
         public string BnoIsolationPrefix { get; set; }
         /// <summary>
-        /// Specify the same open prompt original claim.
+        /// Specify the safe open prompt original claim.
         /// </summary>
         public byte[] SafeOpenPromptOriginClaim { get; set; }


Fix typo in condition

Fix typo in condition

--- Stratis.Bitcoin/Miner/PowMining.cs
+++ Stratis.Bitcoin/Miner/PowMining.cs
@@ -167,7 +167,7 @@
 					// ensure the block is written to disk
 					ulong retry = 0;
 					while (++retry < maxTries &&
-                           nHeight != nHeight &&
+                           nHeight == nHeightEnd && // last block
 					       !this.blockRepository.ExistAsync(blockResult.ChainedBlock.HashBlock).GetAwaiter().GetResult())
 						Thread.Sleep(100);


Remove unneeded constants.

Remove unneeded constants.

--- PSql.Core/NewSqlContextCommand.cs
+++ PSql.Core/NewSqlContextCommand.cs
@@ -8,10 +8,8 @@
     public class NewSqlContextCommand : Cmdlet
     {
         private const string
-            GenericName        = "Generic",
-            AzureName          = "Azure",
-            LocalServerName    = ".",
-            MasterDatabaseName = "master";
+            GenericName = "Generic",
+            AzureName   = "Azure";

         // -Azure
         [Alias("a")]


Linq用の拡張メソッド群にエディタ非表示属性を付与

Linq用の拡張メソッド群にエディタ非表示属性を付与

--- ParsecSharp/Parser/Parser.Linq.cs
+++ ParsecSharp/Parser/Parser.Linq.cs
@@ -1,15 +1,19 @@
 using System;
+using System.ComponentModel;

 namespace Parsec
 {
     public static partial class Parser
     {
+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static Parser<TToken, TResult> Select<TToken, T, TResult>(this Parser<TToken, T> parser, Func<T, TResult> selector)
             => parser.FMap(selector);

+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static Parser<TToken, TResult> SelectMany<TToken, T, TTemp, TResult>(this Parser<TToken, T> parser, Func<T, Parser<TToken, TTemp>> selector, Func<T, TTemp, TResult> resultSelector)
             => parser.Bind(x => selector(x).FMap(y => resultSelector(x, y)));

+        [EditorBrowsable(EditorBrowsableState.Never)]
         public static Parser<TToken, T> Where<TToken, T>(this Parser<TToken, T> parser, Func<T, bool> predicate)
             => parser.Guard(predicate);
     }


Add preliminary support for paste.

Add preliminary support for paste.

--- Pinta.Core/Actions/EditActions.cs
+++ Pinta.Core/Actions/EditActions.cs
@@ -71,8 +71,6 @@
 			Redo.Sensitive = false;
 			Cut.Sensitive = false;
 			Copy.Sensitive = false;
-			Paste.Sensitive = false;
-			PasteIntoNewLayer.Sensitive = false;
 			PasteIntoNewImage.Sensitive = false;
 			InvertSelection.Sensitive = false;
 		}
@@ -104,6 +102,9 @@
 			EraseSelection.Activated += HandlePintaCoreActionsEditEraseSelectionActivated;
 			SelectAll.Activated += HandlePintaCoreActionsEditSelectAllActivated;
 			FillSelection.Activated += HandlePintaCoreActionsEditFillSelectionActivated;
+			PasteIntoNewLayer.Activated += HandlerPintaCoreActionsEditPasteIntoNewLayerActivated;
+			Paste.Activated += HandlerPintaCoreActionsEditPasteActivated;
+			Copy.Activated += HandlerPintaCoreActionsEditCopyActivated;
 		}
 		#endregion

@@ -144,6 +145,53 @@

 			PintaCore.Chrome.DrawingArea.GdkWindow.Invalidate ();
 		}
+
+		private void HandlerPintaCoreActionsEditPasteIntoNewLayerActivated (object sender, EventArgs e)
+		{
+			Gtk.Clipboard cb = Gtk.Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
+			Gdk.Pixbuf image = cb.WaitForImage ();
+
+			if (image == null)
+				return;
+
+			Layer l = PintaCore.Layers.AddNewLayer (string.Empty);
+
+			using (Cairo.Context g = new Cairo.Context (l.Surface))
+				g.DrawPixbuf (image, new Cairo.Point (0, 0));
+
+			PintaCore.Chrome.DrawingArea.GdkWindow.Invalidate ();
+		}
+
+		private void HandlerPintaCoreActionsEditPasteActivated (object sender, EventArgs e)
+		{
+			Gtk.Clipboard cb = Gtk.Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
+			Gdk.Pixbuf image = cb.WaitForImage ();
+
+			if (image == null)
+				return;
+
+			using (Cairo.Context g = new Cairo.Context (PintaCore.Layers.CurrentLayer.Surface))
+				g.DrawPixbuf (image, new Cairo.Point (0, 0));
+
+			PintaCore.Chrome.DrawingArea.GdkWindow.Invalidate ();
+		}
+
+		private void HandlerPintaCoreActionsEditCopyActivated (object sender, EventArgs e)
+		{
+			//Cairo.ImageSurface surf = PintaCore.Layers.GetFlattenedImage ();
+
+			//Gtk.Clipboard cb = Gtk.Clipboard.Get (Gdk.Atom.Intern ("CLIPBOARD", false));
+			//cb.Image = surf.ToPixbuf ();
+
+
+			//if (image == null)
+			//        return;
+
+			//using (Cairo.Context g = new Cairo.Context (PintaCore.Layers.CurrentLayer.Surface))
+			//        g.DrawPixbuf (image, new Cairo.Point (0, 0));
+
+			//PintaCore.Chrome.DrawingArea.GdkWindow.Invalidate ();
+		}
 		#endregion
 	}
 }


[Fixes bug #797140] Add more zoom options between 100% and 200%. (Also removed hard-coded index of the 100% zoom level)

--- Pinta.Core/Actions/ViewActions.cs
+++ Pinta.Core/Actions/ViewActions.cs
@@ -73,8 +73,8 @@
 			Centimeters = new Gtk.RadioAction ("Centimeters", Catalog.GetString ("Centimeters"), null, null, 2);
 			Fullscreen = new Gtk.Action ("Fullscreen", Catalog.GetString ("Fullscreen"), null, Stock.Fullscreen);

-			ZoomCollection = new string[] { "3600%", "2400%", "1600%", "1200%", "800%", "700%", "600%", "500%", "400%", "300%", "200%", "100%", "66%", "50%", "33%", "25%", "16%", "12%", "8%", "5%", "Window" };
-			ZoomComboBox = new ToolBarComboBox (75, 11, true, ZoomCollection);
+			ZoomCollection = new string[] { "3600%", "2400%", "1600%", "1200%", "800%", "700%", "600%", "500%", "400%", "300%", "200%", "175%", "150%", "125%", "100%", "66%", "50%", "33%", "25%", "16%", "12%", "8%", "5%", "Window" };
+			ZoomComboBox = new ToolBarComboBox (75, DefaultZoomIndex(), true, ZoomCollection);

 			// Make sure these are the same group so only one will be selected at a time
 			Inches.Group = Pixels.Group;
@@ -212,7 +212,7 @@
 		#region Action Handlers
 		private void HandlePintaCoreActionsViewActualSizeActivated (object sender, EventArgs e)
 		{
-			PintaCore.Actions.View.ZoomComboBox.ComboBox.Active = 11;
+			PintaCore.Actions.View.ZoomComboBox.ComboBox.Active = DefaultZoomIndex();
 		}

 		private void HandlePintaCoreActionsViewZoomComboBoxComboBoxChanged (object sender, EventArgs e)
@@ -233,5 +233,13 @@
 			PintaCore.Workspace.ActiveDocument.Workspace.ZoomIn ();
 		}
 		#endregion
+
+		/// <summary>
+		/// Returns the index in the ZoomCollection of the default zoom level
+		/// </summary>
+		private int DefaultZoomIndex()
+		{
+			return Array.IndexOf(ZoomCollection, "100%");
+		}
 	}
 }


#45 Some podcasts don't show as downloaded

--- Podcasts.Common/Models/Podcast.cs
+++ Podcasts.Common/Models/Podcast.cs
@@ -257,7 +257,10 @@
                     foreach (var file in files)
                     {
                         var fileName = file.Name;
-                        var episode = Episodes.FirstOrDefault(e => e.LocalFilename.ContainsIgnoreCase(fileName));
+                        // #45 File name could have been truncated while previously saved. i.e. Filename123.mp3 could be saved as Filename12.mp3)
+                        // The extension prevent from matching files in the collection so remove it
+                        var fileNameWithoutExtension = Path.GetFileNameWithoutExtension(fileName);
+                        var episode = Episodes.FirstOrDefault(e => e.LocalFilename.ContainsIgnoreCase(fileNameWithoutExtension));

                         if (episode != null)
                         {


Revert "Added copyFromCurrentPos param to Packet.CopyFrom()"

This reverts commit 156aec5c785420a2371d990d0d82be2ff9856457.

--- Packet.cs
+++ Packet.cs
@@ -107,21 +107,17 @@
         }

         /// <summary>
-        /// Copies the bytes from <paramref name="otherPacket"/> supplied into this packet,
-        /// PeerId, sent from and ElapsedMillisecondsSinceSent.
+        /// Copies the bytes written from <see cref="Packet"/> supplied to this packet along with
+        /// PeerId sent from and ElapsedMillisecondsSinceSent.
         /// </summary>
         /// <param name="otherPacket"><see cref="Packet"/> to copy from.</param>
         /// <param name="reset">If true resets current pos and makes read-only.</param>
-        /// <param name="copyFromCurrentPos">If true only start copying from the current pos, otherwise copy entire packet.</param>
-        public void CopyFrom(Packet otherPacket, bool copyFromCurrentPos, bool reset)
+        public void CopyFrom(Packet otherPacket, bool reset)
         {
             if (otherPacket.count != this.count)
                 throw new InvalidOperationException("packets are different sizes");

-            int srcIndex = copyFromCurrentPos ? otherPacket.pos : otherPacket.offset;
-            int count = copyFromCurrentPos ? this.count - this.pos : this.count;
-
-            Buffer.BlockCopy(otherPacket.backingBuffer, srcIndex, this.backingBuffer, this.offset, count);
+            Buffer.BlockCopy(otherPacket.backingBuffer, otherPacket.offset, this.backingBuffer, this.offset, otherPacket.BytesWritten);
             this.BytesWritten = otherPacket.BytesWritten;
             this.DatagramSeq = otherPacket.DatagramSeq;
             this.PeerId = otherPacket.PeerId;


Fixes linter errors

Fixes linter errors

--- vision/api/VisionTest/ProductSearchTest.cs
+++ vision/api/VisionTest/ProductSearchTest.cs
@@ -62,7 +62,7 @@

             output = _productSearch.Run("get_product", _projectId, REGION_NAME, INDEXED_PRODUCT_1);
             if (!output.Stdout.Contains("style") || !output.Stdout.Contains("womens"))
-            {
+            {
                 _productSearch.Run("update_product_labels", _projectId, REGION_NAME, INDEXED_PRODUCT_1, "style,womens");
             }
         }


Fix typo.

Fix typo.

--- osu.Desktop.Deploy/Program.cs
+++ osu.Desktop.Deploy/Program.cs
@@ -262,7 +262,7 @@

             if (!File.Exists(Path.Combine(ReleasesFolder, nupkgDistroFilename(lastRelease.Name))))
             {
-                write("Last verion's package not found locally.", ConsoleColor.Red);
+                write("Last version's package not found locally.", ConsoleColor.Red);
                 requireDownload = true;
             }
             else


Bugfix

Bugfix

--- 7DTDManager/7DTDManager/Commands/cmdList.cs
+++ 7DTDManager/7DTDManager/Commands/cmdList.cs
@@ -41,6 +41,7 @@
                     p.Error(CommandUsage);
                     return false;
                 }
+                startitem--;
             }
             p.Message(String.Format("{0,3} {1,-15} {2,5} {3,5}", "#", "name", "price", "stock").Replace(" ","_"));


Update ReactVideoView.cs

Update ReactVideoView.cs

Fix 'Event' does not contain a constructor that takes 2 arguments ReactNativeVideo

--- windows/ReactNativeVideo.Net46/ReactVideoView.cs
+++ windows/ReactNativeVideo.Net46/ReactVideoView.cs
@@ -328,7 +328,7 @@
             private readonly JObject _eventData;

             public ReactVideoEvent(string eventName, int viewTag, JObject eventData)
-                : base(viewTag, TimeSpan.FromTicks(Environment.TickCount))
+                : base(viewTag)
             {
                 _eventName = eventName;
                 _eventData = eventData;


update

update

--- Assets/Editor/MyEditor.cs
+++ Assets/Editor/MyEditor.cs
@@ -21,38 +21,47 @@
 	[MenuItem("Custom Editor/BuildAssetBundle - Windows")]
 	static void BuildAssetBundle_windows()
 	{
-		BuildAllPrefabToAssetBundles(BuildTarget.StandaloneWindows);
+		BuildPrefabsToAssetBundles(BuildTarget.StandaloneWindows);
 	}

 	[MenuItem("Custom Editor/BuildAssetBundle - Android")]
 	static void BuildAssetBundle_Android()
 	{
-		BuildAllPrefabToAssetBundles(BuildTarget.Android);
+		BuildPrefabsToAssetBundles(BuildTarget.Android);
 	}

 	[MenuItem("Custom Editor/BuildAssetBundle - iPhone")]
 	static void BuildAssetBundle_iPhone()
 	{
-		BuildAllPrefabToAssetBundles(BuildTarget.iPhone);
+		BuildPrefabsToAssetBundles(BuildTarget.iPhone);
 	}

-	static void BuildAllPrefabToAssetBundles(BuildTarget buildTarget)
-	{
-		BuildPipeline.PushAssetDependencies();
-
-		string prefabPatten = "*.prefab";
-
-		BuildFiles(GetFiles("Assets/Resources/Prefabs/Atlas/Fanstasy", prefabPatten), true, buildTarget);  // Altas
-		BuildFiles(GetFiles("Assets/Resources/Prefabs/Atlas/Wooden", prefabPatten), true, buildTarget);
-
-		BuildFiles(GetFiles("Assets/Resources/Prefabs/", prefabPatten), false, buildTarget);
-
-		BuildPipeline.PopAssetDependencies();
-
-		BuildFiles(GetFiles("Assets/Resources"), false, buildTarget);
-
+	static void BuildPrefabsToAssetBundles(BuildTarget buildTarget)
+	{
+		Object[] SelectedAssets = Selection.GetFiltered(typeof(Object), SelectionMode.DeepAssets);
+		if (SelectedAssets.Length > 0 ){
+			BuildPipeline.PushAssetDependencies();
+			foreach(Object obj in SelectedAssets ){
+				string targetPath = AssetBundleDir + obj.name + AssetBundleExt;
+				BuildAssetBundler(obj, null, targetPath, buildTarget);
+			}
+			BuildPipeline.PopAssetDependencies();
+		}else{
+			BuildPipeline.PushAssetDependencies();
+
+			string prefabPatten = "*.prefab";
+
+			BuildFiles(GetFiles("Assets/Resources/Prefabs/Atlas/Fanstasy", prefabPatten), true, buildTarget);  // Altas
+			BuildFiles(GetFiles("Assets/Resources/Prefabs/Atlas/Wooden", prefabPatten), true, buildTarget);
+
+			BuildFiles(GetFiles("Assets/Resources/Prefabs/", prefabPatten), false, buildTarget);
+
+			BuildPipeline.PopAssetDependencies();
+
+			BuildFiles(GetFiles("Assets/Resources"), false, buildTarget);
+		}
 		AssetDatabase.Refresh();
-
+
 		//更新版本号
 		//BuildAssetBundleVersion();
 	}


Added some new fields.

Added some new fields.

--- Assets/Plugins/OuyaSDK.cs
+++ Assets/Plugins/OuyaSDK.cs
@@ -597,8 +597,10 @@
     {
         public string identifier = string.Empty;
         public string name = string.Empty;
+        public int localPrice = 0;
         public int priceInCents = 0;
         public string currencyCode = string.Empty;
+        public int productVersionToBundle = 0;

         public string getIdentifier()
         {


Edit namespace

Edit namespace

--- Pulsar/Content/ContentResolver.cs
+++ Pulsar/Content/ContentResolver.cs
@@ -23,9 +23,7 @@
  * THE SOFTWARE.
  */

-using System;
-
-namespace Pulsar
+namespace Pulsar.Content
 {
 /// <summary>
 	/// Resolve a content type


Build Fix

Build Fix

--- Tests/Classes/ComposerUnitTests.cs
+++ Tests/Classes/ComposerUnitTests.cs
@@ -104,7 +104,7 @@
             }).WaitOne();
         }

-        public class TestCustomBatch : SpriteBatch
+        public class TestCustomBatch : VertexDataSpriteBatch
         {
             public override unsafe void Process(RenderComposer c)
             {


Code prettyfying.

Code prettyfying.

--- Tests/RevWalk/RevWalkFilterTest.cs
+++ Tests/RevWalk/RevWalkFilterTest.cs
@@ -45,200 +45,213 @@
     [TestFixture]
     public class RevWalkFilterTest : RevWalkTestCase
     {
-
-	private static MyAll MY_ALL = new MyAll();
-
-    [Test]
-	public void testFilter_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(RevFilter.ALL);
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_Negate_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(RevFilter.ALL.negate());
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NOT_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(NotRevFilter.create(RevFilter.ALL));
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(RevFilter.NONE);
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NOT_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(NotRevFilter.create(RevFilter.NONE));
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_ALL_And_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(AndRevFilter.create(RevFilter.ALL, RevFilter.NONE));
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NONE_And_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(AndRevFilter.create(RevFilter.NONE, RevFilter.ALL));
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_ALL_Or_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(OrRevFilter.create(RevFilter.ALL, RevFilter.NONE));
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NONE_Or_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(OrRevFilter.create(RevFilter.NONE, RevFilter.ALL));
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_MY_ALL_And_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(AndRevFilter.create(MY_ALL, RevFilter.NONE));
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NONE_And_MY_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(AndRevFilter.create(RevFilter.NONE, MY_ALL));
-		markStart(c);
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_MY_ALL_Or_NONE() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(OrRevFilter.create(MY_ALL, RevFilter.NONE));
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NONE_Or_MY_ALL() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c = commit(b);
-
-		rw.setRevFilter(OrRevFilter.create(RevFilter.NONE, MY_ALL));
-		markStart(c);
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-    [Test]
-	public void testFilter_NO_MERGES() {
-		RevCommit a = commit();
-		RevCommit b = commit(a);
-		RevCommit c1 = commit(b);
-		RevCommit c2 = commit(b);
-		RevCommit d = commit(c1, c2);
-		RevCommit e = commit(d);
-
-		rw.setRevFilter(RevFilter.NO_MERGES);
-		markStart(e);
-		assertCommit(e, rw.next());
-		assertCommit(c2, rw.next());
-		assertCommit(c1, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		Assert.IsNull(rw.next());
-	}
-
-	private class MyAll : RevFilter {
-
-		public override RevFilter Clone() {
-			return this;
-		}
-
-		public override bool include(GitSharp.RevWalk.RevWalk walker, RevCommit cmit)
-        {
-			return true;
-		}
-	}
-
+        private static readonly MyAll MY_ALL = new MyAll();
+
+        [Test]
+        public void testFilter_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(RevFilter.ALL);
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_Negate_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(RevFilter.ALL.negate());
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NOT_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(NotRevFilter.create(RevFilter.ALL));
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(RevFilter.NONE);
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NOT_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(NotRevFilter.create(RevFilter.NONE));
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_ALL_And_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(AndRevFilter.create(RevFilter.ALL, RevFilter.NONE));
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NONE_And_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(AndRevFilter.create(RevFilter.NONE, RevFilter.ALL));
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_ALL_Or_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(OrRevFilter.create(RevFilter.ALL, RevFilter.NONE));
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NONE_Or_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(OrRevFilter.create(RevFilter.NONE, RevFilter.ALL));
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_MY_ALL_And_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(AndRevFilter.create(MY_ALL, RevFilter.NONE));
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NONE_And_MY_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(AndRevFilter.create(RevFilter.NONE, MY_ALL));
+            markStart(c);
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_MY_ALL_Or_NONE()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(OrRevFilter.create(MY_ALL, RevFilter.NONE));
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NONE_Or_MY_ALL()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c = commit(b);
+
+            rw.setRevFilter(OrRevFilter.create(RevFilter.NONE, MY_ALL));
+            markStart(c);
+            assertCommit(c, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        [Test]
+        public void testFilter_NO_MERGES()
+        {
+            RevCommit a = commit();
+            RevCommit b = commit(a);
+            RevCommit c1 = commit(b);
+            RevCommit c2 = commit(b);
+            RevCommit d = commit(c1, c2);
+            RevCommit e = commit(d);
+
+            rw.setRevFilter(RevFilter.NO_MERGES);
+            markStart(e);
+            assertCommit(e, rw.next());
+            assertCommit(c2, rw.next());
+            assertCommit(c1, rw.next());
+            assertCommit(b, rw.next());
+            assertCommit(a, rw.next());
+            Assert.IsNull(rw.next());
+        }
+
+        private class MyAll : RevFilter
+        {
+            public override RevFilter Clone()
+            {
+                return this;
+            }
+
+            public override bool include(GitSharp.RevWalk.RevWalk walker, RevCommit cmit)
+            {
+                return true;
+            }
+        }
     }
 }


Expose LastSize property for QFontDrawingPrimitive to get the size of the string last printed or measured

--- QuickFont/QFontDrawingPimitive.cs
+++ QuickFont/QFontDrawingPimitive.cs
@@ -61,6 +61,8 @@

         public QFontRenderOptions Options { get; private set; }

+        public SizeF LastSize { get; private set; }
+
         internal IList<QVertex> CurrentVertexRepr
         {
             get { return _currentVertexRepr; }
@@ -390,7 +392,8 @@
             if (minXPos != float.MaxValue)
                 maxWidth = maxXpos - minXPos;

-            return new SizeF(maxWidth, yOffset + LineSpacing);
+            LastSize = new SizeF(maxWidth, yOffset + LineSpacing);
+            return LastSize;
         }

         private SizeF PrintOrMeasure(ProcessedText processedText, bool measureOnly)
@@ -488,7 +491,8 @@
                 }
             }

-            return new SizeF(maxMeasuredWidth, yOffset + LineSpacing - yPos);
+            LastSize = new SizeF(maxMeasuredWidth, yOffset + LineSpacing - yPos);
+            return LastSize;
         }

         private void RenderWord(float x, float y, TextNode node)
@@ -854,6 +858,5 @@

             return processedText;
         }
-
     }
 }


Add constructor that allows prefix to be set.

--- source/NuGet.Lucene.Web/NuGetWebApiSettings.cs
+++ source/NuGet.Lucene.Web/NuGetWebApiSettings.cs
@@ -16,9 +16,13 @@
         private readonly NameValueCollection roleMappings;

         public NuGetWebApiSettings()
-            : this(DefaultAppSettingPrefix, ConfigurationManager.AppSettings, ConfigurationManager.GetSection("roleMappings") as NameValueCollection)
-        {
-
+            : this(DefaultAppSettingPrefix)
+        {
+        }
+
+        public NuGetWebApiSettings(string prefix)
+            : this(prefix, ConfigurationManager.AppSettings, ConfigurationManager.GetSection("roleMappings") as NameValueCollection)
+        {
         }

         public NuGetWebApiSettings(string prefix, NameValueCollection settings, NameValueCollection roleMappings)


Add project type for Docker Compose projects (#37)

--- source/Nuke.Common/ProjectModel/ProjectType.cs
+++ source/Nuke.Common/ProjectModel/ProjectType.cs
@@ -32,6 +32,8 @@

         public static ProjectType SqlProject = new ProjectType("00D1A9C2-B5F0-4AF3-8072-F6C62B433612");

+        public static ProjectType DockerComposeProject = new ProjectType("E53339B2-1760-4266-BCC7-CA923CBCF16C");
+
         public static ProjectType WindowsPhoneProject = new ProjectType("76F1466A-8B6D-4E39-A767-685A06062A39",
             "C089C8C0-30E0-4E22-80C0-CE093F111A43",
             "DB03555F-0C8B-43BE-9FF9-57896B3C5E56");


Fixed MultipartRelated unit tests

Fixed MultipartRelated unit tests

--- UnitTests/MultipartRelatedTests.cs
+++ UnitTests/MultipartRelatedTests.cs
@@ -144,7 +144,7 @@
 			// Note: MimeKit no longer sets the "start" parameter if the root is the first MIME part due to a bug in Thunderbird.
 			Assert.IsNull (related.ContentType.Parameters["start"], "The start parameter should be null.");

-			for (int i = 0; i < related.Count; i++) {
+			for (int i = 1; i < related.Count; i++) {
 				var cid = new Uri (string.Format ("cid:{0}", related[i].ContentId));
 				string mimeType, charset;


Use resource request

Use resource request

--- AngleSharp/Dom/Html/HtmlFrameElementBase.cs
+++ AngleSharp/Dom/Html/HtmlFrameElementBase.cs
@@ -157,14 +157,16 @@

             async Task<IDocument> GetDocumentAsync()
             {
-                var referer = _element.Owner.DocumentUri;
+                var document = _element.Owner;
+                var referer = document.DocumentUri;
+                var loader = document.Loader;

-                if (_htmlContent == null && !String.IsNullOrEmpty(_requestUrl) && !_requestUrl.Is(_element.BaseUri))
+                if (_htmlContent == null && !String.IsNullOrEmpty(_requestUrl) && !_requestUrl.Is(_element.BaseUri) && loader != null)
                 {
                     var cancel = _cts.Token;
                     var url = _element.HyperReference(_requestUrl);
-                    var request = DocumentRequest.Get(url, source: _element, referer: referer);
-                    _download = _context.Loader.DownloadAsync(request);
+                    var request = _element.CreateRequestFor(url);
+                    _download = loader.DownloadAsync(request);
                     cancel.Register(_download.Cancel);
                     var response = await _download.Task.ConfigureAwait(false);
                     return await _context.OpenAsync(response, cancel).ConfigureAwait(false);


show on order details

show on order details

--- Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
+++ Anlab.Mvc/Views/Shared/_OrderDetails.cshtml
@@ -54,6 +54,11 @@

 }
+
+

+        Date Sampled
+        @Model.OrderDetails.DateSampled
+

 @if (Model.OrderDetails.AdditionalEmails.Length > 0)
 {


Fixed bug that prevent battle system from working correctly

--- Assembly-CSharp/Global/Sound/VoicePlayer.cs
+++ Assembly-CSharp/Global/Sound/VoicePlayer.cs
@@ -144,7 +144,7 @@

 	public static void PlayBattleActionTakenVoice(BattleUnit unit, CMD_DATA cmd)
     {
-		if (unit.IsPlayer)
+		if (unit.IsPlayer || unit.IsSlave)
 		{
 			string cmdName = getCommandName(cmd);
 			string playerName = Enum.GetName(typeof(CharacterId), unit.PlayerIndex);
@@ -153,11 +153,11 @@
 			int soundIndex = 2140000000 + ((int)cmd.cmd_no * 10000) + (cmd.sub_no * 100) + (int)unit.PlayerIndex;

 			// this should change between these based on the hit they are doing
-			// normal hit = atk_norm
-			// criti hit = atk_crit
-			// missed = atk_miss
-			// dodged = atk_dodge
-			string status = "use";
+			// normal hit = deal_norm
+			// criti hit = deal_crit
+			// missed = deal_miss
+			// dodged = deal_dodge
+			string status = "atk_norm";

 			String vaPath = String.Format("Voices/{0}/battle/shared/va_{1}_{2}_{3}", Localization.GetSymbol(), status, cmdName, playerName).ToLower();
 			if (!(AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".akb", true, true) || AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".ogg", true, false)))
@@ -166,7 +166,7 @@
 				vaPath = String.Format("Voices/{0}/battle/shared/va_{1}_{2}_{3}", Localization.GetSymbol(), status, cmdName, playerName).ToLower();
 				if (!(AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".akb", true, true) || AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".ogg", true, false)))
 				{
-					SoundLib.VALog(String.Format("Player Char {0} Abbility, used:{1} caster:{2} path:{3} (not found)", cmdName.ToLower(), playerName, vaPath));
+					SoundLib.VALog(String.Format("Player Char {0} Abbility, used:{1} caster:{2} path:{3} (not found)", status, cmdName.ToLower(), playerName, vaPath));
 					return;
 				}
 			}
@@ -174,7 +174,7 @@
 			int randomNumber = rand.Next(0, Configuration.Audio.CharAttackAudioChance);
 			if (randomNumber == (int)(Configuration.Audio.CharAttackAudioChance / 2) || (int)(Configuration.Audio.CharAttackAudioChance / 2) == 0)
 			{
-				SoundLib.VALog(String.Format("Player Char {0} Abbility, used:{0}, caster:{1} path:{2}", cmdName.ToLower(), playerName, vaPath));
+				SoundLib.VALog(String.Format("Player Char {0} Abbility, used:{1}, caster:{2} path:{3}", status, cmdName.ToLower(), playerName, vaPath));
 				CreateLoadThenPlayVoice(soundIndex, vaPath);
 			}
 		}
@@ -182,7 +182,7 @@

 	public static void PlayBattleActionRecivedVoice(BattleUnit unit, CMD_DATA cmd)
 	{
-		if (unit.IsPlayer)
+		if (unit.IsPlayer || unit.IsSlave)
 		{
 			string cmdName = getCommandName(cmd);
 			string playerName = Enum.GetName(typeof(CharacterId), unit.PlayerIndex);
@@ -190,17 +190,17 @@
 			int soundIndex = 2141000000 + ((int)cmd.cmd_no * 10000) + (cmd.sub_no * 100) + unit.Id;

 			// this should change between below when they are hit
-			// normal hit = dmg_norm
-			// criti hit = dmg_crit
-			// missed = dmg_miss
-			// dodged = dmg_dodge
-
-			string status = "atk_norm";
+			// normal hit = rcv_norm
+			// criti hit = rcv_crit
+			// missed = rcv_miss
+			// dodged = rcv_dodge
+
+			string status = "dmg_norm";

 			String vaPath = String.Format("Voices/{0}/battle/shared/va_{1}_{2}_{3}", Localization.GetSymbol(), status, cmdName, unit.Player.Name).ToLower();
 			if (!(AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".akb", true, true) || AssetManager.HasAssetOnDisc("Sounds/" + vaPath + ".ogg", true, false)))
 			{
-				SoundLib.VALog(String.Format("Player Char hit with Abbility, msg:{0}, caster:{1} path:{2} (not found)", cmdName.ToLower(), unit.Player.Name, vaPath));
+				SoundLib.VALog(String.Format("Player Char {0} with Abbility, msg:{0}, caster:{1} path:{2} (not found)", status, cmdName.ToLower(), unit.Player.Name, vaPath));
 				return;
 			}

@@ -208,7 +208,7 @@
 			if (randomNumber == (int)(Configuration.Audio.CharHitAudioChance / 2) || (int)(Configuration.Audio.CharHitAudioChance / 2) == 0)
 			{

-				SoundLib.VALog(String.Format("Player Char {0} with Abbility, msg:{1}, caster:{2} path:{4}", status, cmdName.ToLower(), unit.Player.Name, vaPath));
+				SoundLib.VALog(String.Format("Player Char {0} with Abbility, msg:{1}, caster:{2} path:{3}", status, cmdName.ToLower(), unit.Player.Name, vaPath));

 				CreateLoadThenPlayVoice(soundIndex, vaPath);
 			}


In ManageController, eliminated some magic strings and added a string constant for email subjects. #340

--- AllReadyApp/Web-App/AllReady/Controllers/ManageController.cs
+++ AllReadyApp/Web-App/AllReady/Controllers/ManageController.cs
@@ -14,6 +14,7 @@
     [Authorize]
     public class ManageController : Controller
     {
+        private const string EMAIL_CONFIRMATION_SUBJECT = "Confirm your allReady account";
         private readonly UserManager<ApplicationUser> _userManager;
         private readonly SignInManager<ApplicationUser> _signInManager;
         private readonly IEmailSender _emailSender;
@@ -117,8 +118,8 @@
         {
             var user = await _userManager.FindByIdAsync(User.GetUserId());
             var code = await _userManager.GenerateEmailConfirmationTokenAsync(user);
-            var callbackUrl = Url.Action("ConfirmEmail", "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
-            await _emailSender.SendEmailAsync(user.Email, "Confirm your allReady account",
+            var callbackUrl = Url.Action(nameof(ConfirmNewEmail), "Account", new { userId = user.Id, code = code }, protocol: HttpContext.Request.Scheme);
+            await _emailSender.SendEmailAsync(user.Email, EMAIL_CONFIRMATION_SUBJECT,
                 "Please confirm your allReady account by clicking this link: link");

             return RedirectToAction(nameof(EmailConfirmationSent));
@@ -327,7 +328,7 @@
             {
                 if(!await _userManager.CheckPasswordAsync(user, model.Password))
                 {
-                    ModelState.AddModelError("Password", "The password supplied is not correct");
+                    ModelState.AddModelError(nameof(model.Password), "The password supplied is not correct");
                     return View(model);
                 }

@@ -335,7 +336,7 @@
                 if(existingUser != null)
                 {
                     // The username/email is already registered
-                    ModelState.AddModelError("NewEmail", "The email supplied is already registered");
+                    ModelState.AddModelError(nameof(model.NewEmail), "The email supplied is already registered");
                     return View(model);
                 }

@@ -343,8 +344,8 @@
                 await _userManager.UpdateAsync(user);

                 var token = await _userManager.GenerateChangeEmailTokenAsync(user, model.NewEmail);
-                var callbackUrl = Url.Action("ConfirmNewEmail", "Manage", new { token = token }, protocol: HttpContext.Request.Scheme);
-                await _emailSender.SendEmailAsync(user.Email, "Confirm your allReady account",
+                var callbackUrl = Url.Action(nameof(ConfirmNewEmail), "Manage", new { token = token }, protocol: HttpContext.Request.Scheme);
+                await _emailSender.SendEmailAsync(user.Email, EMAIL_CONFIRMATION_SUBJECT,
                     "Please confirm your new email address for your allReady account by clicking this link: link. Note that once confirmed your original email address will cease to be valid as your username.");

                 return RedirectToAction(nameof(EmailConfirmationSent));
@@ -393,8 +394,8 @@
             }

             var token = await _userManager.GenerateChangeEmailTokenAsync(user, user.PendingNewEmail);
-            var callbackUrl = Url.Action("ConfirmNewEmail", "Manage", new { token = token }, protocol: HttpContext.Request.Scheme);
-            await _emailSender.SendEmailAsync(user.Email, "Confirm your allReady account",
+            var callbackUrl = Url.Action(nameof(ConfirmNewEmail), "Manage", new { token = token }, protocol: HttpContext.Request.Scheme);
+            await _emailSender.SendEmailAsync(user.Email, EMAIL_CONFIRMATION_SUBJECT,
                 "Please confirm your new email address for your allReady account by clicking this link: link. Note that once confirmed your original email address will cease to be valid as your username.");

             return RedirectToAction(nameof(EmailConfirmationSent));
@@ -474,7 +475,7 @@
         public IActionResult LinkLogin(string provider)
         {
             // Request a redirect to the external login provider to link a login for the current user
-            var redirectUrl = Url.Action("LinkLoginCallback", "Manage");
+            var redirectUrl = Url.Action(nameof(LinkLoginCallback), "Manage");
             var properties = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl, User.GetUserId());
             return new ChallengeResult(provider, properties);
         }


ParticleFilter fixed issues with new particles in objects

--- AI_In_Robotics/AI_In_Robotics/Classes/ParticleFilter.cs
+++ AI_In_Robotics/AI_In_Robotics/Classes/ParticleFilter.cs
@@ -50,9 +50,15 @@
                 if (part.pos.X > World.WorldSizeX || part.pos.X < 0 || part.pos.Y > World.WorldSizeY ||
                     part.pos.Y < 0 || World.IsPointInSquare(part.pos))
                 {
-                    var tmpPart = new Particle(World.WorldSizeX, World.WorldSizeY);
+                    Particle tmpPart;
+                    do
+                    {
+                        tmpPart = new Particle(World.WorldSizeX, World.WorldSizeY);
+                    } while (World.IsPointInSquare(tmpPart.pos));
+
                     part.pos = tmpPart.pos;
                     part.theta = tmpPart.theta;
+                    part.weight = 1 / (double)_N;
                 }
             }
         }


Comment public fields

Comment public fields

--- Assets/MRTK/SDK/Features/Input/Handlers/EyeTrackingTarget.cs
+++ Assets/MRTK/SDK/Features/Input/Handlers/EyeTrackingTarget.cs
@@ -101,6 +101,9 @@
         [SerializeField]
         private UnityEvent onTapDown = new UnityEvent();

+        /// <summary>
+        /// Event is triggered when the RaiseEventManually_TapDown is called.
+        /// </summary>
         public UnityEvent OnTapDown
         {
             get { return onTapDown; }
@@ -110,6 +113,9 @@
         [SerializeField]
         private UnityEvent onTapUp = new UnityEvent();

+        /// <summary>
+        /// Event is triggered when the RaiseEventManually_TapUp is called.
+        /// </summary>
         public UnityEvent OnTapUp
         {
             get { return onTapUp; }
@@ -160,11 +166,24 @@
         private DateTime lastTimeClicked;
         private float minTimeoutBetweenClicksInMs = 20f;

-
+        /// <summary>
+        /// GameObject eye gaze is currently targeting, updated once per frame.
+        /// null if no object with colllider is currently being looked at.
+        /// </summary>
         public static GameObject LookedAtTarget { get; private set; }
+
+        /// <summary>
+        /// EyeTrackingTarget eye gaze is currently looking at.
+        /// null if currently gazed at object has no EyeTrackingTarget, or if
+        /// no object with collider is being looked at.
+        /// </summary>
         public static EyeTrackingTarget LookedAtEyeTarget { get; private set; }
         public static Vector3 LookedAtPoint { get; private set; }

+        /// <summary>
+        /// Most recently selected target, selected either using pointer
+        /// or voice.
+        /// </summary>
         public static GameObject SelectedTarget { get; set; }

         #region Focus handling
@@ -211,12 +230,14 @@
             OnEyeFocusStop();
         }

+        /// <inheritdoc/>
         protected override void RegisterHandlers()
         {
             CoreServices.InputSystem?.RegisterHandler<IMixedRealityPointerHandler>(this);
             CoreServices.InputSystem?.RegisterHandler<IMixedRealitySpeechHandler>(this);
         }
-
+
+        /// <inheritdoc/>
         protected override void UnregisterHandlers()
         {
             CoreServices.InputSystem?.UnregisterHandler<IMixedRealityPointerHandler>(this);
@@ -233,9 +254,10 @@
                     lastEyeSignalUpdateTimeLocal = DateTime.UtcNow;

                     // ToDo: Handle raycasting layers
-                    RaycastHit hitInfo;
-                    Ray lookRay = new Ray(CoreServices.InputSystem.EyeGazeProvider.GazeOrigin, CoreServices.InputSystem.EyeGazeProvider.GazeDirection.normalized);
-                    bool isHit = UnityEngine.Physics.Raycast(lookRay, out hitInfo);
+                    var lookRay = new Ray(
+                        CoreServices.InputSystem.EyeGazeProvider.GazeOrigin,
+                        CoreServices.InputSystem.EyeGazeProvider.GazeDirection.normalized);
+                    bool isHit = UnityEngine.Physics.Raycast(lookRay, out RaycastHit hitInfo);

                     if (isHit)
                     {
@@ -325,6 +347,7 @@
         }
         #endregion

+        #region Methods to Invoke Events Manually
         public void RaiseSelectEventManually()
         {
             EyeTrackingTarget.SelectedTarget = this.gameObject;
@@ -340,5 +363,6 @@
         {
             OnTapUp.Invoke();
         }
+        #endregion
     }
 }


pushed creation of s3 client down to UploadedFile

--- Bernos.FileUploader.StorageProviders.S3/S3StorageProvider.cs
+++ Bernos.FileUploader.StorageProviders.S3/S3StorageProvider.cs
@@ -1,6 +1,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using System.Net;
 using Amazon;
 using Amazon.Runtime;
@@ -12,24 +13,21 @@
 {
     public class S3StorageProvider : IStorageProvider
     {
-        private Lazy<AmazonS3Client> _client;
+        private const string MetadataHeaderPrefix = "x-amz-meta-";
+
+        private readonly Lazy<AmazonS3Client> _client;
         private readonly S3StorageProviderConfiguration _configuration;

         public S3StorageProvider(S3StorageProviderConfiguration configuration)
         {
             _configuration = configuration;
-
-            _client = new Lazy<AmazonS3Client>(() =>
-            {
-                if (!String.IsNullOrEmpty(_configuration.AccessKeyId))
-                {
-                   return new AmazonS3Client(_configuration.AccessKeyId, _configuration.AccessKeySecret, RegionEndpoint.GetBySystemName(_configuration.Region));
-                }
-                return new AmazonS3Client(RegionEndpoint.GetBySystemName(_configuration.Region));
-            });
+            _client = new Lazy<AmazonS3Client>(GetClient);
         }
+
         public UploadedFile Save(string filename, string folder, string contentType, Stream inputStream, IDictionary<string, string> metadata)
         {
+            // TODO: Add config param to determine whether uploads are public or private.
+
             var path = string.IsNullOrEmpty(folder) ? filename : folder + "/" + filename;
             var transferUtility = new TransferUtility(_client.Value);
             var uploadRequest = new TransferUtilityUploadRequest
@@ -50,30 +48,6 @@
             transferUtility.Upload(uploadRequest);

             return BuildUploadedFile(path, contentType, metadata);
-
-
-
-            // TODO: Add config param to determine whether uploads are public or private.
-
-            var request = new PutObjectRequest
-            {
-                AutoCloseStream = false,
-                BucketName = _configuration.BucketName,
-                CannedACL = S3CannedACL.Private,
-                ContentType = contentType,
-                Key = _configuration.GetKey(path),
-
-                InputStream = inputStream
-            };
-
-            foreach (var kvp in metadata)
-            {
-                request.Metadata.Add(kvp.Key, kvp.Value);
-            }
-
-            _client.Value.PutObject(request);
-
-            return BuildUploadedFile(path, contentType, metadata);
         }

         public UploadedFile Load(string path)
@@ -87,13 +61,8 @@
             try
             {
                 var response = _client.Value.GetObjectMetadata(request);
-                var metadata = new Dictionary<string, string>();
                 var contentType = response.Headers.ContentType;
-
-                foreach (var key in response.Metadata.Keys)
-                {
-                    metadata.Add(key, response.Metadata[key]);
-                }
+                var metadata = response.Metadata.Keys.ToDictionary(key => key.Substring(MetadataHeaderPrefix.Length), key => response.Metadata[key]);

                 return BuildUploadedFile(path, contentType, metadata);
             }
@@ -112,31 +81,43 @@
             throw new System.NotImplementedException();
         }

+        private AmazonS3Client GetClient()
+        {
+            if (!String.IsNullOrEmpty(_configuration.AccessKeyId))
+            {
+                return new AmazonS3Client(_configuration.AccessKeyId, _configuration.AccessKeySecret, RegionEndpoint.GetBySystemName(_configuration.Region));
+            }
+            return new AmazonS3Client(RegionEndpoint.GetBySystemName(_configuration.Region));
+        }
+
         private UploadedFile BuildUploadedFile(string path, string contentType, IDictionary<string, string> metadata)
         {
             // TODO: set up url correctly. Add a "Use private" bool to config. If it is set then we will need to calculate the public URL, otherwise we
             // can just use the default url
-
+
             return new UploadedFile(() =>
             {
                 try
                 {
-                    var r = new GetObjectRequest
+                    using (var client = GetClient())
                     {
-                        BucketName = _configuration.BucketName,
-                        Key = _configuration.GetKey(path)
-                    };
+                        var r = new GetObjectRequest
+                        {
+                            BucketName = _configuration.BucketName,
+                            Key = _configuration.GetKey(path)
+                        };

-                    var ms = new MemoryStream();
+                        var ms = new MemoryStream();

-                    using (var response = _client.Value.GetObject(r))
-                    {
-                        response.ResponseStream.CopyTo(ms);
+                        using (var response = client.GetObject(r))
+                        {
+                            response.ResponseStream.CopyTo(ms);
+                        }
+
+                        ms.Position = 0;
+
+                        return ms;
                     }
-
-                    ms.Position = 0;
-
-                    return ms;
                 }
                 catch (AmazonS3Exception ex)
                 {


Fixed bug in the VirtualDictionary with an update in a missing branch.

--- BitcoinUtilities/Collections/VirtualDictionaryTransaction.cs
+++ BitcoinUtilities/Collections/VirtualDictionaryTransaction.cs
@@ -55,12 +55,12 @@

             CompactTree tree = dictionary.GetBlockTree();

-            SortedDictionary<long, BlockBatch> blockBatches = SplitByBlock(tree, recordsToLookup);
+            SortedDictionary<long, BlockBatch> blockBatches = SplitByBlock(tree, recordsToLookup, false);

             foreach (BlockBatch batch in blockBatches.Values)
             {
                 Block block = dictionary.Container.ReadBlock(batch.BlockOffset);
-                FindRecords(res, block.Records, batch.Records, batch.MaskOffset / 8);
+                FindRecords(res, block.Records, batch.Records, batch.MaskOffset/8);
             }

             return res;
@@ -126,7 +126,7 @@

         private void AddRecordsToTree(CompactTree tree, List<NonIndexedRecord> nonIndexedRecords)
         {
-            SortedDictionary<long, BlockBatch> blockUpdates = SplitByBlock(tree, nonIndexedRecords.Select(r => new Record(r.Key, r.Value)));
+            SortedDictionary<long, BlockBatch> blockUpdates = SplitByBlock(tree, nonIndexedRecords.Select(r => new Record(r.Key, r.Value)), true);

             List<SplitTreeNode> updatedTreeNodes = new List<SplitTreeNode>();

@@ -178,7 +178,7 @@
             }
         }

-        private SortedDictionary<long, BlockBatch> SplitByBlock(CompactTree tree, IEnumerable<Record> records)
+        private SortedDictionary<long, BlockBatch> SplitByBlock(CompactTree tree, IEnumerable<Record> records, bool addMissingBranches)
         {
             SortedDictionary<long, BlockBatch> blockBatches = new SortedDictionary<long, BlockBatch>();

@@ -187,29 +187,50 @@
                 int maskOffset = 0;
                 int nodeIndex = 0;
                 CompactTreeNode node = tree.Nodes[nodeIndex];
-                while (!node.IsDataNode)
-                {
-                    bool left = (record.Key[maskOffset / 8] & (1 << (7 - maskOffset % 8))) == 0;
-                    nodeIndex = node.GetChild(left ? 0 : 1);
+                int childNum = 0;
+                while (node.IsSplitNode)
+                {
+                    bool left = (record.Key[maskOffset/8] & (1 << (7 - maskOffset%8))) == 0;
+                    childNum = left ? 0 : 1;
+                    int childIndex = node.GetChild(childNum);
+                    if (childIndex == 0)
+                    {
+                        break;
+                    }
+                    nodeIndex = childIndex;
                     node = tree.Nodes[nodeIndex];
                     maskOffset++;
                 }

-                long blockOffset = node.Value;
-
-                BlockBatch blockBatch;
-                if (!blockBatches.TryGetValue(blockOffset, out blockBatch))
-                {
-                    blockBatch = new BlockBatch(blockOffset, maskOffset, nodeIndex);
-                    blockBatches.Add(blockOffset, blockBatch);
-                }
-
-                blockBatch.Records.Add(record);
+                if (node.IsSplitNode)
+                {
+                    if (addMissingBranches)
+                    {
+                        long blockOffset = dictionary.Container.AllocateBlock();
+                        nodeIndex = tree.AddDataNode(nodeIndex, childNum, blockOffset);
+                        node = tree.Nodes[nodeIndex];
+                        maskOffset++;
+                    }
+                }
+
+                if (node.IsDataNode)
+                {
+                    long blockOffset = node.Value;
+
+                    BlockBatch blockBatch;
+                    if (!blockBatches.TryGetValue(blockOffset, out blockBatch))
+                    {
+                        blockBatch = new BlockBatch(blockOffset, maskOffset, nodeIndex);
+                        blockBatches.Add(blockOffset, blockBatch);
+                    }
+
+                    blockBatch.Records.Add(record);
+                }
             }

             foreach (BlockBatch batch in blockBatches.Values)
             {
-                batch.Records.Sort((recordA, recordB) => CompareKeys(recordA.Key, recordB.Key, batch.MaskOffset / 8));
+                batch.Records.Sort((recordA, recordB) => CompareKeys(recordA.Key, recordB.Key, batch.MaskOffset/8));
             }

             return blockBatches;
@@ -220,7 +241,7 @@
             Block block = dictionary.Container.ReadBlock(blockBatch.BlockOffset);

             //todo: review types
-            List<Record> records = MergeRecords(block.Records, blockBatch.Records, blockBatch.MaskOffset / 8);
+            List<Record> records = MergeRecords(block.Records, blockBatch.Records, blockBatch.MaskOffset/8);

             //todo: is it worth to have this check?
             if (records.Count <= dictionary.RecordsPerBlock)
@@ -317,8 +338,8 @@
             List<Record> records = node.Records;
             node.Records = null;

-            int maskByte = node.MaskOffset / 8;
-            byte mask = (byte)(1 << (7 - node.MaskOffset % 8));
+            int maskByte = node.MaskOffset/8;
+            byte mask = (byte) (1 << (7 - node.MaskOffset%8));

             int firstRight = 0;
             for (; firstRight < records.Count; firstRight++)
@@ -352,5 +373,4 @@
             //todo: inplement
         }
     }
-
 }


Restart and reconnect when IBGateway closed

- This is required with IBGateway v978 because of the daily/weekly automatic logoff

--- Brokerages/InteractiveBrokers/InteractiveBrokersBrokerage.cs
+++ Brokerages/InteractiveBrokers/InteractiveBrokersBrokerage.cs
@@ -2994,7 +2994,18 @@
             Log.Trace($"InteractiveBrokersBrokerage.OnIbAutomaterExited(): Exit code: {e.ExitCode}");

             // check if IBGateway was closed because of an IBAutomater error
-            CheckIbAutomaterError(_ibAutomater.GetLastStartResult(), false);
+            var result = _ibAutomater.GetLastStartResult();
+            CheckIbAutomaterError(result, false);
+
+            if (!result.HasError)
+            {
+                // IBGateway was closed by the v978+ automatic logoff or it was closed manually (less likely)
+                Log.Trace("InteractiveBrokersBrokerage.OnIbAutomaterExited(): IBGateway close detected, restarting IBAutomater and reconnecting...");
+
+                Disconnect();
+                CheckIbAutomaterError(_ibAutomater.Start(false));
+                Connect();
+            }
         }

         private void CheckIbAutomaterError(StartResult result, bool throwException = true)


Update PotionPot.cs

Update PotionPot.cs

--- Assets/Resources/Microgames/Potion/Scripts/PotionPot.cs
+++ Assets/Resources/Microgames/Potion/Scripts/PotionPot.cs
@@ -71,9 +71,8 @@

 		int[] skiparray = new int[inglen];
 		int skip = 0;
-		for(int i = inglen - 1; i >= 0; i--){ //this takes O(n) time
+		for(int i = inglen - 1; i >= 0;skiparray[i] = skip;, i--){ //this takes O(n) time
 		skip = ingredients[i].theCollider.gameObject.activeSelf ? 0 : skip+1; //we are building a skip array in order to skip over any objects that are not active
-		skiparray[i] = skip;
 		}

 		for (int i = skiparray[0]; i < inglen-1; i += skiparray[i+1]){ //the for loop above will make this O(n^2) for loop run much faster via memoization and dynamic programming
@@ -117,19 +116,18 @@

 	void orderIngredients()
 	{
-		for (int i = 0; i < ingredients.Length; i++)
-		{
-			ingredients[i].spriteRenderer.sortingOrder = 60 - i;
-			ingredients[i].transform.position = new Vector3(ingredients[i].transform.position.x, ingredients[i].transform.position.y,
-				-2f + (.01f * (float)i));
-		}
+		for (int i = 0; i < ingredients.Length;ingredients[i].spriteRenderer.sortingOrder = 60 - i, ingredients[i].transform.position =
+		new Vector3(ingredients[i].transform.position.x, ingredients[i].transform.position.y, -2f + (.01f * (float)i)), i++);
 	}

 	public void reset()
 	{
 		ingredientPool.poolAllObjects();
 		potVibrate.vibrateOn = false;
-		playPotParticles();
+		foreach (ParticleSystem particles in potParticles)
+		{
+			particles.Play();
+		}
 		resetIngredients();

 		setState(State.Default);
@@ -137,13 +135,6 @@
 	}

-	void playPotParticles()
-	{
-		foreach (ParticleSystem particles in potParticles)
-		{
-			particles.Play();
-		}
-	}

 	void stopPotParticles()
 	{
@@ -202,10 +193,7 @@
 		victoryPotion.SetActive(true);
 	}

-	void Update()
-	{
-
-	}
+

 	public void addIngredient(PotionIngredient ingredient)
 	{


fixed issue where prioritybrain's TargetLeast could give targets that did not fulfill requirements

--- Assets/Scripts/Model/Characters/Brains/PriorityBrain.cs
+++ Assets/Scripts/Model/Characters/Brains/PriorityBrain.cs
@@ -48,6 +48,7 @@
                     sb
                     .TargetType
                     .GetTargets(brainOwner, currentBattle)
+                    .Where(t => sb.IsCastable(brainOwner, t))
                     .OrderBy(sorter)
                     .FirstOrDefault();


make sure look-ahead reads at least one ahead for each thread

--- BitSharp.Blockchain/BlockchainCalculator.cs
+++ BitSharp.Blockchain/BlockchainCalculator.cs
@@ -489,16 +489,18 @@

             var lookAheadThread = new Thread(() =>
             {
+                var maxThreads = 5;
+
                 // calculate how far to look-ahead based on how quickly the results are being read
                 Func<long> targetIndex = () =>
                 {
                     var firstReadTime = readTimes[0];
                     var readPerMillisecond = (float)(readTimes.Count / (DateTime.UtcNow - firstReadTime).TotalMilliseconds);
-                    return resultReadIndex[0] + 1 + (int)(readPerMillisecond * 1000); // look ahead 1000 milliseconds
+                    return resultReadIndex[0] + 1 + maxThreads + (int)(readPerMillisecond * 1000); // look ahead 1000 milliseconds
                 };

                 // look-ahead loop
-                Parallel.ForEach(keys, new ParallelOptions { MaxDegreeOfParallelism = 5 }, (key, loopState, indexLocal) =>
+                Parallel.ForEach(keys, new ParallelOptions { MaxDegreeOfParallelism = maxThreads }, (key, loopState, indexLocal) =>
                 {
                     // cooperative loop
                     if (internalCancelToken.IsCancellationRequested || (cancelToken != null && cancelToken.IsCancellationRequested))


fix notification on revoke badge

fix notification on revoke badge

--- Badges/Areas/Admin/Controllers/RevokeBadgeController.cs
+++ Badges/Areas/Admin/Controllers/RevokeBadgeController.cs
@@ -1,6 +1,8 @@
 using Badges.Controllers;
 using Badges.Core.Domain;
 using Badges.Core.Repositories;
+using Badges.Helpers;
+using Badges.Services;
 using System;
 using System.Linq;
 using System.Web.Mvc;
@@ -15,9 +17,13 @@
     [Authorize(Roles = RoleNames.Administrator)]
     public class RevokeBadgeController : ApplicationController
     {
+        private readonly INotificationService _notificationService;
+
         /** Default constructor **/
-        public RevokeBadgeController(IRepositoryFactory repositoryFactory) : base(repositoryFactory)
+        public RevokeBadgeController(IRepositoryFactory repositoryFactory, INotificationService notificationService)
+            : base(repositoryFactory)
         {
+            _notificationService = notificationService;
         }

         // GET: /Admin/RevokeBadge/
@@ -62,7 +68,11 @@

             RepositoryFactory.BadgeSubmissionRepository.Remove(badgeSubmission);

-            // TODO: Give a notification to the user whose badge was revoked
+            _notificationService.Notify(badgeSubmission.Creator, AuthenticatedUser,
+                "Your badge has been revoked!",
+                "Unforuntately, the \"" + badgeSubmission.Badge.Name + "\" badge has been revoked from you.",
+                ActionLinkHelper.ActionLink(Url.Action("MyBadges", "Badge", new { area = string.Empty }), "View your badges"));
+
             Message = "The badge has been revoked.";
             return RedirectToAction("Index");
         }


FirstPerspectiveManipulater support zoom in/out

--- CSharpGL/OpenGLObjects/Camera/FirstPerspectiveManipulater.cs
+++ CSharpGL/OpenGLObjects/Camera/FirstPerspectiveManipulater.cs
@@ -97,6 +97,7 @@
         private MouseEventHandler mouseDownEvent;
         private MouseEventHandler mouseMoveEvent;
         private MouseEventHandler mouseUpEvent;
+        private MouseEventHandler mouseWheelEvent;

         public FirstPerspectiveManipulater()
         {
@@ -113,6 +114,8 @@
             this.mouseDownEvent = new MouseEventHandler(this.canvas_MouseDown);
             this.mouseMoveEvent = new MouseEventHandler(this.canvas_MouseMove);
             this.mouseUpEvent = new MouseEventHandler(this.canvas_MouseUp);
+            this.mouseWheelEvent = new MouseEventHandler(this.canvas_MouseWheel);
+
         }

         public override void Bind(ICamera camera, System.Windows.Forms.Control canvas)
@@ -129,6 +132,7 @@
             canvas.MouseDown += this.mouseDownEvent;
             canvas.MouseMove += this.mouseMoveEvent;
             canvas.MouseUp += this.mouseUpEvent;
+            canvas.MouseWheel += this.mouseWheelEvent;
         }

         public override void Unbind()
@@ -140,12 +144,18 @@
                 this.canvas.MouseDown -= this.mouseDownEvent;
                 this.canvas.MouseMove -= this.mouseMoveEvent;
                 this.canvas.MouseUp -= this.mouseUpEvent;
+                this.canvas.MouseWheel -= this.mouseWheelEvent;
             }
         }

         private bool mouseDownFlag = false;
         private int lastLocationX;
         private int lastLocationY;
+
+        void canvas_MouseWheel(object sender, System.Windows.Forms.MouseEventArgs e)
+        {
+            this.camera.MouseWheel(e.Delta);
+        }

         void canvas_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
         {


Ensure MVC sees the set status route

Ensure MVC sees the set status route

Fixes #242

--- Battery-Commander.Web/Controllers/SoldiersController.cs
+++ Battery-Commander.Web/Controllers/SoldiersController.cs
@@ -134,7 +134,7 @@
             return RedirectToAction(nameof(Index));
         }

-        [HttpPost, ValidateAntiForgeryToken]
+        [HttpPost, ValidateAntiForgeryToken, Route("~/Soldiers/SetStatus")]
         public async Task<IActionResult> SetStatus(int soldierId, Soldier.SoldierStatus status)
         {
             var soldier = await Get(db, soldierId);


added EqualsWithHashCode and EqualsValueWithHashCode

--- Code/Light.GuardClauses/FrameworkExtensions/Equality.cs
+++ Code/Light.GuardClauses/FrameworkExtensions/Equality.cs
@@ -130,7 +130,7 @@
                     }
                     return hash;
                 }
-
+
                 // ReSharper disable once LoopCanBeConvertedToQuery
                 foreach (var @object in values)
                 {
@@ -157,5 +157,34 @@
             return equalityComparer.GetHashCode(first) == equalityComparer.GetHashCode(second) &&
                    equalityComparer.Equals(first, second);
         }
+
+        /// <summary>
+        ///     Checks if the specified object is equal to the other object. Performs null reference checking and afterwards calls
+        ///     GetHashCode and Equals to determine equality. If you are dealing with value types, please use <see cref="EqualsValueWithHashCode{T}" />
+        ///     instead as no null checks are performed in that method.
+        /// </summary>
+        /// <typeparam name="T">The reference type of the items to be compared.</typeparam>
+        /// <param name="value">The first value to be compared.</param>
+        /// <param name="other">The second value to be compared.</param>
+        /// <returns>True if both hash codes are equal and Equals returns true, else false.</returns>
+        public static bool EqualsWithHashCode<T>(this T value, T other) where T : IEquatable<T>
+        {
+            if (value == null) return other == null;
+            if (other == null) return false;
+
+            return value.GetHashCode() == other.GetHashCode() && value.Equals(other);
+        }
+
+        /// <summary>
+        ///     Checks if the specified value is equal to the other value. Calls GetHashCode and Equals to determine equality.
+        /// </summary>
+        /// <typeparam name="T">The value type of the items to be compared.</typeparam>
+        /// <param name="value">The first value to be compared.</param>
+        /// <param name="other">The second value to be compared.</param>
+        /// <returns>True if both hash codes are equal and Equals returns true, else false.</returns>
+        public static bool EqualsValueWithHashCode<T>(this T value, T other) where T : struct, IEquatable<T>
+        {
+            return value.GetHashCode() == other.GetHashCode() && value.Equals(other);
+        }
     }
 }


Uses VS toolchain for SDK .NET Framework projects (resolves #23)

--- src/Buildalyzer/PathHelperFactory.cs
+++ src/Buildalyzer/PathHelperFactory.cs
@@ -22,9 +22,24 @@
             XElement projectElement = projectDocument.GetDescendants("Project").FirstOrDefault();
             if (projectElement != null)
             {
-                // Use .NET Core SDK if a SDK attribute
-                if (projectElement.GetAttributeValue("Sdk") != null)
+                // Does this project use the SDK?
+                // Check for an SDK attribute on the project element
+                // If no <Project> attribute, check for a SDK import (see https://github.com/Microsoft/msbuild/issues/1493)
+                if (projectElement.GetAttributeValue("Sdk") != null
+                    || projectElement.GetDescendants("Import").Any(x => x.GetAttributeValue("Sdk") != null))
                 {
+                    // Use the Framework tools if this project targets .NET Framework ("net" followed by a digit)
+                    // https://docs.microsoft.com/en-us/dotnet/standard/frameworks
+                    string targetFramework = projectElement.GetDescendants("TargetFramework").FirstOrDefault()?.Value;
+                    if(targetFramework != null
+                        && targetFramework.StartsWith("net", StringComparison.OrdinalIgnoreCase)
+                        && targetFramework.Length > 3
+                        && char.IsDigit(targetFramework[4]))
+                    {
+                        return new FrameworkPathHelper();
+                    }
+
+                    // Otherwise use the .NET Core SDK
                     return new CorePathHelper(projectPath);
                 }

@@ -33,13 +48,6 @@
                 {
                     return new FrameworkPathHelper();
                 }
-
-                // If no <Project> attribute, check for a SDK import
-                // See https://github.com/Microsoft/msbuild/issues/1493
-                if (projectElement.GetDescendants("Import").Any(x => x.GetAttributeValue("Sdk") != null))
-                {
-                    return new CorePathHelper(projectPath);
-                }
             }

             throw new InvalidOperationException("Unrecognized project file format");


Added url is possible to request tracking.

--- cdmdotnet.Logging.Azure.ApplicationInsights/TelemetryHelper.cs
+++ cdmdotnet.Logging.Azure.ApplicationInsights/TelemetryHelper.cs
@@ -126,6 +126,12 @@
 		{
 			var requestTelemetry = new RequestTelemetry(name, startTime, duration, responseCode, wasSuccessfull);
 			SetCorrelationId(requestTelemetry.Properties);
+			try
+			{
+				requestTelemetry.Url = new Uri(string.Format("cqrs://{0}", name));
+			}
+			catch { /* Move on for now */ }
+
 			TelemetryClient.TrackRequest(requestTelemetry);
 		}


update for new nuget package release

update for new nuget package release


WhereSelection

WhereSelection


Add ToString method

Add ToString method

--- BibTeXLibrary/BibEntry.cs
+++ BibTeXLibrary/BibEntry.cs
@@ -185,6 +185,31 @@
         #endregion

         #region Public Method
+        /// <summary>
+        /// To BibTeX entry
+        /// </summary>
+        /// <returns></returns>
+        public override string ToString()
+        {
+            var bib = new StringBuilder("@");
+            bib.Append(Type);
+            bib.Append('{');
+            bib.Append(Key);
+            bib.Append(",\n");
+
+            foreach(var tag in _tags)
+            {
+                bib.Append("  ");
+                bib.Append(tag.Key);
+                bib.Append(" = {");
+                bib.Append(tag.Value);
+                bib.Append("},\n");
+            }
+
+            bib.Append("}");
+
+            return bib.ToString();
+        }
         #endregion

         #region Public Indexer


Added testReponse.close to the methods and pushed the reponse variables outside of the methods

--- CS410Project/FTPClient.cs
+++ CS410Project/FTPClient.cs
@@ -34,16 +34,19 @@
         public override bool establishConnection()
         {
             request = (FtpWebRequest)WebRequest.Create(destination);
+            //Request is going to stay alive, until a timeout, or a logout
+            request.KeepAlive = true;
+            //Set the timeout to only be 5000ms
+            request.Timeout = 5000;
+            //Use password and username to access FTP
             request.Credentials = new NetworkCredential(username, password);
             //Perform any action just to test to see if it failed
             //In this case we are just using List Directory to see if the directory exist
             request.Method = WebRequestMethods.Ftp.ListDirectory;
-            //Request is going to stay alive, until a timeout, or a logout
-            request.KeepAlive = true;
             try
             {
                 //Test the connection
-                WebResponse testResponse = request.GetResponse();
+                testResponse = request.GetResponse();
             }
             catch(WebException err)
             {
@@ -53,6 +56,7 @@
                 return false;
             }
             //Connection is valid, return true
+            testResponse.Close();
             return true;
         }
         //This function creates a list of the files/folders in the current directory
@@ -61,12 +65,11 @@
             List<string> results = new List<string>();
             request = (FtpWebRequest)WebRequest.Create(destination + currDirectory);
             //Request is going to stay alive, until a timeout, or a logout
-            request.KeepAlive = true;
             request.Method = WebRequestMethods.Ftp.ListDirectory;
             try
             {
                 //Check if the file exist on the server
-                WebResponse testResponse = request.GetResponse();
+                testResponse = request.GetResponse();
             }
             catch (WebException err)
             {
@@ -74,7 +77,7 @@
                 Console.WriteLine(err.ToString());
                 return null;
             }
-            FtpWebResponse response = (FtpWebResponse)request.GetResponse();
+            response = (FtpWebResponse)request.GetResponse();
             Stream responseStream = response.GetResponseStream();
             StreamReader reader = new StreamReader(responseStream);

@@ -88,8 +91,17 @@
             response.Close();
             return results;
         }
-        //TODO: add definitions to virtual functions in base class
+
+        //TODO: Add more functionality for the FTP client here
+        //Also include the function prototype as an abstract type in the Client base class
+
+        /*The request object stores credentials and performs the methods to
+        *to interact with the FTP server*/
         private FtpWebRequest request;
+        //This response is used for when testing if the connection is valid
+        private WebResponse testResponse;
+        //This reponse is used to pull data from the FTP server
+        private FtpWebResponse response;

     }
 }