Annotate seasons methods with oauth attribute.

--- Source/Lib/TraktApiSharp/Modules/TraktSeasonsModule.cs
+++ Source/Lib/TraktApiSharp/Modules/TraktSeasonsModule.cs
@@ -1,5 +1,6 @@
 namespace TraktApiSharp.Modules
 {
+    using Attributes;
     using Enums;
     using Extensions;
     using Objects.Basic;
@@ -39,6 +40,7 @@
         /// <returns>A list of <see cref="TraktSeason" /> instances with the data of each queried season.</returns>
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<IEnumerable<TraktSeason>> GetAllSeasonsAsync(string showIdOrSlug, TraktExtendedOption extendedOption = null)
         {
             Validate(showIdOrSlug);
@@ -68,6 +70,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if the given season number is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<IEnumerable<TraktEpisode>> GetSeasonAsync(string showIdOrSlug, int seasonNumber,
                                                                     TraktExtendedOption extendedOption = null)
         {
@@ -94,6 +97,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if one request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if one of the given show ids is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if one of the given season numbers is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<IEnumerable<IEnumerable<TraktEpisode>>> GetMultipleSeasonsAsync(TraktMultipleSeasonsQueryParams seasonsQueryParams)
         {
             if (seasonsQueryParams == null || seasonsQueryParams.Count <= 0)
@@ -135,6 +139,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if the given season number is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<TraktPaginationListResult<TraktComment>> GetSeasonCommentsAsync(string showIdOrSlug, int seasonNumber,
                                                                                TraktCommentSortOrder? commentSortOrder = null,
                                                                                int? page = null, int? limitPerPage = null)
@@ -163,6 +168,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if the given season number is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<TraktRating> GetSeasonRatingsAsync(string showIdOrSlug, int seasonNumber)
         {
             Validate(showIdOrSlug, seasonNumber);
@@ -187,6 +193,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if the given season number is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<TraktStatistics> GetSeasonStatisticsAsync(string showIdOrSlug, int seasonNumber)
         {
             Validate(showIdOrSlug, seasonNumber);
@@ -215,6 +222,7 @@
         /// <exception cref="Exceptions.TraktException">Thrown, if the request fails.</exception>
         /// <exception cref="ArgumentException">Thrown, if the given showIdOrSlug is null, empty or contains spaces.</exception>
         /// <exception cref="ArgumentOutOfRangeException">Thrown, if the given season number is below zero.</exception>
+        [OAuthAuthorizationRequired(false)]
         public async Task<IEnumerable<TraktUser>> GetSeasonWatchingUsersAsync(string showIdOrSlug, int seasonNumber,
                                                                               TraktExtendedOption extendedOption = null)
         {


Make drawing screen transition properly

Make drawing screen transition properly

--- osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs
+++ osu.Game.Tournament/Screens/Drawings/DrawingsScreen.cs
@@ -24,7 +24,7 @@

 namespace osu.Game.Tournament.Screens.Drawings
 {
-    public class DrawingsScreen : CompositeDrawable
+    public class DrawingsScreen : TournamentScreen
     {
         private const string results_filename = "drawings_results.txt";


Coded ProductRepository

Coded ProductRepository

--- Source/OWASP-2013-Demo.DataAccess/ProductRepository.cs
+++ Source/OWASP-2013-Demo.DataAccess/ProductRepository.cs
@@ -1,13 +1,35 @@
 using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Linq;
+using Dapper;
 using OWASP_2013_Demo.Interfaces;
+using OWASP_2013_Demo.Models.DB;

 namespace OWASP_2013_Demo.DataAccess
 {
 	public class ProductRepository : IProductRepository
 	{
+		private readonly ISiteConfiguration _siteConfiguration;
+
+		public ProductRepository(ISiteConfiguration siteConfiguration)
+		{
+			_siteConfiguration = siteConfiguration;
+		}
+
 		public IEnumerable<IProduct> GetProductsBy(string whereClause)
 		{
-			throw new System.NotImplementedException();
+			IEnumerable<Product> products;
+
+			using (var sqlConnection = new SqlConnection(_siteConfiguration.DbConnection))
+			{
+				sqlConnection.Open();
+
+				products = sqlConnection.Query<Product>(string.Format("SELECT * FROM SalesLT.Product {0}", whereClause)).AsEnumerable();
+
+				sqlConnection.Close();
+			}
+
+			return products;
 		}
 	}
 }


Fix incorrect null check

Fix incorrect null check

--- osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs
+++ osu.Game/Overlays/BeatmapSet/Scores/ScoresContainer.cs
@@ -105,7 +105,7 @@
         {
             request?.Cancel();

-            if (!beatmap?.OnlineBeatmapID.HasValue ?? false)
+            if (!beatmap?.OnlineBeatmapID.HasValue ?? true)
             {
                 clearAllScores();
                 return;


Fix layout of profile top header to match web (#5218)

Fix layout of profile top header to match web

--- osu.Game/Overlays/Profile/Header/TopHeaderContainer.cs
+++ osu.Game/Overlays/Profile/Header/TopHeaderContainer.cs
@@ -72,18 +72,30 @@
                                 new FillFlowContainer
                                 {
                                     AutoSizeAxes = Axes.Both,
-                                    Direction = FillDirection.Horizontal,
+                                    Direction = FillDirection.Vertical,
                                     Children = new Drawable[]
                                     {
-                                        usernameText = new OsuSpriteText
-                                        {
-                                            Font = OsuFont.GetFont(size: 24, weight: FontWeight.Regular)
-                                        },
-                                        openUserExternally = new ExternalLinkButton
-                                        {
-                                            Margin = new MarginPadding { Left = 5 },
-                                            Anchor = Anchor.CentreLeft,
-                                            Origin = Anchor.CentreLeft,
+                                        new FillFlowContainer
+                                        {
+                                            AutoSizeAxes = Axes.Both,
+                                            Direction = FillDirection.Horizontal,
+                                            Children = new Drawable[]
+                                            {
+                                                usernameText = new OsuSpriteText
+                                                {
+                                                    Font = OsuFont.GetFont(size: 24, weight: FontWeight.Regular)
+                                                },
+                                                openUserExternally = new ExternalLinkButton
+                                                {
+                                                    Margin = new MarginPadding { Left = 5 },
+                                                    Anchor = Anchor.CentreLeft,
+                                                    Origin = Anchor.CentreLeft,
+                                                },
+                                            }
+                                        },
+                                        titleText = new OsuSpriteText
+                                        {
+                                            Font = OsuFont.GetFont(size: 18, weight: FontWeight.Regular)
                                         },
                                     }
                                 },
@@ -95,10 +107,6 @@
                                     AutoSizeAxes = Axes.Both,
                                     Children = new Drawable[]
                                     {
-                                        titleText = new OsuSpriteText
-                                        {
-                                            Font = OsuFont.GetFont(size: 18, weight: FontWeight.Regular)
-                                        },
                                         supporterTag = new SupporterIcon
                                         {
                                             Height = 20,
@@ -111,10 +119,11 @@
                                             Margin = new MarginPadding { Top = 10 },
                                             Colour = colours.GreySeafoamLighter,
                                         },
-                                        new Container
+                                        new FillFlowContainer
                                         {
                                             AutoSizeAxes = Axes.Both,
                                             Margin = new MarginPadding { Top = 5 },
+                                            Direction = FillDirection.Horizontal,
                                             Children = new Drawable[]
                                             {
                                                 userFlag = new UpdateableFlag
@@ -125,7 +134,7 @@
                                                 userCountryText = new OsuSpriteText
                                                 {
                                                     Font = OsuFont.GetFont(size: 17.5f, weight: FontWeight.Regular),
-                                                    Margin = new MarginPadding { Left = 40 },
+                                                    Margin = new MarginPadding { Left = 10 },
                                                     Origin = Anchor.CentreLeft,
                                                     Anchor = Anchor.CentreLeft,
                                                     Colour = colours.GreySeafoamLighter,


dictionary for color conversion

dictionary for color conversion

--- Source/Winkeladvokat/Converter/PlayerColorConverter.cs
+++ Source/Winkeladvokat/Converter/PlayerColorConverter.cs
@@ -1,31 +1,35 @@
 namespace Winkeladvokat.Converter
 {
     using System;
+    using System.Collections.Generic;
     using System.Globalization;
     using System.Windows;
     using System.Windows.Data;
-    using Winkeladvokat.Models;
+    using System.Windows.Media;
+    using Models;

     public class PlayerColorConverter : IValueConverter
     {
         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
         {
-            if (value != null)
+            var playerColors = new Dictionary<PlayerColor, Color>
             {
-                var colorKey = (PlayerColor)value;
-                switch (colorKey)
-                {
-                    case PlayerColor.Player1:
-                        return Application.Current.Resources["Player1"];
-                    case PlayerColor.Player2:
-                        return Application.Current.Resources["Player2"];
-                    case PlayerColor.Player3:
-                        return Application.Current.Resources["Player3"];
-                    case PlayerColor.Player4:
-                        return Application.Current.Resources["Player4"];
-                }
+                { PlayerColor.Player1, (Color)Application.Current.Resources["Player1"] },
+                { PlayerColor.Player2, (Color)Application.Current.Resources["Player2"] },
+                { PlayerColor.Player3, (Color)Application.Current.Resources["Player3"] },
+                { PlayerColor.Player4, (Color)Application.Current.Resources["Player4"] }
+            };
+
+            Color? color = value != null && playerColors.ContainsKey((PlayerColor)value)
+                ? playerColors[(PlayerColor)value]
+                : (Color?)null;
+
+            if (color == null)
+            {
+                throw new InvalidColorException();
             }
-            throw new InvalidColorException();
+
+            return color;
         }

         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)


Apply further refactoring to star rating display UX-wise

--- osu.Game/Screens/Ranking/Expanded/StarRatingDisplay.cs
+++ osu.Game/Screens/Ranking/Expanded/StarRatingDisplay.cs
@@ -13,7 +13,7 @@
 using osu.Framework.Graphics.UserInterface;
 using osu.Game.Beatmaps;
 using osu.Game.Graphics;
-using osu.Game.Graphics.Containers;
+using osu.Game.Graphics.Sprites;
 using osuTK;
 using osuTK.Graphics;

@@ -22,27 +22,50 @@
     /// <summary>
     /// A pill that displays the star rating of a <see cref="BeatmapInfo"/>.
     /// </summary>
-    public class StarRatingDisplay : CompositeDrawable, IHasCurrentValue<StarDifficulty>
+    public class StarRatingDisplay : CompositeDrawable, IHasCurrentValue<StarDifficulty?>
     {
         private Box background;
-        private OsuTextFlowContainer textFlow;
+        private OsuSpriteText wholePart;
+        private OsuSpriteText fractionPart;
+
+        private double displayedStarRating;
+
+        protected double DisplayedStarRating
+        {
+            get => displayedStarRating;
+            set
+            {
+                displayedStarRating = value;
+
+                var starRatingParts = value.ToString("0.00", CultureInfo.InvariantCulture).Split('.');
+                wholePart.Text = starRatingParts[0];
+                fractionPart.Text = starRatingParts[1];
+            }
+        }

         [Resolved]
         private OsuColour colours { get; set; }

-        private readonly BindableWithCurrent<StarDifficulty> current = new BindableWithCurrent<StarDifficulty>();
+        private readonly BindableWithCurrent<StarDifficulty?> current = new BindableWithCurrent<StarDifficulty?>();

-        public Bindable<StarDifficulty> Current
+        public Bindable<StarDifficulty?> Current
         {
             get => current.Current;
             set => current.Current = value;
         }

         /// <summary>
+        /// Creates a new <see cref="StarRatingDisplay"/> without any <see cref="StarDifficulty"/> set, displaying a placeholder until <see cref="Current"/> is changed.
+        /// </summary>
+        public StarRatingDisplay()
+        {
+        }
+
+        /// <summary>
         /// Creates a new <see cref="StarRatingDisplay"/> using an already computed <see cref="StarDifficulty"/>.
         /// </summary>
         /// <param name="starDifficulty">The already computed <see cref="StarDifficulty"/> to display the star difficulty of.</param>
-        public StarRatingDisplay(StarDifficulty starDifficulty = default)
+        public StarRatingDisplay(StarDifficulty starDifficulty)
         {
             Current.Value = starDifficulty;
         }
@@ -82,13 +105,40 @@
                             Icon = FontAwesome.Solid.Star,
                             Colour = Color4.Black
                         },
-                        textFlow = new OsuTextFlowContainer(s => s.Font = OsuFont.Numeric.With(weight: FontWeight.Black))
+                        new FillFlowContainer
                         {
                             Anchor = Anchor.CentreLeft,
                             Origin = Anchor.CentreLeft,
                             AutoSizeAxes = Axes.Both,
                             Direction = FillDirection.Horizontal,
-                            TextAnchor = Anchor.BottomLeft,
+                            Children = new[]
+                            {
+                                wholePart = new OsuSpriteText
+                                {
+                                    Anchor = Anchor.BottomLeft,
+                                    Origin = Anchor.BottomLeft,
+                                    Colour = Color4.Black,
+                                    Font = OsuFont.Numeric.With(size: 14, weight: FontWeight.Black),
+                                    UseFullGlyphHeight = false,
+                                },
+                                new OsuSpriteText
+                                {
+                                    Anchor = Anchor.BottomLeft,
+                                    Origin = Anchor.BottomLeft,
+                                    Colour = Color4.Black,
+                                    Text = NumberFormatInfo.CurrentInfo.NumberDecimalSeparator,
+                                    Font = OsuFont.Numeric.With(size: 7, weight: FontWeight.Black),
+                                    UseFullGlyphHeight = false,
+                                },
+                                fractionPart = new OsuSpriteText
+                                {
+                                    Anchor = Anchor.BottomLeft,
+                                    Origin = Anchor.BottomLeft,
+                                    Colour = Color4.Black,
+                                    Font = OsuFont.Numeric.With(size: 7, weight: FontWeight.Black),
+                                    UseFullGlyphHeight = false,
+                                }
+                            }
                         }
                     }
                 }
@@ -98,35 +148,31 @@
         protected override void LoadComplete()
         {
             base.LoadComplete();
-            Current.BindValueChanged(difficulty => updateDisplay(difficulty.NewValue), true);
+
+            Current.BindValueChanged(_ => updateDisplay(), true);
+            FinishTransforms(true);
         }

-        private void updateDisplay(StarDifficulty difficulty)
+        private void updateDisplay()
         {
-            var starRatingParts = difficulty.Stars.ToString("0.00", CultureInfo.InvariantCulture).Split('.');
-            string wholePart = starRatingParts[0];
-            string fractionPart = starRatingParts[1];
-            string separator = CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator;
+            const double duration = 400;
+            const Easing easing = Easing.OutQuint;

-            background.Colour = difficulty.DifficultyRating == DifficultyRating.ExpertPlus
-                ? ColourInfo.GradientVertical(Color4Extensions.FromHex("#C1C1C1"), Color4Extensions.FromHex("#595959"))
-                : (ColourInfo)colours.ForDifficultyRating(difficulty.DifficultyRating);
+            ColourInfo backgroundColour;

-            textFlow.Clear();
+            if (Current.Value == null)
+                backgroundColour = Color4.SlateGray.Opacity(0.3f);
+            else
+            {
+                var rating = Current.Value.Value.DifficultyRating;

-            textFlow.AddText($"{wholePart}", s =>
-            {
-                s.Colour = Color4.Black;
-                s.Font = s.Font.With(size: 14);
-                s.UseFullGlyphHeight = false;
-            });
+                backgroundColour = rating == DifficultyRating.ExpertPlus
+                    ? ColourInfo.GradientVertical(Color4Extensions.FromHex("#C1C1C1"), Color4Extensions.FromHex("#595959"))
+                    : (ColourInfo)colours.ForDifficultyRating(rating);
+            }

-            textFlow.AddText($"{separator}{fractionPart}", s =>
-            {
-                s.Colour = Color4.Black;
-                s.Font = s.Font.With(size: 7);
-                s.UseFullGlyphHeight = false;
-            });
+            background.FadeColour(backgroundColour, duration, easing);
+            this.TransformTo(nameof(DisplayedStarRating), Current.Value?.Stars ?? 0.0f, duration, easing);
         }
     }
 }


small fix in NUnit DataDriven class

small fix in NUnit DataDriven class

--- Objectivity.Test.Automation.Common/Helpers/NUnit/DataDrivenHelper.cs
+++ Objectivity.Test.Automation.Common/Helpers/NUnit/DataDrivenHelper.cs
@@ -71,7 +71,10 @@

                         if (keyFlag)
                         {
-                            testCaseName += "_" + keyValue;
+                            if (!string.IsNullOrEmpty(keyValue))
+                            {
+                                testCaseName += "_" + keyValue;
+                            }
                         }
                         else
                         {


HETS-75 - forward traffic for the swagger API

--- FrontEnd/src/SchoolBusClient/Handlers/ApiProxyMiddleware.cs
+++ FrontEnd/src/SchoolBusClient/Handlers/ApiProxyMiddleware.cs
@@ -10,6 +10,8 @@
     public class ApiProxyMiddleware
     {
         private static readonly string _apiPathKey = "/api/";
+        private static readonly string _swaggerKey = "/swagger/";
+
         private readonly ILogger _logger;
         private readonly string _apiUri;
         private readonly Microsoft.AspNetCore.Proxy.ProxyMiddleware _proxy;
@@ -46,7 +48,8 @@

         public static bool IsApiPath(HttpContext httpContext)
         {
-            return httpContext.Request.Path.Value.IndexOf(_apiPathKey, StringComparison.OrdinalIgnoreCase) >= 0;
+            return httpContext.Request.Path.Value.IndexOf(_apiPathKey, StringComparison.OrdinalIgnoreCase) >= 0 ||
+                httpContext.Request.Path.Value.IndexOf(_swaggerKey, StringComparison.OrdinalIgnoreCase) >= 0;
         }
     }
 }


Increased the timeout on AgentUpdate to 30 sec and improved error message to try to catch some weirdnesses going on in HG TPs (and maybe non-HG TPs too).

--- OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
+++ OpenSim/Services/Connectors/Simulation/SimulationServiceConnector.cs
@@ -257,7 +257,7 @@
             HttpWebRequest ChildUpdateRequest = (HttpWebRequest)WebRequest.Create(uri);
             ChildUpdateRequest.Method = "PUT";
             ChildUpdateRequest.ContentType = "application/json";
-            ChildUpdateRequest.Timeout = 10000;
+            ChildUpdateRequest.Timeout = 30000;
             //ChildUpdateRequest.KeepAlive = false;

             // Fill it in
@@ -334,7 +334,7 @@
             }
             catch (WebException ex)
             {
-                m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate {0}", ex.Message);
+                m_log.InfoFormat("[REMOTE SIMULATION CONNECTOR]: exception on reply of ChilAgentUpdate from {0}: {1}", uri, ex.Message);
                 // ignore, really
             }
             finally


Wireshark 1.12.8

Wireshark 1.12.8

--- PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerHttp.cs
+++ PcapDotNet/src/PcapDotNet.Core.Test/WiresharkDatagramComparerHttp.cs
@@ -36,7 +36,8 @@
                     field.AssertNoShow();

                 MoreAssert.AreSequenceEqual(httpDatagram.Subsegment(0, _data.Length / 2), HexEncoding.Instance.GetBytes(_data.ToString()));
-                // TODO: Uncomment once https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=10707 is fixed.
+                Assert.AreEqual(httpDatagram.Subsegment(_data.Length / 2 + 2, httpDatagram.Length - _data.Length / 2 - 2).ToHexadecimalString(), field.Value().Substring(0, 2 * (httpDatagram.Length - _data.Length / 2 - 2)));
+                // TODO: Uncomment instad of the above line once https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=11801 is fixed.
 //                field.AssertValue(httpDatagram.Subsegment(_data.Length / 2 + 2, httpDatagram.Length - _data.Length / 2 - 2));
                 return false;
             }


ContentControl now checks for null content before trying to measure or arrange them

--- PocketMechanic/RedBadger.Xpf/Presentation/Controls/ContentControl.cs
+++ PocketMechanic/RedBadger.Xpf/Presentation/Controls/ContentControl.cs
@@ -24,6 +24,7 @@
             {
                 return (IElement)this.GetValue(ContentProperty);
             }
+
             set
             {
                 this.SetValue(ContentProperty, value);
@@ -32,19 +33,34 @@

         public override void Render(ISpriteBatch spriteBatch)
         {
-            this.Content.Render(spriteBatch);
+            IElement content = this.Content;
+            if (content != null)
+            {
+                content.Render(spriteBatch);
+            }
         }

         protected override Size ArrangeOverride(Size finalSize)
         {
-            this.Content.Arrange(new Rect(Vector2.Zero, finalSize));
+            IElement content = this.Content;
+            if (content != null)
+            {
+                content.Arrange(new Rect(Vector2.Zero, finalSize));
+            }
+
             return finalSize;
         }

         protected override Size MeasureOverride(Size availableSize)
         {
-            this.Content.Measure(availableSize);
-            return this.Content.DesiredSize;
+            IElement content = this.Content;
+            if (content == null)
+            {
+                return Size.Empty;
+            }
+
+            content.Measure(availableSize);
+            return content.DesiredSize;
         }
     }
 }


Added column selection

Added column selection

--- GenericTSQLCollector/ExtendedXEReaderCollector/Collector.cs
+++ GenericTSQLCollector/ExtendedXEReaderCollector/Collector.cs
@@ -237,13 +237,15 @@
             }
             DataColumn cl_dt = new DataColumn("collection_time", typeof(DateTime));
             cl_dt.DefaultValue = DateTime.Now;
+            cl_dt.ExtendedProperties.Add("auto_column", true);
             dt.Columns.Add(cl_dt);
+

             //
             // Add Name column
             //
             dt.Columns.Add("Name", typeof(String));
-
+            dt.Columns["Name"].ExtendedProperties.Add("auto_column", true);

             //
             // Read event data
@@ -328,7 +330,7 @@

-        private void PerformWrite(ConcurrentQueue<DataTable> dataQueue, CollectionItemConfig itm)
+        private void PerformWrite(ConcurrentQueue<DataTable> dataQueue, XEReaderCollectionItemConfig itm)
         {

             while (true)
@@ -357,6 +359,19 @@
                 //
                 if (collectedData != null && collectedData.Rows.Count > 0)
                 {
+                    // Remove the columns not included in the output
+                    List<String> columnsToRemove = new List<String>();
+                    foreach(DataColumn dc in collectedData.Columns)
+                    {
+                        if (!itm.Columns.Contains(dc.ColumnName) && !dc.ColumnName.Equals("collection_time"))
+                        {
+                            columnsToRemove.Add(dc.ColumnName);
+                        }
+                    }
+                    foreach (String colName in columnsToRemove)
+                    {
+                        collectedData.Columns.Remove(colName);
+                    }
                     WriteCacheFile(collectedData, itm);
                 }


Stop and Disconnecting option when disconnected and more Informations

Informations:
- ConnectionType
- Delay

--- Project-Aurora/Project-Aurora/Devices/Dualshock4/Dualshock4Device.cs
+++ Project-Aurora/Project-Aurora/Devices/Dualshock4/Dualshock4Device.cs
@@ -60,6 +60,11 @@
             {
                 if (isInitialized)
                 {
+                    if (Global.Configuration.VarRegistry.GetVariable<bool>($"{devicename}_disconnect_when_stop"))
+                    {
+                        device.DisconnectBT();
+                        device.DisconnectDongle();
+                    }
                     RestoreColor();
                     DS4Devices.stopControllers();
                     isInitialized = false;
@@ -76,7 +81,27 @@
         {
             if (isInitialized)
             {
-                return devicename + ": Connected";
+                string DS4ConnectionType;
+                switch (device.getConnectionType())
+                {
+                    case ConnectionType.BT:
+                        DS4ConnectionType = " over Bluetooth";
+                        break;
+                    case ConnectionType.USB:
+                        DS4ConnectionType = " over USB";
+                        break;
+                    case ConnectionType.SONYWA:
+                        DS4ConnectionType = " over DS4 Wireless adapter";
+                        break;
+                    default:
+                        DS4ConnectionType = "";
+                        break;
+                }
+
+
+                return devicename + ": Connected" + DS4ConnectionType + " Delay: " + device.Latency.ToString("0.00") + " ms";
+
+
             }
             else
             {
@@ -110,6 +135,10 @@

         public bool IsInitialized()
         {
+            if (isInitialized && device.isDisconnectingStatus())
+            {
+                Shutdown();
+            }
             return this.isInitialized;
         }

@@ -170,10 +199,11 @@

         public VariableRegistry GetRegisteredVariables()
         {
-            if(default_registry==null)
+            if (default_registry == null)
             {
                 default_registry = new VariableRegistry();
                 default_registry.Register($"{devicename}_restore_dualshock", new Aurora.Utils.RealColor(System.Drawing.Color.FromArgb(255, 0, 0, 255)), "Color", new Aurora.Utils.RealColor(System.Drawing.Color.FromArgb(255, 255, 255, 255)), new Aurora.Utils.RealColor(System.Drawing.Color.FromArgb(0, 0, 0, 0)), "Set restore color for your DS4 Controller");
+                default_registry.Register($"{devicename}_disconnect_when_stop", false, "Disconnect when Stopping");
             }
             return default_registry;
         }


Fixed missing JsonIgnore causing a property to be repeated in the profile JSON files.

--- Project-Aurora/Project-Aurora/Settings/Layers/PercentLayerHandler.cs
+++ Project-Aurora/Project-Aurora/Settings/Layers/PercentLayerHandler.cs
@@ -30,6 +30,7 @@
         [JsonIgnore]
         public bool BlinkDirection { get { return Logic._BlinkDirection ?? _BlinkDirection ?? false; } }

+        [JsonIgnore]
         public bool BlinkBackground { get { return Logic._BlinkBackground ?? _BlinkBackground ?? false; } }

         public string _VariablePath { get; set; }


simplify

simplify

--- samples/sqltransport-nhpersistence/Version_3.0/Receiver/OrderSubmittedHandler.cs
+++ samples/sqltransport-nhpersistence/Version_3.0/Receiver/OrderSubmittedHandler.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Threading.Tasks;
+using NHibernate;
 using NServiceBus;

 public class OrderSubmittedHandler : IHandleMessages<OrderSubmitted>
@@ -10,7 +11,8 @@

         #region StoreUserData

-        context.SynchronizedStorageSession.Session().Save(new Order
+        ISession nhibernateSession = context.SynchronizedStorageSession.Session();
+        nhibernateSession.Save(new Order
         {
             OrderId = message.OrderId,
             Value = message.Value


Update Directives6502.cs

Update Directives6502.cs

--- 6502.Net/Directives6502.cs
+++ 6502.Net/Directives6502.cs
@@ -213,7 +213,7 @@
             if (relocval < short.MinValue || relocval > ushort.MaxValue)
                 Controller.Log.LogEntry(line, Resources.ErrorStrings.IllegalQuantity, relocval.ToString());
             else
-                Controller.Output.SetLogicalPC(Convert.ToInt32(relocval));
+                Controller.Output.SetLogicalPC(Convert.ToInt32(relocval) & ushort.MaxValue);
         }

         /// <summary>


Drop the Xamarin copyright after the CLA has been signed to contribute this back to Microsoft

--- sdk/xamarin/ios/Microsoft.WindowsAzure.Mobile.Ext.iOS/Properties/AssemblyInfo.cs
+++ sdk/xamarin/ios/Microsoft.WindowsAzure.Mobile.Ext.iOS/Properties/AssemblyInfo.cs
@@ -10,7 +10,6 @@
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Xamarin Inc.")]
 [assembly: AssemblyProduct("Microsoft.WindowsAzure.Mobile.Ext.iOS")]
-[assembly: AssemblyCopyright("Copyright © Xamarin Inc. 2013")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]


wizard constructor fix

wizard constructor fix

--- AlgoritmeProjekt/Wizard.cs
+++ AlgoritmeProjekt/Wizard.cs
@@ -12,24 +12,11 @@
 {
     internal class Wizard : Entity
     {
-        private float X;
-        private float Y;
-        int CurrentPath;
-        private Texture2D sprite;
+
         private float speed;
         private Vector2 start;
         private Vector2 end;
         private Vector2 pos;
-
-        List<Vector2> path;
-        public Wizard() : base()
-        {
-            CurrentPath = 0;
-            speed = 60;
-            path = new List<Vector2>();
-
-        }
-
         private int CurrentPath;
         private Texture2D sprite;
         private List<Vector2> path;
@@ -58,10 +45,6 @@
         {
             sprite = contentManager.Load<Texture2D>("wizard");
         }
-
-
-        public void Path(List<Vector2> list)
-
         private void Wat2Do()
         {
             if (!hasDeliveredPotion)
@@ -231,7 +214,7 @@
                 }
             }

-            this.Position = new Vector2(X, Y);
+

         }


Corrected schedule typo

Corrected schedule typo

--- Libraries/Farmhand/API/NPCs/Schedules/ScheduleDirections.cs
+++ Libraries/Farmhand/API/NPCs/Schedules/ScheduleDirections.cs
@@ -167,10 +167,10 @@
             var msg = this.EndMessage != null || this.EndBehavior != null;
             var message = msg
                               ? this.EndMessage != null
-                                    ? $"\\\" {this.EndMessage}\\\""
+                                    ? $" \\\"{this.EndMessage}\\\""
                                     : (this.EndBehavior != null ? $" {this.EndBehavior}" : string.Empty)
                               : string.Empty;
             return $"{this.TimeOfDay} {this.MapName} {this.EndX} {this.EndY} {(int)this.FacingDirection}{message}";
         }
     }
-}+}


* unmark CabinetArchive fields as readonly * move cab parsing from constructor to _parseCabStream method * define _readFromDump method * implement inherited properties

--- Archives/CabinetArchive.cs
+++ Archives/CabinetArchive.cs
@@ -262,8 +262,8 @@
         }

         // The absolute offset of the first CFFILE block.
-        private readonly uint _filesFirstOffset;
-        private readonly ushort
+        private uint _filesFirstOffset;
+        private ushort
             // The number of files/folders stored within
             // the archive.
             _filesCount, _foldersCount,
@@ -272,10 +272,10 @@
             _headerAbLength;
         // The lengths of the abReserve fields in CFFOLDER
         // and CFDATA blocks, respectively.
-        private readonly byte _folderAbLength, _dataAbLength;
+        private byte _folderAbLength, _dataAbLength;
         // Flags indicating the presence of optional fields
         // within the cabinet's main header.
-        private readonly CabinetHeaderFlags _flags;
+        private CabinetHeaderFlags _flags;

         // The names of the files stored within the archive.
         private List<string> _names;
@@ -290,12 +290,224 @@
         // from the _dataDump FileStream.
         private object _dataLock;

-        /// <summary>
-        /// Writes a set of bytes to the dump file.
-        /// </summary>
-        /// <param name="name">The name of the file being written.</param>
-        /// <param name="bytes">The contents of the file.</param>
-        /// <param name="seekToEnd">Whether to seek to the end of the dump.</param>
+        private void _parseCabStream(Stream stream)
+        {
+            stream.Position = 0;
+
+            // We know that these headers will be present
+            // in every cabinet file, so we can just read
+            // them.
+            byte[] hdrBuf = new byte[HEADER_MIN_LENGTH];
+            stream.Read(hdrBuf, 0, HEADER_MIN_LENGTH);
+
+            #region Verify cabinet signature
+            if (!hdrBuf.Take(SIGNATURE_LEN).SequenceEqual(Signature))
+                throw new InvalidDataException(
+                    "The stream does not represent a cabinet archive."
+                    );
+            #endregion
+            #region Verify cabinet length
+            uint cabLength;
+            var sizeBytes = hdrBuf.Skip(SIZE_OFFSET).Take(SIZE_LEN);
+
+            if (!BitConverter.IsLittleEndian)
+            {
+                sizeBytes = sizeBytes.Reverse();
+            }
+
+            cabLength = BitConverter.ToUInt32(sizeBytes.ToArray(), 0);
+
+            if (stream.Length < cabLength)
+                throw new InvalidDataException(
+                    "The stream's length does not match the cabinet's length."
+                    );
+            #endregion
+            #region Verify cabinet version
+            if (
+                hdrBuf[VERSION_MIN_OFFSET] != VERSION_MIN_SUPPORTED ||
+                hdrBuf[VERSION_MAJ_OFFSET] != VERSION_MAJ_SUPPORTED
+                )
+            {
+                throw new NotSupportedException(
+                    "The class does not support the provided file format version."
+                    );
+            }
+            #endregion
+            #region Set first file offset / file count / folder count / flags
+            var fileOffsetBytes = hdrBuf.Skip(FILE_OFFSET_OFFSET).Take(FILE_OFFSET_LEN);
+            var fileCountBytes = hdrBuf.Skip(FILE_COUNT_OFFSET).Take(FILE_COUNT_LEN);
+            var fdrCountBytes = hdrBuf.Skip(FOLDER_COUNT_OFFSET).Take(FOLDER_COUNT_LEN);
+            var flagBytes = hdrBuf.Skip(HEADER_FLAGS_OFFSET).Take(HEADER_FLAGS_LEN);
+
+            if (!BitConverter.IsLittleEndian)
+            {
+                fileOffsetBytes = fileOffsetBytes.Reverse();
+                fileCountBytes = fileCountBytes.Reverse();
+                fdrCountBytes = fdrCountBytes.Reverse();
+                flagBytes = flagBytes.Reverse();
+            }
+
+            _filesFirstOffset = BitConverter.ToUInt32(fileOffsetBytes.ToArray(), 0);
+            _filesCount = BitConverter.ToUInt16(fileCountBytes.ToArray(), 0);
+            _foldersCount = BitConverter.ToUInt16(fdrCountBytes.ToArray(), 0);
+            _flags = (CabinetHeaderFlags)BitConverter.ToUInt16(flagBytes.ToArray(), 0);
+            #endregion
+
+            // Check to see if optional variable-length fields are present
+            // within the archive's header.
+            if ((_flags & CabinetHeaderFlags.ReservedPresent) == CabinetHeaderFlags.ReservedPresent)
+            {
+                #region Set abReserve lengths
+                // Byte buffer for optional fields that are only included
+                // if the flag in the above condition is present and set.
+                byte[]
+                    headerAbLenBytes = new byte[HDR_ABRLEN_LEN],
+                    folderAbLenBytes = new byte[FDR_ABRLEN_LEN],
+                    dataAbLenBytes = new byte[DATA_ABRLEN_LEN];
+                stream.Read(headerAbLenBytes, 0, HDR_ABRLEN_LEN);
+                stream.Read(folderAbLenBytes, 0, FDR_ABRLEN_LEN);
+                stream.Read(dataAbLenBytes, 0, DATA_ABRLEN_LEN);
+
+                if (!BitConverter.IsLittleEndian)
+                {
+                    headerAbLenBytes = headerAbLenBytes.Reverse().ToArray();
+                }
+
+                _headerAbLength = BitConverter.ToUInt16(headerAbLenBytes, 0);
+                _folderAbLength = folderAbLenBytes.First();
+                _dataAbLength = dataAbLenBytes.First();
+                #endregion
+
+                // We don't care about what's in the abReserve field, since
+                // it's application-specific, so we'll just skip past it.
+                if (_headerAbLength != 0)
+                    stream.Seek(_headerAbLength, SeekOrigin.Current);
+            }
+
+            #region Skip past optional headers
+            // If this isn't the first archive in a set, there'll be additional
+            // header fields providing information about any previous archives.
+            if ((_flags & CabinetHeaderFlags.IsNotFirst) == CabinetHeaderFlags.IsNotFirst)
+            {
+                // There are two null-terminated fields giving information
+                // about previous archives. This makes it fairly simple to
+                // skip past them.
+                stream.ReadUntilFound(ASCII_NUL, b => { });
+                stream.ReadUntilFound(ASCII_NUL, b => { });
+            }
+            // As with not being the first in a set, not being the last in a set
+            // means that there are additional fields present within the archive's
+            // headers.
+            if ((_flags & CabinetHeaderFlags.IsNotLast) == CabinetHeaderFlags.IsNotLast)
+            {
+                // And, as with information about previous archives, information
+                // about archives to come is null-terminated.
+                stream.ReadUntilFound(ASCII_NUL, b => { });
+                stream.ReadUntilFound(ASCII_NUL, b => { });
+            }
+            #endregion
+            #region Read all folder details from the cabinet
+            List<CFFOLDER> folders = new List<CFFOLDER>(_foldersCount);
+            // CFFOLDER entries are sequential within the cabinet
+            // archive, and the first immediately follows the end
+            // of the CFHEADER block.
+            for (int i = 0; i < _foldersCount; i++)
+            {
+                var fdr = new CFFOLDER(stream, _folderAbLength);
+
+                if (
+                    fdr.typeCompress == CFFOLDERCompressionType.Quantum ||
+                    fdr.typeCompress == CFFOLDERCompressionType.LZX
+                    )
+                {
+                    throw new NotSupportedException(
+                        String.Format(
+                            "{0} {1} (folder {2}).",
+                            "The cabinet contains data compressed with an",
+                            "unsupported algorithm",
+                            i
+                        ));
+                }
+
+                folders.Add(fdr);
+            }
+            #endregion
+            #region Read all file details from the cabinet
+            List<CFFILE> files = new List<CFFILE>();
+            // The first CFFILE entry is at an offset given within the
+            // CFHEADER block. We need to skip to this offset before
+            // we start reading.
+            stream.Position = _filesFirstOffset;
+            // Once at the specified offset, CFFILE blocks are
+            // contiguous.
+            for (int i = 0; i < _filesCount; i++)
+            {
+                var file = new CFFILE(stream);
+
+                // We're not going to bother to support multi-cabinet
+                // archives right now. If the file indicates that it
+                // spans multiple archives, skip it.
+                if (
+                    file.iFolder == CFFILEFolderIndex.ContinuedFromPrevious ||
+                    file.iFolder == CFFILEFolderIndex.ContinuedPreviousAndNext ||
+                    file.iFolder == CFFILEFolderIndex.ContinuedToNext
+                    )
+                {
+                    continue;
+                }
+
+                if (folders.Count <= (ushort)file.iFolder)
+                    throw new InvalidDataException(
+                        String.Format(
+                            "The cabinet references an invalid folder (folder {0}).",
+                            file.iFolder
+                        ));
+
+                files.Add(file);
+            }
+            #endregion
+
+            #region Read file data, add to CabinetArchive's list
+            MemoryStream dataBuf = new MemoryStream();
+            for (int i = 0; i < folders.Count; i++)
+            {
+                var fdr = folders[i];
+
+                var fdrFiles = files.Where(f => (int)f.iFolder == i);
+
+                dataBuf.Position = 0;
+                stream.Position = fdr.coffCabStart;
+                for (int j = 0; j < fdr.cCFData; j++)
+                {
+                    var data = new CFDATA(stream, _dataAbLength);
+
+                    if (fdr.typeCompress == CFFOLDERCompressionType.None)
+                    {
+                        // todo
+                    }
+                    else if (fdr.typeCompress == CFFOLDERCompressionType.MSZIP)
+                    {
+                        _mszipInflate(data, dataBuf);
+                    }
+                    else
+                    {
+                        throw new NotSupportedException(
+                            "The cabinet contains data compressed with an unsupported algorithm."
+                            );
+                    }
+                }
+
+                foreach (var file in fdrFiles)
+                {
+                    byte[] fileBytes = new byte[file.cbFile];
+                    dataBuf.Position = file.uoffFolderStart;
+                    dataBuf.Read(fileBytes, 0, fileBytes.Length);
+
+                    _writeToDump(file.szName, fileBytes);
+                }
+            }
+            #endregion
+        }
         private void _writeToDump(string name, byte[] bytes, bool seekToEnd = true)
         {
             lock (_dataLock)
@@ -306,6 +518,20 @@
                 _filemarks.Add(new Filemark(bytes.LongLength, _dataDump.Position));
                 _dataDump.Write(bytes, 0, bytes.Length);
             }
+        }
+        private IEnumerable<byte> _readFromDump(string name)
+        {
+            int index = _names.IndexOf(name);
+            var mark = _filemarks[index];
+            byte[] fileBytes = new byte[mark.Length];
+
+            lock (_dataLock)
+            {
+                _dataDump.Position = mark.Offset;
+                _dataDump.Read(fileBytes, 0, fileBytes.Length);
+            }
+
+            return fileBytes;
         }
         private void _mszipInflate(CFDATA data, Stream dump)
         {
@@ -363,10 +589,6 @@
         /// </exception>
         public CabinetArchive(Stream stream)
         {
-            /* * * * * * * * * *
-             * Set up the class to make it ready for cabinet parsing
-             * * * * * * * * * */
-            #region Ensure stream usable
             if (stream == null)
                 throw new ArgumentNullException(
                     "The provided stream cannot be null.",
@@ -382,13 +604,11 @@
                 throw new ArgumentException(
                     "The provided stream does not support reading."
                     );
-            #endregion

             _names = new List<string>();
             _filemarks = new List<Filemark>();
             _dataLock = new object();

-            #region Attempt to open temporary file
             try
             {
                 _dataDump = new FileStream(
@@ -414,244 +634,52 @@
                     uaex
                     );
             }
-            #endregion
-
-            /* * * * * * * * * *
-             * Parse the cabinet file
-             * * * * * * * * * */
-            stream.Position = 0;
-
-            // We know that these headers will be present
-            // in every cabinet file, so we can just read
-            // them.
-            byte[] hdrBuf = new byte[HEADER_MIN_LENGTH];
-            stream.Read(hdrBuf, 0, HEADER_MIN_LENGTH);
-
-            #region Verify cabinet signature
-            if (!hdrBuf.Take(SIGNATURE_LEN).SequenceEqual(Signature))
-                throw new InvalidDataException(
-                    "The stream does not represent a cabinet archive."
-                    );
-            #endregion
-            #region Verify cabinet length
-            uint cabLength;
-            var sizeBytes = hdrBuf.Skip(SIZE_OFFSET).Take(SIZE_LEN);
-
-            if (!BitConverter.IsLittleEndian)
-            {
-                sizeBytes = sizeBytes.Reverse();
-            }
-
-            cabLength = BitConverter.ToUInt32(sizeBytes.ToArray(), 0);
-
-            if (stream.Length < cabLength)
-                throw new InvalidDataException(
-                    "The stream's length does not match the cabinet's length."
-                    );
-            #endregion
-            #region Verify cabinet version
-            if (
-                hdrBuf[VERSION_MIN_OFFSET] != VERSION_MIN_SUPPORTED ||
-                hdrBuf[VERSION_MAJ_OFFSET] != VERSION_MAJ_SUPPORTED
-                )
-            {
-                throw new NotSupportedException(
-                    "The class does not support the provided file format version."
-                    );
-            }
-            #endregion
-            #region Set first file offset / file count / folder count / flags
-            var fileOffsetBytes = hdrBuf.Skip(FILE_OFFSET_OFFSET).Take(FILE_OFFSET_LEN);
-            var fileCountBytes = hdrBuf.Skip(FILE_COUNT_OFFSET).Take(FILE_COUNT_LEN);
-            var fdrCountBytes = hdrBuf.Skip(FOLDER_COUNT_OFFSET).Take(FOLDER_COUNT_LEN);
-            var flagBytes = hdrBuf.Skip(HEADER_FLAGS_OFFSET).Take(HEADER_FLAGS_LEN);
-
-            if (!BitConverter.IsLittleEndian)
-            {
-                fileOffsetBytes = fileOffsetBytes.Reverse();
-                fileCountBytes = fileCountBytes.Reverse();
-                fdrCountBytes = fdrCountBytes.Reverse();
-                flagBytes = flagBytes.Reverse();
-            }
-
-            _filesFirstOffset = BitConverter.ToUInt32(fileOffsetBytes.ToArray(), 0);
-            _filesCount = BitConverter.ToUInt16(fileCountBytes.ToArray(), 0);
-            _foldersCount = BitConverter.ToUInt16(fdrCountBytes.ToArray(), 0);
-            _flags = (CabinetHeaderFlags)BitConverter.ToUInt16(flagBytes.ToArray(), 0);
-            #endregion
-
-            // Check to see if optional variable-length fields are present
-            // within the archive's header.
-            if ((_flags & CabinetHeaderFlags.ReservedPresent) == CabinetHeaderFlags.ReservedPresent)
-            {
-                #region Set abReserve lengths
-                // Byte buffer for optional fields that are only included
-                // if the flag in the above condition is present and set.
-                byte[]
-                    headerAbLenBytes = new byte[HDR_ABRLEN_LEN],
-                    folderAbLenBytes = new byte[FDR_ABRLEN_LEN],
-                    dataAbLenBytes = new byte[DATA_ABRLEN_LEN];
-                stream.Read(headerAbLenBytes, 0, HDR_ABRLEN_LEN);
-                stream.Read(folderAbLenBytes, 0, FDR_ABRLEN_LEN);
-                stream.Read(dataAbLenBytes, 0, DATA_ABRLEN_LEN);
-
-                if (!BitConverter.IsLittleEndian)
-                {
-                    headerAbLenBytes = headerAbLenBytes.Reverse().ToArray();
-                }
-
-                _headerAbLength = BitConverter.ToUInt16(headerAbLenBytes, 0);
-                _folderAbLength = folderAbLenBytes.First();
-                _dataAbLength = dataAbLenBytes.First();
-                #endregion
-
-                // We don't care about what's in the abReserve field, since
-                // it's application-specific, so we'll just skip past it.
-                if (_headerAbLength != 0)
-                    stream.Seek(_headerAbLength, SeekOrigin.Current);
-            }
-
-            #region Skip past optional headers
-            // If this isn't the first archive in a set, there'll be additional
-            // header fields providing information about any previous archives.
-            if ((_flags & CabinetHeaderFlags.IsNotFirst) == CabinetHeaderFlags.IsNotFirst)
-            {
-                // There are two null-terminated fields giving information
-                // about previous archives. This makes it fairly simple to
-                // skip past them.
-                stream.ReadUntilFound(ASCII_NUL, b => { });
-                stream.ReadUntilFound(ASCII_NUL, b => { });
-            }
-            // As with not being the first in a set, not being the last in a set
-            // means that there are additional fields present within the archive's
-            // headers.
-            if ((_flags & CabinetHeaderFlags.IsNotLast) == CabinetHeaderFlags.IsNotLast)
-            {
-                // And, as with information about previous archives, information
-                // about archives to come is null-terminated.
-                stream.ReadUntilFound(ASCII_NUL, b => { });
-                stream.ReadUntilFound(ASCII_NUL, b => { });
-            }
-            #endregion
-            #region Read all folder details from the cabinet
-            List<CFFOLDER> folders = new List<CFFOLDER>(_foldersCount);
-            // CFFOLDER entries are sequential within the cabinet
-            // archive, and the first immediately follows the end
-            // of the CFHEADER block.
-            for (int i = 0; i < _foldersCount; i++)
-            {
-                var fdr = new CFFOLDER(stream, _folderAbLength);
-
-                if (
-                    fdr.typeCompress == CFFOLDERCompressionType.Quantum ||
-                    fdr.typeCompress == CFFOLDERCompressionType.LZX
-                    )
-                {
-                    throw new NotSupportedException(
-                        String.Format(
-                            "{0} {1} (folder {2}).",
-                            "The cabinet contains data compressed with an",
-                            "unsupported algorithm",
-                            i
-                        ));
-                }
-
-                folders.Add(fdr);
-            }
-            #endregion
-            #region Read all file details from the cabinet
-            List<CFFILE> files = new List<CFFILE>();
-            // The first CFFILE entry is at an offset given within the
-            // CFHEADER block. We need to skip to this offset before
-            // we start reading.
-            stream.Position = _filesFirstOffset;
-            // Once at the specified offset, CFFILE blocks are
-            // contiguous.
-            for (int i = 0; i < _filesCount; i++)
-            {
-                var file = new CFFILE(stream);
-
-                // We're not going to bother to support multi-cabinet
-                // archives right now. If the file indicates that it
-                // spans multiple archives, skip it.
-                if (
-                    file.iFolder == CFFILEFolderIndex.ContinuedFromPrevious ||
-                    file.iFolder == CFFILEFolderIndex.ContinuedPreviousAndNext ||
-                    file.iFolder == CFFILEFolderIndex.ContinuedToNext
-                    )
-                {
-                    continue;
-                }
-
-                if (folders.Count <= (ushort)file.iFolder)
-                    throw new InvalidDataException(
-                        String.Format(
-                            "The cabinet references an invalid folder (folder {0}).",
-                            file.iFolder
-                        ));
-
-                files.Add(file);
-            }
-            #endregion
-
-            #region Read file data, add to CabinetArchive's list
-            MemoryStream dataBuf = new MemoryStream();
-            for (int i = 0; i < folders.Count; i++)
-            {
-                var fdr = folders[i];
-
-                var fdrFiles = files.Where(f => (int)f.iFolder == i);
-
-                dataBuf.Position = 0;
-                stream.Position = fdr.coffCabStart;
-                for (int j = 0; j < fdr.cCFData; j++)
-                {
-                    var data = new CFDATA(stream, _dataAbLength);
-
-                    if (fdr.typeCompress == CFFOLDERCompressionType.None)
-                    {
-                        // todo
-                    }
-                    else if (fdr.typeCompress == CFFOLDERCompressionType.MSZIP)
-                    {
-                        _mszipInflate(data, dataBuf);
-                    }
-                    else
-                    {
-                        throw new NotSupportedException(
-                            "The cabinet contains data compressed with an unsupported algorithm."
-                            );
-                    }
-                }
-
-                foreach (var file in fdrFiles)
-                {
-                    byte[] fileBytes = new byte[file.cbFile];
-                    dataBuf.Position = file.uoffFolderStart;
-                    dataBuf.Read(fileBytes, 0, fileBytes.Length);
-
-                    _writeToDump(file.szName, fileBytes);
-                }
-            }
-            #endregion
-        }
-
+
+            _parseCabStream(stream);
+        }
+
+        /// <summary>
+        /// The number of files contained within the cabinet.
+        /// </summary>
         public override int Count
         {
-            get { throw new NotImplementedException(); }
-        }
+            get { return _names.Count; }
+        }
+        /// <summary>
+        /// The names of the files contained within the cabinet.
+        /// </summary>
         public override IEnumerable<string> Files
         {
-            get { throw new NotImplementedException(); }
-        }
-
+            get { return _names; }
+        }
+
+        /// <summary>
+        /// Retrieves a file based on its name.
+        /// </summary>
+        /// <param name="name">The name of the file to retrieve.</param>
+        /// <param name="contents">The contents of the retrieved file.</param>
+        /// <returns>True if a file with the given name exists within the archive.</returns>
         public override bool GetFile(string name, out IEnumerable<byte> contents)
         {
-            throw new NotImplementedException();
-        }
+            bool ctns = _names.Contains(name);
+            if (ctns)
+            {
+                contents = _readFromDump(name);
+            }
+            else
+            {
+                contents = null;
+            }
+
+            return ctns;
+        }
+        /// <summary>
+        /// Releases the resources used by this class.
+        /// </summary>
         public override void Dispose()
         {
-            throw new NotImplementedException();
+            _dataDump.Close();
+            _dataDump.Dispose();
         }
     }
 }


Updated strive messages.

Updated strive messages.

--- Assets/Characters/Edros.cs
+++ Assets/Characters/Edros.cs
@@ -218,7 +218,7 @@
                 // store input in striveCard
                 while (true)
                 {
-                    Card striveCard = Game.library.waitForClickOrCancel("Strive 1 card");
+                    Card striveCard = Game.library.waitForClickOrCancel("Strive one card or cancel");
                     if (user.strive(striveCard))
                     {
                         ((TorensFavored)this).strove = true;
@@ -285,7 +285,7 @@
                 {
                     while (true /*&& (blueCardsInStandby == 2 || standbyCard.color != Color.blue)*/)
                     {
-                        Character.Card card = Game.library.waitForClickOrCancel("Choose an inherent to strive");
+                        Character.Card card = Game.library.waitForClickOrCancel("Choose an inherent to strive or cancel");
                         if(card == null)
                         {
                             ((FaithUnquestioned)this).strove = false;
@@ -474,7 +474,7 @@
                 // First declare
                 while (true)
                 {
-                    Card card1 = Game.library.waitForClickOrCancel("Choose an inherent to strive.");
+                    Card card1 = Game.library.waitForClickOrCancel("Choose an inherent to strive or cancel.");
                     if (card1 == null)
                     {
                         return;
@@ -489,7 +489,7 @@
                 // Second declare
                 while (true)
                 {
-                    Card card2 = Game.library.waitForClickOrCancel("Choose an additional inherent to strive.");
+                    Card card2 = Game.library.waitForClickOrCancel("Choose an additional inherent to strive or cancel.");
                     if (card2 == null)
                     {
                         return;
@@ -504,7 +504,7 @@
                 // Third declare
                 while (true)
                 {
-                    Card card2 = Game.library.waitForClickOrCancel("Choose an additional inherent to strive.");
+                    Card card2 = Game.library.waitForClickOrCancel("Choose an additional inherent to strive or cancel.");
                     if (card2 == null)
                     {
                         return;


Refactor executeAction slightly, prep for more complex execution

--- Assets/Scripts/WorldMap.cs
+++ Assets/Scripts/WorldMap.cs
@@ -302,7 +302,7 @@
 		}
 		return true;
 	}
-
+
 	private void instantiateWorld()
 	{
 		// Structures
@@ -352,7 +352,7 @@
 		List<AgentPercept> structureList = null;
 		for(int i=0; i<structures.Count; i++)
 		{
-			structureList = canPerceiveStructure(agent, structures[i]);
+			structureList = perceiveStructure(agent, structures[i]);
 			if(structureList != null)
 			{
 				apList.AddRange(structureList);
@@ -387,7 +387,7 @@
 		return false;
 	}

-	private List<AgentPercept> canPerceiveStructure(Agent who, Rect what)
+	private List<AgentPercept> perceiveStructure(Agent who, Rect what)
 	{
 		// TODO: Calculate chunks of walls that are visible, return those.
 		return null;
@@ -404,28 +404,58 @@
 					break;

 				case Action.ActionType.MOVE_TOWARDS:
-					Vector2 newPoint = agent.getLocation() + (planList[i].getTargetPoint() - agent.getLocation()).normalized * duration * moveSpeed * agent.getSpeedMultiplier();
-
-					if(isValidPosition(newPoint))
-					{
-						agent.setLocation(newPoint);
-					}
-
+					moveAgentTowards( agent, planList[i].getTargetPoint(), duration);
 					break;

 				case Action.ActionType.TURN_BY_DEGREES:
+					turnAgentBy( agent, planList[i].getDirection());
 					break;

 				case Action.ActionType.TURN_TO_DEGREES:
-					agent.setDirection( planList[i].getDirection() );
+					turnAgentTo( agent, planList[i].getDirection());
 					break;

 				case Action.ActionType.TURN_TOWARDS:
+					turnAgentTowards( agent, planList[i].getTargetPoint());
 					break;
 			}
 		}
 	}

+	// attempt to move the agent as far as possible towards target,
+	// given a duration of movement.
+	private void moveAgentTowards(Agent agent, Vector2 target, float duration)
+	{
+		Vector2 newPoint = agent.getLocation() + (target - agent.getLocation()).normalized * duration * moveSpeed * agent.getSpeedMultiplier();
+
+		if(isValidPosition(newPoint))
+		{
+			agent.setLocation(newPoint);
+		}
+		else
+		{
+			// partial movement & wall-sliding go here
+		}
+	}
+
+	private void turnAgentBy(Agent agent, float degrees)
+	{
+		agent.setDirection( agent.getDirection() + degrees );
+	}
+
+	private void turnAgentTo(Agent agent, float angle)
+	{
+		agent.setDirection( angle );
+	}
+
+	private void turnAgentTowards(Agent agent, Vector2 point)
+	{
+		Vector2 delta = point - agent.getLocation();
+		float angle = Mathf.Rad2Deg * Mathf.Atan2(delta.x, delta.y);
+
+		turnAgentTo( agent, angle );
+	}
+
 	#endregion Agent-World Interactions
 	//////////////////////////////////////////////////////////////////
 }


Check for overwrite output file, allow short option names.

--- TfZip/Program.cs
+++ TfZip/Program.cs
@@ -15,26 +15,25 @@
     {
         static void Usage()
         {
-            System.Console.WriteLine(String.Format("Usage:   TfZip -shelveset <shelvesetname>[;<selvesetowner>] [<zipoutfile>]      Creates a zipfile containing the files in the shelveset and their previous versions."));
-            System.Console.WriteLine(String.Format("                                                                                A filename will be generated from <shelvesetname> if <zipoutfile> ends with '\\' or is missing."));
-            System.Console.WriteLine(String.Format("         TfZip -pending <zipoutfile>                                            Creates a zipfile containing all pending files and their previous versions."));
+            Console.WriteLine(String.Format("Usage:   TfZip [-y] -shel[veset] <shelvesetname>[;<shelvesetowner>] [<zipoutfile>]     Creates a zipfile containing the files in the shelveset and their previous versions."));
+            Console.WriteLine(String.Format("                                                                                A filename will be generated from <shelvesetname> if <zipoutfile> ends with '\\' or is missing."));
+            Console.WriteLine(String.Format("                                                                                '-y' suppresses prompting to confirm overwrite an existing <zipoutfile>."));
+            Console.WriteLine(String.Format("         TfZip [-y] -pend[ing] <zipoutfile>                                            Creates a zipfile containing all pending files and their previous versions."));
         }

         enum ItemsSource
         {
-            ShelveSet,
-            Pending,
+            ShelveSet = 1,
+            Pending = 2,
         }

         static int Main(String[] args)
         {
-            //System.Diagnostics.Debugger.Launch();
-
             String zipFilePath = null;

-            ItemsSource itemsSource;
+            ItemsSource itemsSource = (ItemsSource)0;
             String shelveSetSpec = null;
             String shelvesetName = null;
             String shelvesetOwner = null;
@@ -46,73 +45,87 @@
             }

             WorkspaceInfo wsInfo = null;
-
-            if (String.Equals(args[0], "-shelveset", StringComparison.InvariantCultureIgnoreCase))
-            {
-                if ((args.Length < 2) || (args.Length > 3))
+            bool confirmOverwriteOutfile = true;
+
+            System.Collections.IEnumerator enu = args.GetEnumerator();
+            enu.Reset();
+            while (enu.MoveNext())
+            {
+                string arg = (string)enu.Current;
+                string option = arg.ToLowerInvariant();
+
+                if (String.Equals(option, "-y", StringComparison.InvariantCultureIgnoreCase) || String.Equals(args[0], "/y", StringComparison.InvariantCultureIgnoreCase))
+                {
+                    confirmOverwriteOutfile = false;
+                }
+                else if ((option.Length >= 5) && ("-shelveset".StartsWith(option, StringComparison.InvariantCultureIgnoreCase) || "/shelveset".StartsWith(option, StringComparison.InvariantCultureIgnoreCase)))
+                {
+                    if (!enu.MoveNext())
+                    {
+                        Usage();
+                        return 3;
+                    }
+
+                    shelveSetSpec = (string)enu.Current;
+                    WorkspaceSpec.Parse(shelveSetSpec, RepositoryConstants.AuthenticatedUser, out shelvesetName, out shelvesetOwner);
+                    if (String.IsNullOrEmpty(shelvesetName) || String.IsNullOrEmpty(shelvesetOwner))
+                    {
+                        Usage();
+                        return 3;
+                    }
+
+                    if (enu.MoveNext())
+                    {
+                        zipFilePath = (string)enu.Current;
+                    }
+
+                    zipFilePath = EnsureValidZipOutFile(zipFilePath, delegate() { return shelvesetName; });
+
+                    itemsSource = ItemsSource.ShelveSet;
+                }
+                else if ((option.Length >= 5) && ("-pending".StartsWith(option, StringComparison.InvariantCultureIgnoreCase) || "/pending".StartsWith(option, StringComparison.InvariantCultureIgnoreCase)))
+                {
+                    if (enu.MoveNext())
+                    {
+                        zipFilePath = (string)enu.Current;
+                    }
+
+                    try
+                    {
+                        zipFilePath = EnsureValidZipOutFile(zipFilePath, delegate()
+                        {
+                            wsInfo = Workstation.Current.GetLocalWorkspaceInfo(Environment.CurrentDirectory);
+                            if (wsInfo == null)
+                            {
+                                Console.Error.WriteLine("The current directory is not part of a workspace.");
+                                throw new ApplicationException();
+                            }
+
+                            string fallbackFileName = DateTime.Now.ToString("yyyyMMddTHHmmss") + '_' + wsInfo.Name + '@' + wsInfo.Computer;
+                            return fallbackFileName;
+                        });
+                    }
+                    catch (ApplicationException)
+                    {
+                        return 1;
+                    }
+
+                    itemsSource = ItemsSource.Pending;
+                }
+                else
                 {
                     Usage();
                     return 3;
                 }
-
-                shelveSetSpec = args[1];
-                WorkspaceSpec.Parse(shelveSetSpec, RepositoryConstants.AuthenticatedUser, out shelvesetName, out shelvesetOwner);
-                if (String.IsNullOrEmpty(shelvesetName) || String.IsNullOrEmpty(shelvesetOwner))
-                {
-                    Usage();
-                    return 3;
-                }
-
-                if (args.Length == 3)
-                {
-                    zipFilePath = args[2];
-                }
-
-                zipFilePath = EnsureValidZipOutFile(zipFilePath, delegate() { return shelvesetName; });
-
-                itemsSource = ItemsSource.ShelveSet;
-            }
-            else if (String.Equals(args[0], "-pending", StringComparison.InvariantCultureIgnoreCase))
-            {
-                if ((args.Length < 1) || (args.Length > 2))
-                {
-                    Usage();
-                    return 3;
-                }
-
-                if (args.Length == 2)
-                {
-                    zipFilePath = args[1];
-                }
-
-                try
-                {
-                    zipFilePath = EnsureValidZipOutFile(zipFilePath, delegate()
-                    {
-                        wsInfo = Workstation.Current.GetLocalWorkspaceInfo(Environment.CurrentDirectory);
-                        if (wsInfo == null)
-                        {
-                            Console.Error.WriteLine("The current directory is not part of a workspace.");
-                            throw new ApplicationException();
-                        }
-
-                        string fallbackFileName = DateTime.Now.ToString("yyyyMMddTHHmmss") + '_' + wsInfo.Name + '@' + wsInfo.Computer;
-                        return fallbackFileName;
-                    });
-                }
-                catch (ApplicationException)
-                {
-                    return 1;
-                }
-
-                itemsSource = ItemsSource.Pending;
-            }
-            else
+            }
+
+            if (itemsSource == (ItemsSource)0)
             {
                 Usage();
                 return 3;
             }

+
             if (wsInfo == null)
             {
                 wsInfo = Workstation.Current.GetLocalWorkspaceInfo(Environment.CurrentDirectory);
@@ -130,7 +143,7 @@
                 VersionControlServer versionControl = (VersionControlServer)tfsServer.GetService(typeof(VersionControlServer));
                 if (versionControl == null)
                 {
-                    System.Console.WriteLine(String.Format("Could not access VersionControlServer service."));
+                    Console.WriteLine(String.Format("Could not access VersionControlServer service."));
                     return 1;
                 }

@@ -150,7 +163,7 @@
                     }
                     catch (ShelvesetNotFoundException)
                     {
-                        System.Console.WriteLine(String.Format("Could not find shelveset \"{0}\".", shelveSetSpec));
+                        Console.WriteLine(String.Format("Could not find shelveset \"{0}\".", shelveSetSpec));
                         return 1;
                     }
                     if ((pendingSets == null) || (pendingSets.Length == 0) || (pendingSets.Length > 1))
@@ -173,15 +186,31 @@
                 {
                     if (zipFilePathInfo.IsReadOnly)
                     {
-                        System.Console.WriteLine(String.Format("Cannot write to outfile \"{0}\".", zipFilePath));
+                        Console.WriteLine(String.Format("Cannot write to outfile \"{0}\".", zipFilePath));
                         return 1;
                     }
+                    else if (confirmOverwriteOutfile)
+                    {
+                        while (true)
+                        {
+                            Console.Write(String.Format("Overwrite \"{0}\" ? (Yes/No): ", zipFilePath));
+                            string result = Console.ReadLine().ToLowerInvariant();
+                            if (result.Length >= 1 && "yes".StartsWith(result))
+                            {
+                                break;
+                            }
+                            else if (result.Length >= 1 && "no".StartsWith(result))
+                            {
+                                return 1;
+                            }
+                        }
+                    }
                 }
                 else
                 {
                     if (!zipFilePathInfo.Directory.Exists)
                     {
-                        System.Console.WriteLine(String.Format("Cannot access outfile path \"{0}\".", zipFilePath));
+                        Console.WriteLine(String.Format("Cannot access outfile path \"{0}\".", zipFilePath));
                         return 1;
                     }
                 }
@@ -203,11 +232,17 @@
                         }
                         catch (Exception ex)
                         {
-                            System.Console.WriteLine(String.Format("Cannot use temporary storage file \"{0}\"." + Environment.NewLine + "{1}", tmpFileInfo, ex.Message));
+                            Console.WriteLine(String.Format("Cannot use temporary storage file \"{0}\"." + Environment.NewLine + "{1}", tmpFileInfo, ex.Message));
                         }

                         MemoryStream pendingChangesInfo = new MemoryStream();
                         StreamWriter pendingChangesInfoWriter = new StreamWriter(pendingChangesInfo);
+
+                        if (pendingChanges.Length == 0)
+                        {
+                            Console.WriteLine("No pending changes. No file written.");
+                            return 1;
+                        }

                         foreach (PendingChange pendingChange in pendingChanges)
                         {
@@ -216,7 +251,7 @@
                             string originalPath = pendingChange.IsRename ? pendingChange.SourceServerItem : null;
                             string originalPathInfo = originalPath != null ? String.Format("{0}", originalPath) : String.Empty;
                             string info = String.Format("{0}|{1}|{2}|{3}", pendingChange.ServerItem, changeType, basedOn, originalPathInfo);
-                            System.Console.WriteLine(info);
+                            Console.WriteLine(info);
                             pendingChangesInfoWriter.WriteLine(info);

                             if (pendingChange.ItemType != ItemType.File)


64k ought to be enough for everybody

64k ought to be enough for everybody

--- Trie/BaseTrie.cs
+++ Trie/BaseTrie.cs
@@ -13,7 +13,7 @@

         protected BaseTrie(byte[] storage)
         {
-            if (storage.Length > 32 * 1024) throw new ArgumentOutOfRangeException(nameof(storage), "Array too big");
+            if (storage.Length - 1 > ushort.MaxValue) throw new ArgumentOutOfRangeException(nameof(storage), "Array too big");
             _storage = storage;
         }


BodyPrototyperManager: Added ability to scale time.

--- Source/Plugins/Lizitt/Outfitter/Prototyping/BodyPrototyperManager.cs
+++ Source/Plugins/Lizitt/Outfitter/Prototyping/BodyPrototyperManager.cs
@@ -81,6 +81,11 @@
         [Range(0, 2)]
         private float m_AnimatorTimeout = 1;

+        [SerializeField]
+        [Tooltip("The speed of time.")]
+        [Range(0, 1)]
+        private float m_TimeScale = 1;
+
         #endregion

         #region Utility Members
@@ -311,6 +316,8 @@
             m_Camera.transform.LookAt(m_CameraPivot.position);

             m_OutfitBlockTime -= Time.deltaTime;
+
+            Time.timeScale = m_TimeScale;
         }

         #endregion


Minor changes.

Minor changes.

--- Source/Test/NProxy.Core.Test/Interceptors/ProxyFactoryTestFixture.cs
+++ Source/Test/NProxy.Core.Test/Interceptors/ProxyFactoryTestFixture.cs
@@ -112,17 +112,19 @@
         [Test]
         public void NewProxyWithLazyInterceptorTest()
         {
+            // Arrange
             var employee = _proxyFactory.NewProxy<IEmployee>()
                 .Extends<LazyMixin>()
                 .Targets<Employee>();

-            employee.Name = "Saturnus";
+            // Act
+            employee.Name = "2";

+            // Assert
             Assert.That(employee, Is.InstanceOf<IEmployee>());
+            Assert.That(employee.Name, Is.EqualTo("2"));
+
             Assert.That(employee, Is.InstanceOf<ILazy>());
-
-            Assert.That(employee.Name, Is.EqualTo("Saturnus"));
-
             var lazy = (ILazy) employee;

             Assert.That(lazy.Loaded, Is.EqualTo(true));


Small refactoring into ObservableWebRequest

--- Sources/Silphid.Loadzup/Sources/Loaders/Http/ObservableWebRequest.cs
+++ Sources/Silphid.Loadzup/Sources/Loaders/Http/ObservableWebRequest.cs
@@ -38,24 +38,24 @@
         }

-        private static IEnumerator Fetch(UnityWebRequest www, IObserver<UnityWebRequest> observer)
+        private static IEnumerator Fetch(UnityWebRequest webRequest, IObserver<UnityWebRequest> observer)
         {
-            using (www)
+            using (webRequest)
             {
-                yield return www.Send();
-                if (!www.error.IsNullOrEmpty())
+                yield return webRequest.Send();
+                if (!webRequest.error.IsNullOrEmpty())
                 {
-                    observer.OnError(new Exception(www.downloadHandler.text));
+                    observer.OnError(new Exception(webRequest.downloadHandler.text));
                 }
                 else
                 {
-                    observer.OnNext(www);
+                    observer.OnNext(webRequest);
                     observer.OnCompleted();
                 }
             }
         }

-        private static IEnumerator FetchExemple(UnityWebRequest www, IObserver<byte[]> observer, IProgress<float> reportProgress, CancellationToken cancel)
+        private static IEnumerator FetchRef(UnityWebRequest www, IObserver<byte[]> observer, IProgress<float> reportProgress, CancellationToken cancel)
         {
             using (www)
             {


draw in color and fix ellipse drawing

draw in color and fix ellipse drawing

--- BCad/UI/CadRendererGame.cs
+++ BCad/UI/CadRendererGame.cs
@@ -20,6 +20,7 @@
         private BasicEffect effect;
         private PrimitiveBatch<VertexPositionColor> batch;
         private Color autoColor;
+        private Color backgroundColor;
         private Matrix4 transform;

         public CadRendererGame(IWorkspace workspace, IInputService inputService, IViewControl viewControl)
@@ -54,6 +55,7 @@
             switch (e.PropertyName)
             {
                 case Constants.BackgroundColorString:
+                    backgroundColor = workspace.SettingsManager.BackgroundColor.ToColor();
                     autoColor = workspace.SettingsManager.BackgroundColor.GetAutoContrastingColor().ToColor();
                     break;
             }
@@ -68,6 +70,7 @@
         {
             batch = new PrimitiveBatch<VertexPositionColor>(GraphicsDevice);
             effect = new BasicEffect(GraphicsDevice);
+            effect.VertexColorEnabled = true;

             workspace.WorkspaceChanged += Workspace_WorkspaceChanged;
             workspace.SettingsManager.PropertyChanged += SettingsManager_PropertyChanged;
@@ -89,7 +92,7 @@
         protected override void Draw(GameTime gameTime)
         {
             // TODO: transform is incorrect on first launch
-            GraphicsDevice.Clear(workspace.SettingsManager.BackgroundColor.ToColor4());
+            GraphicsDevice.Clear(backgroundColor);
             effect.Projection = Matrix.Identity;
             effect.CurrentTechnique.Passes[0].Apply();
             batch.Begin();
@@ -124,7 +127,6 @@

         private void DrawPrimitive(IPrimitive primitive, IndexedColor layerColor)
         {
-            // TODO: only draws white
             var color = GetColor(layerColor, primitive.Color);
             switch (primitive.Kind)
             {
@@ -138,16 +140,26 @@
                     var el = (PrimitiveEllipse)primitive;
                     var startAngle = el.StartAngle * MathHelper.DegreesToRadians;
                     var endAngle = el.EndAngle * MathHelper.DegreesToRadians;
+                    if (endAngle < startAngle)
+                        endAngle += MathHelper.TwoPI;
                     var angleDelta = 1.0 * MathHelper.DegreesToRadians;
                     var trans = transform * el.FromUnitCircleProjection();
                     var last = trans.Transform(new Point(Math.Cos(startAngle), Math.Sin(startAngle), 0.0));
-                    // TODO: drawing for every degree could over-draw if StartAngle or EndAngle isn't whole
-                    for (var angle = startAngle; angle <= endAngle; angle += angleDelta)
+                    double angle;
+                    for (angle = startAngle; angle <= endAngle; angle += angleDelta)
                     {
                         var next = trans.Transform(new Point(Math.Cos(angle), Math.Sin(angle), 0.0));
                         batch.DrawLine(new VertexPositionColor(last.ToVector3(), color), new VertexPositionColor(next.ToVector3(), color));
                         last = next;
                     }
+
+                    if (angle != endAngle)
+                    {
+                        // draw final line if needed.  this could occur if either startAngle or endAngle aren't whole numbers
+                        var next = trans.Transform(new Point(Math.Cos(endAngle), Math.Sin(endAngle), 0.0));
+                        batch.DrawLine(new VertexPositionColor(last.ToVector3(), color), new VertexPositionColor(next.ToVector3(), color));
+                    }
+
                     break;
             }
         }


Fix null reference exceptions if includes was not passed in. Treat Null includes as include ALL

--- Util-JsonApiSerializer/ResourceConfigurationBuilder.cs
+++ Util-JsonApiSerializer/ResourceConfigurationBuilder.cs
@@ -259,8 +259,8 @@
         /// </remarks>
         public ResourceConfigurationBuilder<TResource> WithLinkedResource<TNested>(Expression<Func<TResource, TNested>> objectAccessor, Expression<Func<TResource, object>> idAccessor = null, string linkedResourceType = null, string linkName = null, ResourceInclusionRules inclusionRule = ResourceInclusionRules.Smart, string smartUrlTemplate = null, string requestedIncludes = null) where TNested : class
         {
-            var includes = requestedIncludes.ToLower().Split(',').ToList() ?? new List<string>();
-            if (includes.Contains(linkName.ToLower()))
+            var includes = requestedIncludes == null ? new List<string>() : requestedIncludes.ToLower().Split(',').ToList();
+            if (requestedIncludes == null || (linkName != null && includes.Contains(linkName.ToLower())))
             {
                 if (typeof(TNested).Name == "Array")
                     throw new NotSupportedException("Array type is not supported!");


(VsIntegration) Remove the Manual addition of TextTemplatingFileGenerator

--- VisualStudio/ProjectBase/SingleFileGeneratorFactory.cs
+++ VisualStudio/ProjectBase/SingleFileGeneratorFactory.cs
@@ -208,11 +208,11 @@
         {
             get
             {
-                if(this.baseGeneratorRegistryKey == null)
-                {
-                    using(RegistryKey root = VSRegistry.RegistryRoot(__VsLocalRegistryType.RegType_Configuration))
+                if (this.baseGeneratorRegistryKey == null)
+                {
+                    using (RegistryKey root = VSRegistry.RegistryRoot(__VsLocalRegistryType.RegType_Configuration))
                     {
-                        if(null != root)
+                        if (null != root)
                         {
                             string regPath = "Generators\\" + this.ProjectGuid.ToString("B");
                             baseGeneratorRegistryKey = root.OpenSubKey(regPath);
@@ -251,20 +251,20 @@
             Guid genGuid;
             ErrorHandler.ThrowOnFailure(this.GetGeneratorInformation(progId, out generatesDesignTimeSource, out generatesSharedDesignTimeSource, out useTempPEFlag, out genGuid));

-			//Create the single file generator and pass it out. Check to see if it is in the cache
-         if (genGuid.CompareTo(Guid.Empty) == 0)
-         {
-            generate = null;
-            return VSConstants.S_FALSE;
-         }
-            if(!this.generatorsMap.ContainsKey(progId) || ((this.generatorsMap[progId]).Generator == null))
+            //Create the single file generator and pass it out. Check to see if it is in the cache
+            if (genGuid.CompareTo(Guid.Empty) == 0)
+            {
+                generate = null;
+                return VSConstants.S_FALSE;
+            }
+            if (!this.generatorsMap.ContainsKey(progId) || ((this.generatorsMap[progId]).Generator == null))
             {
                 Guid riid = VSConstants.IID_IUnknown;
                 uint dwClsCtx = (uint)CLSCTX.CLSCTX_INPROC_SERVER;
                 IntPtr genIUnknown = IntPtr.Zero;
                 //create a new one.
                 ErrorHandler.ThrowOnFailure(this.LocalRegistry.CreateInstance(genGuid, null, ref riid, dwClsCtx, out genIUnknown));
-                if(genIUnknown != IntPtr.Zero)
+                if (genIUnknown != IntPtr.Zero)
                 {
                     try
                     {
@@ -322,51 +322,30 @@
                 return VSConstants.S_FALSE;

             //Create the single file generator and pass it out.
-            if(!this.generatorsMap.ContainsKey(progId))
+            if (!this.generatorsMap.ContainsKey(progId))
             {
                 // We have to check whether the BaseGeneratorkey returns null.
                 RegistryKey tempBaseGeneratorKey = this.BaseGeneratorsKey;
-                //////////////////
-                ////////////////// Fab ugly Hack
-                if (progId == "TextTemplatingFileGenerator")
-                {
-                    GeneratorMetaData genData = new GeneratorMetaData();
-
-                    genData.GeneratorClsid = guidGenerator = new Guid("{b9c665d2-0451-4ae2-a38c-443b85d634f2}");
-                    //Get the GeneratesDesignTimeSource flag. Assume 0 if not present.
-                    genData.GeneratesDesignTimeSource = generatesDesignTimeSource = 1;
-                    //Get the GeneratesSharedDesignTimeSource flag. Assume 0 if not present.
-                    genData.GeneratesSharedDesignTimeSource = generatesSharedDesignTimeSource = 0;
-                    //Get the UseDesignTimeCompilationFlag flag. Assume 0 if not present.
-                    genData.UseDesignTimeCompilationFlag = useTempPEFlag = 0;
-                    this.generatorsMap.Add(progId, genData);
-                }
-                else
-                {
-
-                    /////////////////
-                    ////////////////
-                    if (tempBaseGeneratorKey == null || (genKey = tempBaseGeneratorKey.OpenSubKey(progId)) == null)
-                    {
-                        return VSConstants.S_FALSE;
-                    }
-
-                    //Get the CLSID
-                    string guid = (string)genKey.GetValue(GeneratorClsid, "");
-                    if (String.IsNullOrEmpty(guid))
-                        return VSConstants.S_FALSE;
-
-                    GeneratorMetaData genData = new GeneratorMetaData();
-
-                    genData.GeneratorClsid = guidGenerator = new Guid(guid);
-                    //Get the GeneratesDesignTimeSource flag. Assume 0 if not present.
-                    genData.GeneratesDesignTimeSource = generatesDesignTimeSource = (int)genKey.GetValue(this.GeneratesDesignTimeSource, 0);
-                    //Get the GeneratesSharedDesignTimeSource flag. Assume 0 if not present.
-                    genData.GeneratesSharedDesignTimeSource = generatesSharedDesignTimeSource = (int)genKey.GetValue(GeneratesSharedDesignTimeSource, 0);
-                    //Get the UseDesignTimeCompilationFlag flag. Assume 0 if not present.
-                    genData.UseDesignTimeCompilationFlag = useTempPEFlag = (int)genKey.GetValue(UseDesignTimeCompilationFlag, 0);
-                    this.generatorsMap.Add(progId, genData);
-                }
+                if (tempBaseGeneratorKey == null || (genKey = tempBaseGeneratorKey.OpenSubKey(progId)) == null)
+                {
+                    return VSConstants.S_FALSE;
+                }
+
+                //Get the CLSID
+                string guid = (string)genKey.GetValue(GeneratorClsid, "");
+                if (String.IsNullOrEmpty(guid))
+                    return VSConstants.S_FALSE;
+
+                GeneratorMetaData genData = new GeneratorMetaData();
+
+                genData.GeneratorClsid = guidGenerator = new Guid(guid);
+                //Get the GeneratesDesignTimeSource flag. Assume 0 if not present.
+                genData.GeneratesDesignTimeSource = generatesDesignTimeSource = (int)genKey.GetValue(this.GeneratesDesignTimeSource, 0);
+                //Get the GeneratesSharedDesignTimeSource flag. Assume 0 if not present.
+                genData.GeneratesSharedDesignTimeSource = generatesSharedDesignTimeSource = (int)genKey.GetValue(GeneratesSharedDesignTimeSource, 0);
+                //Get the UseDesignTimeCompilationFlag flag. Assume 0 if not present.
+                genData.UseDesignTimeCompilationFlag = useTempPEFlag = (int)genKey.GetValue(UseDesignTimeCompilationFlag, 0);
+                this.generatorsMap.Add(progId, genData);
             }
             else
             {


stateblock changes for lighting

stateblock changes for lighting


1. Fix server map when workspace is mapped to root $/ 2. Fix pending operation is Add do not process more

--- Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs
+++ Microsoft.TeamFoundation.VersionControl.Client/Workspace.cs
@@ -221,7 +221,10 @@
             else
             {
                 string rest = TfsPath.LocalToServerPath(localItem.Substring(mappedFolder.LocalItem.Length));
-                return mappedFolder.ServerItem + rest;
+                if (mappedFolder.ServerItem == VersionControlPath.RootFolder)
+                    return "$" + rest;
+                else
+                    return mappedFolder.ServerItem + rest;
             }
         }

@@ -860,12 +863,21 @@
                         progress.BeginTask(stepName + " " + operation.TargetLocalItem, 1);
                         UpdateLocalVersion update = null;

+                        if (operation.IsAdd)
+                        {
+                            update = ProcessAdd(operation, ProcessDirection.Undo);
+                            if (update != null)
+                                updates.QueueUpdate(update);
+                            continue;
+                        }
+
                         if (operation.IsDelete)
                         {
                             update = ProcessDelete(operation, downloadService, ProcessDirection.Undo);
                             if (update != null)
                                 updates.QueueUpdate(update);
                         }
+
                         if (operation.IsRename)
                         {
                             update = ProcessRename(operation, ProcessDirection.Undo, progress);
@@ -879,12 +891,7 @@
                                 updates.QueueUpdate(update);
                         }

-                        if (operation.IsAdd)
-                        {
-                            update = ProcessAdd(operation, ProcessDirection.Undo);
-                            if (update != null)
-                                updates.QueueUpdate(update);
-                        }
+
                     }
                     finally
                     {


- added Venue Name to Booking model

- added Venue Name to Booking model

--- Venue/Booking.cs
+++ Venue/Booking.cs
@@ -21,6 +21,9 @@

         [JsonProperty("venueId")]
         public int VenueId { get; set; }
+
+        [JsonProperty("venueName")]
+        public string VenueName { get; set; }

         [JsonProperty("code")]
         public string Code { get; set; }


The Variant's visitor should work on derived classes.

--- WmcSoft.Drawing/WmcSoft.Canvas.Abstractions/Variant.cs
+++ WmcSoft.Drawing/WmcSoft.Canvas.Abstractions/Variant.cs
@@ -69,11 +69,11 @@

         public void Visit(Visitor visitor) {
             var type = GetInnerType();
-            if (type == typeof(T1))
+            if (typeof(T1).IsAssignableFrom(type))
                 visitor.Visit((T1)_storage);
-            else if (type == typeof(T2))
+            else if (typeof(T2).IsAssignableFrom(type))
                 visitor.Visit((T2)_storage);
-            else if (type == typeof(T3))
+            else if (typeof(T3).IsAssignableFrom(type))
                 visitor.Visit((T3)_storage);
             else
                 throw new InvalidOperationException();


Fixed issue with logging of hidden fields

--- src/AlloyDemoKit/Business/Forms/FormEventsInitialization.cs
+++ src/AlloyDemoKit/Business/Forms/FormEventsInitialization.cs
@@ -21,7 +21,7 @@
         public void Initialize(InitializationEngine context)
         {
             var formsEvents = ServiceLocator.Current.GetInstance<FormsEvents>();
-            formsEvents.FormsSubmissionFinalized += FormsEvents_FormsSubmissionFinalized;
+            formsEvents.FormsSubmissionFinalized += FormsEvents_FormsSubmissionFinalized;
         }

         private void FormsEvents_FormsSubmissionFinalized(object sender, FormsEventArgs e)
@@ -48,18 +48,21 @@
                     {
                         int id = Convert.ToInt32(item.Key.Substring(item.Key.LastIndexOf("_") + 1));
                         var elementId = formElements.Items.Where(i => i.ContentLink.ID == id).FirstOrDefault();
-                        ElementBlockBase element = loader.Get<ElementBlockBase>(elementId.ContentLink) as ElementBlockBase;
-                        string friendlyName = element != null ? element.GetElementInfo().FriendlyName : item.Key;
-                        _logger.Information(friendlyName + ": " + item.Value);
+                        if (elementId != null)
+                        {
+                            ElementBlockBase element = loader.Get<ElementBlockBase>(elementId.ContentLink) as ElementBlockBase;
+                            string friendlyName = element != null ? element.GetElementInfo().FriendlyName : item.Key;
+                            _logger.Information(friendlyName + ": " + item.Value);
+                        }
                     }
                 }

-
+

             }
         }
-
+

         public void Preload(string[] parameters) { }