Parallelize some learning.

Parallelize some learning.

--- Coremero/Coremero.Plugin.Playground/ImitateChat.cs
+++ Coremero/Coremero.Plugin.Playground/ImitateChat.cs
@@ -1,4 +1,5 @@
 using System;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
@@ -47,6 +48,12 @@
                 {
                     _userModels[entity.ID].Learn(e.Message.Text);
                 }
+                else
+                {
+                    StringMarkov markov = new StringMarkov();
+                    _userModels.TryAdd(entity.ID, markov);
+                    markov.Learn(e.Message.Text);
+                }
             }
         }

@@ -70,7 +77,7 @@
             throw new Exception("Not buffered channel.");
         }

-        Dictionary<ulong, StringMarkov> _userModels = new Dictionary<ulong, StringMarkov>();
+        ConcurrentDictionary<ulong, StringMarkov> _userModels = new ConcurrentDictionary<ulong, StringMarkov>();

         [Command("fillusermarkovs", MinimumPermissionLevel = UserPermission.BotOwner)]
         public async Task<string> FillUserMarkovs(IInvocationContext context)
@@ -79,30 +86,40 @@
             string botName = context.OriginClient.Username;
             foreach (var server in context.OriginClient.Servers)
             {
-                foreach (IChannel channel in server.Channels)
+                Parallel.ForEach(server.Channels, async channel =>
                 {
                     IBufferedChannel bufferedChannel = channel as IBufferedChannel;
                     if (bufferedChannel != null)
                     {
-                        foreach (IBufferedMessage message in await bufferedChannel.GetLatestMessagesAsync(10000))
+                        try
                         {
-                            if (message.User.Name == botName || string.IsNullOrEmpty(message.Text.Trim()) || message.Text.IsCommand())
+                            foreach (IBufferedMessage message in await bufferedChannel.GetLatestMessagesAsync(10000))
                             {
-                                continue;
-                            }
-                            IEntity entity = message.User as IEntity;
-                            if (entity != null)
-                            {
-                                if (!_userModels.ContainsKey(entity.ID))
+                                if (message.User.Name == botName || string.IsNullOrEmpty(message.Text.Trim()) ||
+                                    message.Text.IsCommand())
                                 {
-                                    _userModels[entity.ID] = new StringMarkov();
+                                    continue;
                                 }
-                                _userModels[entity.ID].Learn(message.Text);
-                                linesLearned += 1;
+                                IEntity entity = message.User as IEntity;
+                                if (entity != null)
+                                {
+                                    if (!_userModels.ContainsKey(entity.ID))
+                                    {
+                                        _userModels.TryAdd(entity.ID, new StringMarkov());
+                                    }
+                                    StringMarkov markov;
+                                    _userModels.TryGetValue(entity.ID, out markov);
+                                    markov?.Learn(message.Text);
+                                    linesLearned += 1;
+                                }
                             }
                         }
+                        catch
+                        {
+                            Log.Warn($"Could not read {bufferedChannel.Name}");
+                        }
                     }
-                }
+                });
             }

             return $"Identified {_userModels.Count} users. Learned {linesLearned} lines.";


Refactoring a bit

Refactoring a bit

--- CorvallisBusCore/WebClients/GoogleTransitClient.cs
+++ CorvallisBusCore/WebClients/GoogleTransitClient.cs
@@ -193,77 +193,7 @@

                 if(!routeSchedules.Any(x => x.RouteNo == "C1R"))
                 {
-                    routeSchedules.Add(new GoogleRouteSchedule
-                    {
-                        RouteNo = "C1R",
-                        Days = new List<GoogleDaySchedule>{
-                                        new GoogleDaySchedule {Days = DaysOfWeek.Weekdays,
-                                             StopSchedules = new List<GoogleStopSchedule>
-                                             {
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "MonroeAve_S_5thSt",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(3,35,0),
-                                                          new TimeSpan(4,35,0),
-                                                          new TimeSpan(5,35,0),
-                                                      }
-                                                 },
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "ArnoldWay_N_26thSt",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(3,40,0),
-                                                          new TimeSpan(4,40,0),
-                                                          new TimeSpan(5,40,0),
-                                                      }
-                                                 },
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "WithamHillDr_E_UniversityPl",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(3,45,0),
-                                                          new TimeSpan(4,45,0),
-                                                          new TimeSpan(5,45,0),
-                                                      }
-                                                 },
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "WithamHillDr_W_ElmwoodDr",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(3,50,0),
-                                                          new TimeSpan(4,50,0),
-                                                          new TimeSpan(5,50,0),
-                                                      }
-                                                 },
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "KingsBlvd_E_MonroeAve",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(3,55,0),
-                                                          new TimeSpan(4,55,0),
-                                                          new TimeSpan(5,55,0),
-                                                      }
-                                                 },
-                                                 new GoogleStopSchedule
-                                                 {
-                                                      Name = "MonroeAve_S_7thSt",
-                                                      Times = new List<TimeSpan>
-                                                      {
-                                                          new TimeSpan(4,0,0),
-                                                          new TimeSpan(5,0,0),
-                                                          new TimeSpan(6,0,0),
-                                                      }
-                                                 }
-                                             }
-                                        }
-                        }
-                    });
+                    routeSchedules.Add(GetC1RSchedule());
                 }
                 return routeSchedules.ToList();
             }
@@ -283,5 +213,80 @@
                 return new MemoryStream(data);
             }
         }
+
+        private static GoogleRouteSchedule GetC1RSchedule()
+        {
+            return new GoogleRouteSchedule
+            {
+                RouteNo = "C1R",
+                Days = new List<GoogleDaySchedule>{
+                        new GoogleDaySchedule {Days = DaysOfWeek.Weekdays,
+                                StopSchedules = new List<GoogleStopSchedule>
+                                {
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "MonroeAve_S_5thSt",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(3,35,0),
+                                            new TimeSpan(4,35,0),
+                                            new TimeSpan(5,35,0),
+                                        }
+                                    },
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "ArnoldWay_N_26thSt",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(3,40,0),
+                                            new TimeSpan(4,40,0),
+                                            new TimeSpan(5,40,0),
+                                        }
+                                    },
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "WithamHillDr_E_UniversityPl",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(3,45,0),
+                                            new TimeSpan(4,45,0),
+                                            new TimeSpan(5,45,0),
+                                        }
+                                    },
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "WithamHillDr_W_ElmwoodDr",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(3,50,0),
+                                            new TimeSpan(4,50,0),
+                                            new TimeSpan(5,50,0),
+                                        }
+                                    },
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "KingsBlvd_E_MonroeAve",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(3,55,0),
+                                            new TimeSpan(4,55,0),
+                                            new TimeSpan(5,55,0),
+                                        }
+                                    },
+                                    new GoogleStopSchedule
+                                    {
+                                        Name = "MonroeAve_S_7thSt",
+                                        Times = new List<TimeSpan>
+                                        {
+                                            new TimeSpan(4,0,0),
+                                            new TimeSpan(5,0,0),
+                                            new TimeSpan(6,0,0),
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    };
+        }
     }
 }


Touch some Android file (not entirely sure why this changed)

--- CrossPlatform/Droid/Resources/Resource.designer.cs
+++ CrossPlatform/Droid/Resources/Resource.designer.cs
@@ -1,15 +1,15 @@
 #pragma warning disable 1591
-//------------------------------------------------------------------------------
-// <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
-//
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
-// </auto-generated>
-//------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------
+//  <autogenerated>
+//      This code was generated by a tool.
+//      Mono Runtime Version: 4.0.30319.42000
+//
+//      Changes to this file may cause incorrect behavior and will be lost if
+//      the code is regenerated.
+//  </autogenerated>
+// ------------------------------------------------------------------------------

-[assembly: global::Android.Runtime.ResourceDesignerAttribute("BTTP.Droid.Resource", IsApplication=true)]
+[assembly: Android.Runtime.ResourceDesignerAttribute("BTTP.Droid.Resource", IsApplication=true)]

 namespace BTTP.Droid
 {
@@ -4595,7 +4595,8 @@
 		public partial class Styleable
 		{

-			public static int[] ActionBar = new int[] {
+			public static int[] ActionBar = new int[]
+			{
 					2130772030,
 					2130772032,
 					2130772033,
@@ -4705,13 +4706,15 @@
 			// aapt resource value: 5
 			public const int ActionBar_titleTextStyle = 5;

-			public static int[] ActionBarLayout = new int[] {
+			public static int[] ActionBarLayout = new int[]
+			{
 					16842931};

 			// aapt resource value: 0
 			public const int ActionBarLayout_android_layout_gravity = 0;

-			public static int[] ActionMenuItemView = new int[] {
+			public static int[] ActionMenuItemView = new int[]
+			{
 					16843071};

 			// aapt resource value: 0
@@ -4719,7 +4722,8 @@

 			public static int[] ActionMenuView;

-			public static int[] ActionMode = new int[] {
+			public static int[] ActionMode = new int[]
+			{
 					2130772030,
 					2130772036,
 					2130772037,
@@ -4745,7 +4749,8 @@
 			// aapt resource value: 1
 			public const int ActionMode_titleTextStyle = 1;

-			public static int[] ActivityChooserView = new int[] {
+			public static int[] ActivityChooserView = new int[]
+			{
 					2130772058,
 					2130772059};

@@ -4755,7 +4760,8 @@
 			// aapt resource value: 0
 			public const int ActivityChooserView_initialActivityCount = 0;

-			public static int[] AlertDialog = new int[] {
+			public static int[] AlertDialog = new int[]
+			{
 					16842994,
 					2130772060,
 					2130772061,
@@ -4781,7 +4787,8 @@
 			// aapt resource value: 4
 			public const int AlertDialog_singleChoiceItemLayout = 4;

-			public static int[] AppBarLayout = new int[] {
+			public static int[] AppBarLayout = new int[]
+			{
 					16842964,
 					2130772055,
 					2130772238};
@@ -4795,7 +4802,8 @@
 			// aapt resource value: 2
 			public const int AppBarLayout_expanded = 2;

-			public static int[] AppBarLayout_LayoutParams = new int[] {
+			public static int[] AppBarLayout_LayoutParams = new int[]
+			{
 					2130772239,
 					2130772240};

@@ -4805,7 +4813,8 @@
 			// aapt resource value: 1
 			public const int AppBarLayout_LayoutParams_layout_scrollInterpolator = 1;

-			public static int[] AppCompatImageView = new int[] {
+			public static int[] AppCompatImageView = new int[]
+			{
 					16843033,
 					2130772065};

@@ -4815,7 +4824,8 @@
 			// aapt resource value: 1
 			public const int AppCompatImageView_srcCompat = 1;

-			public static int[] AppCompatTextView = new int[] {
+			public static int[] AppCompatTextView = new int[]
+			{
 					16842804,
 					2130772066};

@@ -4825,7 +4835,8 @@
 			// aapt resource value: 1
 			public const int AppCompatTextView_textAllCaps = 1;

-			public static int[] AppCompatTheme = new int[] {
+			public static int[] AppCompatTheme = new int[]
+			{
 					16842839,
 					16842926,
 					2130772067,
@@ -5275,7 +5286,8 @@
 			// aapt resource value: 3
 			public const int AppCompatTheme_windowNoTitle = 3;

-			public static int[] BottomSheetBehavior_Params = new int[] {
+			public static int[] BottomSheetBehavior_Params = new int[]
+			{
 					2130772241,
 					2130772242};

@@ -5285,13 +5297,15 @@
 			// aapt resource value: 0
 			public const int BottomSheetBehavior_Params_behavior_peekHeight = 0;

-			public static int[] ButtonBarLayout = new int[] {
+			public static int[] ButtonBarLayout = new int[]
+			{
 					2130772177};

 			// aapt resource value: 0
 			public const int ButtonBarLayout_allowStacking = 0;

-			public static int[] CardView = new int[] {
+			public static int[] CardView = new int[]
+			{
 					16843071,
 					16843072,
 					2130772018,
@@ -5345,7 +5359,8 @@
 			// aapt resource value: 11
 			public const int CardView_contentPaddingTop = 11;

-			public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
+			public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
+			{
 					2130772243,
 					2130772244};

@@ -5355,7 +5370,8 @@
 			// aapt resource value: 1
 			public const int CollapsingAppBarLayout_LayoutParams_layout_collapseParallaxMultiplier = 1;

-			public static int[] CollapsingToolbarLayout = new int[] {
+			public static int[] CollapsingToolbarLayout = new int[]
+			{
 					2130772032,
 					2130772245,
 					2130772246,
@@ -5413,7 +5429,8 @@
 			// aapt resource value: 10
 			public const int CollapsingToolbarLayout_toolbarId = 10;

-			public static int[] CompoundButton = new int[] {
+			public static int[] CompoundButton = new int[]
+			{
 					16843015,
 					2130772178,
 					2130772179};
@@ -5427,7 +5444,8 @@
 			// aapt resource value: 2
 			public const int CompoundButton_buttonTintMode = 2;

-			public static int[] CoordinatorLayout = new int[] {
+			public static int[] CoordinatorLayout = new int[]
+			{
 					2130772258,
 					2130772259};

@@ -5437,7 +5455,8 @@
 			// aapt resource value: 1
 			public const int CoordinatorLayout_statusBarBackground = 1;

-			public static int[] CoordinatorLayout_LayoutParams = new int[] {
+			public static int[] CoordinatorLayout_LayoutParams = new int[]
+			{
 					16842931,
 					2130772260,
 					2130772261,
@@ -5459,7 +5478,8 @@
 			// aapt resource value: 3
 			public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;

-			public static int[] DesignTheme = new int[] {
+			public static int[] DesignTheme = new int[]
+			{
 					2130772264,
 					2130772265,
 					2130772266};
@@ -5473,7 +5493,8 @@
 			// aapt resource value: 2
 			public const int DesignTheme_textColorError = 2;

-			public static int[] DrawerArrowToggle = new int[] {
+			public static int[] DrawerArrowToggle = new int[]
+			{
 					2130772180,
 					2130772181,
 					2130772182,
@@ -5507,7 +5528,8 @@
 			// aapt resource value: 7
 			public const int DrawerArrowToggle_thickness = 7;

-			public static int[] FloatingActionButton = new int[] {
+			public static int[] FloatingActionButton = new int[]
+			{
 					2130772055,
 					2130772236,
 					2130772237,
@@ -5541,7 +5563,8 @@
 			// aapt resource value: 7
 			public const int FloatingActionButton_useCompatPadding = 7;

-			public static int[] ForegroundLinearLayout = new int[] {
+			public static int[] ForegroundLinearLayout = new int[]
+			{
 					16843017,
 					16843264,
 					2130772272};
@@ -5555,7 +5578,8 @@
 			// aapt resource value: 2
 			public const int ForegroundLinearLayout_foregroundInsidePadding = 2;

-			public static int[] LinearLayoutCompat = new int[] {
+			public static int[] LinearLayoutCompat = new int[]
+			{
 					16842927,
 					16842948,
 					16843046,
@@ -5593,7 +5617,8 @@
 			// aapt resource value: 7
 			public const int LinearLayoutCompat_showDividers = 7;

-			public static int[] LinearLayoutCompat_Layout = new int[] {
+			public static int[] LinearLayoutCompat_Layout = new int[]
+			{
 					16842931,
 					16842996,
 					16842997,
@@ -5611,7 +5636,8 @@
 			// aapt resource value: 1
 			public const int LinearLayoutCompat_Layout_android_layout_width = 1;

-			public static int[] ListPopupWindow = new int[] {
+			public static int[] ListPopupWindow = new int[]
+			{
 					16843436,
 					16843437};

@@ -5621,7 +5647,8 @@
 			// aapt resource value: 1
 			public const int ListPopupWindow_android_dropDownVerticalOffset = 1;

-			public static int[] LoadingImageView = new int[] {
+			public static int[] LoadingImageView = new int[]
+			{
 					2130771985,
 					2130771986,
 					2130771987};
@@ -5635,7 +5662,8 @@
 			// aapt resource value: 0
 			public const int LoadingImageView_imageAspectRatioAdjust = 0;

-			public static int[] MapAttrs = new int[] {
+			public static int[] MapAttrs = new int[]
+			{
 					2130771968,
 					2130771969,
 					2130771970,
@@ -5705,7 +5733,8 @@
 			// aapt resource value: 14
 			public const int MapAttrs_zOrderOnTop = 14;

-			public static int[] MediaRouteButton = new int[] {
+			public static int[] MediaRouteButton = new int[]
+			{
 					16843071,
 					16843072,
 					2130772017};
@@ -5719,7 +5748,8 @@
 			// aapt resource value: 2
 			public const int MediaRouteButton_externalRouteEnabledDrawable = 2;

-			public static int[] MenuGroup = new int[] {
+			public static int[] MenuGroup = new int[]
+			{
 					16842766,
 					16842960,
 					16843156,
@@ -5745,7 +5775,8 @@
 			// aapt resource value: 2
 			public const int MenuGroup_android_visible = 2;

-			public static int[] MenuItem = new int[] {
+			public static int[] MenuItem = new int[]
+			{
 					16842754,
 					16842766,
 					16842960,
@@ -5815,7 +5846,8 @@
 			// aapt resource value: 13
 			public const int MenuItem_showAsAction = 13;

-			public static int[] MenuView = new int[] {
+			public static int[] MenuView = new int[]
+			{
 					16842926,
 					16843052,
 					16843053,
@@ -5849,7 +5881,8 @@
 			// aapt resource value: 7
 			public const int MenuView_preserveIconSpacing = 7;

-			public static int[] NavigationView = new int[] {
+			public static int[] NavigationView = new int[]
+			{
 					16842964,
 					16842973,
 					16843039,
@@ -5891,7 +5924,8 @@
 			// aapt resource value: 4
 			public const int NavigationView_menu = 4;

-			public static int[] PopupWindow = new int[] {
+			public static int[] PopupWindow = new int[]
+			{
 					16843126,
 					2130772196};

@@ -5901,13 +5935,15 @@
 			// aapt resource value: 1
 			public const int PopupWindow_overlapAnchor = 1;

-			public static int[] PopupWindowBackgroundState = new int[] {
+			public static int[] PopupWindowBackgroundState = new int[]
+			{
 					2130772197};

 			// aapt resource value: 0
 			public const int PopupWindowBackgroundState_state_above_anchor = 0;

-			public static int[] RecyclerView = new int[] {
+			public static int[] RecyclerView = new int[]
+			{
 					16842948,
 					2130771991,
 					2130771992,
@@ -5929,19 +5965,22 @@
 			// aapt resource value: 4
 			public const int RecyclerView_stackFromEnd = 4;

-			public static int[] ScrimInsetsFrameLayout = new int[] {
+			public static int[] ScrimInsetsFrameLayout = new int[]
+			{
 					2130772279};

 			// aapt resource value: 0
 			public const int ScrimInsetsFrameLayout_insetForeground = 0;

-			public static int[] ScrollingViewBehavior_Params = new int[] {
+			public static int[] ScrollingViewBehavior_Params = new int[]
+			{
 					2130772280};

 			// aapt resource value: 0
 			public const int ScrollingViewBehavior_Params_behavior_overlapTop = 0;

-			public static int[] SearchView = new int[] {
+			public static int[] SearchView = new int[]
+			{
 					16842970,
 					16843039,
 					16843296,
@@ -6011,7 +6050,8 @@
 			// aapt resource value: 12
 			public const int SearchView_voiceIcon = 12;

-			public static int[] SignInButton = new int[] {
+			public static int[] SignInButton = new int[]
+			{
 					2130771988,
 					2130771989,
 					2130771990};
@@ -6025,7 +6065,8 @@
 			// aapt resource value: 2
 			public const int SignInButton_scopeUris = 2;

-			public static int[] SnackbarLayout = new int[] {
+			public static int[] SnackbarLayout = new int[]
+			{
 					16843039,
 					2130772055,
 					2130772281};
@@ -6039,7 +6080,8 @@
 			// aapt resource value: 2
 			public const int SnackbarLayout_maxActionInlineWidth = 2;

-			public static int[] Spinner = new int[] {
+			public static int[] Spinner = new int[]
+			{
 					16842930,
 					16843126,
 					16843131,
@@ -6061,7 +6103,8 @@
 			// aapt resource value: 4
 			public const int Spinner_popupTheme = 4;

-			public static int[] SwitchCompat = new int[] {
+			public static int[] SwitchCompat = new int[]
+			{
 					16843044,
 					16843045,
 					16843074,
@@ -6103,7 +6146,8 @@
 			// aapt resource value: 3
 			public const int SwitchCompat_track = 3;

-			public static int[] TabItem = new int[] {
+			public static int[] TabItem = new int[]
+			{
 					16842754,
 					16842994,
 					16843087};
@@ -6117,7 +6161,8 @@
 			// aapt resource value: 2
 			public const int TabItem_android_text = 2;

-			public static int[] TabLayout = new int[] {
+			public static int[] TabLayout = new int[]
+			{
 					2130772282,
 					2130772283,
 					2130772284,
@@ -6183,7 +6228,8 @@
 			// aapt resource value: 9
 			public const int TabLayout_tabTextColor = 9;

-			public static int[] TextAppearance = new int[] {
+			public static int[] TextAppearance = new int[]
+			{
 					16842901,
 					16842902,
 					16842903,
@@ -6221,7 +6267,8 @@
 			// aapt resource value: 8
 			public const int TextAppearance_textAllCaps = 8;

-			public static int[] TextInputLayout = new int[] {
+			public static int[] TextInputLayout = new int[]
+			{
 					16842906,
 					16843088,
 					2130772298,
@@ -6267,7 +6314,8 @@
 			// aapt resource value: 2
 			public const int TextInputLayout_hintTextAppearance = 2;

-			public static int[] Toolbar = new int[] {
+			public static int[] Toolbar = new int[]
+			{
 					16842927,
 					16843072,
 					2130772032,
@@ -6369,7 +6417,8 @@
 			// aapt resource value: 23
 			public const int Toolbar_titleTextColor = 23;

-			public static int[] View = new int[] {
+			public static int[] View = new int[]
+			{
 					16842752,
 					16842970,
 					2130772233,
@@ -6391,7 +6440,8 @@
 			// aapt resource value: 4
 			public const int View_theme = 4;

-			public static int[] ViewBackgroundHelper = new int[] {
+			public static int[] ViewBackgroundHelper = new int[]
+			{
 					16842964,
 					2130772236,
 					2130772237};
@@ -6405,7 +6455,8 @@
 			// aapt resource value: 2
 			public const int ViewBackgroundHelper_backgroundTintMode = 2;

-			public static int[] ViewStubCompat = new int[] {
+			public static int[] ViewStubCompat = new int[]
+			{
 					16842960,
 					16842994,
 					16842995};


Bot now writes welcome message to new joined members, and tells them to take a look at the rules channel

--- DiscordAstroBot/DiscordAstroBot/DiscordAstroBot.cs
+++ DiscordAstroBot/DiscordAstroBot/DiscordAstroBot.cs
@@ -54,6 +54,7 @@
             DiscordClient.MessageReceived += MessageReceived;
             DiscordClient.ServerAvailable += DiscordClient_ServerAvailable;
             DiscordClient.UserUpdated += DiscordClient_UserUpdated;
+            DiscordClient.UserJoined += DiscordClient_UserJoined;

             // Login into Discord
             DiscordClient.ExecuteAndWait(async () =>
@@ -61,6 +62,26 @@
                 await DiscordClient.Connect(token, TokenType.Bot);
                 Log<DiscordAstroBot>.InfoFormat("Login successfull");
             });
+        }
+        /// <summary>
+        /// Gets called when a user joins the server
+        /// </summary>
+        /// <param name="sender"></param>
+        /// <param name="e"></param>
+        private void DiscordClient_UserJoined(object sender, UserEventArgs e)
+        {
+            Log<DiscordAstroBot>.InfoFormat($"New user {e.User.Name} joined on server {e.Server.Name}");
+
+            // Send a welcome message in the default channel
+            var rulesChannel = e.Server.AllChannels.FirstOrDefault(x => x.Name.ToLower() == "rules");
+            if (rulesChannel != null)
+            {
+                e.Server.DefaultChannel.SendMessage($"A new user joined! Say hi to {e.User.Mention}\r\nMake sure to check out the {rulesChannel.Mention} channel!");
+            }
+            else
+            {
+                e.Server.DefaultChannel.SendMessage($"A new user joined! Say hi to {e.User.Mention}");
+            }
         }

         /// <summary>


Fixed: AddShapeFunction is missing call to base Deactivate method.

--- DotSpatial.Plugins.ShapeEditor/AddShapeFunction.cs
+++ DotSpatial.Plugins.ShapeEditor/AddShapeFunction.cs
@@ -167,6 +167,8 @@
                 Map.MapFrame.Invalidate();
                 Map.Invalidate();
             }
+
+            base.Deactivate();
         }

         /// <summary>


Better reading of first layer height

Better reading of first layer height

--- examples/GCodeVisualizer/GCodeFileLoaded.cs
+++ examples/GCodeVisualizer/GCodeFileLoaded.cs
@@ -290,7 +290,7 @@
 							{
 								loadedGCodeFile.layerThickness = double.Parse(lineString.Split('=')[1]);
 							}
-							else if (lineString.StartsWith("; firstLayerThickness"))
+							else if (lineString.StartsWith("; firstLayerThickness") && loadedGCodeFile.firstLayerThickness == 0)
 							{
 								loadedGCodeFile.firstLayerThickness = double.Parse(lineString.Split('=')[1]);
 							}


Made texture width dynamic in backdrop sprite

--- osu.Framework.Templates/templates/template-flappy/FlappyDon.Game/Elements/BackdropSprite.cs
+++ osu.Framework.Templates/templates/template-flappy/FlappyDon.Game/Elements/BackdropSprite.cs
@@ -33,7 +33,7 @@
         {
             Texture = textures.Get("background-day");
             RelativeSizeAxes = Axes.Y;
-            Size = new Vector2(320.0f, 1.0f);
+            Size = new Vector2(Texture.Size.X, 1.0f);
         }

         protected override void Update()


Overloaded to string for the PythagoreanTheorem class

--- EquationLibrary/Trigonometry/PythagoreanTheorem.cs
+++ EquationLibrary/Trigonometry/PythagoreanTheorem.cs
@@ -11,6 +11,10 @@
         public double Opposite { get; set; }
         public double Adjacent { get; set; }

+        public override string ToString()
+        {
+            return String.Format("(Hypothenus = {0}\nOpposite = {1}\nAdjacent = {2}\n",Hypothenus,Opposite,Adjacent);
+        }
         /// <summary>
         /// Solve for the Hypothenus side of the right angle triangle.
         /// </summary>


Ignoring test causing CI to fail occasionally.

--- src/Umbraco.Tests/Logging/AsyncRollingFileAppenderTest.cs
+++ src/Umbraco.Tests/Logging/AsyncRollingFileAppenderTest.cs
@@ -119,6 +119,7 @@
         }

         [Test]
+        [Ignore]
         public void CanLogAtleast1000MessagesASecond()
         {
             // Arrange


It's further not farther :P

It's further not farther :P

--- mAppQuiz/mAppQuiz/Facades/DataFacade.cs
+++ mAppQuiz/mAppQuiz/Facades/DataFacade.cs
@@ -97,19 +97,19 @@
                  * Answers for Question 1 Test 1 Course 2 (Linear Algebra)
                  * Contains:    2   test    with    3   questions   each
                  */
-                Answer answer1at1c2 = new Answer("Orthogonal", "Define this term farther.",
+                Answer answer1at1c2 = new Answer("Orthogonal", "Define this term further.",
                     new SubAnswer("W' is a subspace of R^n"),
                     new SubAnswer("The number of vectors in any basis of H; the zero subspace's dimension is 0"),
                     new SubAnswer("None of these"));
-                Answer answer1bt1c2 = new Answer("Onto", "Define this term farther.",
+                Answer answer1bt1c2 = new Answer("Onto", "Define this term further.",
                     new SubAnswer("W' is a subspace of R^n"),
                     new SubAnswer("consistent for any b; pivots in all rows"),
                     new SubAnswer("None of these"));
-                Answer answer1ct1c2 = new Answer("Rank", "Define this term farther.",
+                Answer answer1ct1c2 = new Answer("Rank", "Define this term further.",
                     new SubAnswer("consistent for any b; pivots in all rows"),
                     new SubAnswer("The dimension of the column space"),
                     new SubAnswer("None of these"));
-                Answer answer1dt1c2 = new Answer("Dimension", "Define this term farther.",
+                Answer answer1dt1c2 = new Answer("Dimension", "Define this term further.",
                     new SubAnswer("The number of vectors in any basis of H; the zero subspace's dimension is 0"),
                     new SubAnswer("The dimension of the column space"),
                     new SubAnswer("None of these"));
@@ -122,19 +122,19 @@
                 int C2T1Q1TIER2ANSWER = 0;

                 //Answers for Question 2 Test 1 Course 2
-                Answer answer2at1c2 = new Answer("Homogeneous", "Define this term farther.",
+                Answer answer2at1c2 = new Answer("Homogeneous", "Define this term further.",
                     new SubAnswer("the x = 0 solution is a TRIVIAL solution"),
                     new SubAnswer("flips rows and columns"),
                     new SubAnswer("None of these"));
-                Answer answer2bt1c2 = new Answer("Independent", "Define this term farther.",
+                Answer answer2bt1c2 = new Answer("Independent", "Define this term further.",
                     new SubAnswer("the columns of A are independent if only the trivial solution exists"),
                     new SubAnswer("If non-zero weights that satisfy the equation exist"),
                     new SubAnswer("None of these"));
-                Answer answer2ct1c2 = new Answer("Dependent", "Define this term farther.",
+                Answer answer2ct1c2 = new Answer("Dependent", "Define this term further.",
                     new SubAnswer("assigns each vector x in R^n a vector T(x) in R^m"),
                     new SubAnswer("If non-zero weights that satisfy the equation exist"),
                     new SubAnswer("None of these"));
-                Answer answer2dt1c2 = new Answer("Transformation", "Define this term farther.",
+                Answer answer2dt1c2 = new Answer("Transformation", "Define this term further.",
                     new SubAnswer("assigns each vector x in R^n a vector T(x) in R^m"),
                     new SubAnswer("flips rows and columns"),
                     new SubAnswer("None of these"));
@@ -147,19 +147,19 @@
                 int C2T1Q2TIER2ANSWER = 0;

                 //Answers for Question 3 Test 1 Course 2
-                Answer answer3at1c2 = new Answer("Basis", "Define this term farther.",
+                Answer answer3at1c2 = new Answer("Basis", "Define this term further.",
                     new SubAnswer("the pivot columns of A form a basis for A's column space"),
                     new SubAnswer("A transformation that assigns a vector y in R^m for each x in R^n"),
                     new SubAnswer("None of these"));
-                Answer answer3bt1c2 = new Answer("One-to-one", "Define this term farther.",
+                Answer answer3bt1c2 = new Answer("One-to-one", "Define this term further.",
                     new SubAnswer("A transformation that assigns a vector y in R^m for each x in R^n"),
                     new SubAnswer("Set of all solution to Ax = 0"),
                     new SubAnswer("None of these"));
-                Answer answer3ct1c2 = new Answer("Null space", "Define this term farther.",
+                Answer answer3ct1c2 = new Answer("Null space", "Define this term further.",
                     new SubAnswer("Set of all solution to Ax = 0"),
                     new SubAnswer("Set of all the linear combinations of the columns of A"),
                     new SubAnswer("None of these"));
-                Answer answer3dt1c2 = new Answer("Column space", "Define this term farther.",
+                Answer answer3dt1c2 = new Answer("Column space", "Define this term further.",
                     new SubAnswer("Set of all solution to Ax = 0"),
                     new SubAnswer("Set of all the linear combinations of the columns of A"),
                     new SubAnswer("None of these"));
@@ -183,19 +183,19 @@
                 /**
                  * Answers for Question 1 Test 2 Course 2 (Linear Algebra)
                  */
-                Answer answer1at2c2 = new Answer("Dimension", "Define this term farther.",
+                Answer answer1at2c2 = new Answer("Dimension", "Define this term further.",
                     new SubAnswer("the zero subspace's dimension is 0"),
                     new SubAnswer("The dimension of the column space"),
                     new SubAnswer("None of these"));
-                Answer answer1bt2c2 = new Answer("Onto", "Define this term farther.",
+                Answer answer1bt2c2 = new Answer("Onto", "Define this term further.",
                     new SubAnswer("the zero subspace's dimension is 0"),
                     new SubAnswer("consistent for any b; pivots in all rows"),
                     new SubAnswer("None of these"));
-                Answer answer1ct2c2 = new Answer("Rank", "Define this term farther.",
-                    new SubAnswer("The dimension of the column space"),
-                    new SubAnswer("Set of all solution to Ax = 0"),
-                    new SubAnswer("None of these"));
-                Answer answer1dt2c2 = new Answer("Null Space", "Define this term farther.",
+                Answer answer1ct2c2 = new Answer("Rank", "Define this term further.",
+                    new SubAnswer("The dimension of the column space"),
+                    new SubAnswer("Set of all solution to Ax = 0"),
+                    new SubAnswer("None of these"));
+                Answer answer1dt2c2 = new Answer("Null Space", "Define this term further.",
                     new SubAnswer("Set of all solution to Ax = 0"),
                     new SubAnswer("The dimension of the column space"),
                     new SubAnswer("None of these"));
@@ -208,19 +208,19 @@
                 int C2T2Q1TIER2ANSWER = 0;

                 //Answers for Question 2 Test 2 Course 2
-                Answer answer2at2c2 = new Answer("Inner Product", "Define this term farther.",
+                Answer answer2at2c2 = new Answer("Inner Product", "Define this term further.",
                     new SubAnswer("if U . V = 0, u and v are orthogonal"),
                     new SubAnswer("x = Cx + d"),
                     new SubAnswer("None of these"));
-                Answer answer2bt2c2 = new Answer("Leontief input-output model", "Define this term farther.",
+                Answer answer2bt2c2 = new Answer("Leontief input-output model", "Define this term further.",
                     new SubAnswer("Leftmost non-zero entry in a non-zero row"),
                     new SubAnswer("x = Cx + d"),
                     new SubAnswer("None of these"));
-                Answer answer2ct2c2 = new Answer("leading entry", "Define this term farther.",
+                Answer answer2ct2c2 = new Answer("leading entry", "Define this term further.",
                     new SubAnswer("Leftmost non-zero entry in a non-zero row"),
                     new SubAnswer("Has no solution"),
                     new SubAnswer("None of these"));
-                Answer answer2dt2c2 = new Answer("inconsistent system", "Define this term farther.",
+                Answer answer2dt2c2 = new Answer("inconsistent system", "Define this term further.",
                     new SubAnswer("x = Cx + d"),
                     new SubAnswer("Has no solution"),
                     new SubAnswer("None of these"));
@@ -233,19 +233,19 @@
                 int C2T2Q2TIER2ANSWER = 0;

                 //Answers for Question 3 Test 2 Course 2
-                Answer answer3at2c2 = new Answer("Dependent", "Define this term farther.",
+                Answer answer3at2c2 = new Answer("Dependent", "Define this term further.",
                     new SubAnswer("if there are more vectors than there are entries"),
                     new SubAnswer("If only the trivial solution exists for a linear equation"),
                     new SubAnswer("None of these"));
-                Answer answer3bt2c2 = new Answer("Independent", "Define this term farther.",
+                Answer answer3bt2c2 = new Answer("Independent", "Define this term further.",
                     new SubAnswer("If only the trivial solution exists for a linear equation"),
                     new SubAnswer("flips rows and columns"),
                     new SubAnswer("None of these"));
-                Answer answer3ct2c2 = new Answer("Transposition", "Define this term farther.",
+                Answer answer3ct2c2 = new Answer("Transposition", "Define this term further.",
                     new SubAnswer("assigns each vector x in R^n a vector T(x) in R^m"),
                     new SubAnswer("flips rows and columns"),
                     new SubAnswer("None of these"));
-                Answer answer3dt2c2 = new Answer("Transformation", "Define this term farther.",
+                Answer answer3dt2c2 = new Answer("Transformation", "Define this term further.",
                     new SubAnswer("assigns each vector x in R^n a vector T(x) in R^m"),
                     new SubAnswer("flips rows and columns"),
                     new SubAnswer("None of these"));
@@ -279,19 +279,19 @@
                  * Answers for Question 1 Test 1 Course 3 (Comp Sci)
                  * Contains:    1   test    with    3   questions
                  */
-                Answer answer1at1c3 = new Answer("Casting", "Define this term farther.",
+                Answer answer1at1c3 = new Answer("Casting", "Define this term further.",
                     new SubAnswer("Referred to as type conversion."),
                     new SubAnswer("Logical expression determined to be true or false - if true execution continues."),
                     new SubAnswer("None of these"));
-                Answer answer1bt1c3 = new Answer("Condition", "Define this term farther.",
+                Answer answer1bt1c3 = new Answer("Condition", "Define this term further.",
                     new SubAnswer("Logical expression determined to be true or false - if true execution continues."),
                     new SubAnswer("Allows a program to proceed in a non-sequential matter."),
                     new SubAnswer("None of these"));
-                Answer answer1ct1c3 = new Answer("Control Statement", "Define this term farther.",
+                Answer answer1ct1c3 = new Answer("Control Statement", "Define this term further.",
                     new SubAnswer("Allows a program to proceed in a non-sequential matter."),
                     new SubAnswer("Data that lies outside the expected limits."),
                     new SubAnswer("None of these"));
-                Answer answer1dt1c3 = new Answer("Encapsulation", "Define this term farther.",
+                Answer answer1dt1c3 = new Answer("Encapsulation", "Define this term further.",
                     new SubAnswer("Allows a program to proceed in a non-sequential matter."),
                     new SubAnswer("Is used to protect (hide) data or methods which prevents access."),
                     new SubAnswer("None of these"));
@@ -304,19 +304,19 @@
                 int C3T1Q1TIER2ANSWER = 0;

                 //Answers for Question 2 Test 1 Course 3
-                Answer answer2at1c3 = new Answer("Mutator", "Define this term farther.",
+                Answer answer2at1c3 = new Answer("Mutator", "Define this term further.",
                     new SubAnswer("Method that alters the attributes of an object."),
                     new SubAnswer("Problem broken down into smaller components."),
                     new SubAnswer("None of these"));
-                Answer answer2bt1c3 = new Answer("Modifiers", "Define this term farther.",
+                Answer answer2bt1c3 = new Answer("Modifiers", "Define this term further.",
                     new SubAnswer("Consist of public, private, static, final, and abstract"),
                     new SubAnswer("Method that alters the attributes of an object."),
                     new SubAnswer("None of these"));
-                Answer answer2ct1c3 = new Answer("Modularity", "Define this term farther.",
+                Answer answer2ct1c3 = new Answer("Modularity", "Define this term further.",
                     new SubAnswer("Method that alters the attributes of an object."),
                     new SubAnswer("Problem broken down into smaller components."),
                     new SubAnswer("None of these"));
-                Answer answer2dt1c3 = new Answer("Nesting", "Define this term farther.",
+                Answer answer2dt1c3 = new Answer("Nesting", "Define this term further.",
                     new SubAnswer("Placing one control statements inside another."),
                     new SubAnswer("Consist of public, private, static, final, and abstract"),
                     new SubAnswer("None of these"));
@@ -329,19 +329,19 @@
                 int C3T1Q2TIER2ANSWER = 0;

                 //Answers for Question 3 Test 1 Course 3
-                Answer answer3at1c3 = new Answer("Tree", "Define this term farther.",
+                Answer answer3at1c3 = new Answer("Tree", "Define this term further.",
                     new SubAnswer("Nodes have max of 2 sub-nodes."),
                     new SubAnswer("Data structure that accesses data in a First In - First Out method"),
                     new SubAnswer("None of these"));
-                Answer answer3bt1c3 = new Answer("Queue", "Define this term farther.",
+                Answer answer3bt1c3 = new Answer("Queue", "Define this term further.",
                     new SubAnswer("Data structure that accesses data in a First In - First Out method"),
                     new SubAnswer("Nodes have max of 2 sub-nodes."),
                     new SubAnswer("None of these"));
-                Answer answer3ct1c3 = new Answer("Array", "Define this term farther.",
+                Answer answer3ct1c3 = new Answer("Array", "Define this term further.",
                     new SubAnswer("Type of object used to store groups of similar elements."),
                     new SubAnswer("Nodes have max of 2 sub-nodes."),
                     new SubAnswer("None of these"));
-                Answer answer3dt1c3 = new Answer("Buffer", "Define this term farther.",
+                Answer answer3dt1c3 = new Answer("Buffer", "Define this term further.",
                     new SubAnswer("Data structure that accesses data in a First In - First Out method"),
                     new SubAnswer("Temporary storage location of limited size."),
                     new SubAnswer("None of these"));


Update BuildSetup.cake

Update BuildSetup.cake

--- src/BuildSetup.cake
+++ src/BuildSetup.cake
@@ -4,7 +4,7 @@
 #tool "nuget:?package=OpenCover&version=4.6.519"
 #tool "nuget:?package=coveralls.io&version=1.3.4"
 #addin "nuget:?package=Cake.Coveralls&version=0.7.0"
-#addin "nuget:?package=Cake.SonarScanner&version=0.1.0"
+#addin "nuget:?package=Cake.SonarScanner&version=1.0.0"

 public class Parameters
 {


Fix number format bug.

Fix number format bug.

--- main/SS/Format/CellNumberPartHandler.cs
+++ main/SS/Format/CellNumberPartHandler.cs
@@ -170,15 +170,15 @@
                 Special s = specials[i];
                 if (IsDigitFmt(s))
                 {
-                    Special numStart = s;
+                    //Special numStart = s;
                     Special last = s;
-                    while (i > 0)
-                    {
-                        i--;
+                    while (i >= 0)
+                    {
                         s = specials[i];
-                        if (last.pos - s.pos > 1 || IsDigitFmt(s)) // it has to be continuous digits
+                        if (last.pos - s.pos > 1 || !IsDigitFmt(s)) // it has to be continuous digits
                             break;
                         last = s;
+                        i--;
                     }
                     return last;
                 }


Version bump

Version bump

--- SSMSExecutor/Properties/AssemblyInfo.cs
+++ SSMSExecutor/Properties/AssemblyInfo.cs
@@ -27,6 +27,6 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("2.0.1.*")]
+[assembly: AssemblyVersion("2.0.2.*")]
 [assembly: AssemblyTrademark("")]
 //[assembly: AssemblyFileVersion("0.1.0.0")]


Tidied up goto code.

Tidied up goto code.

--- Scripting/Parser/Construct/ParseFlow.cs
+++ Scripting/Parser/Construct/ParseFlow.cs
@@ -81,14 +81,10 @@
                 case FlowGoto:
                     if (parts.Length < 1)
                         throw new ParseException("No label specified");
-                    for (int i = 0; i < parts[1].Length; i++)
-                    {
-                        sym = parts[1][i];
-                        if (sym == Resolve)
-                            throw new ParseException("Dynamic label references are not supported"); // TODO: dynamic goto label references
-                        else if (!IsIdentifier(sym))
-                            throw new ParseException("Illegal character in label name");
-                    }
+                    if (parts[1].IndexOf(Resolve) != 1)
+                        throw new ParseException("Dynamic label references are not supported"); // TODO: dynamic goto label references
+                    else if (!IsIdentifier(parts[1]))
+                        throw new ParseException("Illegal character in label name");
                     return new CodeGotoStatement(parts[1]); // TODO: gosub

                 #endregion


fixed tests

fixed tests

--- FreeParkingSystem.Common.Tests/DayScheduleTests.cs
+++ FreeParkingSystem.Common.Tests/DayScheduleTests.cs
@@ -38,10 +38,12 @@
         [Fact]
         public void Is_Open_Now_Returns_True_Because_Of_The_Open_Hour_Range()
         {
-            // arrange
-            var openHourList = new List<(TimeSpan, TimeSpan)>
-            {
-                (DateTimeOffset.Now.AddHours(-1).TimeOfDay, DateTimeOffset.Now.AddHours(5).TimeOfDay)
+
+            // arrange
+
+            var openHourList = new List<(TimeSpan, TimeSpan)>
+            {
+                ( DateTimeOffset.Now.AddSeconds(-1).TimeOfDay,  DateTimeOffset.Now.AddSeconds(1).TimeOfDay )
             };
             // act
             var daySched = new DaySchedule(DateTime.Now.DayOfWeek, openHourList);
@@ -91,7 +93,7 @@
         public void Add_Open_Hours_Does_Not_Add_Time_Collapsed_Open_Hours()
         {
             // arrange
-            var openHourList = new List<(TimeSpan, TimeSpan)> {(new TimeSpan(0, 2, 0, 0), new TimeSpan(0, 12, 0, 0))};
+            var openHourList = new List<(TimeSpan, TimeSpan)> { (new TimeSpan(0, 2, 0, 0), new TimeSpan(0, 12, 0, 0)) };
             var openHourListCount = openHourList.Count;
             // act
             var daySched = new DaySchedule(DateTime.Now.DayOfWeek, openHourList);


Added the Mpeg4VcmVideoEncoder.IsSupported() method.

--- SharpAvi/Codecs/Mpeg4VcmVideoEncoder.cs
+++ SharpAvi/Codecs/Mpeg4VcmVideoEncoder.cs
@@ -31,6 +31,20 @@
     public class Mpeg4VcmVideoEncoder : IVideoEncoder, IDisposable
     {
         /// <summary>
+        /// Checks whether <see cref="Mpeg4VcmVideoEncoder"/> is supported on this platform.
+        /// </summary>
+        /// <returns><c>True</c> if supported, <c>false</c> otherwise.</returns>
+        public static bool IsSupported() => Environment.OSVersion.Platform == PlatformID.Win32NT;
+
+        private static void CheckSupportedPlatform()
+        {
+            if (!IsSupported())
+            {
+                throw new PlatformNotSupportedException($"{nameof(Mpeg4VcmVideoEncoder)} is only supported on the Windows platform.");
+            }
+        }
+
+        /// <summary>
         /// Default preferred order of the supported codecs.
         /// </summary>
         public static ReadOnlyCollection<FourCC> DefaultCodecPreference { get; }
@@ -47,8 +61,13 @@
         /// <summary>
         /// Gets info about the supported codecs that are installed on the system.
         /// </summary>
+        /// <exception cref="PlatformNotSupportedException">
+        /// Running not on Windows.
+        /// </exception>
         public static CodecInfo[] GetAvailableCodecs()
         {
+            CheckSupportedPlatform();
+
             var result = new List<CodecInfo>();

             var inBitmapInfo = CreateBitmapInfo(8, 8, 32, CodecIds.Uncompressed);
@@ -147,6 +166,9 @@
         /// <exception cref="InvalidOperationException">
         /// No compatible codec was found in the system.
         /// </exception>
+        /// <exception cref="PlatformNotSupportedException">
+        /// Running not on Windows.
+        /// </exception>
         /// <remarks>
         /// <para>
         /// It is not guaranteed that the codec will respect the specified <paramref name="quality"/> value.
@@ -166,10 +188,7 @@
             Argument.IsNotNegative(frameCount, nameof(frameCount));
             Argument.IsInRange(quality, 1, 100, nameof(quality));

-            if (Environment.OSVersion.Platform != PlatformID.Win32NT)
-            {
-                throw new PlatformNotSupportedException($"{nameof(Mpeg4VcmVideoEncoder)} only supports the Windows platform.");
-            }
+            CheckSupportedPlatform();

             this.width = width;
             this.height = height;


Add padding to song select

Add padding to song select

--- osu.Game/Screens/Multi/RealtimeMultiplayer/RealtimeMatchSongSelect.cs
+++ osu.Game/Screens/Multi/RealtimeMultiplayer/RealtimeMatchSongSelect.cs
@@ -5,6 +5,7 @@
 using Humanizer;
 using osu.Framework.Allocation;
 using osu.Framework.Bindables;
+using osu.Framework.Graphics;
 using osu.Framework.Screens;
 using osu.Game.Online.Multiplayer;
 using osu.Game.Online.RealtimeMultiplayer;
@@ -23,6 +24,11 @@

         [Resolved]
         private StatefulMultiplayerClient client { get; set; }
+
+        public RealtimeMatchSongSelect()
+        {
+            Padding = new MarginPadding { Horizontal = HORIZONTAL_OVERFLOW_PADDING };
+        }

         protected override bool OnStart()
         {


[XCode] Add utility methods to write list of string items, properly formatted

--- Sharpmake.Generators/Apple/XCodeProj.cs
+++ Sharpmake.Generators/Apple/XCodeProj.cs
@@ -411,6 +411,38 @@
             return configurations.Find(element => (element.Output == Project.Configuration.OutputType.IosApp));
         }

+        public static string XCodeFormatSingleListItem(string item)
+        {
+            if (item.Contains(' '))
+                return $@"""{item}""";
+            return $"{item}";
+        }
+
+        public static string XCodeFormatList(Strings items, int nbIndent)
+        {
+            if (items.Count == 0)
+                return FileGeneratorUtilities.RemoveLineTag;
+
+            if (items.Count == 1)
+                return XCodeFormatSingleListItem(items.First());
+
+            // Write all selected items.
+            var strBuilder = new StringBuilder(1024 * 16);
+
+            string indent = new string('\t', nbIndent);
+
+            strBuilder.Append("(");
+            strBuilder.AppendLine();
+
+            foreach (string item in items)
+            {
+                strBuilder.AppendFormat("{0}\t{1},{2}", indent, XCodeFormatSingleListItem(item), Util.UnixSeparator);
+            }
+            strBuilder.AppendFormat("{0})", indent);
+
+            return strBuilder.ToString();
+        }
+
         //Key is the default config of a Native Target, Value is the list of configs per native target with different optimization (Debug, Release,...)
         private Dictionary<Project.Configuration, List<Project.Configuration>> GetProjectConfigurationsPerNativeTarget(List<Project.Configuration> configurations)
         {


Bumped year in AssemblyInfo

Bumped year in AssemblyInfo

--- SimplSockets/Properties/AssemblyInfo.cs
+++ SimplSockets/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyCompany("Imperative Bytes, LLC")]
-[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyCopyright("Copyright © 2015")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyTrademark("SimplSockets")]


Minor

Minor

--- Snittlistan/Views/Shared/_Layout.cshtml
+++ Snittlistan/Views/Shared/_Layout.cshtml
@@ -16,8 +16,7 @@

-

-                    @Html.ActionLink("Snittlistan", "Index", "Home")

+
@Html.ActionLink("Snittlistan", "Index", "Home")

                 @Html.Partial("_LogOnPartial")


Sorted usings and removed unused namespaces

--- Some2DRPG/Some2DRPG/GameObjects/Coin.cs
+++ Some2DRPG/Some2DRPG/GameObjects/Coin.cs
@@ -1,13 +1,10 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
+using GameEngine;
 using GameEngine.Drawing;
 using GameEngine.GameObjects;
+using Microsoft.Xna.Framework;
+using Microsoft.Xna.Framework.Audio;
 using Microsoft.Xna.Framework.Content;
-using Microsoft.Xna.Framework;
-using GameEngine;
-using Microsoft.Xna.Framework.Audio;

 namespace Some2DRPG.GameObjects
 {


Fixed failing view_projection_for_view_with_non_public_id_setter tests

--- src/Marten.Testing/Events/Projections/view_projection_for_view_with_non_public_id_setter.cs
+++ src/Marten.Testing/Events/Projections/view_projection_for_view_with_non_public_id_setter.cs
@@ -18,6 +18,7 @@
             StoreOptions(_ =>
             {
                 _.AutoCreateSchemaObjects = AutoCreate.All;
+                _.UseDefaultSerialization(nonPublicMembersStorage: NonPublicMembersStorage.NonPublicSetters);
                 _.Events.InlineProjections.Add<ViewProjectionForViewWithPrivateIdSetter>();
                 _.Events.InlineProjections.Add<ViewProjectionForViewWithProtectedIdSetter>();
             });


Add more documentation.

Add more documentation.

--- osu.Framework/Allocation/DependencyContainer.cs
+++ osu.Framework/Allocation/DependencyContainer.cs
@@ -19,6 +19,10 @@

         private readonly DependencyContainer parentContainer;

+        /// <summary>
+        /// Create a new DependencyContainer instance.
+        /// </summary>
+        /// <param name="parent">An optional parent container which we should use as a fallback for cache lookups.</param>
         public DependencyContainer(DependencyContainer parent = null)
         {
             parentContainer = parent;
@@ -156,6 +160,8 @@
         {
             var type = instance.GetType();

+            // TODO: consider using parentContainer for activator lookups as a potential performance improvement.
+
             lock (activators)
                 if (autoRegister && !activators.ContainsKey(type))
                     register(type, lazy);


修改ServerManager实例化节点,防止IISManager因未安装IIS无法实例化

--- Install4ibas.Tools/Plugin/IISManager/IISManager.cs
+++ Install4ibas.Tools/Plugin/IISManager/IISManager.cs
@@ -10,11 +10,19 @@
 {
     public class IISManager : IIISManager
     {
-        protected ServerManager serverManager;
+        protected ServerManager _serverManager;
+        protected ServerManager serverManager
+        {
+            get
+            {
+                if (_serverManager == null)
+                    _serverManager = new ServerManager();
+                return _serverManager;
+            }
+        }
         protected bool checkedFullyInstalled;
         public IISManager()
         {
-            serverManager = new ServerManager();
             RegistryModules = new List<KeyValuePair<bool, string>>();
         }
         public virtual bool IsFullyInstalled()
@@ -139,7 +147,7 @@
             var result = new List<string>();
             foreach (var item in serverManager.Sites)
             {
-                if (!onlyIbas || item.Applications.Count(c => c.Path.Equals("/SystemCenter",StringComparison.InvariantCultureIgnoreCase)) == 1)
+                if (!onlyIbas || item.Applications.Count(c => c.Path.Equals("/SystemCenter", StringComparison.InvariantCultureIgnoreCase)) == 1)
                 {
                     result.Add(item.Name);
                 }


Ease creation of deterministic IDs for e.g. aggregates

--- Source/EventFlow/Aggregates/Identity.cs
+++ Source/EventFlow/Aggregates/Identity.cs
@@ -24,6 +24,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text.RegularExpressions;
+using EventFlow.Core;
 using EventFlow.ValueObjects;

 namespace EventFlow.Aggregates
@@ -39,18 +40,23 @@
             RegexOptions.Compiled);
         // ReSharper enable StaticMemberInGenericType

-        public static T New
+        public static T New => BuildWith(Guid.NewGuid());
+
+        public static T NewDeterministic(Guid namespaceId, string name)
         {
-            get
-            {
-                var value = $"{Name}-{Guid.NewGuid()}".ToLowerInvariant();
-                return With(value);
-            }
+            var guid = GuidFactories.Deterministic.Create(namespaceId, name);
+            return BuildWith(guid);
         }

         public static T With(string value)
         {
             return (T)Activator.CreateInstance(typeof(T), value);
+        }
+
+        private static T BuildWith(Guid guid)
+        {
+            var value = $"{Name}-{guid}".ToLowerInvariant();
+            return With(value);
         }

         public static bool IsValid(string value)


Refactored result handling, so no unnecessary classes needs to be written. Cant handle result:[] anymore due to this. but its also not very pretty.

--- Scripts/Parse/Parse.cs
+++ Scripts/Parse/Parse.cs
@@ -24,11 +24,26 @@
 public class ParseErrorResponse
 {
 	public int code = 0;
+
 	public string error = null;
+
+	public T Decode<T>()
+	{
+		if (!error.StartsWith("{"))
+			return default(T);
+
+		return JsonUtility.FromJson<T>(error);
+	}
 }

 public class Parse
 {
+	[Serializable]
+	class ParseResponseHandler<T>
+	{
+		public T result = default(T);
+	}
+
 	class ParseDummy : MonoBehaviour
 	{

@@ -124,10 +139,10 @@
 		{
 			Debug.Log("[Parse] Response from '" + function + "' with data: " + www.text);

-			T_Response resp = JsonUtility.FromJson<T_Response>(www.text);
+			ParseResponseHandler<T_Response> resp = JsonUtility.FromJson<ParseResponseHandler<T_Response>>(www.text);

 			if (onComplete != null)
-				onComplete(resp);
+				onComplete(resp.result);
 		}
 	}


Code  cleanup

Code  cleanup

--- src/ZNetCS.AspNetCore.Logging.EntityFrameworkCore/EntityFrameworkLoggerBuilderExtensions.cs
+++ src/ZNetCS.AspNetCore.Logging.EntityFrameworkCore/EntityFrameworkLoggerBuilderExtensions.cs
@@ -86,7 +86,9 @@
         /// <typeparam name="TLog">
         /// The type representing a log.
         /// </typeparam>
-        public static ILoggingBuilder AddEntityFramework<TContext, TLog>(this ILoggingBuilder builder) where TContext : DbContext where TLog : Log<int>
+        public static ILoggingBuilder AddEntityFramework<TContext, TLog>(this ILoggingBuilder builder)
+            where TContext : DbContext
+            where TLog : Log<int>
         {
             if (builder == null)
             {
@@ -144,7 +146,9 @@
         /// The type of the entity framework logger class used to log.
         /// </typeparam>
         public static ILoggingBuilder AddEntityFramework<TContext, TLog, TLogger>(this ILoggingBuilder builder)
-            where TContext : DbContext where TLog : Log<int> where TLogger : EntityFrameworkLogger<TContext, TLog>
+            where TContext : DbContext
+            where TLog : Log<int>
+            where TLogger : EntityFrameworkLogger<TContext, TLog>
         {
             if (builder == null)
             {
@@ -209,7 +213,10 @@
         /// The type of the primary key for a log.
         /// </typeparam>
         public static ILoggingBuilder AddEntityFramework<TContext, TLog, TLogger, TKey>(this ILoggingBuilder builder)
-            where TContext : DbContext where TLog : Log<TKey> where TLogger : EntityFrameworkLogger<TContext, TLog, TKey> where TKey : IEquatable<TKey>
+            where TContext : DbContext
+            where TLog : Log<TKey>
+            where TLogger : EntityFrameworkLogger<TContext, TLog, TKey>
+            where TKey : IEquatable<TKey>
         {
             if (builder == null)
             {


added AsUtc() for nullable dateTime Signed-off-by: hatem-b <hatem@serial-labs.com>

added AsUtc() for nullable dateTime
Signed-off-by: hatem-b <4bd3211a7da299d41e26d4efa6f453e0e38a9a0e@serial-labs.com>

--- Source/SerialLabs/Helpers/DateHelper.cs
+++ Source/SerialLabs/Helpers/DateHelper.cs
@@ -22,6 +22,20 @@
             return value.ToUniversalTime();
         }
         /// <summary>
+        /// Ensures that local times are converted to UTC times.  Unspecified kinds are recast to UTC with no conversion.
+        /// </summary>
+        /// <param name="value">The nullable date-time to convert.</param>
+        /// <returns>The nullable date-time in UTC time.</returns>
+        public static DateTime? AsUtc(this DateTime? value)
+        {
+            if (value.Value.Kind == DateTimeKind.Unspecified)
+            {
+                return new DateTime(value.Value.Ticks, DateTimeKind.Utc);
+            }
+
+            return value.Value.ToUniversalTime();
+        }
+        /// <summary>
         /// Convert a unix timestamp to the corresponding datetime.
         /// </summary>
         /// <param name="value"></param>


Null reference guard on "selected value" on select widget type

--- core/p5.ajax/widgets/Container.cs
+++ core/p5.ajax/widgets/Container.cs
@@ -144,7 +144,7 @@
                     idxWidget.DeleteAttribute ("selected"); // DeleteAttribute will check if attribute exists before attempting to delete it.
                 }

-                foreach (string idxSplit in value.Split (',')) {
+                foreach (string idxSplit in (value ?? "").Split (',')) {
                     foreach (Widget idxWidget in Controls) {
                         if (idxWidget ["value"] == idxSplit || idxWidget ["value"] == value) {
                             idxWidget ["selected"] = null;


Print ",..." if a sentinel is part of a method sig

--- src/DotNet/Utils.cs
+++ src/DotNet/Utils.cs
@@ -110,14 +110,17 @@
 			}
 			sb.Append('(');
 			int count = PrintMethodArgList(sb, methodSig.Params, typeGenArgs, methodGenArgs, false);
-			PrintMethodArgList(sb, methodSig.ParamsAfterSentinel, typeGenArgs, methodGenArgs, count > 0);
+			PrintMethodArgList(sb, methodSig.ParamsAfterSentinel, typeGenArgs, methodGenArgs, true);
 			sb.Append(')');
 			return sb.ToString();
 		}

-		static int PrintMethodArgList(StringBuilder sb, IEnumerable<ITypeSig> args, IList<ITypeSig> typeGenArgs, IList<ITypeSig> methodGenArgs, bool hasPrintedArgs) {
+		static int PrintMethodArgList(StringBuilder sb, IEnumerable<ITypeSig> args, IList<ITypeSig> typeGenArgs, IList<ITypeSig> methodGenArgs, bool isAfterSentinel) {
 			if (args == null)
 				return 0;
+			bool hasPrintedArgs = isAfterSentinel;
+			if (isAfterSentinel)
+				sb.Append(",...");
 			int count = 0;
 			foreach (var arg in args) {
 				count++;


Fixed bug with HealthCard ViewHolder

Fixed bug with HealthCard ViewHolder

--- TFG.Droid/Adapters/HealthCardAdapter.cs
+++ TFG.Droid/Adapters/HealthCardAdapter.cs
@@ -23,21 +23,19 @@
         public class CardViewHolder : RecyclerView.ViewHolder {

             //Fragment for the Module
-            public CustomTextView ModuleName { get; set; }
-            public ImageView ModuleImage { get; set; }
+            public RelativeLayout ModuleLayout { get; set; }
+            public LinearLayout FragmentContainer { get; set; }
             public HealthCard HealthCard { get; set; }

             public CardViewHolder(View itemView) : base(itemView) {
-                ModuleName = itemView.FindViewById<CustomTextView>(Resource.Id.module_name);
-                ModuleImage = itemView.FindViewById<ImageView>(Resource.Id.module_icon);
+                ModuleLayout = itemView.FindViewById<RelativeLayout>(Resource.Id.module_layout);
+                FragmentContainer = itemView.FindViewById<LinearLayout>(Resource.Id.fragments_container);
             }
         }

         private Context _context;
         private List<HealthCard> _cards = new List<HealthCard>();
-        private HealthCardClickListener _listener;
-        private RelativeLayout _moduleLayout;
-        private LinearLayout _fragmentContainer;
+        private HealthCardClickListener _listener;

         public HealthCardAdapter(Context context, List<HealthCard> cards) {
@@ -53,10 +51,7 @@

         public override RecyclerView.ViewHolder OnCreateViewHolder(ViewGroup parent, int viewType) {
             var itemView = LayoutInflater.From(parent.Context).
-                            Inflate(Resource.Layout.health_card, parent, false);
-
-            _moduleLayout = itemView.FindViewById<RelativeLayout>(Resource.Id.module_layout);
-            _fragmentContainer = itemView.FindViewById<LinearLayout>(Resource.Id.fragments_container);
+                            Inflate(Resource.Layout.health_card, parent, false);

             var viewHolder = new CardViewHolder(itemView);

@@ -76,18 +71,25 @@

             var fragment = HealthModulesInfoExtension.GetHealthCardFragmentFromHealthModuleName(item.Name);
             var backgroundImage = HealthModulesInfoExtension.GetHealthModuleHeaderFromHealthModuleName(_context, item.Name);
-            if (fragment != null) {
-                _fragmentContainer.Visibility = ViewStates.Visible;
-                _moduleLayout.Visibility = ViewStates.Gone;
-                fragmentTransaction.Replace(Resource.Id.fragments_container, fragment as Fragment);
+            if (fragment != null) {     //If the module has a custom card fragment
+                viewHolder.FragmentContainer.Visibility = ViewStates.Visible;
+                viewHolder.ModuleLayout.Visibility = ViewStates.Gone;
+                var oldFragment = fragmentManager.FindFragmentById(viewHolder.FragmentContainer.Id);
+                if (oldFragment != null) {
+                    fragmentTransaction.Remove(oldFragment);    //Remove previous fragment if exists
+                }
+                viewHolder.FragmentContainer.Id = (int)SystemClock.CurrentThreadTimeMillis();   //Give unique ID
+                fragmentTransaction.Replace(viewHolder.FragmentContainer.Id, fragment as Fragment);
                 fragmentTransaction.Commit();
-                _fragmentContainer.Background = backgroundImage;
-            } else {
-                _moduleLayout.Visibility = ViewStates.Visible;
-                _fragmentContainer.Visibility = ViewStates.Gone;
-                viewHolder.ModuleName.Text = item.Name;
-                viewHolder.ModuleImage.Background = item.Icon;
-                _moduleLayout.Background = backgroundImage;
+                viewHolder.FragmentContainer.Background = backgroundImage;
+            } else {    //Show default fragment
+                viewHolder.ModuleLayout.Visibility = ViewStates.Visible;
+                viewHolder.FragmentContainer.Visibility = ViewStates.Gone;
+                var moduleName = viewHolder.ModuleLayout.FindViewById<CustomTextView>(Resource.Id.module_name);
+                var moduleImage = viewHolder.ModuleLayout.FindViewById<ImageView>(Resource.Id.module_icon);
+                moduleName.Text = item.Name;
+                moduleImage.Background = item.Icon;
+                viewHolder.ModuleLayout.Background = backgroundImage;
             }


bump to version 1.3

bump to version 1.3

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.2.80
+    \xrefitem sw_version "Versions" "Software Package Version" 1.3

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.2.80")]
-[assembly: AssemblyInformationalVersion("1.2.80")]
+[assembly: AssemblyVersion("1.3")]
+[assembly: AssemblyInformationalVersion("1.3")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


release

release

--- Terradue.Tep/Properties/AssemblyInfo.cs
+++ Terradue.Tep/Properties/AssemblyInfo.cs
@@ -4,7 +4,7 @@
 @{
     Terradue.Tep Software Package provides with all the functionalities specific to the TEP.

-    \xrefitem sw_version "Versions" "Software Package Version" 1.3.29
+    \xrefitem sw_version "Versions" "Software Package Version" 1.3.30

     \xrefitem sw_link "Links" "Software Package List" [Terradue.Tep](https://git.terradue.com/sugar/Terradue.Tep)

@@ -77,6 +77,6 @@
 [assembly: AssemblyLicenseUrl("")]
 [assembly: AssemblyTrademark("")]
 [assembly: AssemblyCulture("")]
-[assembly: AssemblyVersion("1.3.29")]
-[assembly: AssemblyInformationalVersion("1.3.29")]
+[assembly: AssemblyVersion("1.3.30")]
+[assembly: AssemblyInformationalVersion("1.3.30")]
 [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]


Fixed tests.

Fixed tests.

--- Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs
+++ Tests/Cosmos.Kernel.Tests.Fat/Kernel.cs
@@ -45,188 +45,189 @@

         public void TestPath()
         {
-            string message;
-            object result, expectedResult;
+            string xMessage;
+            string xStringResult, xStringExpectedResult;
+            int xIntResult, xIntExpectedResult;

             // Path.ChangeExtension(string, string)
             mDebugger.Send("START TEST");
-            result = Path.ChangeExtension(@"0:\Kudzu.txt", ".doc");
-            expectedResult = @"0:\Kudzu.doc";
-            message = "Path.ChangeExtenstion (no dot) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.ChangeExtension(@"0:\Kudzu.txt", "doc");
-            expectedResult = @"0:\Kudzu.doc";
-            message = "Path.ChangeExtenstion (no dot) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.ChangeExtension(@"0:\Kudzu.txt", ".doc");
+            xStringExpectedResult = @"0:\Kudzu.doc";
+            xMessage = "Path.ChangeExtenstion (no dot) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.ChangeExtension(@"0:\Kudzu.txt", "doc");
+            xStringExpectedResult = @"0:\Kudzu.doc";
+            xMessage = "Path.ChangeExtenstion (no dot) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.Combine(string, string)
             mDebugger.Send("START TEST");
-            result = Path.Combine(@"0:\", "test");
-            expectedResult = @"0:\test";
-            message = "Path.Combine (root and directory) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.Combine(@"0:\", "test.txt");
-            expectedResult = @"0:\test.txt";
-            message = "Path.Combine (root and file) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.Combine(@"0:\test", "test2");
-            expectedResult = @"0:\test\test2";
-            message = "Path.Combine (directory and directory) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.Combine(@"0:\test", "test2.txt");
-            expectedResult = @"0:\test\test2.txt";
-            message = "Path.Combine (directory and file) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.Combine(@"0:\", "test");
+            xStringExpectedResult = @"0:\test";
+            xMessage = "Path.Combine (root and directory) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.Combine(@"0:\", "test.txt");
+            xStringExpectedResult = @"0:\test.txt";
+            xMessage = "Path.Combine (root and file) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.Combine(@"0:\test", "test2");
+            xStringExpectedResult = @"0:\test\test2";
+            xMessage = "Path.Combine (directory and directory) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.Combine(@"0:\test", "test2.txt");
+            xStringExpectedResult = @"0:\test\test2.txt";
+            xMessage = "Path.Combine (directory and file) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetDirectoryName(string)
             mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\");
-            expectedResult = null;
-            message = "Path.GetDirectoryName (root) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\test");
-            expectedResult = @"0:\";
-            message = "Path.GetDirectoryName (directory no trailing directory separator) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\test\");
-            expectedResult = @"0:\";
-            message = "Path.GetDirectoryName (directory with trailing directory separator) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\test\test2");
-            expectedResult = @"0:\test";
-            message = "Path.GetDirectoryName (subdirectory no trailing directory separator) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\test\test2\");
-            expectedResult = @"0:\test";
-            message = "Path.GetDirectoryName (subdirectory with trailing directory separator) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetDirectoryName(@"0:\test\ .");
-            expectedResult = @"0:\test";
-            message = "Path.GetDirectoryName (directory with trailing directory separator and invalid path) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetDirectoryName(@"0:\");
+            xStringExpectedResult = null;
+            xMessage = "Path.GetDirectoryName (root) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetDirectoryName(@"0:\test");
+            xStringExpectedResult = @"0:\";
+            xMessage = "Path.GetDirectoryName (directory no trailing directory separator) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetDirectoryName(@"0:\test\");
+            xStringExpectedResult = @"0:\";
+            xMessage = "Path.GetDirectoryName (directory with trailing directory separator) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetDirectoryName(@"0:\test\test2");
+            xStringExpectedResult = @"0:\test";
+            xMessage = "Path.GetDirectoryName (subdirectory no trailing directory separator) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetDirectoryName(@"0:\test\test2\");
+            xStringExpectedResult = @"0:\test";
+            xMessage = "Path.GetDirectoryName (subdirectory with trailing directory separator) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetDirectoryName(@"0:\test\ .");
+            xStringExpectedResult = @"0:\test";
+            xMessage = "Path.GetDirectoryName (directory with trailing directory separator and invalid path) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetExtension(string)
             mDebugger.Send("START TEST");
-            result = Path.GetExtension(@"file");
-            expectedResult = string.Empty;
-            message = "Path.GetExtension (file no extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetExtension(@"file.txt");
-            expectedResult = "txt";
-            message = "Path.GetExtension (file with extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetExtension(@"file");
+            xStringExpectedResult = string.Empty;
+            xMessage = "Path.GetExtension (file no extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetExtension(@"file.txt");
+            xStringExpectedResult = "txt";
+            xMessage = "Path.GetExtension (file with extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetFileName(string aPath)
             mDebugger.Send("START TEST");
-            result = Path.GetFileName(@"0:\file");
-            expectedResult = string.Empty;
-            message = "Path.GetFileName (file no extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileName(@"0:\file.txt");
-            expectedResult = "file.txt";
-            message = "Path.GetFileName (file with extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileName(@"0:\test\file");
-            expectedResult = string.Empty;
-            message = "Path.GetFileName (directory and file no extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileName(@"0:\test\file.txt");
-            expectedResult = "file.txt";
-            message = "Path.GetFileName (directory and file with extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetFileName(@"0:\file");
+            xStringExpectedResult = string.Empty;
+            xMessage = "Path.GetFileName (file no extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileName(@"0:\file.txt");
+            xStringExpectedResult = "file.txt";
+            xMessage = "Path.GetFileName (file with extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileName(@"0:\test\file");
+            xStringExpectedResult = string.Empty;
+            xMessage = "Path.GetFileName (directory and file no extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileName(@"0:\test\file.txt");
+            xStringExpectedResult = "file.txt";
+            xMessage = "Path.GetFileName (directory and file with extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetFileNameWithoutExtension(string aPath)
             mDebugger.Send("START TEST");
-            result = Path.GetFileNameWithoutExtension(@"0:\file");
-            expectedResult = string.Empty;
-            message = "Path.GetFileNameWithoutExtension (file no extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileNameWithoutExtension(@"0:\file.txt");
-            expectedResult = "file";
-            message = "Path.GetFileNameWithoutExtension (file with extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileNameWithoutExtension(@"0:\test\file");
-            expectedResult = string.Empty;
-            message = "Path.GetFileNameWithoutExtension (directory and file no extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
-            mDebugger.Send("END TEST");
-            mDebugger.Send("");
-
-            mDebugger.Send("START TEST");
-            result = Path.GetFileNameWithoutExtension(@"0:\test\file.txt");
-            expectedResult = "file";
-            message = "Path.GetFileNameWithoutExtension (directory and file with extension) failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetFileNameWithoutExtension(@"0:\file");
+            xStringExpectedResult = string.Empty;
+            xMessage = "Path.GetFileNameWithoutExtension (file no extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileNameWithoutExtension(@"0:\file.txt");
+            xStringExpectedResult = "file";
+            xMessage = "Path.GetFileNameWithoutExtension (file with extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileNameWithoutExtension(@"0:\test\file");
+            xStringExpectedResult = string.Empty;
+            xMessage = "Path.GetFileNameWithoutExtension (directory and file no extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
+            mDebugger.Send("END TEST");
+            mDebugger.Send("");
+
+            mDebugger.Send("START TEST");
+            xStringResult = Path.GetFileNameWithoutExtension(@"0:\test\file.txt");
+            xStringExpectedResult = "file";
+            xMessage = "Path.GetFileNameWithoutExtension (directory and file with extension) failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

@@ -234,19 +235,19 @@

             // Path.GetInvalidFileNameChars()
             mDebugger.Send("START TEST");
-            result = Path.GetInvalidFileNameChars().Length;
-            expectedResult = 0;
-            message = "Path.GetInvalidFileNameChars failed.";
-            Assert.IsFalse(result == expectedResult, message);
+            xIntResult = Path.GetInvalidFileNameChars().Length;
+            xIntExpectedResult = 0;
+            xMessage = "Path.GetInvalidFileNameChars failed.";
+            Assert.IsFalse(xIntResult == xIntExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetInvalidPathChars()
             mDebugger.Send("START TEST");
-            result = Path.GetInvalidPathChars().Length;
-            expectedResult = 0;
-            message = "Path.GetInvalidPathChars failed.";
-            Assert.IsFalse(result == expectedResult, message);
+            xIntResult = Path.GetInvalidPathChars().Length;
+            xIntExpectedResult = 0;
+            xMessage = "Path.GetInvalidPathChars failed.";
+            Assert.IsFalse(xIntResult == xIntExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

@@ -254,28 +255,28 @@

             // Path.GetRandomFileName()
             mDebugger.Send("START TEST");
-            result = Path.GetRandomFileName();
-            expectedResult = "random.tmp";
-            message = "Path.GetRandomFileName failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetRandomFileName();
+            xStringExpectedResult = "random.tmp";
+            xMessage = "Path.GetRandomFileName failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetTempFileName()
             mDebugger.Send("START TEST");
-            result = Path.GetTempFileName();
-            expectedResult = "tempfile.tmp";
-            message = "Path.GetTempFileName failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetTempFileName();
+            xStringExpectedResult = "tempfile.tmp";
+            xMessage = "Path.GetTempFileName failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");

             // Path.GetTempPath();
             mDebugger.Send("START TEST");
-            result = Path.GetTempPath();
-            expectedResult = @"\Temp";
-            message = "Path.GetTempPath failed.";
-            Assert.IsTrue(result == expectedResult, message);
+            xStringResult = Path.GetTempPath();
+            xStringExpectedResult = @"\Temp";
+            xMessage = "Path.GetTempPath failed.";
+            Assert.IsTrue(xStringResult == xStringExpectedResult, xMessage);
             mDebugger.Send("END TEST");
             mDebugger.Send("");


fixed my fix

fixed my fix

--- TheWheel.ServiceBus/ServiceBusClient.cs
+++ TheWheel.ServiceBus/ServiceBusClient.cs
@@ -113,7 +113,7 @@
             {
                 while (reader.Read())
                 {
-                    if (reader.Depth == 0)
+                    if (reader.FieldCount < 3)
                         continue;
                     var type = reader.GetString(2);
                     var handle = reader.GetGuid(1);


Remove the contact picker feature

Remove the contact picker feature

Removal of the ChooseEmailContacts method and the EmailContact class.
It wasn't working on Universal so we decided to remove it since it's
not commonly used.

Resolves: #122.

--- SharedSource/Helper.cs
+++ SharedSource/Helper.cs
@@ -583,53 +583,6 @@
         }
 #endif

-		public void ChooseEmailContacts(Action<IList<EmailContact>> callback, string buttonText = "Select")
-		{
-#if NETFX_CORE
-            ContactPicker picker = new ContactPicker();
-            picker.CommitButtonText = buttonText;
-            picker.SelectionMode = ContactSelectionMode.Fields;
-            picker.DesiredFieldsWithContactFieldType.Add(ContactFieldType.Email);
-
-            Dispatcher.InvokeOnUIThread(async () =>
-            {
-                IList<Contact> contacts = await picker.PickContactsAsync();
-                IList<EmailContact> emailContacts = contacts.Select(c =>
-                    new EmailContact(c.DisplayName, c.Emails[0].Address)).ToList();
-
-                if (callback != null)
-                    callback(emailContacts);
-            });
-
-#elif WINDOWS_PHONE
-			Contacts contacts = new Contacts();
-
-			Action<object, ContactsSearchEventArgs> onCompleted = (sender, e) =>
-				{
-					Dispatcher.InvokeOnUIThread(() =>
-					{
-						List<EmailContact> contactList = new List<EmailContact>();
-						foreach (var contact in e.Results)
-							foreach (var em in contact.EmailAddresses)
-								contactList.Add(new EmailContact(contact.DisplayName, em.EmailAddress));
-
-						Dispatcher.InvokeOnAppThread(() =>
-						{
-							if (callback != null)
-								callback(contactList);
-						});
-					});
-				};
-			contacts.SearchCompleted += new EventHandler<ContactsSearchEventArgs>(onCompleted);
-			Dispatcher.InvokeOnUIThread(() =>
-			{
-				contacts.SearchAsync(String.Empty, FilterKind.None, "");
-			});
-#else
-            throw new PlatformNotSupportedException();
-#endif
-		}
-
         /// <summary>
         /// Win8 - Launches a mailto: URI.
         /// WP8 - Calls email compose task.
@@ -662,17 +615,6 @@
 #endif
 		}

-		public class EmailContact
-		{
-			public string name { get; private set; }
-			public string email { get; private set; }
-			public EmailContact(string name, string email)
-			{
-				this.name = name;
-				this.email = email;
-			}
-		}
-
 #if !NETFX_CORE
 		public System.Net.EndPoint GetDnsEndPoint(string host, int port)
 		{