In BrandClient.GetBrandsByTagAsync SDKExceptionResponseTestAsync ArgumentException changed to ArgumentOutOfRangeException for InRange valida

tion.

-New parameter added to ArgumentOutOfRangeException for InRange
validation.

--- src/XOMNI.SDK.Public.Test/Fixtures/Clients/Catalog/BrandClientFixture.cs
+++ src/XOMNI.SDK.Public.Test/Fixtures/Clients/Catalog/BrandClientFixture.cs
@@ -344,7 +344,7 @@
         {
             await base.SDKExceptionResponseTestAsync(
                 (BrandClient c) => c.GetBrandsByTagAsync(1, 1, -2),
-                new ArgumentException("take must be greater than or equal to 1.")
+                new ArgumentOutOfRangeException("take", -2, string.Format("{0} must be in range ({1} - {2}).", "take", 1, 1000))
             );
         }


Add tests for null values

Add tests for null values

--- QueryBuilder.Tests/QueryBuilderTest.cs
+++ QueryBuilder.Tests/QueryBuilderTest.cs
@@ -183,10 +183,36 @@
             var c = Compile(query);

             Assert.Equal("WITH [old_cards] AS (SELECT * FROM [all_cars] WHERE [year] < 2000) INSERT INTO [expensive_cars] ([name], [model], [year]) SELECT * FROM (SELECT *, ROW_NUMBER() OVER (ORDER BY (SELECT 0)) AS [row_num] FROM [old_cars] WHERE [price] > 100) AS [subquery] WHERE [row_num] BETWEEN 11 AND 20", c[0]);
-
+
             Assert.Equal("WITH `old_cards` AS (SELECT * FROM `all_cars` WHERE `year` < 2000) INSERT INTO `expensive_cars` (`name`, `model`, `year`) SELECT * FROM `old_cars` WHERE `price` > 100 LIMIT 10 OFFSET 10", c[1]);
-
+
             Assert.Equal("WITH \"old_cards\" AS (SELECT * FROM \"all_cars\" WHERE \"year\" < 2000) INSERT INTO \"expensive_cars\" (\"name\", \"model\", \"year\") SELECT * FROM \"old_cars\" WHERE \"price\" > 100 LIMIT 10 OFFSET 10", c[2]);
+        }
+
+        [Fact]
+        public void InsertWithNullValues()
+        {
+            var query = new Query("Books").Insert(
+                new[] { "Id", "Author", "ISBN", "Date" },
+                new object[] { 1, "Author 1", "123456", null }
+            );
+
+            var c = Compile(query);
+
+            Assert.Equal("INSERT INTO [Books] ([Id], [Author], [ISBN], [Date]) VALUES (1, 'Author 1', 123456, NULL)", c[0]);
+        }
+
+        [Fact]
+        public void UpdateWithNullValues()
+        {
+            var query = new Query("Books").Where("Id", 1).Update(
+                new[] { "Author", "Date", "Version" },
+                new object[] { "Author 1", null, null }
+            );
+
+            var c = Compile(query);
+
+            Assert.Equal("UPDATE [Books] SET [Author] = 'Author 1', [Date] = NULL, [Version] = NULL WHERE [Id] = 1", c[0]);
         }
     }
 }


Fixed update-hooks to correctly update the surface-rectangle

--- RGB.NET.Core/RGBSurfaceDeviceLoader.cs
+++ RGB.NET.Core/RGBSurfaceDeviceLoader.cs
@@ -28,6 +28,7 @@
                     addedDevice = device;

                     device.PropertyChanged += DeviceOnPropertyChanged;
+                    device.Location.PropertyChanged += DeviceLocationOnPropertyChanged;
                     _devices.Add(device);
                 }
             }
@@ -45,7 +46,15 @@
             {
                 SurfaceLayoutChanged?.Invoke(new SurfaceLayoutChangedEventArgs(sender as IRGBDevice, false, true));
                 UpdateSurfaceRectangle();
+
+                ((IRGBDevice)sender).Location.PropertyChanged += DeviceLocationOnPropertyChanged;
             }
+        }
+
+        private static void DeviceLocationOnPropertyChanged(object sender, PropertyChangedEventArgs propertyChangedEventArgs)
+        {
+            SurfaceLayoutChanged?.Invoke(new SurfaceLayoutChangedEventArgs(sender as IRGBDevice, false, true));
+            UpdateSurfaceRectangle();
         }

         #endregion


Fixed GeoIP again

Fixed GeoIP again

last service gone offline

--- Client/Core/GeoIP.cs
+++ Client/Core/GeoIP.cs
@@ -1,6 +1,6 @@
 using System.IO;
 using System.Net;
-using System.Xml;
+using System.Text.RegularExpressions;

 namespace Core
 {
@@ -12,11 +12,29 @@
         public string Region { get; private set; }
         public string City { get; private set; }

+        private string GetWANIP()
+        {
+            HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://checkip.dyndns.org");
+            request.Proxy = null;
+            request.Timeout = 5000;
+            HttpWebResponse response = (HttpWebResponse)request.GetResponse();
+            Stream dataStream = response.GetResponseStream();
+            StreamReader reader = new StreamReader(dataStream);
+            string responseString = reader.ReadToEnd();
+            reader.Close();
+            dataStream.Close();
+            response.Close();
+
+            responseString = (new Regex(@"\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b")).Match(responseString).Value;
+            return responseString;
+        }
+
         public GeoIP()
         {
             try
             {
-                HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://freegeoip.net/xml/");
+                WANIP = GetWANIP();
+                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(string.Format("http://api.hackertarget.com/geoip/?q={0}", WANIP));
                 request.Proxy = null;
                 request.Timeout = 5000;
                 HttpWebResponse response = (HttpWebResponse)request.GetResponse();
@@ -27,14 +45,24 @@
                 dataStream.Close();
                 response.Close();

-                XmlDocument doc = new XmlDocument();
-                doc.LoadXml(responseString);
+                string[] resp = responseString.Split('\n');

-                WANIP = doc.SelectSingleNode("Response//IP").InnerXml.ToString();
-                Country = (!string.IsNullOrEmpty(doc.SelectSingleNode("Response//CountryName").InnerXml.ToString())) ? doc.SelectSingleNode("Response//CountryName").InnerXml.ToString() : "Unknown";
-                CountryCode = (!string.IsNullOrEmpty(doc.SelectSingleNode("Response//CountryCode").InnerXml.ToString())) ? doc.SelectSingleNode("Response//CountryCode").InnerXml.ToString() : "-";
-                Region = (!string.IsNullOrEmpty(doc.SelectSingleNode("Response//RegionName").InnerXml.ToString())) ? doc.SelectSingleNode("Response//RegionName").InnerXml.ToString() : "Unknown";
-                City = (!string.IsNullOrEmpty(doc.SelectSingleNode("Response//City").InnerXml.ToString())) ? doc.SelectSingleNode("Response//City").InnerXml.ToString() : "Unknown";
+                foreach (string line in resp)
+                {
+                    if (line.StartsWith("Country: "))
+                    {
+                        Country = line.Replace("Country: ", string.Empty);
+                        CountryCode = Country;
+                    }
+                    else if (line.StartsWith("State: "))
+                    {
+                        Region = line.Replace("State: ", string.Empty);
+                    }
+                    else if (line.StartsWith("City: "))
+                    {
+                        City = line.Replace("City: ", string.Empty);
+                    }
+                }
             }
             catch
             {


Added buffer and method to flush the buffer. May possibly need to add a lock to the buffer

--- LinkedData/DataManagers/LinkedDataManager.cs
+++ LinkedData/DataManagers/LinkedDataManager.cs
@@ -22,6 +22,7 @@
         private readonly IQueryableStorage _store;
         protected readonly IConceptManager ConceptManager;
         private readonly Uri _graphUri;
+        private List<Triple> _tripleWriteBuffer = new List<Triple>();

         public LinkedDataManager(IQueryableStorage store, IConceptManager conceptManager, Uri graphUri)
         {
@@ -82,10 +83,32 @@

             triples = ApplyFormatters(_inFormatters, triples);

-            if (_store.UpdateSupported)
+            //Not need atm.
+            //triples = AddGraphUriToTriples(_graphUri, triples);
+
+            _tripleWriteBuffer.AddRange(triples);
+        }
+
+        public void Flush()
+        {
+            if (_store.UpdateSupported && _tripleWriteBuffer != null && _tripleWriteBuffer.Any())
             {
-                _store.UpdateGraph(_graphUri, triples, null);
+                _store.UpdateGraph(_graphUri, _tripleWriteBuffer, null);
             }
+
+            _tripleWriteBuffer = new List<Triple>();
+        }
+
+        private IEnumerable<Triple> AddGraphUriToTriples(Uri _graphUri, IEnumerable<Triple> triples)
+        {
+            var newTriples = new List<Triple>();
+
+            foreach (var triple in triples)
+            {
+                newTriples.Add(new Triple(triple.Subject, triple.Predicate, triple.Object, _graphUri));
+            }
+
+            return newTriples;
         }

         public void DeleteTriple(Triple triple)
@@ -141,7 +164,7 @@
                         if (!filter.ShouldFilter(triple))
                         {
                             innerFilteredTriples.Add(triple);
-                        }
+                        }
                     }

                     FilteredTriples = innerFilteredTriples;


Updated to v0.5.6

Updated to v0.5.6

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


Changed generic exception to specific

Changed generic exception to specific

Replaced Exception with InvalidOperationException when adding a macro to
the repository.

--- MacroManager.Core/Data/XmlMacroRepository.cs
+++ MacroManager.Core/Data/XmlMacroRepository.cs
@@ -157,7 +157,7 @@
             var root = document.Element(MACRO_ROOT_LABEL);
             if (root.Elements(MACRO_LABEL).Any(x => x.Attribute(MACRO_ID_LABEL).Value == macro.MacroId.ToString()))
             {
-                throw new Exception("Can't add the same macro twice!");
+                throw new InvalidOperationException("Can't add the same macro twice!");
             }
             var userActions = macro.GetUserActions();
             var macroXml = new XElement(
@@ -295,6 +295,5 @@

         #endregion

-
     }
 }


Fixed how we render splash screens.

Fixed how we render splash screens.

--- MagicalLifeGUIWindows/Splash/SplashScreen.cs
+++ MagicalLifeGUIWindows/Splash/SplashScreen.cs
@@ -1,4 +1,5 @@
 using MagicalLifeGUIWindows.Rendering;
+using Microsoft.Xna.Framework;
 using Microsoft.Xna.Framework.Graphics;
 using System;
 using System.Collections.Generic;
@@ -14,6 +15,8 @@
     public class SplashScreen
     {
         protected const int FPS = 60;
+
+        protected Rectangle DisplayZone { get; set; }

         /// <summary>
         /// How many frames to show the splash screen.
@@ -31,6 +34,7 @@
         {
             this.Frames = (int)duration * SplashScreen.FPS;
             this.Logo = Game1.AssetManager.Load<Texture2D>(logo);
+            this.DisplayZone = this.CalculateDisplayLocation();
         }

         /// <summary>
@@ -44,8 +48,55 @@

         public void Draw(ref SpriteBatch spBatch)
         {
-            spBatch.Draw(this.Logo, RenderingPipe.FullScreenWindow, RenderingPipe.colorMask);
+            spBatch.Draw(this.Logo, this.DisplayZone, RenderingPipe.colorMask);
             this.Frames--;
+        }
+
+        private Rectangle CalculateDisplayLocation()
+        {
+            int x;
+            int y;
+
+            int width;
+            int height;
+
+            if (this.Logo.Bounds.Width < RenderingPipe.FullScreenWindow.Width)
+            {
+                width = this.Logo.Bounds.Width;
+            }
+            else
+            {
+                width = RenderingPipe.FullScreenWindow.Width;
+            }
+
+            if (this.Logo.Bounds.Height < RenderingPipe.FullScreenWindow.Height)
+            {
+                height = this.Logo.Bounds.Height;
+            }
+            else
+            {
+                height = RenderingPipe.FullScreenWindow.Height;
+            }
+
+            if (this.Logo.Bounds.Width < RenderingPipe.FullScreenWindow.Width)
+            {
+                x = (RenderingPipe.FullScreenWindow.Size.X - this.Logo.Bounds.Size.X) / 2;
+            }
+            else
+            {
+                x = RenderingPipe.FullScreenWindow.Width;
+            }
+
+            if (this.Logo.Bounds.Height < RenderingPipe.FullScreenWindow.Height)
+            {
+                y = (RenderingPipe.FullScreenWindow.Size.Y - this.Logo.Bounds.Size.Y) / 2;
+            }
+            else
+            {
+                y = RenderingPipe.FullScreenWindow.Height;
+            }
+
+            return new Rectangle(x, y, width, height);
         }
     }
 }


Allow only TimeOfDay between 12:00:00 AM and 11:59:59.9999999 PM

--- MahApps.Metro/Controls/TimePartPickerBase.cs
+++ MahApps.Metro/Controls/TimePartPickerBase.cs
@@ -72,6 +72,15 @@
             typeof(TimePartPickerBase),
             new PropertyMetadata(TimePartVisibility.All, OnPickerVisibilityChanged));

+        /// <summary>
+        /// Represents the time 00:00:00; 12:00:00 AM respectively
+        /// </summary>
+        private static readonly TimeSpan MinValue = TimeSpan.Zero;
+        /// <summary>
+        /// Represents the time 23:59:59.9999999; 11:59:59.9999999 PM respectively
+        /// </summary>
+        private static readonly TimeSpan MaxValue = TimeSpan.FromDays(1) - TimeSpan.FromTicks(1);
+
         private const string ElementAmPmSwitcher = "PART_AmPmSwitcher";
         private const string ElementButton = "PART_Button";
         private const string ElementHourHand = "PART_HourHand";
@@ -262,7 +271,18 @@

         private static object CoerceSelectedTime(DependencyObject d, object basevalue)
         {
-            return (TimeSpan?)basevalue < TimeSpan.Zero ? TimeSpan.Zero : (TimeSpan?)basevalue;
+            var spanOfTime = (TimeSpan?)basevalue;
+
+            if (spanOfTime < MinValue)
+            {
+                return MinValue;
+            }
+            if (spanOfTime > MaxValue)
+            {
+                return MaxValue;
+            }
+
+            return spanOfTime;
         }

         private static object CoerceSource60(DependencyObject d, object basevalue)


ToHashSet nullability

ToHashSet nullability

--- Main/src/Collections/EnumerableExtensions.cs
+++ Main/src/Collections/EnumerableExtensions.cs
@@ -1,107 +1,102 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-
-using JetBrains.Annotations;
-
-namespace CodeJam
-{
-	/// <summary>
-	/// Extensions for <see cref="IEnumerable{T}"/>
-	/// </summary>
-	[PublicAPI]
-	public static class EnumerableExtensions
-	{
-		/// <summary>
-		/// Appends specified <paramref name="element"/> to end of the collection.
-		/// </summary>
-		public static IEnumerable<T> Concat<T>(this IEnumerable<T> source, T element)
-		{
-			foreach (var item in source)
-				yield return item;
-			yield return element;
-		}
-
-		/// <summary>
-		/// Appends specified <paramref name="elements"/> to end of the collection.
-		/// </summary>
-		public static IEnumerable<T> Concat<T>(this IEnumerable<T> source, params T[] elements)
-		{
-			foreach (var item in source)
-				yield return item;
-			foreach (var element in elements)
-				yield return element;
-		}
-
-		/// <summary>
-		/// Prepends specified <paramref name="element"/> to the collection start.
-		/// </summary>
-		public static IEnumerable<T> Prepend<T>(this IEnumerable<T> source, T element)
-		{
-			yield return element;
-			foreach (var item in source)
-				yield return item;
-		}
-
-		/// <summary>
-		/// Prepends specified <paramref name="elements"/> to the collection start.
-		/// </summary>
-		public static IEnumerable<T> Prepend<T>(this IEnumerable<T> source, params T[] elements)
-		{
-			foreach (var element in elements)
-				yield return element;
-			foreach (var item in source)
-				yield return item;
-		}
-
-		/// <summary>
-		/// Creates a <see cref="HashSet{T}"/> from an <see cref="IEnumerable{T}"/>.
-		/// </summary>
-		public static HashSet<T> ToHashSet<T>([NotNull] this IEnumerable<T> source)
-		{
-			if (source == null) throw new ArgumentNullException(nameof(source));
-			return new HashSet<T>(source);
-		}
-
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using JetBrains.Annotations;
+
+namespace CodeJam
+{
+	/// <summary>
+	/// Extensions for <see cref="IEnumerable{T}"/>
+	/// </summary>
+	[PublicAPI]
+	public static class EnumerableExtensions
+	{
+		/// <summary>
+		/// Appends specified <paramref name="element"/> to end of the collection.
+		/// </summary>
+		public static IEnumerable<T> Concat<T>(this IEnumerable<T> source, T element)
+		{
+			foreach (var item in source)
+				yield return item;
+			yield return element;
+		}
+
+		/// <summary>
+		/// Appends specified <paramref name="elements"/> to end of the collection.
+		/// </summary>
+		public static IEnumerable<T> Concat<T>(this IEnumerable<T> source, params T[] elements)
+		{
+			foreach (var item in source)
+				yield return item;
+			foreach (var element in elements)
+				yield return element;
+		}
+
+		/// <summary>
+		/// Prepends specified <paramref name="element"/> to the collection start.
+		/// </summary>
+		public static IEnumerable<T> Prepend<T>(this IEnumerable<T> source, T element)
+		{
+			yield return element;
+			foreach (var item in source)
+				yield return item;
+		}
+
+		/// <summary>
+		/// Prepends specified <paramref name="elements"/> to the collection start.
+		/// </summary>
+		public static IEnumerable<T> Prepend<T>(this IEnumerable<T> source, params T[] elements)
+		{
+			foreach (var element in elements)
+				yield return element;
+			foreach (var item in source)
+				yield return item;
+		}
+
 		/// <summary>
 		/// Creates a <see cref="HashSet{T}"/> from an <see cref="IEnumerable{T}"/>.
 		/// </summary>
-		public static HashSet<T> ToHashSet<T>([NotNull] this IEnumerable<T> source, IEqualityComparer<T> comparer)
+		[NotNull]
+		public static HashSet<T> ToHashSet<T>([NotNull] this IEnumerable<T> source) => new HashSet<T>(source);
+
+		/// <summary>
+		/// Creates a <see cref="HashSet{T}"/> from an <see cref="IEnumerable{T}"/>.
+		/// </summary>
+		[NotNull]
+		public static HashSet<T> ToHashSet<T>(
+			[NotNull] this IEnumerable<T> source,
+			[NotNull] IEqualityComparer<T> comparer) =>
+				new HashSet<T>(source, comparer);
+
+		/// <summary>
+		/// Returns first element, or specified <paramref name="defaultValue"/>, if sequence is empty.
+		/// </summary>
+		public static T FirstOrDefault<T>([NotNull] this IEnumerable<T> source, T defaultValue)
 		{
 			if (source == null)
 				throw new ArgumentNullException(nameof(source));
+			foreach (var item in source)
+				return item;
+			return defaultValue;
+		}

-			return new HashSet<T>(source, comparer);
+		/// <summary>
+		/// Returns first element, or specified <paramref name="defaultValue"/>, if sequence is empty.
+		/// </summary>
+		public static T FirstOrDefault<T>(
+			[NotNull] this IEnumerable<T> source,
+			T defaultValue,
+			[NotNull] Func<T, bool> predicate)
+		{
+			if (source == null)
+				throw new ArgumentNullException(nameof(source));
+			if (predicate == null)
+				throw new ArgumentNullException(nameof(predicate));
+			foreach (var item in source)
+				if (predicate(item))
+					return item;
+			return defaultValue;
 		}
-
-		/// <summary>
-		/// Returns first element, or specified <paramref name="defaultValue"/>, if sequence is empty.
-		/// </summary>
-		public static T FirstOrDefault<T>([NotNull] this IEnumerable<T> source, T defaultValue)
-		{
-			if (source == null)
-				throw new ArgumentNullException(nameof(source));
-			foreach (var item in source)
-				return item;
-			return defaultValue;
-		}
-
-		/// <summary>
-		/// Returns first element, or specified <paramref name="defaultValue"/>, if sequence is empty.
-		/// </summary>
-		public static T FirstOrDefault<T>(
-			[NotNull] this IEnumerable<T> source,
-			T defaultValue,
-			[NotNull] Func<T, bool> predicate)
-		{
-			if (source == null)
-				throw new ArgumentNullException(nameof(source));
-			if (predicate == null)
-				throw new ArgumentNullException(nameof(predicate));
-			foreach (var item in source)
-				if (predicate(item))
-					return item;
-			return defaultValue;
-		}
-	}
+	}
 }


Fix tunein issues

Fix tunein issues

--- MediaBrowser.Plugins.TuneIn/TuneInChannel.cs
+++ MediaBrowser.Plugins.TuneIn/TuneInChannel.cs
@@ -39,7 +39,7 @@
             get
             {
                 // Increment as needed to invalidate all caches
-                return "12";
+                return "46";
             }
         }

@@ -78,18 +78,21 @@
             {
                 var channelID = query.FolderId.Split('_');

-
+
                 if (channelID[0] == "preset")
                 {
                     items = await GetPresets(query, cancellationToken);
                 }
-
-                query.FolderId = channelID[1].Replace("&", "&");
-
-
-                if (channelID.Count() > 2)
-                {
-                    items = await GetMenu(channelID[2], query, cancellationToken).ConfigureAwait(false);
+                else
+                {
+                    query.FolderId = channelID[1].Replace("&", "&");
+
+                    if (channelID.Count() > 2)
+                    {
+                        items = await GetMenu(channelID[2], query, cancellationToken).ConfigureAwait(false);
+                    }
+                    else
+                        items = await GetMenu("", query, cancellationToken).ConfigureAwait(false);
                 }
             }

@@ -119,9 +122,9 @@
                 {
                     var body = page.DocumentNode.SelectSingleNode("//body");

-                    if (body.SelectNodes("./outline[@url and @type=\"audio\"]") != null)
-                    {
-                       foreach (var node in body.SelectNodes("./outline[@url]"))
+                    if (body.SelectNodes("//outline[@url and @type=\"audio\"]") != null)
+                    {
+                        foreach (var node in body.SelectNodes("//outline[@url and @type=\"audio\"]"))
                         {
                             items.Add(new ChannelItemInfo
                             {
@@ -129,8 +132,21 @@
                                 Id = "stream_" + node.Attributes["url"].Value,
                                 Type = ChannelItemType.Media,
                                 ContentType = ChannelMediaContentType.Podcast,
-                                ImageUrl = node.Attributes["image"].Value,
+                                ImageUrl = node.Attributes["image"] != null ? node.Attributes["image"].Value : null,
                                 MediaType = ChannelMediaType.Audio
+                            });
+                        }
+                    }
+                    if (body.SelectNodes("//outline[@key=\"shows\"]") != null)
+                    {
+                        foreach (var node in body.SelectNodes("//outline[@key=\"shows\"]/outline[@url]"))
+                        {
+                            items.Add(new ChannelItemInfo
+                            {
+                                Name = node.Attributes["text"].Value,
+                                Id = "subcat_" + node.Attributes["url"].Value,
+                                Type = ChannelItemType.Folder,
+                                ImageUrl = node.Attributes["image"] != null ? node.Attributes["image"].Value : null
                             });
                         }
                     }
@@ -175,9 +191,12 @@
                                 items.Add(new ChannelItemInfo
                                 {
                                     Name = node.Attributes["text"].Value,
-                                    Id = "subcat_" + node.Attributes["url"].Value,
+                                    Id = "stream_" + node.Attributes["url"].Value,
                                     ImageUrl = node.Attributes["image"] != null ? node.Attributes["image"].Value : "",
-                                    Type = ChannelItemType.Folder,
+                                    Type = ChannelItemType.Media,
+                                    ContentType = ChannelMediaContentType.Podcast,
+                                    MediaType = ChannelMediaType.Audio
+
                                 });
                             }
                         }


Added new seasons

Added new seasons

--- Modules/RocketLeague/RocketLeagueCommands.cs
+++ Modules/RocketLeague/RocketLeagueCommands.cs
@@ -795,21 +795,21 @@
             {
                 var statAdd = new RlUserStat();
                 var getStat = db.RlUserStats.Where(s => s.SteamID == steamId).FirstOrDefault();
-                if (stats.rankedSeasons._5._onevone != null)
-                {
-                    statAdd.RankedDuel = stats.rankedSeasons._5._onevone.rankPoints.ToString();
-                }
-                if (stats.rankedSeasons._5._twovtwo != null)
-                {
-                    statAdd.Ranked2v2 = stats.rankedSeasons._5._twovtwo.rankPoints.ToString();
-                }
-                if (stats.rankedSeasons._5._solostandard != null)
-                {
-                    statAdd.RankedSolo = stats.rankedSeasons._5._solostandard.rankPoints.ToString();
-                }
-                if (stats.rankedSeasons._5._standard != null)
-                {
-                    statAdd.Ranked3v3 = stats.rankedSeasons._5._standard.rankPoints.ToString();
+                if (stats.rankedSeasons._6._onevone != null)
+                {
+                    statAdd.RankedDuel = stats.rankedSeasons._6._onevone.rankPoints.ToString();
+                }
+                if (stats.rankedSeasons._6._twovtwo != null)
+                {
+                    statAdd.Ranked2v2 = stats.rankedSeasons._6._twovtwo.rankPoints.ToString();
+                }
+                if (stats.rankedSeasons._6._solostandard != null)
+                {
+                    statAdd.RankedSolo = stats.rankedSeasons._6._solostandard.rankPoints.ToString();
+                }
+                if (stats.rankedSeasons._6._standard != null)
+                {
+                    statAdd.Ranked3v3 = stats.rankedSeasons._6._standard.rankPoints.ToString();
                 }
                 if (getStat == null)
                 {
@@ -818,21 +818,21 @@
                 }
                 else
                 {
-                    if (stats.rankedSeasons._5._onevone != null)
-                    {
-                        getStat.RankedDuel = stats.rankedSeasons._5._onevone.rankPoints.ToString();
-                    }
-                    if (stats.rankedSeasons._5._twovtwo != null)
-                    {
-                        getStat.Ranked2v2 = stats.rankedSeasons._5._twovtwo.rankPoints.ToString();
-                    }
-                    if (stats.rankedSeasons._5._solostandard != null)
-                    {
-                        getStat.RankedSolo = stats.rankedSeasons._5._solostandard.rankPoints.ToString();
-                    }
-                    if (stats.rankedSeasons._5._standard != null)
-                    {
-                        getStat.Ranked3v3 = stats.rankedSeasons._5._standard.rankPoints.ToString();
+                    if (stats.rankedSeasons._6._onevone != null)
+                    {
+                        getStat.RankedDuel = stats.rankedSeasons._6._onevone.rankPoints.ToString();
+                    }
+                    if (stats.rankedSeasons._6._twovtwo != null)
+                    {
+                        getStat.Ranked2v2 = stats.rankedSeasons._6._twovtwo.rankPoints.ToString();
+                    }
+                    if (stats.rankedSeasons._6._solostandard != null)
+                    {
+                        getStat.RankedSolo = stats.rankedSeasons._6._solostandard.rankPoints.ToString();
+                    }
+                    if (stats.rankedSeasons._6._standard != null)
+                    {
+                        getStat.Ranked3v3 = stats.rankedSeasons._6._standard.rankPoints.ToString();
                     }
                     getStat.SteamID = steamId;
                 }


Added the RevokeMandate method to the IMandateClient interface

--- Mollie.Api/Client/Abstract/IMandateClient.cs
+++ Mollie.Api/Client/Abstract/IMandateClient.cs
@@ -12,5 +12,6 @@
         Task<MandateResponse> CreateMandateAsync(string customerId, MandateRequest request);
         Task<ListResponse<MandateResponse>> GetMandateListAsync(UrlObjectLink<ListResponse<MandateResponse>> url);
         Task<MandateResponse> GetMandateAsync(UrlObjectLink<MandateResponse> url);
+        Task RevokeMandate(string customerId, string mandateId);
     }
 }


Fixed broken test

Fixed broken test

--- MtgApiManager.Lib.Test/Core/RateLimitTest.cs
+++ MtgApiManager.Lib.Test/Core/RateLimitTest.cs
@@ -27,12 +27,12 @@
             var privateObject = new PrivateObject(limit);

             limit.AddApiCall();
-            Task.Delay(500);
+            Thread.Sleep(500);
             limit.AddApiCall();
-            Task.Delay(500);
+            Thread.Sleep(500);
             limit.AddApiCall();

-            Assert.AreEqual(3, (privateObject.GetFieldOrProperty("_webServiceCalls") as HashSet<DateTime>).Count);
+            Assert.AreEqual(3, (privateObject.GetFieldOrProperty("_webServiceCalls") as List<DateTime>).Count);
         }

         /// <summary>


Tabifyed

Tabifyed

--- NBi.NUnit.Runtime/ConnectionStringsFinder.cs
+++ NBi.NUnit.Runtime/ConnectionStringsFinder.cs
@@ -6,23 +6,23 @@

 namespace NBi.NUnit.Runtime
 {
-    public class ConnectionStringsFinder
-    {
-        protected internal virtual NameValueCollection Find()
-        {
-            var list = new NameValueCollection();
-            string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
-            //Try to find a config file, if existing take the path inside for the TestSuite
-            if (File.Exists(configFile))
-            {
-                //line bellow to avoid .Net framework bug: http://support.microsoft.com/kb/2580188/en-us
-                var configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
+	public class ConnectionStringsFinder
+	{
+		protected internal virtual NameValueCollection Find()
+		{
+			var list = new NameValueCollection();
+			string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile;
+			//Try to find a config file, if existing take the path inside for the TestSuite
+			if (File.Exists(configFile))
+			{
+				//line bellow to avoid .Net framework bug: http://support.microsoft.com/kb/2580188/en-us
+				var configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);

-                if (configuration.ConnectionStrings != null)
-                    foreach (ConnectionStringSettings css in configuration.ConnectionStrings.ConnectionStrings)
-	                    list.Add(css.Name, css.ConnectionString);
-            }
-            return list;
-        }
-    }
+				if (configuration.ConnectionStrings != null)
+					foreach (ConnectionStringSettings css in configuration.ConnectionStrings.ConnectionStrings)
+						list.Add(css.Name, css.ConnectionString);
+			}
+			return list;
+		}
+	}
 }


Version upped

Version upped

--- NadekoBot.Core/Services/Impl/StatsService.cs
+++ NadekoBot.Core/Services/Impl/StatsService.cs
@@ -23,7 +23,7 @@
         private readonly IBotCredentials _creds;
         private readonly DateTime _started;

-        public const string BotVersion = "2.17.3";
+        public const string BotVersion = "2.17.4";
         public string Author => "Kwoth#2560";
         public string Library => "Discord.Net";


Version upped

Version upped

--- NadekoBot.Core/Services/Impl/StatsService.cs
+++ NadekoBot.Core/Services/Impl/StatsService.cs
@@ -21,7 +21,7 @@
         private readonly IBotCredentials _creds;
         private readonly DateTime _started;

-        public const string BotVersion = "2.4.2";
+        public const string BotVersion = "2.4.3";

         public string Author => "Kwoth#2560";
         public string Library => "Discord.Net";


Add view file feature

Add view file feature

--- ReplaceStringInManyProject/FormMain.cs
+++ ReplaceStringInManyProject/FormMain.cs
@@ -872,6 +872,18 @@
           Translate("No selected item"), MessageBoxButtons.OK);
         return;
       }
+
+      var selectedFiles = listViewResult.SelectedItems;
+      foreach (ListViewItem file in selectedFiles)
+      {
+        StartProcess(file.SubItems[3].ToString());
+      }
+
+    }
+
+    private static void StartProcess(string fileName)
+    {
+      Process.Start("notepad.exe " + fileName);
     }

     private void listViewResult_ItemChecked(object sender, ItemCheckedEventArgs e)


Update test class

Update test class

--- osu.Framework.Tests/IO/FontStoreTest.cs
+++ osu.Framework.Tests/IO/FontStoreTest.cs
@@ -24,8 +24,8 @@
         [Test]
         public void TestNestedScaleAdjust()
         {
-            var fontStore = new FontStore(new GlyphStore(fontResourceStore, "OpenSans") { CacheStorage = storage }, scaleAdjust: 100);
-            var nestedFontStore = new FontStore(new GlyphStore(fontResourceStore, "OpenSans-Bold") { CacheStorage = storage }, 10);
+            var fontStore = new FontStore(new RawCachingGlyphStore(fontResourceStore, "OpenSans") { CacheStorage = storage }, scaleAdjust: 100);
+            var nestedFontStore = new FontStore(new RawCachingGlyphStore(fontResourceStore, "OpenSans-Bold") { CacheStorage = storage }, 10);

             fontStore.AddStore(nestedFontStore);


Remove unused using

Remove unused using

--- osu.Game.Rulesets.Catch/CatchRuleset.cs
+++ osu.Game.Rulesets.Catch/CatchRuleset.cs
@@ -10,7 +10,6 @@
 using System.Collections.Generic;
 using osu.Framework.Graphics;
 using osu.Framework.Input.Bindings;
-using osu.Game.Rulesets.Catch.Objects;

 namespace osu.Game.Rulesets.Catch
 {


Fix replays not correctly considering negative time diffs

--- osu.Game/Rulesets/Scoring/ScoreStore.cs
+++ osu.Game/Rulesets/Scoring/ScoreStore.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using System.IO;
+using System.Linq;
 using osu.Framework.Platform;
 using osu.Game.Beatmaps;
 using osu.Game.Database;
@@ -129,7 +130,14 @@
             {
                 var split = l.Split('|');

-                if (split.Length < 4 || float.Parse(split[0]) < 0) continue;
+                if (split.Length < 4)
+                    continue;
+
+                if (split[0] == "-12345")
+                {
+                    // Todo: The seed is provided in split[3], which we'll need to use at some point
+                    continue;
+                }

                 lastTime += float.Parse(split[0]);

@@ -141,7 +149,7 @@
                 ));
             }

-            return new Replay { Frames = frames };
+            return new Replay { Frames = frames.OrderBy(f => f.Time).ToList() };
         }
     }
 }


Log exception and rethrow

Log exception and rethrow

--- Nodejs/Product/TestAdapter/TestDiscoverer.cs
+++ Nodejs/Product/TestAdapter/TestDiscoverer.cs
@@ -1,15 +1,15 @@
 //*********************************************************//
 //    Copyright (c) Microsoft. All rights reserved.
-//
+//
 //    Apache 2.0 License
-//
+//
 //    You may obtain a copy of the License at
 //    http://www.apache.org/licenses/LICENSE-2.0
-//
-//    Unless required by applicable law or agreed to in writing, software
-//    distributed under the License is distributed on an "AS IS" BASIS,
-//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-//    implied. See the License for the specific language governing
+//
+//    Unless required by applicable law or agreed to in writing, software
+//    distributed under the License is distributed on an "AS IS" BASIS,
+//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+//    implied. See the License for the specific language governing
 //    permissions and limitations under the License.
 //
 //*********************************************************//
@@ -89,6 +89,9 @@
                         //Debug.Fail("Before Discover");
                         DiscoverTests(testItems, proj, discoverySink, logger);
                     }
+                } catch (Exception ex) {
+                    logger.SendMessage(TestMessageLevel.Error, ex.Message);
+                    throw ex;
                 } finally {
                     // Disposing buildEngine does not clear the document cache in
                     // VS 2013, so manually unload all projects before disposing.
@@ -144,7 +147,7 @@
                             CodeFilePath = (fi != null) ? fi.Filename : filePath,
                             LineNumber = (fi != null && fi.LineNumber.HasValue) ? fi.LineNumber.Value : discoveredTest.SourceLine,
                             DisplayName = discoveredTest.TestName
-                        });
+                        });

                 }
                 logger.SendMessage(TestMessageLevel.Informational, string.Format("Processing finished for framework of {0}", testFx));


normalising return types of MapAPI methods

--- OpenSimulator/addon-modules/MapAPI/MapAPI.cs
+++ OpenSimulator/addon-modules/MapAPI/MapAPI.cs
@@ -87,13 +87,24 @@
         }

-        public static OSDString pos2region(uint x, uint y)
+        public static OSDMap pos2region(uint x, uint y)
         {
             Scene scene;
+            OSDMap result;
             if (SceneManager.Instance.TryGetScene(x, y, out scene))
-                return (OSDString)scene.RegionInfo.RegionName;
+            {
+                result = new OSDMap(new Dictionary<string,OSD>(){
+                    {"region", scene.RegionInfo.RegionName}
+                });
+            }
             else
-                return (OSDString)string.Empty;
+            {
+                result = new OSDMap(new Dictionary<string, OSD>(){
+                    {"error", "No region found at the specified coordinates"}
+                });
+            }
+
+            return result;
         }

         public static OSDMap region2pos(string name)
@@ -246,9 +257,7 @@
                     uint y;
                     if (uint.TryParse(args[1], out x) && uint.TryParse(args[2], out y))
                     {
-                        result = new OSDMap(new Dictionary<string, OSD>(){
-                            {"region", MapAPI.pos2region(x, y)}
-                        });
+                        result = MapAPI.pos2region(x, y);
                     }
                     else
                     {


add unit tests for settings hash code calculation

--- OutlookMatters.Test/Settings/SettingsTest.cs
+++ OutlookMatters.Test/Settings/SettingsTest.cs
@@ -51,5 +51,27 @@

             result.Should().BeTrue();
         }
+
+        [Test]
+        [TestCase("", "", "", "", true)]
+        [TestCase("x", "", "", "", false)]
+        [TestCase("", "x", "", "", false)]
+        [TestCase("", "", "x", "", false)]
+        [TestCase("", "", "", "x", false)]
+        public void GetHashCode_(string urlModifier, string teamIdModifier, string channelIdModifier,
+            string usernameModifier, bool expected)
+        {
+            const string url = "http://tempuri.org";
+            const string teamId = "team id";
+            const string channelId = "channel id";
+            const string username = "user name";
+            var otherSettings = new OutlookMatters.Settings.Settings(url + urlModifier, teamId + teamIdModifier,
+                channelId + channelIdModifier, username + usernameModifier);
+            var classUnderTest = new OutlookMatters.Settings.Settings(url, teamId, channelId, username);
+
+            var result = classUnderTest.GetHashCode() == otherSettings.GetHashCode();
+
+            result.Should().Be(expected);
+        }
     }
 }


Move UseTypeRefactoring to helpers.

Move UseTypeRefactoring to helpers.

--- src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/AbstractUseTypeCodeRefactoringProvider.cs
+++ src/Features/CSharp/Portable/CodeRefactorings/UseExplicitOrImplicitType/AbstractUseTypeCodeRefactoringProvider.cs
@@ -43,7 +43,7 @@
             var semanticModel = await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
             var optionSet = await document.GetOptionsAsync(cancellationToken).ConfigureAwait(false);

-            var declaration = GetDeclaration(root, textSpan);
+            var declaration = await GetDeclarationAsync(document, textSpan, cancellationToken).ConfigureAwait(false);
             if (declaration == null)
             {
                 return;
@@ -85,11 +85,45 @@
                     c => UpdateDocumentAsync(document, declaredType, c)));
         }

-        private static SyntaxNode GetDeclaration(SyntaxNode root, TextSpan textSpan)
+        private static async Task<SyntaxNode> GetDeclarationAsync(Document document, TextSpan textSpan, CancellationToken cancellationToken)
         {
-            var token = root.FindToken(textSpan.Start);
-            return token.Parent?.FirstAncestorOrSelf<SyntaxNode>(
-                a => a.IsKind(SyntaxKind.DeclarationExpression, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement));
+            // We want to provide refactoring for changing the Type of newly introduced variables in following cases:
+            // - DeclarationExpressionSyntax: `"42".TryParseInt32(out var number)`
+            // - VariableDeclarationSyntax: General field / variable declaration statement `var number = 42`
+            // - ForEachStatementSyntax: The variable that gets introduced by foreach `foreach(var number in numbers)`
+            //
+            // In addition to providing the refactoring when the whole node (i.e. the node that introduces the new variable) in question is selected
+            // we also want to enable it when only the type node is selected because this refactoring changes the type. We still have to make sure
+            // we're only working on TypeNodes for in above-mentioned situations.
+
+            var refactoringHelperService = document.GetLanguageService<IRefactoringHelpersService>();
+
+            var declNode = await refactoringHelperService.TryGetSelectedNodeAsync<DeclarationExpressionSyntax>(document, textSpan, cancellationToken).ConfigureAwait(false);
+            if (declNode != null)
+            {
+                return declNode;
+            }
+
+            var variableNode = await refactoringHelperService.TryGetSelectedNodeAsync<VariableDeclarationSyntax>(document, textSpan, cancellationToken).ConfigureAwait(false);
+            if (variableNode != null)
+            {
+                return variableNode;
+            }
+
+            var foreachStatement = await refactoringHelperService.TryGetSelectedNodeAsync<ForEachStatementSyntax>(document, textSpan, cancellationToken).ConfigureAwait(false);
+            if (foreachStatement != null)
+            {
+                return foreachStatement;
+            }
+
+            var typeNode = await refactoringHelperService.TryGetSelectedNodeAsync<TypeSyntax>(document, textSpan, cancellationToken).ConfigureAwait(false);
+            var typeNodeParent = typeNode?.Parent;
+            if (typeNodeParent != null && typeNodeParent.IsKind(SyntaxKind.DeclarationExpression, SyntaxKind.VariableDeclaration, SyntaxKind.ForEachStatement))
+            {
+                return typeNodeParent;
+            }
+
+            return null;
         }

         private async Task<Document> UpdateDocumentAsync(Document document, SyntaxNode node, CancellationToken cancellationToken)


fix crash in shut up

fix crash in shut up


Woops, incorrect conditional check

Woops, incorrect conditional check

--- PROBot/Scripting/LuaScript.cs
+++ PROBot/Scripting/LuaScript.cs
@@ -1338,8 +1338,8 @@
             if (values.Length != 1 && values.Length != 4 ||
                 (values.Length == 1 && values[0].Type != DataType.Table) ||
                 (values.Length == 4
-                    && values[0].Type != DataType.Number && values[1].Type != DataType.Number
-                    && values[2].Type != DataType.Number && values[3].Type != DataType.Number))
+                    && (values[0].Type != DataType.Number || values[1].Type != DataType.Number
+                    || values[2].Type != DataType.Number || values[3].Type != DataType.Number)))
             {
                 Fatal("error: moveToRectangle: must receive either a table or four numbers.");
                 return false;


Repair test in finall html is six div elements in form

--- Riganti.Utils/Riganti.Utils.Testing/SeleniumCoreSamples.Tests/UITests.cs
+++ Riganti.Utils/Riganti.Utils.Testing/SeleniumCoreSamples.Tests/UITests.cs
@@ -116,7 +116,7 @@

         public void SubSectionAction(BrowserWrapper browser)
         {
-            browser.FindElements("form").FindElements("div").ThrowIfDifferentCountThan(111);
+            browser.FindElements("form").FindElements("div").ThrowIfDifferentCountThan(6);
         }

         [TestMethod]


完善 .net framework Demo

完善 .net framework Demo

--- Samples/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Global.asax.cs
+++ Samples/Senparc.Weixin.MP.Sample/Senparc.Weixin.MP.Sample/Global.asax.cs
@@ -260,7 +260,6 @@
             //Senparc.CO2NET.Config.IsDebug = false;

             //这里设为Debug状态时，/App_Data/WeixinTraceLog/目录下会生成日志文件记录所有的API请求日志，正式发布版本建议关闭
-            Senparc.Weixin.Config.IsDebug = true;
             Senparc.Weixin.WeixinTrace.SendCustomLog("系统日志", "系统启动");//只在Senparc.Weixin.Config.IsDebug = true的情况下生效

             //自定义日志记录回调


Use additional emails

Use additional emails

--- Anlab.Mvc/Services/OrderMessageService.cs
+++ Anlab.Mvc/Services/OrderMessageService.cs
@@ -31,11 +31,17 @@
         {
             var body = await _viewRenderService.RenderViewToStringAsync("Templates/_OrderCreated", order);

+            var sendTo = order.Creator.Email;
+            if (!string.IsNullOrWhiteSpace(order.AdditionalEmails))
+            {
+                sendTo = $"{sendTo};{order.AdditionalEmails}";
+            }
+
             var message = new MailMessage
             {
                 Subject = "Work Request Confirmation",
                 Body = body,
-                SendTo = order.Creator.Email,
+                SendTo = sendTo,
                 Order = order,
                 User = order.Creator,
             };


FieldCompare examples

FieldCompare examples

--- ApiExamples/CSharp/ApiExamples/ExField.cs
+++ ApiExamples/CSharp/ApiExamples/ExField.cs
@@ -795,6 +795,44 @@
         }

         [Test]
+        public void FieldCompare()
+        {
+            //ExStart
+            //ExFor:FieldCompare
+            //ExFor:FieldCompare.ComparisonOperator
+            //ExFor:FieldCompare.LeftExpression
+            //ExFor:FieldCompare.RightExpression
+            //ExSummary:Shows how to insert a field that compares expressions.
+            Document doc = new Document();
+            DocumentBuilder builder = new DocumentBuilder(doc);
+
+            // Insert a compare field using a document builder
+            FieldCompare field = (FieldCompare)builder.InsertField(FieldType.FieldCompare, true);
+
+            // Construct a comparison statement
+            field.LeftExpression = "3";
+            field.ComparisonOperator = "<";
+            field.RightExpression = "2";
+
+            // The compare field will print a "0" or "1" depending on the truth of its statement
+            // The result of this statement is false, so a "0" will be show up in the document
+            Assert.AreEqual(" COMPARE  3 < 2", field.GetFieldCode());
+
+            builder.Writeln();
+
+            // Here a "1" will show up, because the statement is true
+            field = (FieldCompare)builder.InsertField(FieldType.FieldCompare, true);
+            field.LeftExpression = "5";
+            field.ComparisonOperator = "=";
+            field.RightExpression = "2 + 3";
+
+            Assert.AreEqual(" COMPARE  5 = \"2 + 3\"", field.GetFieldCode());
+
+            doc.UpdateFields();
+            doc.Save(MyDir + @"\Artifacts\Field.Compare.docx");
+        }
+
+        [Test]
         public void FieldIf()
         {
             //ExStart


Don't overwrite descriptor info with metadata

--- MultiMiner.UX/ViewModels/MinerFormViewModel.cs
+++ MultiMiner.UX/ViewModels/MinerFormViewModel.cs
@@ -78,7 +78,8 @@
             {
                 DeviceViewModel deviceViewModel = Devices.SingleOrDefault(d => d.Equals(metadata));
                 if (deviceViewModel != null)
-                    ObjectCopier.CopyObject(metadata, deviceViewModel);
+                    //only assigned customized values, rest are keys for Equals()
+                    deviceViewModel.FriendlyName = metadata.FriendlyName;
             }

             //remove entries from Devices not found in deviceModels or  networkDeviceModels


Detach the debugger when done testing

Detach the debugger when done testing

Since Node 8 doesn't exit when debugging unless you detach, we
should detach when the test are done.

--- Nodejs/Product/TestAdapterImpl/TestExecutor.cs
+++ Nodejs/Product/TestAdapterImpl/TestExecutor.cs
@@ -58,6 +58,8 @@

         private readonly ManualResetEvent cancelRequested = new ManualResetEvent(false);

+        private readonly ManualResetEvent testsCompleted = new ManualResetEvent(false);
+
         private static readonly char[] needToBeQuoted = new[] { ' ', '"' };
         private ProcessOutput nodeProcess;
         private object syncObject = new object();
@@ -87,8 +89,10 @@
                     {
                         case "test start":
                             {
-                                this.currentResult = new TestResult(tests.First());
-                                this.currentResult.StartTime = DateTimeOffset.Now;
+                                this.currentResult = new TestResult(tests.First())
+                                {
+                                    StartTime = DateTimeOffset.Now
+                                };
                                 this.frameworkHandle.RecordStart(tests.First());
                             }
                             break;
@@ -108,6 +112,7 @@
                 else if (testEvent.type == "suite end")
                 {
                     this.currentResultObject = testEvent.result;
+                    this.testsCompleted.Set();
                 }
             }
             catch (JsonReaderException)
@@ -271,6 +276,9 @@
                     // Ensure that --debug-brk is the first argument
                     nodeArgs.Insert(0, GetDebugArgs(nodeVersion, out port));
                 }
+
+                // make sure the testscompleted is not signalled.
+                this.testsCompleted.Reset();

                 this.nodeProcess = ProcessOutput.Run(
                     settings.NodeExePath,
@@ -321,13 +329,22 @@
                 }
                 // Send the process the list of tests to run and wait for it to complete
                 this.nodeProcess.WriteInputLine(JsonConvert.SerializeObject(testObjects));
-                this.nodeProcess.Wait();
+
+                // for node 8 the process doesn't automatically exit when debugging, so always detach
+                WaitHandle.WaitAny(new[] { this.nodeProcess.WaitHandle, this.testsCompleted });
+                if(runContext.IsBeingDebugged && app != null)
+                {
+                    app.GetDTE().Debugger.DetachAll();
+                }

                 // Automatically fail tests that haven't been run by this point (failures in before() hooks)
                 foreach (var notRunTest in this.currentTests)
                 {
-                    var result = new TestResult(notRunTest);
-                    result.Outcome = TestOutcome.Failed;
+                    var result = new TestResult(notRunTest)
+                    {
+                        Outcome = TestOutcome.Failed
+                    };
+
                     if (this.currentResultObject != null)
                     {
                         result.Messages.Add(new TestResultMessage(TestResultMessage.StandardOutCategory, this.currentResultObject.stdout));
@@ -343,10 +360,7 @@
         {
             lock (this.syncObject)
             {
-                if (this.nodeProcess != null)
-                {
-                    this.nodeProcess.Kill();
-                }
+                this.nodeProcess?.Kill();
             }
         }

@@ -436,19 +450,6 @@
     }
 }

-internal class DataReceiver
-{
-    public readonly StringBuilder Data = new StringBuilder();
-
-    public void DataReceived(object sender, DataReceivedEventArgs e)
-    {
-        if (e.Data != null)
-        {
-            this.Data.AppendLine(e.Data);
-        }
-    }
-}
-
 internal class TestReceiver : ITestCaseDiscoverySink
 {
     public List<TestCase> Tests { get; } = new List<TestCase>();


Test reference hint path

Test reference hint path

--- NuGet.Extensions.Tests/MSBuild/AdapterTests.cs
+++ NuGet.Extensions.Tests/MSBuild/AdapterTests.cs
@@ -4,6 +4,7 @@
 using NuGet.Extensions.MSBuild;
 using NuGet.Extensions.Tests.TestData;
 using NUnit.Framework;
+using NUnit.Framework.Constraints;

 namespace NuGet.Extensions.Tests.MSBuild
 {
@@ -42,6 +43,23 @@
             Assert.That(binaryDependency.IncludeVersion, Is.EqualTo(_expectedBinaryDependencyVersion));
         }

+        [Test]
+        public void BinaryReferenceHasHintPathContainingAssemblyNameAndVersion()
+        {
+            var projectAdapter = CreateProjectAdapter(Paths.ProjectWithDependencies);
+
+            var binaryReferences = projectAdapter.GetBinaryReferences();
+            var binaryDependency = binaryReferences.Single(IsExpectedBinaryDependency);
+            string hintpath;
+            var hasHintPath = binaryDependency.TryGetHintPath(out hintpath);
+
+            Assert.That(hasHintPath, Is.True);
+            const string expectedHintPathStart = "..\\packages\\" + _expectedBinaryDependencyAssemblyName;
+            const string expectedHintPathEnd = _expectedBinaryDependencyAssemblyName + ".dll";
+            Assert.That(hintpath, new StartsWithConstraint(expectedHintPathStart));
+            Assert.That(hintpath, new EndsWithConstraint(expectedHintPathEnd));
+        }
+
         private static bool IsExpectedBinaryDependency(IBinaryReference r)
         {
             return r.IncludeName == _expectedBinaryDependencyAssemblyName;


Create separate diffuseMaterialVariable

Create separate diffuseMaterialVariable

--- Source/HelixToolkit.SharpDX.Shared/Model/Material/DiffuseMaterialCore.cs
+++ Source/HelixToolkit.SharpDX.Shared/Model/Material/DiffuseMaterialCore.cs
@@ -8,11 +8,21 @@
 namespace HelixToolkit.UWP.Model
 #endif
 {
+    using Core;
+    using Render;
+    using ShaderManager;
+    using Shaders;
+    using System;
+    using System.Collections.Generic;
+    using System.Runtime.CompilerServices;
+    using Utilities;
+    using System.ComponentModel;
+
     public sealed class DiffuseMaterialCore : PhongMaterialCore
     {
         public override IEffectMaterialVariables CreateMaterialVariables(IEffectsManager manager)
         {
-            return new TextureSharedPhongMaterialVariables(DefaultPassNames.Diffuse, manager, this);
+            return new DiffuseMaterialVariables(DefaultPassNames.Diffuse, manager, this);
         }
     }

@@ -20,7 +30,347 @@
     {
         public override IEffectMaterialVariables CreateMaterialVariables(IEffectsManager manager)
         {
-            return new TextureSharedPhongMaterialVariables(DefaultPassNames.ViewCube, manager, this);
+            return new DiffuseMaterialVariables(DefaultPassNames.ViewCube, manager, this);
+        }
+    }
+
+    public sealed class DiffuseMaterialVariables : DisposeObject, IEffectMaterialVariables
+    {
+        private const int NUMTEXTURES = 1;
+        private const int NUMSAMPLERS = 1;
+        private const int DiffuseIdx = 0;
+        /// <summary>
+        /// <see cref="IEffectMaterialVariables.OnInvalidateRenderer"/>
+        /// </summary>
+        public event EventHandler<EventArgs> OnInvalidateRenderer;
+
+        private readonly ITextureResourceManager textureManager;
+        private readonly IStatePoolManager statePoolManager;
+        private readonly ShaderResourceViewProxy[] TextureResources = new ShaderResourceViewProxy[NUMTEXTURES];
+        private readonly SamplerStateProxy[] SamplerResources = new SamplerStateProxy[NUMSAMPLERS];
+
+        private int texDiffuseSlot;
+        private int samplerDiffuseSlot, samplerShadowSlot;
+        private uint textureIndex = 0;
+
+        private bool HasTextures
+        {
+            get
+            {
+                return textureIndex != 0;
+            }
+        }
+
+        public ShaderPass MaterialPass { get; private set; } = ShaderPass.NullPass;
+        public ShaderPass TransparentPass { private set; get; } = ShaderPass.NullPass;
+        /// <summary>
+        ///
+        /// </summary>
+        public string ShaderDiffuseTexName { set; get; } = DefaultBufferNames.DiffuseMapTB;
+
+        /// <summary>
+        ///
+        /// </summary>
+        public string ShaderSamplerDiffuseTexName { set; get; } = DefaultSamplerStateNames.DiffuseMapSampler;
+        /// <summary>
+        ///
+        /// </summary>
+        public string ShaderSamplerShadowMapName { set; get; } = DefaultSamplerStateNames.ShadowMapSampler;
+
+        private bool renderShadowMap = false;
+
+        /// <summary>
+        ///
+        /// </summary>
+        public bool RenderShadowMap
+        {
+            set
+            {
+                if (Set(ref renderShadowMap, value))
+                {
+                    needUpdate = true;
+                }
+            }
+            get
+            {
+                return renderShadowMap;
+            }
+        }
+
+        private string defaultShaderPassName = DefaultPassNames.Default;
+        public string DefaultShaderPassName
+        {
+            set
+            {
+                if (!fixedPassName && Set(ref defaultShaderPassName, value) && isAttached)
+                {
+                    MaterialPass = technique[value];
+                    UpdateMappings(MaterialPass);
+                }
+            }
+            get
+            {
+                return defaultShaderPassName;
+            }
+        }
+
+        private string transparentPassName = DefaultPassNames.OITPass;
+        /// <summary>
+        /// Gets or sets the name of the mesh transparent pass.
+        /// </summary>
+        /// <value>
+        /// The name of the transparent pass.
+        /// </value>
+        public string TransparentPassName
+        {
+            set
+            {
+                if (!fixedPassName && Set(ref transparentPassName, value) && isAttached)
+                {
+                    TransparentPass = technique[value];
+                }
+            }
+            get
+            {
+                return transparentPassName;
+            }
+        }
+        /// <summary>
+        /// Reflect the environment cube map
+        /// </summary>
+        public bool RenderEnvironmentMap { set; get; }
+        private bool needUpdate = true;
+        private readonly PhongMaterialCore material;
+        private bool isAttached = false;
+        private IRenderTechnique technique;
+        private readonly bool fixedPassName = false;
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="manager"></param>
+        /// <param name="material"></param>
+        private DiffuseMaterialVariables(IEffectsManager manager, PhongMaterialCore material)
+        {
+            this.material = material;
+            needUpdate = true;
+            material.PropertyChanged += Material_OnMaterialPropertyChanged;
+            texDiffuseSlot = -1;
+            samplerDiffuseSlot = samplerShadowSlot = -1;
+            textureManager = manager.MaterialTextureManager;
+            statePoolManager = manager.StateManager;
+            CreateTextureViews();
+            CreateSamplers();
+            this.PropertyChanged += (s, e) => { OnInvalidateRenderer?.Invoke(this, EventArgs.Empty); };
+        }
+        /// <summary>
+        /// Initializes a new instance of the <see cref="TextureSharedPhongMaterialVariables"/> class. This construct will be using the PassName pass into constructor only.
+        /// </summary>
+        /// <param name="passName">Name of the pass.</param>
+        /// <param name="manager">The manager.</param>
+        /// <param name="material">The material.</param>
+        public DiffuseMaterialVariables(string passName, IEffectsManager manager, PhongMaterialCore material)
+            : this(manager, material)
+        {
+            DefaultShaderPassName = passName;
+            fixedPassName = true;
+        }
+
+        public bool Attach(IRenderTechnique technique)
+        {
+            this.technique = technique;
+            MaterialPass = technique[DefaultShaderPassName];
+            TransparentPass = technique[TransparentPassName];
+            UpdateMappings(MaterialPass);
+            isAttached = true;
+            return !MaterialPass.IsNULL;
+        }
+
+        private void Material_OnMaterialPropertyChanged(object sender, PropertyChangedEventArgs e)
+        {
+            needUpdate = true;
+            if (IsDisposed)
+            {
+                return;
+            }
+            if (e.PropertyName.Equals(nameof(PhongMaterialCore.DiffuseMap)))
+            {
+                CreateTextureView((sender as PhongMaterialCore).DiffuseMap, DiffuseIdx);
+            }
+            else if (e.PropertyName.Equals(nameof(PhongMaterialCore.DiffuseMapSampler)))
+            {
+                RemoveAndDispose(ref SamplerResources[DiffuseIdx]);
+                SamplerResources[DiffuseIdx] = Collect(statePoolManager.Register((sender as PhongMaterialCore).DiffuseMapSampler));
+            }
+            OnInvalidateRenderer?.Invoke(this, EventArgs.Empty);
+        }
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        private void CreateTextureView(System.IO.Stream stream, int index)
+        {
+            RemoveAndDispose(ref TextureResources[index]);
+            TextureResources[index] = stream == null ? null : Collect(textureManager.Register(stream));
+            if (TextureResources[index] != null)
+            {
+                textureIndex |= 1u << index;
+            }
+            else
+            {
+                textureIndex &= ~(1u << index);
+            }
+        }
+
+        private void CreateTextureViews()
+        {
+            if (material != null)
+            {
+                CreateTextureView(material.DiffuseMap, DiffuseIdx);
+            }
+            else
+            {
+                for (int i = 0; i < NUMTEXTURES; ++i)
+                {
+                    RemoveAndDispose(ref TextureResources[i]);
+                }
+                textureIndex = 0;
+            }
+        }
+
+        private void CreateSamplers()
+        {
+            RemoveAndDispose(ref SamplerResources[DiffuseIdx]);
+            if (material != null)
+            {
+                SamplerResources[DiffuseIdx] = Collect(statePoolManager.Register(material.DiffuseMapSampler));
+            }
+        }
+
+        private void AssignVariables(ref ModelStruct modelstruct)
+        {
+            modelstruct.Ambient = material.AmbientColor;
+            modelstruct.Diffuse = material.DiffuseColor;
+            modelstruct.Emissive = material.EmissiveColor;
+            modelstruct.Reflect = material.ReflectiveColor;
+            modelstruct.Specular = material.SpecularColor;
+            modelstruct.Shininess = material.SpecularShininess;
+            modelstruct.HasDiffuseMap = material.RenderDiffuseMap && TextureResources[DiffuseIdx] != null ? 1 : 0;
+            modelstruct.HasDiffuseAlphaMap = 0;
+            modelstruct.HasNormalMap = 0;
+            modelstruct.HasDisplacementMap = 0;
+            modelstruct.DisplacementMapScaleMask = material.DisplacementMapScaleMask;
+            modelstruct.RenderShadowMap = RenderShadowMap ? 1 : 0;
+            modelstruct.HasCubeMap = 0;
+        }
+
+        /// <summary>
+        /// Updates the material variables.
+        /// </summary>
+        /// <param name="modelstruct">The modelstruct.</param>
+        /// <returns></returns>
+        public bool UpdateMaterialVariables(ref ModelStruct modelstruct)
+        {
+            if (material == null)
+            {
+                return false;
+            }
+            if (needUpdate)
+            {
+                AssignVariables(ref modelstruct);
+                needUpdate = false;
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// <see cref="IEffectMaterialVariables.BindMaterialTextures(DeviceContextProxy, ShaderPass)"/>
+        /// </summary>
+        /// <param name="context"></param>
+        /// <param name="shaderPass"></param>
+        /// <returns></returns>
+        public bool BindMaterialTextures(DeviceContextProxy context, ShaderPass shaderPass)
+        {
+            if (material == null)
+            {
+                return false;
+            }
+            if (HasTextures)
+            {
+                OnBindMaterialTextures(context, shaderPass.PixelShader);
+            }
+            if (RenderShadowMap)
+            {
+                shaderPass.PixelShader.BindSampler(context, samplerShadowSlot, SamplerResources[NUMSAMPLERS - 1]);
+            }
+            return true;
+        }
+
+        /// <summary>
+        /// Actual bindings
+        /// </summary>
+        /// <param name="context"></param>
+        /// <param name="shader"></param>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        private void OnBindMaterialTextures(DeviceContextProxy context, PixelShader shader)
+        {
+            if (shader.IsNULL)
+            {
+                return;
+            }
+            int idx = shader.ShaderStageIndex;
+            shader.BindTexture(context, texDiffuseSlot, TextureResources[DiffuseIdx]);
+            shader.BindSampler(context, samplerDiffuseSlot, SamplerResources[DiffuseIdx]);
+        }
+
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        private void UpdateMappings(ShaderPass shaderPass)
+        {
+            texDiffuseSlot = shaderPass.PixelShader.ShaderResourceViewMapping.TryGetBindSlot(ShaderDiffuseTexName);
+            samplerDiffuseSlot = shaderPass.PixelShader.SamplerMapping.TryGetBindSlot(ShaderSamplerDiffuseTexName);
+            samplerShadowSlot = shaderPass.PixelShader.SamplerMapping.TryGetBindSlot(ShaderSamplerShadowMapName);
+        }
+
+
+        /// <summary>
+        ///
+        /// </summary>
+        /// <param name="disposeManagedResources"></param>
+        protected override void OnDispose(bool disposeManagedResources)
+        {
+            if (disposeManagedResources)
+            {
+                isAttached = false;
+                technique = null;
+                material.PropertyChanged -= Material_OnMaterialPropertyChanged;
+                for (int i = 0; i < NUMTEXTURES; ++i)
+                {
+                    TextureResources[i] = null;
+                }
+                for (int i = 0; i < NUMSAMPLERS; ++i)
+                {
+                    SamplerResources[i] = null;
+                }
+
+                OnInvalidateRenderer = null;
+            }
+
+            base.OnDispose(disposeManagedResources);
+        }
+
+        public ShaderPass GetPass(MaterialGeometryRenderCore core, RenderContext context)
+        {
+            return core.RenderType == RenderType.Transparent && context.IsOITPass ? TransparentPass : MaterialPass;
+        }
+
+        private bool SetAffectsRender<T>(ref T backingField, T value, [CallerMemberName] string propertyName = "")
+        {
+            if (EqualityComparer<T>.Default.Equals(backingField, value))
+            {
+                return false;
+            }
+
+            backingField = value;
+            this.RaisePropertyChanged(propertyName);
+            needUpdate = true;
+            OnInvalidateRenderer?.Invoke(this, EventArgs.Empty);
+            return true;
         }
     }
 }


Three overloads for AsyncReactiveCommand

--- Source/ReactiveProperty.Portable-NET45+WINRT+WP8/AsyncReactiveCommand.cs
+++ Source/ReactiveProperty.Portable-NET45+WINRT+WP8/AsyncReactiveCommand.cs
@@ -10,14 +10,29 @@
     ///
     public class AsyncReactiveCommand : AsyncReactiveCommand<object>
     {
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        ///
         public AsyncReactiveCommand()
             : base()
         {

         }

-        public AsyncReactiveCommand(IObservable<bool> canExecuteSource, bool initialValue = true)
-            : base(canExecuteSource, initialValue)
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        ///
+        public AsyncReactiveCommand(IObservable<bool> canExecuteSource)
+            : base(canExecuteSource)
+        {
+        }
+
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        /// The source is shared between other AsyncReactiveCommand.
+        ///
+        public AsyncReactiveCommand(IReactiveProperty<bool> sharedCanExecute)
+            :base(sharedCanExecute)
         {
         }

@@ -35,10 +50,10 @@
         public event EventHandler CanExecuteChanged;

         readonly object gate = new object();
-
-        readonly ReactiveProperty<bool> isExecuting;
+        readonly IReactiveProperty<bool> canExecute;
         readonly IDisposable sourceSubscription;
-        bool canExecute = true;
+        bool isCanExecute;
+
         bool isDisposed = false;
         Notifiers.ImmutableList<Func<T, Task>> asyncActions = Notifiers.ImmutableList<Func<T, Task>>.Empty;

@@ -47,49 +62,61 @@
         ///
         public AsyncReactiveCommand()
         {
-            this.isExecuting = new ReactiveProperty<bool>(false);
-            this.sourceSubscription = this.isExecuting.Subscribe(x =>
-            {
-                canExecute = !x;
+            this.canExecute = new ReactiveProperty<bool>(true);
+            this.sourceSubscription = this.canExecute.Subscribe(x =>
+            {
+                this.isCanExecute = x;
                 this.CanExecuteChanged?.Invoke(this, EventArgs.Empty);
             });
         }

         ///
         /// CanExecute is automatically changed when executing to false and finished to true.
-        /// The source is shared between other AsyncReactiveCommand.
-        ///
-        public AsyncReactiveCommand(IObservable<bool> canExecuteSource, bool initialValue = true)
-        {
-            this.isExecuting = new ReactiveProperty<bool>(false);
-            this.canExecute = initialValue;
-            this.sourceSubscription = isExecuting.CombineLatest(canExecuteSource, (x, y) => !x && y)
+        ///
+        public AsyncReactiveCommand(IObservable<bool> canExecuteSource)
+        {
+            this.canExecute = new ReactiveProperty<bool>(true);
+            this.sourceSubscription = canExecute.CombineLatest(canExecuteSource, (x, y) => x && y)
                 .DistinctUntilChanged()
                 .Subscribe(x =>
                 {
-                    canExecute = x;
+                    this.isCanExecute = x;
                     this.CanExecuteChanged?.Invoke(this, EventArgs.Empty);
                 });
         }

+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        /// The source is shared between other AsyncReactiveCommand.
+        ///
+        public AsyncReactiveCommand(IReactiveProperty<bool> sharedCanExecute)
+        {
+            this.canExecute = sharedCanExecute;
+            this.sourceSubscription = this.canExecute.Subscribe(x =>
+            {
+                this.isCanExecute = x;
+                this.CanExecuteChanged?.Invoke(this, EventArgs.Empty);
+            });
+        }
+
         /// Return current canExecute status.
         public bool CanExecute()
         {
-            return isDisposed ? false : canExecute;
+            return isDisposed ? false : isCanExecute;
         }

         /// Return current canExecute status. parameter is ignored.
         bool ICommand.CanExecute(object parameter)
         {
-            return isDisposed ? false : canExecute;
+            return isDisposed ? false : isCanExecute;
         }

         /// Push parameter to subscribers, when executing CanExecuting is changed to false.
         public async void Execute(T parameter)
         {
-            if (canExecute)
-            {
-                isExecuting.Value = true;
+            if (isCanExecute)
+            {
+                canExecute.Value = false;
                 var a = asyncActions.Data;
                 if (a.Length == 1)
                 {
@@ -100,7 +127,7 @@
                     }
                     finally
                     {
-                        isExecuting.Value = false;
+                        canExecute.Value = true;
                     }
                 }
                 else
@@ -117,7 +144,7 @@
                     }
                     finally
                     {
-                        isExecuting.Value = false;
+                        canExecute.Value = true;
                     }
                 }
             }
@@ -146,8 +173,9 @@

             isDisposed = true;
             this.sourceSubscription.Dispose();
-            if (canExecute)
-            {
+            if (isCanExecute)
+            {
+                isCanExecute = false;
                 CanExecuteChanged?.Invoke(this, EventArgs.Empty);
             }
         }
@@ -178,13 +206,28 @@
         ///
         /// CanExecute is automatically changed when executing to false and finished to true.
         ///
-        public static AsyncReactiveCommand ToAsyncReactiveCommand(this IObservable<bool> canExecuteSource, bool initialValue = true) =>
-            new AsyncReactiveCommand(canExecuteSource, initialValue);
-
-        ///
-        /// CanExecute is automatically changed when executing to false and finished to true.
-        ///
-        public static AsyncReactiveCommand<T> ToAsyncReactiveCommand<T>(this IObservable<bool> canExecuteSource, bool initialValue = true) =>
-            new AsyncReactiveCommand<T>(canExecuteSource, initialValue);
+        public static AsyncReactiveCommand ToAsyncReactiveCommand(this IObservable<bool> canExecuteSource) =>
+            new AsyncReactiveCommand(canExecuteSource);
+
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        ///
+        public static AsyncReactiveCommand<T> ToAsyncReactiveCommand<T>(this IObservable<bool> canExecuteSource) =>
+            new AsyncReactiveCommand<T>(canExecuteSource);
+
+
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        /// The source is shared between other AsyncReactiveCommand.
+        ///
+        public static AsyncReactiveCommand ToAsyncReactiveCommand(this IReactiveProperty<bool> sharedCanExecute) =>
+            new AsyncReactiveCommand(sharedCanExecute);
+
+        ///
+        /// CanExecute is automatically changed when executing to false and finished to true.
+        /// The source is shared between other AsyncReactiveCommand.
+        ///
+        public static AsyncReactiveCommand<T> ToAsyncReactiveCommand<T>(this IReactiveProperty<bool> sharedCanExecute) =>
+            new AsyncReactiveCommand<T>(sharedCanExecute);
     }
 }


BasicReductionStrategy: ForceNext will now call ForceNext on child sometimes.

--- Source/SchedulingStrategies/Strategies/Special/BasicReductionStrategy.cs
+++ Source/SchedulingStrategies/Strategies/Special/BasicReductionStrategy.cs
@@ -86,172 +86,228 @@
         /// <returns>Boolean</returns>
         public bool GetNext(out ISchedulable next, List<ISchedulable> choices, ISchedulable current)
         {
+            next = null;
+            return GetNextHelper(ref next, choices, current);
+        }
+
+        /// <summary>
+        /// Returns the next boolean choice.
+        /// </summary>
+        /// <param name="maxValue">Max value</param>
+        /// <param name="next">Next</param>
+        /// <returns>Boolean</returns>
+        public bool GetNextBooleanChoice(int maxValue, out bool next)
+        {
+            ++ScheduledSteps;
+            return ChildStrategy.GetNextBooleanChoice(maxValue, out next);
+        }
+
+        /// <summary>
+        /// Returns the next integer choice.
+        /// </summary>
+        /// <param name="maxValue">Max value</param>
+        /// <param name="next">Next</param>
+        /// <returns>Boolean</returns>
+        public bool GetNextIntegerChoice(int maxValue, out int next)
+        {
+            ++ScheduledSteps;
+            return ChildStrategy.GetNextIntegerChoice(maxValue, out next);
+        }
+
+        /// <summary>
+        /// Forces the next choice to schedule.
+        /// </summary>
+        /// <param name="next">Next</param>
+        /// <param name="choices">Choices</param>
+        /// <param name="current">Curent</param>
+        /// <returns>Boolean</returns>
+        public void ForceNext(ISchedulable next, List<ISchedulable> choices, ISchedulable current)
+        {
+            GetNextHelper(ref next, choices, current);
+        }
+
+        /// <summary>
+        /// Forces the next boolean choice.
+        /// </summary>
+        /// <param name="maxValue">Max value</param>
+        /// <param name="next">Next</param>
+        /// <returns>Boolean</returns>
+        public void ForceNextBooleanChoice(int maxValue, bool next)
+        {
+            ++ScheduledSteps;
+            ChildStrategy.ForceNextBooleanChoice(maxValue, next);
+        }
+
+        /// <summary>
+        /// Forces the next integer choice.
+        /// </summary>
+        /// <param name="maxValue">Max value</param>
+        /// <param name="next">Next</param>
+        /// <returns>Boolean</returns>
+        public void ForceNextIntegerChoice(int maxValue, int next)
+        {
+            ++ScheduledSteps;
+            ChildStrategy.ForceNextIntegerChoice(maxValue, next);
+        }
+
+        /// <summary>
+        /// Prepares for the next scheduling iteration. This is invoked
+        /// at the end of a scheduling iteration. It must return false
+        /// if the scheduling strategy should stop exploring.
+        /// </summary>
+        /// <returns>True to start the next iteration</returns>
+        public bool PrepareForNextIteration()
+        {
+            ScheduledSteps = 0;
+            return ChildStrategy.PrepareForNextIteration();
+        }
+
+        /// <summary>
+        /// Resets the scheduling strategy. This is typically invoked by
+        /// parent strategies to reset child strategies.
+        /// </summary>
+        public void Reset()
+        {
+            ScheduledSteps = 0;
+            ChildStrategy.Reset();
+        }
+
+        /// <summary>
+        /// Returns the scheduled steps.
+        /// </summary>
+        /// <returns>Scheduled steps</returns>
+        public int GetScheduledSteps()
+        {
+            return ReportActualScheduledSteps
+                ? ScheduledSteps
+                : ChildStrategy.GetScheduledSteps();
+        }
+
+        /// <summary>
+        /// True if the scheduling strategy has reached the max
+        /// scheduling steps for the given scheduling iteration.
+        /// </summary>
+        /// <returns>Boolean</returns>
+        public bool HasReachedMaxSchedulingSteps()
+        {
+            return ReportActualScheduledSteps
+                ? (StepLimit > 0 && ScheduledSteps >= StepLimit)
+                : ChildStrategy.HasReachedMaxSchedulingSteps();
+        }
+
+        /// <summary>
+        /// Checks if this is a fair scheduling strategy.
+        /// </summary>
+        /// <returns>Boolean</returns>
+        public bool IsFair()
+        {
+            return ChildStrategy.IsFair();
+        }
+
+        /// <summary>
+        /// Returns a textual description of the scheduling strategy.
+        /// </summary>
+        /// <returns>String</returns>
+        public string GetDescription()
+        {
+            return $"{ChildStrategy.GetDescription()}  w/ {Reduction}";
+        }
+
+        /// <summary>
+        /// Returns or forces the next choice to schedule.
+        /// </summary>
+        /// <param name="next">Next</param>
+        /// <param name="choices">Choices</param>
+        /// <param name="current">Curent</param>
+        /// <returns>Boolean</returns>
+        private bool GetNextHelper(ref ISchedulable next, List<ISchedulable> choices, ISchedulable current)
+        {
             ++ScheduledSteps;
             switch (Reduction)
             {
                 case ReductionStrategy.ForceSchedule:
-                {
-                    var partialOrderChoices =
-                        choices
-                            .Where(choice => choice.IsEnabled && IsPartialOrderOperation(choice.NextOperationType))
-                            .ToList();
-
-                    if (partialOrderChoices.Count > 0)
                     {
-                        next = partialOrderChoices[0];
-                        return true;
+                        var partialOrderChoices =
+                            choices
+                                .Where(choice => choice.IsEnabled && IsPartialOrderOperation(choice.NextOperationType))
+                                .ToList();
+
+                        // If we are being forced:
+                        if (next != null)
+                        {
+                            if (!partialOrderChoices.Contains(next))
+                            {
+                                // Tell child strategy that we were forced (to do a particular send).
+                                ChildStrategy.ForceNext(next, choices, current);
+                                return true;
+                            }
+
+                            // We would have forced this choice anyway so don't tell ChildStrategy.
+                            return true;
+                        }
+
+                        // Not being forced:
+                        if (partialOrderChoices.Count > 0)
+                        {
+                            // Force this non-send but don't tell ChildStrategy.
+                            next = partialOrderChoices[0];
+                            return true;
+                        }
+
+                        // Normal schedule:
+                        return ChildStrategy.GetNext(out next, choices, current);
                     }

-                    // Normal schedule:
-                    return ChildStrategy.GetNext(out next, choices, current);
-                }
                 case ReductionStrategy.OmitSchedulingPoints:
-                {
-                    // Otherwise, don't schedule before non-Send.
-                    if (current.IsEnabled &&
-                        IsPartialOrderOperation(current.NextOperationType))
                     {
-                        next = current;
-                        return true;
+                        // Otherwise, don't schedule before non-Send.
+
+                        bool continueWithCurrent =
+                            current.IsEnabled &&
+                            IsPartialOrderOperation(current.NextOperationType);
+
+                        // We are being forced:
+                        if (next != null)
+                        {
+                            // ...to do something different than we would have:
+                            if (continueWithCurrent && current != next)
+                            {
+                                // ...so tell child.
+                                ChildStrategy.ForceNext(next, choices, current);
+                                return true;
+                            }
+                            // Otherwise, don't tell child.
+                            return true;
+                        }
+
+                        // Not being forced:
+
+                        if (continueWithCurrent)
+                        {
+                            next = current;
+                            return true;
+                        }
+
+                        // Normal schedule:
+                        return ChildStrategy.GetNext(out next, choices, current);
                     }

-                    // Normal schedule:
-                    return ChildStrategy.GetNext(out next, choices, current);
-                }
                 case ReductionStrategy.None:
-                {
-                    // Normal schedule:
-                    return ChildStrategy.GetNext(out next, choices, current);
-                }
+                    {
+                        // Normal schedule:
+                        if (next != null)
+                        {
+                            ChildStrategy.ForceNext(next, choices, current);
+                            return true;
+                        }
+                        return ChildStrategy.GetNext(out next, choices, current);
+                    }
+
                 default:
                     throw new ArgumentOutOfRangeException();
             }
         }

-        /// <summary>
-        /// Returns the next boolean choice.
-        /// </summary>
-        /// <param name="maxValue">Max value</param>
-        /// <param name="next">Next</param>
-        /// <returns>Boolean</returns>
-        public bool GetNextBooleanChoice(int maxValue, out bool next)
-        {
-            ++ScheduledSteps;
-            return ChildStrategy.GetNextBooleanChoice(maxValue, out next);
-        }
-
-        /// <summary>
-        /// Returns the next integer choice.
-        /// </summary>
-        /// <param name="maxValue">Max value</param>
-        /// <param name="next">Next</param>
-        /// <returns>Boolean</returns>
-        public bool GetNextIntegerChoice(int maxValue, out int next)
-        {
-            ++ScheduledSteps;
-            return ChildStrategy.GetNextIntegerChoice(maxValue, out next);
-        }
-
-        /// <summary>
-        /// Forces the next choice to schedule.
-        /// </summary>
-        /// <param name="next">Next</param>
-        /// <param name="choices">Choices</param>
-        /// <param name="current">Curent</param>
-        /// <returns>Boolean</returns>
-        public void ForceNext(ISchedulable next, List<ISchedulable> choices, ISchedulable current)
-        {
-            ++ScheduledSteps;
-            ChildStrategy.ForceNext(next, choices, current);
-        }
-
-        /// <summary>
-        /// Forces the next boolean choice.
-        /// </summary>
-        /// <param name="maxValue">Max value</param>
-        /// <param name="next">Next</param>
-        /// <returns>Boolean</returns>
-        public void ForceNextBooleanChoice(int maxValue, bool next)
-        {
-            ++ScheduledSteps;
-            ChildStrategy.ForceNextBooleanChoice(maxValue, next);
-        }
-
-        /// <summary>
-        /// Forces the next integer choice.
-        /// </summary>
-        /// <param name="maxValue">Max value</param>
-        /// <param name="next">Next</param>
-        /// <returns>Boolean</returns>
-        public void ForceNextIntegerChoice(int maxValue, int next)
-        {
-            ++ScheduledSteps;
-            ChildStrategy.ForceNextIntegerChoice(maxValue, next);
-        }
-
-        /// <summary>
-        /// Prepares for the next scheduling iteration. This is invoked
-        /// at the end of a scheduling iteration. It must return false
-        /// if the scheduling strategy should stop exploring.
-        /// </summary>
-        /// <returns>True to start the next iteration</returns>
-        public bool PrepareForNextIteration()
-        {
-            ScheduledSteps = 0;
-            return ChildStrategy.PrepareForNextIteration();
-        }
-
-        /// <summary>
-        /// Resets the scheduling strategy. This is typically invoked by
-        /// parent strategies to reset child strategies.
-        /// </summary>
-        public void Reset()
-        {
-            ScheduledSteps = 0;
-            ChildStrategy.Reset();
-        }
-
-        /// <summary>
-        /// Returns the scheduled steps.
-        /// </summary>
-        /// <returns>Scheduled steps</returns>
-        public int GetScheduledSteps()
-        {
-            return ReportActualScheduledSteps
-                ? ScheduledSteps
-                : ChildStrategy.GetScheduledSteps();
-        }
-
-        /// <summary>
-        /// True if the scheduling strategy has reached the max
-        /// scheduling steps for the given scheduling iteration.
-        /// </summary>
-        /// <returns>Boolean</returns>
-        public bool HasReachedMaxSchedulingSteps()
-        {
-            return ReportActualScheduledSteps
-                ? (StepLimit > 0 && ScheduledSteps >= StepLimit)
-                : ChildStrategy.HasReachedMaxSchedulingSteps();
-        }
-
-        /// <summary>
-        /// Checks if this is a fair scheduling strategy.
-        /// </summary>
-        /// <returns>Boolean</returns>
-        public bool IsFair()
-        {
-            return ChildStrategy.IsFair();
-        }
-
-        /// <summary>
-        /// Returns a textual description of the scheduling strategy.
-        /// </summary>
-        /// <returns>String</returns>
-        public string GetDescription()
-        {
-            return $"{ChildStrategy.GetDescription()}  w/ {Reduction}";
-        }
-
         private static bool IsPartialOrderOperation(OperationType operationType)
         {
             return operationType != OperationType.Send;


Cleared unnecessary code

Cleared unnecessary code

--- Source/Web/Interapp.Web/Areas/Student/Controllers/DocumentsController.cs
+++ Source/Web/Interapp.Web/Areas/Student/Controllers/DocumentsController.cs
@@ -26,15 +26,6 @@

         public ActionResult All()
         {
-            //var studentId = this.User.Identity.GetUserId();
-            //var studentDocuments = this.documents
-            //    .GetByStudent(studentId)
-            //    .ProjectTo<DocumentViewModel>()
-            //    .ToList();
-
-            //var universities = this.universities
-            //    .GetForUserWithDocuments(studentId);
-            // TODO: Finish and add model to view
             var studentId = this.User.Identity.GetUserId();
             var studentInfo = this.students.GetFullInfoById(studentId);

@@ -53,24 +44,19 @@
             return View(model);
         }

-        public ActionResult Details(int? id)
+        public ActionResult Details(int id)
         {
-            if (id != null)
+            var studentId = this.User.Identity.GetUserId();
+            var document = this.documents.GetById(id);
+
+            if (document == null || document.AuthorId != studentId)
             {
-                var studentId = this.User.Identity.GetUserId();
-                var document = this.documents.GetById((int)id);
-
-                if (document == null || document.AuthorId != studentId)
-                {
-                    return this.View();
-                }
-
-                var model = Mapper.Map<DocumentViewModel>(document);
-
-                return this.View(model);
+                return this.View();
             }

-            return this.View();
+            var model = Mapper.Map<DocumentViewModel>(document);
+
+            return this.View(model);
         }

         [HttpGet]
@@ -95,24 +81,19 @@
         }

         [HttpGet]
-        public ActionResult Edit(int? id)
+        public ActionResult Edit(int id)
         {
-            if (id != null)
+            var studentId = this.User.Identity.GetUserId();
+            var document = this.documents.GetById(id);
+
+            if (document == null || document.AuthorId != studentId)
             {
-                var studentId = this.User.Identity.GetUserId();
-                var document = this.documents.GetById((int)id);
-
-                if (document == null || document.AuthorId != studentId)
-                {
-                    return this.View();
-                }
-
-                var model = Mapper.Map<DocumentViewModel>(document);
-
-                return this.View(model);
+                return this.View();
             }

-            return this.View();
+            var model = Mapper.Map<DocumentViewModel>(document);
+
+            return this.View(model);
         }

         [HttpPost]
@@ -136,7 +117,7 @@
                     Content = model.Content
                 };
                 this.documents.Update(document);
-
+
                 return this.RedirectToAction(nameof(this.All));
             }


When computing the accessibility of operators on pointer types, use the accessibility of the pointer type itself. (changeset 1332023)

--- Src/Workspaces/Core/Shared/Extensions/ISymbolExtensions_Accessibility.cs
+++ Src/Workspaces/Core/Shared/Extensions/ISymbolExtensions_Accessibility.cs
@@ -142,6 +142,14 @@
                         return true;
                     }

+                    // If it's a synthesized operator on a pointer, use the pointer's PointedAtType.
+                    if (symbol.IsKind(SymbolKind.Method) &&
+                        ((IMethodSymbol)symbol).MethodKind == MethodKind.BuiltinOperator &&
+                        symbol.ContainingSymbol.IsKind(SymbolKind.PointerType))
+                    {
+                        return IsSymbolAccessibleCore(((IPointerTypeSymbol)symbol.ContainingSymbol).PointedAtType, within, null, out failedThroughTypeCheck);
+                    }
+
                     return IsMemberAccessible(symbol.ContainingType, symbol.DeclaredAccessibility, within, throughTypeOpt, out failedThroughTypeCheck);

                 default:


Update TestConfigurationRootSetup.cs

Update TestConfigurationRootSetup.cs

--- TIKSN.UnitTests.Shared/DependencyInjection/TestConfigurationRootSetup.cs
+++ TIKSN.UnitTests.Shared/DependencyInjection/TestConfigurationRootSetup.cs
@@ -1,4 +1,4 @@
-using Microsoft.Extensions.Configuration;
+using Microsoft.Extensions.Configuration;
 using TIKSN.Configuration;

 namespace TIKSN.DependencyInjection.Tests
@@ -8,8 +8,6 @@
         protected override void SetupConfiguration(IConfigurationBuilder builder)
         {
             base.SetupConfiguration(builder);
-
-            builder.AddUserSecrets("TIKSN-Framework-tests-bee60aa7-e44d-4baf-9587-a0a3d5800585");
         }
     }
-}+}


Bugfix in HLTVWatcher

Bugfix in HLTVWatcher

--- PegBot/Plugins/HLTVWatcher.cs
+++ PegBot/Plugins/HLTVWatcher.cs
@@ -107,8 +107,12 @@
                 List<string> SubscribedTeams = GetSetting(channel) as List<string> ?? new List<string>();
                 foreach (Match match in UpcomingMatches.FindAll(match => SubscribedTeams.Contains(match.Team1, StringComparer.OrdinalIgnoreCase) || SubscribedTeams.Contains(match.Team2, StringComparer.OrdinalIgnoreCase)))
                 {
-                    if (match.Broadcast(channel) && match.PlayDate.CompareTo(DateTimeOffset.Now) <= 0 && !firstupdate)
-                        irc.SendMessage(SendType.Message, channel, "Now starting " + match.ToString());
+                    if (!match.hasBroadcast(channel) && match.PlayDate.CompareTo(DateTimeOffset.Now) <= 0 )
+                    {
+                        match.setBroadcast(channel);
+                        if(!firstupdate)
+                            irc.SendMessage(SendType.Message, channel, "Now starting " + match.ToString());
+                    }
                 }
             }
             UpcomingMatches.RemoveAll(m => m.PlayDate.CompareTo(DateTimeOffset.Now.AddDays(-1)) <= 0);
@@ -171,12 +175,16 @@
                 broadcasted = new List<string>();
             }

-            public bool Broadcast(string channel)
+            public bool hasBroadcast(string channel)
             {
                 if (broadcasted.Contains(channel))
-                    return false;
+                    return true;
+                return false;
+            }
+
+            public void setBroadcast(string channel)
+            {
                 broadcasted.Add(channel);
-                return true;
             }

             public override bool Equals(object obj)


Forget the Name property on Field.

Forget the Name property on Field.

--- GraphQLSharp/Language/Ast.cs
+++ GraphQLSharp/Language/Ast.cs
@@ -149,7 +149,7 @@
         {
             get { return NodeType.Field; }
         }
-
+        public Name Alias { get; set; }
         public Name Name { get; set; }
         public List<Argument> Arguments { get; set; }
         public List<Directive> Directives { get; set; }


Fixes bug with the cards not having correct row and column

--- GreenMemory/GameView.xaml.cs
+++ GreenMemory/GameView.xaml.cs
@@ -83,7 +83,7 @@
             {
                 CardView card = new CardView(br[deck[ix] % 8]);
                 Grid.SetColumn(card, (ix % this.numColumns));
-                Grid.SetRow(card, (ix / this.numRows));
+                Grid.SetRow(card, (ix / this.numColumns));

                 card.MouseUp += clickCard;
                 card.MouseEnter += mouseEnterCard;


Removed pragmas.

Removed pragmas.


GUI version to 1.5.1

GUI version to 1.5.1

--- ACD.DokanNet.Gui/Properties/AssemblyInfo.cs
+++ ACD.DokanNet.Gui/Properties/AssemblyInfo.cs
@@ -47,6 +47,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.5.0.*")]
-[assembly: AssemblyFileVersion("1.5.0.0")]
+[assembly: AssemblyVersion("1.5.1.*")]
+[assembly: AssemblyFileVersion("1.5.1.0")]
 [assembly: NeutralResourcesLanguage("en-US")]


Solve build related issue

Solve build related issue

--- Trappist/src/Promact.Trappist.Repository/Questions/QuestionRepository.cs
+++ Trappist/src/Promact.Trappist.Repository/Questions/QuestionRepository.cs
@@ -52,6 +52,7 @@
         /// Add single multiple answer question into SingleMultipleAnswerQuestion model
         /// </summary>
         /// <param name="singleMultipleAnswerQuestion"></param>
+        /// <param name="singleMultipleAnswerQuestionOption"></param>
         public void AddSingleMultipleAnswerQuestion(SingleMultipleAnswerQuestion singleMultipleAnswerQuestion, SingleMultipleAnswerQuestionOption singleMultipleAnswerQuestionOption)
         {
             _dbContext.SingleMultipleAnswerQuestion.Add(singleMultipleAnswerQuestion);