Tracking a problem with offline IMs coming in as null list.

--- OpenSim/Framework/WebUtil.cs
+++ OpenSim/Framework/WebUtil.cs
@@ -918,6 +918,10 @@

     public class SynchronousRestObjectRequester
     {
+        private static readonly ILog m_log =
+            LogManager.GetLogger(
+            MethodBase.GetCurrentMethod().DeclaringType);
+
         /// <summary>
         /// Perform a synchronous REST request.
         /// </summary>
@@ -972,9 +976,9 @@
                 }
             }

-            try
-            {
-                using (WebResponse resp = request.GetResponse())
+            using (WebResponse resp = request.GetResponse())
+            {
+                try
                 {
                     if (resp.ContentLength > 0)
                     {
@@ -984,10 +988,19 @@
                         respStream.Close();
                     }
                 }
-            }
-            catch (System.InvalidOperationException)
-            {
-                // This is what happens when there is invalid XML
+                catch (System.InvalidOperationException)
+                {
+                    // This is what happens when there is invalid XML
+                    try
+                    {
+                        m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML:");
+                        using (StreamReader sr = new StreamReader(resp.GetResponseStream()))
+                            m_log.WarnFormat("{0}", sr.ReadToEnd());
+                    }
+                    catch (Exception e)
+                    { }
+
+                }
             }
             return deserial;
         }


Handle share activation and init boostraping

--- Source/Windows10/Prism.Windows/PrismApplication.cs
+++ Source/Windows10/Prism.Windows/PrismApplication.cs
@@ -219,9 +219,18 @@
         {
             return Activator.CreateInstance(type);
         }
-
-        /// <summary>
-        /// OnFileActivated is the entry point for an applicatoin when it is launched and the ActivationKind is File.
+        /// <summary> Invoked when the application is .
+        /// OnShareTargetActivated is the entry point for an application when it is activated through sharing.
+        /// Call <see cref="OnActivated"/> to bootstrap the prism application.
+        /// </summary>
+        /// <param name="args">Event data for the event.</param>
+        protected override void OnShareTargetActivated(ShareTargetActivatedEventArgs args)
+        {
+            base.OnShareTargetActivated(args);
+            OnActivated(args);
+        }
+        /// <summary>
+        /// OnFileActivated is the entry point for an application when it is launched and the ActivationKind is File.
         /// Call <see cref="OnActivated"/> to bootstrap the prism application.
         /// </summary>
         /// <param name="args">Event data for the event.</param>


Fix some path related issues in Lucene. write.lock issue is still occuring.

--- Tests/CK.Glouton.Tests.NetFramework/LuceneTests.cs
+++ Tests/CK.Glouton.Tests.NetFramework/LuceneTests.cs
@@ -6,6 +6,7 @@
 using NUnit.Framework;
 using System;
 using System.IO;
+using System.Reflection;
 using System.Threading;

 namespace CK.Glouton.Tests
@@ -26,21 +27,20 @@
         }

         private const int LuceneMaxSearch = 10;
-        private static string LucenePath = TestHelper.GetTestLogDirectory();
-        private const string LuceneDirectory = "";
-
-        private static readonly LuceneConfiguration LuceneConfiguration = new LuceneConfiguration
-        {
-            MaxSearch = LuceneMaxSearch,
-            Path = LucenePath,
-            Directory = LuceneDirectory
-        };
+        private static readonly string LucenePath = Path.Combine( TestHelper.GetTestLogDirectory(), "Lucene" );

         private static readonly LuceneGloutonHandlerConfiguration LuceneGloutonHandlerConfiguration = new LuceneGloutonHandlerConfiguration
         {
             MaxSearch = LuceneMaxSearch,
             Path = LucenePath,
-            Directory = LuceneDirectory
+            Directory = ""
+        };
+
+        private static readonly LuceneConfiguration LuceneSearcherConfiguration = new LuceneConfiguration
+        {
+            MaxSearch = LuceneMaxSearch,
+            Path = LucenePath,
+            Directory = Assembly.GetExecutingAssembly().GetName().Name
         };

         [Test]
@@ -48,16 +48,9 @@
         {
             using( var server = TestHelper.DefaultGloutonServer() )
             {
-                var serverConfiguration = new LuceneGloutonHandlerConfiguration()
-                {
-                    MaxSearch = 10,
-                    Path = TestHelper.GetTestLogDirectory(),
-                    Directory = ""
-                };
-
                 server.Open( new HandlersManagerConfiguration
                 {
-                    GloutonHandlers = { serverConfiguration }
+                    GloutonHandlers = { LuceneGloutonHandlerConfiguration }
                 } );

                 using( var grandOutputClient = GrandOutputHelper.GetNewGrandOutputClient() )
@@ -72,8 +65,7 @@

             Thread.Sleep( TestHelper.DefaultSleepTime );

-
-            var searcher = new LuceneSearcher( LuceneConfiguration, new[] { "LogLevel", "Text" } );
+            var searcher = new LuceneSearcher( LuceneSearcherConfiguration, new[] { "LogLevel", "Text" } );
             var topDocument = searcher.Search( "Hello world" );
             topDocument.Should().NotBeNull();
             topDocument = searcher.Search( "CriticalError" );


IFeature instead of IGeometryFeature

IFeature instead of IGeometryFeature

--- Tests/Mapsui.Tests.Common/Maps/ProjectionSample.cs
+++ Tests/Mapsui.Tests.Common/Maps/ProjectionSample.cs
@@ -47,19 +47,19 @@
         {
             return new MemoryLayer("Center of Amsterdam")
             {
-                DataSource = new GeometryMemoryProvider<IGeometryFeature>(new Point(545465.50488704059, 6866697.0250906311)),
+                DataSource = new MemoryProvider<IFeature>(new Point(545465.50488704059, 6866697.0250906311)),
                 Style = new SymbolStyle { Fill = new Brush { Color = Color.Black }, SymbolScale = 0.5 }
             };
         }

         public static MemoryLayer CreateAmsterdamLayer() // Needs transform
         {
-            var features = new List<IGeometryFeature>
+            var features = new List<IFeature>
             {
                 new GeometryFeature {Geometry = GeometryFromWKT.Parse(WktOfAmsterdam)}
             };

-            var memoryProvider = new GeometryMemoryProvider<IGeometryFeature>(features)
+            var memoryProvider = new GeometryMemoryProvider<IFeature>(features)
             {
                 CRS = "EPSG:4326" // The DataSource CRS needs to be set
             };


No functional change, but there was dead code in here and I think it’s more readable in this order

--- TwitchPlaysAssembly/Src/Commands/ModuleCommands.cs
+++ TwitchPlaysAssembly/Src/Commands/ModuleCommands.cs
@@ -151,8 +151,16 @@
 		else if (TwitchPlaySettings.data.AnarchyMode)
 			IRCConnection.SendMessage($"{user}, taking modules is not allowed in anarchy mode.");

+		// Module is already claimed by the same user
+		else if (module.PlayerName == user)
+			IRCConnection.SendMessageFormat(TwitchPlaySettings.data.ModuleAlreadyOwned, user, module.Code, module.HeaderText);
+
+		// Module is not claimed at all: just claim it
+		else if (module.PlayerName == null)
+			IRCConnection.SendMessage(module.ClaimModule(user).Second);
+
 		// Attempt to take over from another user
-		else if (module.PlayerName != null && user != module.PlayerName)
+		else
 		{
 			module.AddToClaimQueue(user);
 			if (module.TakeInProgress == null)
@@ -164,18 +172,6 @@
 			else
 				IRCConnection.SendMessageFormat(TwitchPlaySettings.data.TakeInProgress, user, module.Code, module.HeaderText);
 		}
-
-		// Module is already claimed by the same user
-		else if (module.PlayerName != null)
-		{
-			if (!module.PlayerName.Equals(user))
-				module.AddToClaimQueue(user);
-			IRCConnection.SendMessageFormat(TwitchPlaySettings.data.ModuleAlreadyOwned, user, module.Code, module.HeaderText);
-		}
-
-		// Module is not claimed at all: just claim it
-		else
-			IRCConnection.SendMessage(module.ClaimModule(user).Second);
 	}

 	[Command(@"mine")]


resources file (probably should have gitignored this a long time ago)

--- UOCApp/UOCApp.Droid/Resources/Resource.Designer.cs
+++ UOCApp/UOCApp.Droid/Resources/Resource.Designer.cs
@@ -1,15 +1,15 @@
 #pragma warning disable 1591
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      Mono Runtime Version: 4.0.30319.17020
-//
-//      Changes to this file may cause incorrect behavior and will be lost if
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
+// <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>
+//------------------------------------------------------------------------------

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

 namespace UOCApp.Droid
 {
@@ -5061,8 +5061,7 @@
 		public partial class Styleable
 		{

-			public static int[] ActionBar = new int[]
-			{
+			public static int[] ActionBar = new int[] {
 					2130771989,
 					2130771991,
 					2130771992,
@@ -5172,15 +5171,13 @@
 			// 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
@@ -5188,8 +5185,7 @@

 			public static int[] ActionMenuView;

-			public static int[] ActionMode = new int[]
-			{
+			public static int[] ActionMode = new int[] {
 					2130771989,
 					2130771995,
 					2130771996,
@@ -5215,8 +5211,7 @@
 			// aapt resource value: 1
 			public const int ActionMode_titleTextStyle = 1;

-			public static int[] ActivityChooserView = new int[]
-			{
+			public static int[] ActivityChooserView = new int[] {
 					2130772017,
 					2130772018};

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

-			public static int[] AlertDialog = new int[]
-			{
+			public static int[] AlertDialog = new int[] {
 					16842994,
 					2130772019,
 					2130772020,
@@ -5253,8 +5247,7 @@
 			// aapt resource value: 4
 			public const int AlertDialog_singleChoiceItemLayout = 4;

-			public static int[] AppBarLayout = new int[]
-			{
+			public static int[] AppBarLayout = new int[] {
 					16842964,
 					2130772014,
 					2130772191};
@@ -5268,8 +5261,7 @@
 			// aapt resource value: 2
 			public const int AppBarLayout_expanded = 2;

-			public static int[] AppBarLayout_LayoutParams = new int[]
-			{
+			public static int[] AppBarLayout_LayoutParams = new int[] {
 					2130772192,
 					2130772193};

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

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

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

-			public static int[] CardView = new int[]
-			{
+			public static int[] CardView = new int[] {
 					2130771977,
 					2130771978,
 					2130771979,
@@ -5337,8 +5327,7 @@
 			// aapt resource value: 9
 			public const int CardView_contentPaddingTop = 9;

-			public static int[] CollapsingAppBarLayout_LayoutParams = new int[]
-			{
+			public static int[] CollapsingAppBarLayout_LayoutParams = new int[] {
 					2130772194,
 					2130772195};

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

-			public static int[] CollapsingToolbarLayout = new int[]
-			{
+			public static int[] CollapsingToolbarLayout = new int[] {
 					2130771991,
 					2130772196,
 					2130772197,
@@ -5407,8 +5395,7 @@
 			// aapt resource value: 10
 			public const int CollapsingToolbarLayout_toolbarId = 10;

-			public static int[] CompoundButton = new int[]
-			{
+			public static int[] CompoundButton = new int[] {
 					16843015,
 					2130772025,
 					2130772026};
@@ -5422,8 +5409,7 @@
 			// aapt resource value: 2
 			public const int CompoundButton_buttonTintMode = 2;

-			public static int[] CoordinatorLayout = new int[]
-			{
+			public static int[] CoordinatorLayout = new int[] {
 					2130772209,
 					2130772210};

@@ -5433,8 +5419,7 @@
 			// 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,
 					2130772211,
 					2130772212,
@@ -5456,8 +5441,7 @@
 			// aapt resource value: 3
 			public const int CoordinatorLayout_LayoutParams_layout_keyline = 3;

-			public static int[] DrawerArrowToggle = new int[]
-			{
+			public static int[] DrawerArrowToggle = new int[] {
 					2130772027,
 					2130772028,
 					2130772029,
@@ -5491,8 +5475,7 @@
 			// aapt resource value: 7
 			public const int DrawerArrowToggle_thickness = 7;

-			public static int[] FloatingActionButton = new int[]
-			{
+			public static int[] FloatingActionButton = new int[] {
 					16842964,
 					2130772014,
 					2130772189,
@@ -5526,8 +5509,7 @@
 			// aapt resource value: 4
 			public const int FloatingActionButton_rippleColor = 4;

-			public static int[] LinearLayoutCompat = new int[]
-			{
+			public static int[] LinearLayoutCompat = new int[] {
 					16842927,
 					16842948,
 					16843046,
@@ -5565,8 +5547,7 @@
 			// 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,
@@ -5584,8 +5565,7 @@
 			// 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};

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

-			public static int[] MediaRouteButton = new int[]
-			{
+			public static int[] MediaRouteButton = new int[] {
 					16843071,
 					16843072,
 					2130771976};
@@ -5610,8 +5589,7 @@
 			// 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,
@@ -5637,8 +5615,7 @@
 			// 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,
@@ -5708,8 +5685,7 @@
 			// 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,
@@ -5743,8 +5719,7 @@
 			// 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,
@@ -5786,8 +5761,7 @@
 			// aapt resource value: 4
 			public const int NavigationView_menu = 4;

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

@@ -5797,29 +5771,25 @@
 			// aapt resource value: 1
 			public const int PopupWindow_overlapAnchor = 1;

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

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

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

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

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

 			// 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,
@@ -5889,8 +5859,7 @@
 			// aapt resource value: 12
 			public const int SearchView_voiceIcon = 12;

-			public static int[] SnackbarLayout = new int[]
-			{
+			public static int[] SnackbarLayout = new int[] {
 					16843039,
 					2130772014,
 					2130772227};
@@ -5904,8 +5873,7 @@
 			// aapt resource value: 2
 			public const int SnackbarLayout_maxActionInlineWidth = 2;

-			public static int[] Spinner = new int[]
-			{
+			public static int[] Spinner = new int[] {
 					16843126,
 					16843131,
 					16843362,
@@ -5923,8 +5891,7 @@
 			// aapt resource value: 3
 			public const int Spinner_popupTheme = 3;

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

-			public static int[] TabLayout = new int[]
-			{
+			public static int[] TabLayout = new int[] {
 					2130772228,
 					2130772229,
 					2130772230,
@@ -6033,8 +5999,7 @@
 			// 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,
@@ -6056,8 +6021,7 @@
 			// aapt resource value: 4
 			public const int TextAppearance_textAllCaps = 4;

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

-			public static int[] Theme = new int[]
-			{
+			public static int[] Theme = new int[] {
 					16842839,
 					16842926,
 					2130772065,
@@ -6518,8 +6481,7 @@
 			// aapt resource value: 3
 			public const int Theme_windowNoTitle = 3;

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

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

-			public static int[] ViewBackgroundHelper = new int[]
-			{
+			public static int[] ViewBackgroundHelper = new int[] {
 					16842964,
 					2130772189,
 					2130772190};
@@ -6659,8 +6619,7 @@
 			// 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};


Add RemoveVariant

Add RemoveVariant

--- UmbShop/Models/Variant/UmbShopVariantRepository.cs
+++ UmbShop/Models/Variant/UmbShopVariantRepository.cs
@@ -114,7 +114,42 @@

         public bool RemoveVariant(string productId, string variantId)
         {
-            //MISSING
+            var databaseContext = ApplicationContext.Current.DatabaseContext;
+            var db = new DatabaseSchemaHelper(databaseContext.Database, ApplicationContext.Current.ProfilingLogger.Logger, databaseContext.SqlSyntax);
+
+            if (!db.TableExist(UmbShopVariant.TableName))
+            {
+                db.CreateTable<UmbShopVariant>(false);
+            }
+
+            Guid productUniqueId = Guid.Empty;
+            Guid.TryParse(productId, out productUniqueId);
+
+            Guid variantUniqueId = Guid.Empty;
+            Guid.TryParse(variantId, out variantUniqueId);
+
+            try
+            {
+                LogHelper.Info<UmbShopVariantRepository>("BEGIN RemoveVariant productId:" + productId + " variantId:" + variantId);
+
+                int count = databaseContext.Database.ExecuteScalar<int>("SELECT COUNT(*) FROM " + UmbShopStock.TableName + " WHERE ProductUniqueId = @0 AND VariantUniqueId = @1;", productUniqueId, variantUniqueId);
+                if (count > 0)
+                {
+                    LogHelper.Info<UmbShopVariantRepository>("ERROR RemoveVariant variant is in use");
+                    return false;
+                }
+
+                UmbShopVariant variant = databaseContext.Database.Fetch<UmbShopVariant>("SELECT TOP 1 * FROM " + UmbShopVariant.TableName + " WHERE UniqueId = @0 AND ProductUniqueId = @1;", variantUniqueId, productUniqueId).FirstOrDefault();
+                databaseContext.Database.Delete<UmbShopVariant>(variant);
+
+                LogHelper.Info<UmbShopVariantRepository>("END RemoveVariant productId:" + productId + " variantId:" + variantId);
+            }
+            catch (Exception exception)
+            {
+                LogHelper.Info<UmbShopVariantRepository>("ERROR RemoveVariant " + exception.Message);
+                return false;
+            }
+
             return true;
         }


Removed OnValidate from GMTab

Removed OnValidate from GMTab

--- Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
+++ Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
@@ -120,15 +120,6 @@
             return myTabBar;
         }

-#if UNITY_EDITOR
-        protected override void OnValidate()
-        {
-            base.OnValidate();
-
-            OnToggleValueChanged(isOn);
-        }
-#endif
-
         protected override void DoStateTransition(SelectionState state, bool instant) {
             base.DoStateTransition(state, instant);


Added Method to GMTab that allows updating of transitionState from the outside (e.g. if colors are changed)

--- Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
+++ Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
@@ -163,6 +163,10 @@
             }
         }

+        public void UpdateColors() {
+            DoStateTransition(currentSelectionState, true);
+        }
+
         protected override void OnDestroy() {
             isBeingDestroyed = true;
         }


GMTab now sets its icon and border correctly without being initalized by a GMTabbar

--- Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
+++ Unity/Assets/Scripts/UserInterface/Tabbar/GMTab.cs
@@ -70,17 +70,7 @@
                     myTabBar.SetAsActiveTab(this);
             }

-            foreach(Graphic colorizeElement in colorizeElements)
-            {
-                colorizeElement.color = activate ? activeColor : defaultColor;
-            }
-
             ActivateContent(activate);
-
-            if (border != null)
-            {
-                border.SetActive(activate);
-            }
         }

         /// <summary>
@@ -135,13 +125,33 @@
         }
 #endif

+        protected override void DoStateTransition(SelectionState state, bool instant) {
+            base.DoStateTransition(state, instant);
+
+            if (state == SelectionState.Pressed) {
+                foreach (Graphic colorizeElement in colorizeElements) {
+                    if (interactable) {
+                        colorizeElement.color = pressedColor;
+                    }
+                }
+            } else {
+                foreach (Graphic colorizeElement in colorizeElements) {
+                    if (interactable) {
+                        colorizeElement.color = isOn ? activeColor : defaultColor;
+                    }
+                }
+            }
+        }
+
         protected virtual void OnToggleValueChanged(bool _isOn) {
             foreach(Graphic colorizeElement in colorizeElements) {
                 if (interactable) {
                     colorizeElement.color = _isOn ? activeColor : defaultColor;
-                } else {
-                    colorizeElement.color = pressedColor;
                 }
+            }
+
+            if (border != null) {
+                border.SetActive(_isOn);
             }
         }
     }


Update WalletWasabi.Tests/UnitTests/ListExtensionTests.cs

Co-Authored-By: yahiheb <1ef907ec03476373b9c05d7f089a7d2fed4d8ea8@users.noreply.github.com>

--- WalletWasabi.Tests/UnitTests/ListExtensionTests.cs
+++ WalletWasabi.Tests/UnitTests/ListExtensionTests.cs
@@ -74,7 +74,7 @@

 			public int Value { get; }

-            public int CompareTo([AllowNull] ReverseComparable other)
+			public int CompareTo([AllowNull] ReverseComparable other)
 			{
 				return other.Value.CompareTo(Value);
 			}


Added Collapse extension.

Added Collapse extension.

--- WmcSoft.Core/Collections/Generic/ListExtensions.cs
+++ WmcSoft.Core/Collections/Generic/ListExtensions.cs
@@ -30,6 +30,7 @@
 using System.Linq;

 using static System.Math;
+using static WmcSoft.IndexedAlgorithms;

 namespace WmcSoft.Collections.Generic
 {
@@ -55,6 +56,27 @@
         {
             return start < 0 ? Max(length + start, 0) : Min(start, length);
         }
+
+        #region Collapse
+
+        public static int Collapse<T>(this List<T> list, int startIndex, int count, Relation<T> relation, Func<IReadOnlyList<T>, T> aggregator)
+        {
+            var first = startIndex;
+            var last = startIndex + count;
+
+            var result = first;
+            while (first < last) {
+                var next = UnguardedFindIfNot(list, first + 1, last, x => relation(list[first], x));
+                list[result++] = aggregator(list.ReadOnlySublist(first, next - first));
+                first = next;
+            }
+
+            count = last - result;
+            list.RemoveRange(result, count);
+            return count;
+        }
+
+        #endregion

         #region Equals


update EntityViewModel

update EntityViewModel

--- Wodsoft.ComBoost/ComponentModel/EntityViewModel.cs
+++ Wodsoft.ComBoost/ComponentModel/EntityViewModel.cs
@@ -107,7 +107,7 @@
                 SetPage(1);
             UpdateTotalPage();
         }
-
+
         /// <summary>
         /// Update total page.
         /// </summary>
@@ -125,10 +125,25 @@
     /// <typeparam name="TEntity">Type of entity.</typeparam>
     public class EntityViewModel<TEntity> : EntityViewModel where TEntity : IEntity
     {
+        private IQueryable<TEntity> _Queryable;
         /// <summary>
         /// Get the queryable of entity.
         /// </summary>
-        public IQueryable<TEntity> Queryable { get; private set; }
+        public IQueryable<TEntity> Queryable
+        {
+            get
+            {
+                return _Queryable;
+            }
+            set
+            {
+                if (value == null)
+                    throw new ArgumentNullException("value");
+                _Queryable = value;
+                UpdateTotalPage();
+                CurrentPage = 1;
+            }
+        }

         /// <summary>
         /// Initialize entity view model.
@@ -150,13 +165,10 @@
                 throw new ArgumentException("Can not less than 1.", "page");
             if (size < 1)
                 throw new ArgumentException("Can not less than 1.", "size");
-            CurrentPage = 1;
-            Queryable = queryable;
-            SetSize(size);
-            UpdateTotalPage();
-            SetPage(page);
+            CurrentSize = size;
             PageSizeOption = DefaultPageSizeOption;
             Metadata = EntityAnalyzer.GetMetadata<TEntity>();
+            Queryable = queryable;
         }

         /// <summary>


still working on text tool

still working on text tool

--- Pinta.Core/Tools/TextTool.cs
+++ Pinta.Core/Tools/TextTool.cs
@@ -1084,7 +1084,7 @@
             if (saved != null)
             {
                 saved.Draw(context.Surface);
-                ActiveLayer.Invalidate(saved.Region);
+                PintaCore.Workspace.Invalidate(saved.Region);
                 saved.Dispose();
                 saved = null;
             }
@@ -1183,25 +1183,10 @@
                 }
                 else
                 {
-					context = new Cairo.Context(PintaCore.Layers.CurrentLayer.Surface);
-
-					context.DrawLine(cursorRect, 2);
-					/*
-					context.AppendPath (PintaCore.Layers.SelectionPath);
-					context.FillRule = FillRule.EvenOdd;
-					context.Clip ();
-
-					context.Antialias = Antialias.None;
-
-					context.MoveTo (cursorRect.Right, cursorRect.Top);
-					context.LineTo (cursorRect.Right, cursorRect.Bottom);
-
-					context.Color = PintaCore.Palette.PrimaryColor;
-					context.LineWidth = 2;
-					context.LineCap = LineCap.Square;
-
-					context.Stroke ();
-					*/
+					using (context = new Cairo.Context(PintaCore.Layers.CurrentLayer.Surface))
+					{
+						context.DrawLine (context, new PointD(cursorRect.Right, cursorRect.Top), new PointD(cursorRect.Right, cursorRect.Bottom), PintaCore.Palette.PrimaryColor, 2);
+					}
                 }
             }


add extra plex support processes

add extra plex support processes

--- PlexServiceWCF/PmsMonitor.cs
+++ PlexServiceWCF/PmsMonitor.cs
@@ -20,7 +20,7 @@
         //Process names
         private static string _plexName = "Plex Media Server";
         //List of processes spawned by plex that we need to get rid of
-        private static string[] _supportingProcesses = { "PlexDlnaServer", "PlexScriptHost", "PlexTranscoder", "PlexNewTranscoder", "Plex Media Scanner" };
+        private static string[] _supportingProcesses = { "Plex DLNA Server", "PlexScriptHost", "PlexTranscoder", "PlexNewTranscoder", "Plex Media Scanner", "Plex Update Service", "PlexRelay" };

         #endregion


Fixes  EF transaction missing SaveChanges

--- samples/Sample.RabbitMQ.SqlServer/Controllers/ValuesController.cs
+++ samples/Sample.RabbitMQ.SqlServer/Controllers/ValuesController.cs
@@ -57,7 +57,7 @@
             using (dbContext.Database.BeginTransaction(_capBus, autoCommit: true))
             {
                 dbContext.Persons.Add(new Person() { Name = "ef.transaction" });
-
+                dbContext.SaveChanges();
                 _capBus.Publish("sample.rabbitmq.sqlserver", new Person()
                 {
                     Id = 123,


Switch to windows binaries (they're smaller); add Dota 2 Test

--- Processors/FileDownloader.cs
+++ Processors/FileDownloader.cs
@@ -18,11 +18,11 @@
         {
             // Team Fortress 2
             {
-                232252,
-                new List<string>
-                {
-                    //"tf/bin/client.dylib",
-                    "tf/bin/server.dylib"
+                232251,
+                new List<string>
+                {
+                    //"tf/bin/client.dll",
+                    "tf/bin/server.dll"
                 }
             },
             {
@@ -35,12 +35,12 @@
             },
             // Dota 2
             {
-                574,
-                new List<string>
-                {
-                    "bin/engine.dylib",
-                    //"dota/bin/client.dylib",
-                    "dota/bin/server.dylib"
+                573,
+                new List<string>
+                {
+                    "bin/engine.dll",
+                    //"dota/bin/client.dll",
+                    "dota/bin/server.dll"
                 }
             },
             {
@@ -60,14 +60,32 @@
                     "dota_ugc/game/bin/win64/engine2.dll"
                 }
             },
+            // Dota 2 Test
+            {
+                205793,
+                new List<string>
+                {
+                    "bin/engine.dll",
+                    //"dota/bin/client.dll",
+                    "dota/bin/server.dll"
+                }
+            },
+            {
+                205791,
+                new List<string>
+                {
+                    "dota/steam.inf",
+                    "dota/resource/dota_english.txt"
+                }
+            },
             // Counter-Strike: Global Offensive
             {
-                733,
-                new List<string>
-                {
-                    "bin/engine.dylib",
-                    //"csgo/bin/client.dylib",
-                    "csgo/bin/server.dylib"
+                732,
+                new List<string>
+                {
+                    "bin/engine.dll",
+                    //"csgo/bin/client.dll",
+                    "csgo/bin/server.dll"
                 }
             },
             {


Fix camera function parameter

Fix camera function parameter

--- Project/Util/CameraParams.cs
+++ Project/Util/CameraParams.cs
@@ -232,7 +232,7 @@
     public class CameraFunction
     {
         public const string RemoteShooting = "Remote Shooting";
-        public const string ContentTransfer = "Content Transfer";
+        public const string ContentTransfer = "Contents Transfer";
     }

     public class Scene


Update Query.Having.cs

Update Query.Having.cs

--- QueryBuilder/Query.Having.cs
+++ QueryBuilder/Query.Having.cs
@@ -360,7 +360,7 @@

         public Query HavingIn<T>(string column, IEnumerable<T> values)
         {
-            // If the developer has passed a string most probably he wants List<string>
+            // If the developer has passed a string they most likely want a List<string>
             // since string is considered as List<char>
             if (values is string)
             {


Improved ListView sample

Improved ListView sample

--- Samples/Samples/ListView2.cs
+++ Samples/Samples/ListView2.cs
@@ -6,29 +6,33 @@
 {
 	public class ListView2: VBox
 	{
-		DataField<bool> editable;
-		DataField<bool> nonEditable;
-
 		public ListView2 ()
 		{
 			ListView list = new ListView ();
-			editable = new DataField<bool> ();
-			nonEditable = new DataField<bool> ();
+			var editableActiveField = new DataField<bool> ();
+			var nonEditableActiveField = new DataField<bool> ();
 			var textField = new DataField<string> ();
-			ListStore store = new ListStore (editable, nonEditable, textField);
+			var textField2 = new DataField<string> ();
+			var editableField = new DataField<bool> ();
+
+			ListStore store = new ListStore (editableActiveField, nonEditableActiveField, textField, textField2, editableField);
 			list.DataSource = store;

-			list.Columns.Add (new ListViewColumn("Editable", new CheckBoxCellView { Editable = true, ActiveField = editable }));
-			list.Columns.Add (new ListViewColumn("Not Editable", new CheckBoxCellView { Editable = false, ActiveField = nonEditable }));
+			list.Columns.Add (new ListViewColumn("Editable", new CheckBoxCellView { Editable = true, ActiveField = editableActiveField }));
+			list.Columns.Add (new ListViewColumn("Not Editable", new CheckBoxCellView { Editable = false, ActiveField = nonEditableActiveField }));
 			list.Columns.Add (new ListViewColumn("Editable", new TextCellView { Editable = true, TextField = textField }));
+			list.Columns.Add (new ListViewColumn("Somewhat Editable", new TextCellView { EditableField = editableField, TextField = textField2 }));

 			Random rand = new Random ();

 			for (int n=0; n<100; n++) {
 				var r = store.AddRow ();
-				store.SetValue (r, editable, rand.Next(0, 2) == 0);
-				store.SetValue (r, nonEditable, rand.Next(0, 2) == 0);
+				store.SetValue (r, editableActiveField, rand.Next(0, 2) == 0);
+				store.SetValue (r, nonEditableActiveField, rand.Next(0, 2) == 0);
 				store.SetValue (r, textField, n.ToString ());
+				var edit = (n % 2) == 0;
+				store.SetValue (r, editableField, edit);
+				store.SetValue (r, textField2, edit ? "editable" : "not editable");
 			}
 			PackStart (list, true);
 		}


Removed superfluous MoveOver event.

Removed superfluous MoveOver event.

--- Sandra.UI.WF/PlayingBoard.cs
+++ Sandra.UI.WF/PlayingBoard.cs
@@ -553,29 +553,6 @@

         /// <summary>
-        /// Occurs when an image is being moved over another square.
-        /// </summary>
-        public event EventHandler<MoveTargetEventArgs> MoveOver;
-
-        /// <summary>
-        /// Raises the <see cref="MoveOver"/> event.
-        /// </summary>
-        protected virtual void OnMoveOver(MoveTargetEventArgs e)
-        {
-            MoveOver?.Invoke(this, e);
-        }
-
-        protected void RaiseMoveOver(int sourceSquareIndex, int squareIndex)
-        {
-            OnMoveOver(new MoveTargetEventArgs(
-                getX(sourceSquareIndex),
-                getY(sourceSquareIndex),
-                getX(squareIndex),
-                getY(squareIndex)));
-        }
-
-
-        /// <summary>
         /// Occurs when an image stops being moved, and is not dropped onto another square.
         /// </summary>
         public event EventHandler<MoveEventArgs> MoveCancel;
@@ -846,12 +823,6 @@
             if (isMoving)
             {
                 moveCurrentPosition = e.Location;
-
-                if (hit >= 0)
-                {
-                    RaiseMoveOver(moveStartSquareIndex, hit);
-                }
-
                 Invalidate();
             }

@@ -1174,8 +1145,7 @@
     }

     /// <summary>
-    /// Provides data for the <see cref="PlayingBoard.MoveOver"/>
-    /// or <see cref="PlayingBoard.MoveDrop"/> event.
+    /// Provides data for the <see cref="PlayingBoard.MoveDrop"/> event.
     /// </summary>
     [DebuggerDisplay("From (x = {StartX}, y = {StartY}) to (x = {TargetX}, y = {TargetY})")]
     public class MoveTargetEventArgs : MoveEventArgs


Changed Picker to use just the list of Ranges for items

--- Pickle/Picker.cs
+++ Pickle/Picker.cs
@@ -8,7 +8,11 @@
 {
     public sealed class Picker<T>
     {
-        Dictionary<T, double> items; // TODO: remove this and only have the ranges
+        IEnumerable<T> Items
+        {
+            get { return ranges.Select(r => r.Item); }
+        }
+
         List<Range<T>> ranges;

         Random rand;
@@ -30,7 +34,6 @@
         /// <param name="rand">Your Random object.</param>
         public Picker(Random rand)
         {
-            items = new Dictionary<T, double>();
             ranges = new List<Range<T>>();

             this.rand = rand;
@@ -48,11 +51,14 @@
             if (prob > 100 || prob < 1)
                 throw new ArgumentOutOfRangeException("prob");

-            if (items.ContainsKey(item))
+            if (Items.Contains(item))
                 throw new ArgumentException(String.Format("Item {0} is already added", item));

-            items.Add(item, prob);
-            UpdateRanges();
+            Range<T> prev = ranges.LastOrDefault();
+            if (prev == null)
+                ranges.Add(new Range<T>(item, 0, prob));
+            else
+                ranges.Add(new Range<T>(item, prev.HighBound, prev.HighBound + prob));
         }

         /// <summary>
@@ -62,10 +68,10 @@
         /// <exception cref="System.ArgumentException">Thrown when item doesn't exist in the picker.</exception>
         public void RemoveItem(T item)
         {
-            if (!items.ContainsKey(item))
+            if (!Items.Contains(item))
                 throw new ArgumentException(String.Format("Item {0} doesn't exist in the picker", item));

-            items.Remove(item);
+            ranges.RemoveAll(r => r.Item.Equals(item));
             UpdateRanges();
         }

@@ -74,7 +80,6 @@
         /// </summary>
         public void ClearItems()
         {
-            items.Clear();
             ranges.Clear();
         }

@@ -86,10 +91,10 @@
         /// <exception cref="System.ArgumentException">Thrown when the given item isn't in the picker.</exception>
         public void UpdateProbability(T item, double prob)
         {
-            if (!items.ContainsKey(item))
+            if (!Items.Contains(item))
                 throw new ArgumentException("Item hasn't been added to the picker");

-            items[item] = prob;
+            ranges.Single(r => r.Item.Equals(item)).HighBound = prob;
             UpdateRanges();
         }

@@ -99,18 +104,19 @@
         /// <returns></returns>
         public bool HasItems()
         {
-            return items.Any();
+            return ranges.Any();
         }

         void UpdateRanges()
         {
-            ranges.Clear();
-
             double prev = 0;
-            foreach (var pair in items.Select(k => new { Item = k.Key, Prob = k.Value }))
+            foreach (Range<T> range in ranges)
             {
-                ranges.Add(new Range<T>(pair.Item, prev, prev + pair.Prob));
-                prev += pair.Prob;
+                if (prev > 0)
+                {
+                    range.Move(range.LowBound - prev);
+                    prev = range.HighBound;
+                }
             }

             changes = true;
@@ -125,7 +131,7 @@
         {
             if (changes)
             {
-                itemSum = items.Values.Sum();
+                itemSum = ranges.Select(r => r.Size).Sum();

                 if (itemSum != 100)
                     throw new InvalidOperationException("Sum of item probabilites isn't 100");


[Aardvark.Base] added AddLog2 to Histogram

--- src/Aardvark.Base/Math/Statistics.cs
+++ src/Aardvark.Base/Math/Statistics.cs
@@ -303,6 +303,8 @@

         public void AddLog10(double value) { Add(Fun.Log10(value)); }

+        public void AddLog2(double value) { Add(Fun.Log2(value)); }
+
         public void Add(double value)
         {
             m_dataRange.ExtendBy(value);
@@ -428,7 +430,13 @@
             Stats.Add(value, data);
         }

-        public void AddHist(double value, T data)
+        public void AddLog2Hist(double value, T data)
+        {
+            Histogram.AddLog2(value);
+            Stats.Add(value, data);
+        }
+
+        public void Add(double value, T data)
         {
             Histogram.Add(value);
             Stats.Add(value, data);
@@ -440,6 +448,12 @@
             Stats.Add(hs.Stats);
         }

+        [Obsolete("Use 'Add' instead (same functionality and parameters)", false)]
+        public void AddHist(double value, T data)
+        {
+            Add(value, data);
+        }
+
         public static HistogramAndStats<T> operator +(HistogramAndStats<T> hs0, HistogramAndStats<T> hs1)
         {
             return new HistogramAndStats<T>(hs0.Histogram + hs1.Histogram, hs0.Stats + hs1.Stats);


Resolving syntax errors brought by merge conflicts

--- Player/Player.cs
+++ Player/Player.cs
@@ -85,7 +85,6 @@
         /// <summary>
         ///     The size of the block
         /// </summary>
-        protected double Boost;
         private readonly int Size;

         /// <summary>
@@ -133,38 +132,32 @@
         /// <summary>
         ///     The main event queue.
         /// </summary>
-        protected double MudBuoyancy;
         private readonly Queue<int> _queue = new Queue<int>();

         /// <summary>
         ///     The checkpoint at the x coordinate
         /// </summary>
-        protected double MudDrag;
         public int CheckpointX = -1;

         /// <summary>
         ///     The checkpoint at the y coordinate
         /// </summary>
-        protected double NoModifierDragX;
         public int CheckpointY = -1;

         /// <summary>
         ///     The current block identifier
         /// </summary>
-        protected double NoModifierDragY;
         private int CurrentBlockId;

         /// <summary>
         ///     The horizontal position
         /// </summary>
-        protected int Size;
         internal int Horizontal = 0;

         /// <summary>
         ///     Whether the player is a club member or not
         /// </summary>
         protected double SpeedX = 0;
-        private bool Isclubmember = false;

         /// <summary>
         ///     The modifier x
@@ -172,27 +165,10 @@
         protected double SpeedY = 0;
         private double ModifierX;

-        /// <summary>
-        ///     The modifier y
-        /// </summary>
-        public bool SwitchOpened = false;
-        private double ModifierY;
-
-        /// <summary>
-        ///     The speed x
-        /// </summary>
-        private double SpeedX;
-
-        /// <summary>
-        ///     The speed y
-        /// </summary>
-        protected double WaterBuoyancy;
-        private double SpeedY;

         /// <summary>
         ///     The vertical
         /// </summary>
-        protected double WaterDrag;
         internal int Vertical = 0;

         /// <summary>
@@ -550,7 +526,7 @@
         ///     The level of the player (in terms of xp).
         /// </summary>
         /// <value>The level.</value>
-        private int Level { get; set; }
+        public int Level { get; set; }

         /// <summary>
         ///     Gets a value indicating whether this instance is god.


remove reference to inlined cbplk implementation

--- src/Adaptive.Agrona/Util/ByteUtil.cs
+++ src/Adaptive.Agrona/Util/ByteUtil.cs
@@ -3,7 +3,6 @@
 using System.Reflection.Emit;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;
-using Altar;
 namespace Adaptive.Agrona.Util {

     /// <summary>


Added GetSafeBoolean

Added GetSafeBoolean

--- src/Buzz.Hybrid/ContentExtensions.cs
+++ src/Buzz.Hybrid/ContentExtensions.cs
@@ -218,6 +218,63 @@
         }

         /// <summary>
+        /// Checks if the model has a property and a value for the property and returns either the string representation
+        /// of the property or the default value of false
+        /// </summary>
+        /// <param name="model">
+        /// The <see cref="RenderModel"/>
+        /// </param>
+        /// <param name="propertyAlias">
+        /// The Umbraco property alias.
+        /// </param>
+        /// <returns>
+        /// The <see cref="bool"/>.
+        /// </returns>
+        public static bool GetSafeBoolean(this RenderModel model, string propertyAlias)
+        {
+            return model.Content.GetSafeBoolean(propertyAlias);
+        }
+
+        /// <summary>
+        /// Checks if the model has a property and a value for the property and returns either the string representation
+        /// of the property or the default value of false
+        /// </summary>
+        /// <param name="content">
+        /// The <see cref="IPublishedContent"/>
+        /// </param>
+        /// <param name="propertyAlias">
+        /// The Umbraco property alias.
+        /// </param>
+        /// <returns>
+        /// The <see cref="bool"/>.
+        /// </returns>
+        public static bool GetSafeBoolean(this IPublishedContent content, string propertyAlias)
+        {
+            return content.GetSafeBoolean(propertyAlias, false);
+        }
+
+        /// <summary>
+        /// Checks if the model has a property and a value for the property and returns either the string representation
+        /// of the property or the default value of false
+        /// </summary>
+        /// <param name="content">
+        /// The <see cref="IPublishedContent"/>
+        /// </param>
+        /// <param name="propertyAlias">
+        /// The Umbraco property alias.
+        /// </param>
+        /// <param name="defaultValue">
+        /// The default Value.
+        /// </param>
+        /// <returns>
+        /// The <see cref="bool"/>.
+        /// </returns>
+        public static bool GetSafeBoolean(this IPublishedContent content, string propertyAlias, bool defaultValue)
+        {
+            return content.WillWork(propertyAlias) ? content.GetPropertyValue<bool>(propertyAlias) : defaultValue;
+        }
+
+        /// <summary>
         /// Checks if the model has a property and a value for the property and returns either the <see cref="IHtmlString"/> representation
         /// of the property or an empty <see cref="IHtmlString"/>
         /// </summary>


リファクタリング

リファクタリング

--- source/AskMonaViewer/MainForm.cs
+++ source/AskMonaViewer/MainForm.cs
@@ -320,11 +320,8 @@
             }
         }

-        private async Task<bool> UpdateResponce(int topicId)
-        {
-            toolStripStatusLabel1.Text = "通信中";
-            toolStripComboBox1.Text = "https://askmona.org/" + topicId;
-
+        private void CacheScrollPosition()
+        {
             if (webBrowser1.Document != null)
             {
                 var doc3 = (mshtml.IHTMLDocument3)webBrowser1.Document.DomDocument;
@@ -332,6 +329,13 @@
                 var cur = mResponseCacheList.FindIndex(x => x.Topic.Id == mTopic.Id);
                 mResponseCacheList[cur].Topic.Scrolled = new System.Drawing.Point(elm.scrollLeft, elm.scrollTop);
             }
+        }
+
+        private async Task<bool> UpdateResponce(int topicId)
+        {
+            CacheScrollPosition();
+            toolStripStatusLabel1.Text = "通信中";
+            toolStripComboBox1.Text = "https://askmona.org/" + topicId;

             var html = "";
             var idx = mResponseCacheList.FindIndex(x => x.Topic.Id == topicId);
@@ -431,11 +435,11 @@
                 string link = null;
                 HtmlElement clickedElement = webBrowser1.Document.GetElementFromPoint(e.MousePosition);

-                if (clickedElement.TagName == "a" || clickedElement.TagName == "A")
+                if (clickedElement.TagName.ToLower() == "a")
                     link = clickedElement.GetAttribute("href");
                 else if (clickedElement.Parent != null)
                 {
-                    if (clickedElement.Parent.TagName == "a" || clickedElement.Parent.TagName == "A")
+                    if (clickedElement.Parent.TagName.ToLower() == "a")
                         link = clickedElement.Parent.GetAttribute("href");
                 }

@@ -569,7 +573,7 @@
             mAccount = new Account().FromAuthCode(authCode);
         }

-        private async void MainForm_Load(object sender, EventArgs e)
+        private void LoadSettings()
         {
             if (File.Exists("AskMonaViewer.xml"))
             {
@@ -593,6 +597,10 @@
                 using (var sr = new StreamReader("ResponseCache.xml", new UTF8Encoding(false)))
                     mResponseCacheList = xs.Deserialize(sr) as List<ResponseCache>;
             }
+        }
+
+        private void LoadHtmlHeader()
+        {
             if (File.Exists("common/style.css"))
             {
                 var css = new StreamReader("common/style.css", Encoding.GetEncoding("UTF-8")).ReadToEnd();
@@ -606,6 +614,12 @@
                     "<script type=\"text/javascript\">\n{0}\n</script>\n", js);
             }
             mHtmlHeader += "</head>\n<body>\n";
+        }
+
+        private async void MainForm_Load(object sender, EventArgs e)
+        {
+            LoadSettings();
+            LoadHtmlHeader();

             mHttpClient = new HttpClient();
             mHttpClient.Timeout = TimeSpan.FromSeconds(10.0);
@@ -627,14 +641,7 @@
             using (var sw = new StreamWriter("AskMonaViewer.xml", false, new UTF8Encoding(false)))
                 xs.Serialize(sw, mAccount);

-            if (webBrowser1.Document != null)
-            {
-                var doc3 = (mshtml.IHTMLDocument3)webBrowser1.Document.DomDocument;
-                var elm = (mshtml.IHTMLElement2)doc3.documentElement;
-                var cur = mResponseCacheList.FindIndex(x => x.Topic.Id == mTopic.Id);
-                mResponseCacheList[cur].Topic.Scrolled = new System.Drawing.Point(elm.scrollLeft, elm.scrollTop);
-            }
-
+            CacheScrollPosition();
             xs = new XmlSerializer(typeof(List<ResponseCache>));
             using (var sw = new StreamWriter("ResponseCache.xml", false, new UTF8Encoding(false)))
                 xs.Serialize(sw, mResponseCacheList);
@@ -672,7 +679,7 @@
         {
             var doc = (mshtml.IHTMLDocument2)this.webBrowser1.Document.DomDocument;
             var range = (mshtml.IHTMLTxtRange)doc.selection.createRange();
-            var url = "https://www.google.co.jp/#q=" + System.Net.WebUtility.UrlEncode(range.text);
+            var url = "https://www.google.co.jp/search?q=" + System.Net.WebUtility.UrlEncode(range.text);
             System.Diagnostics.Process.Start(url);
         }


Reduce minigun impact impulse.

Reduce minigun impact impulse.

--- game/server/weapons/minigun.projectile.cs
+++ game/server/weapons/minigun.projectile.cs
@@ -16,7 +16,7 @@

 	// script damage properties...
 	impactDamage       = 20;
-	impactImpulse      = 2000;
+	impactImpulse      = 500;
 	splashDamage       = 0;
 	splashDamageRadius = 0;
 	splashImpulse      = 0;


Updating docs.

Updating docs.

--- src/Cake.Squirrel/SquirrelAliases.cs
+++ src/Cake.Squirrel/SquirrelAliases.cs
@@ -20,7 +20,7 @@
         ///
         /// Task("PackageNoSettings")
         ///  .Does(() => {
-        ///    Squirrel(GetFile("Package.nupkg"));
+        ///    Squirrel(File("Package.nupkg"));
         /// });
         /// </code>
         /// </example>
@@ -46,7 +46,7 @@
         ///    settings.NoMsi = true;
         ///    settings.Silent = true;
         ///
-        ///    Squirrel(GetFile("Package.nupkg"), settings);
+        ///    Squirrel(File("Package.nupkg"), settings);
         /// });
         /// </code>
         /// </example>
@@ -78,7 +78,7 @@
         ///    settings.NoMsi = true;
         ///    settings.Silent = true;
         ///
-        ///    Squirrel(GetFile("Package.nupkg"), settings, true, false);
+        ///    Squirrel(File("Package.nupkg"), settings, true, false);
         /// });
         /// </code>
         /// </example>


Optimized the generation of expressions.

Signed-off-by: Dimitar Dobrev <ca751a5c976abad79158718440750fc638d19ebc@protonmail.com>

--- src/CppParser/Bootstrap/Bootstrap.cs
+++ src/CppParser/Bootstrap/Bootstrap.cs
@@ -41,6 +41,7 @@
             driver.Options.DryRun = true;
             driver.ParserOptions.EnableRTTI = true;
             driver.ParserOptions.SkipLayoutInfo = true;
+            driver.ParserOptions.UnityBuild = true;

             var module = driver.Options.AddModule("CppSharp");


#if cleanup.  See also r1079 commit message.

In short, change this:

	#if MONO_STRICT
		internal
	#else
		public
	#endif
	 class ...

into this:

	#if !MONO_STRICT
		public
	#endif
		class ...

git-svn-id: 1800f71f313d917366f95485fa960eed04b40598@1215 33146b6e-df29-0410-a1ca-39be37fb9416

--- src/DbLinq/Schema/Dbml/DbmlSchema.cs
+++ src/DbLinq/Schema/Dbml/DbmlSchema.cs
@@ -37,12 +37,10 @@
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
     [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007", IsNullable = false)]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Database : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Database : object, System.ComponentModel.INotifyPropertyChanged
     {

         private Connection connectionField;
@@ -368,12 +366,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Connection : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Connection : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string providerField;
@@ -494,12 +490,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum ConnectionMode
+    enum ConnectionMode
     {

         /// <remarks/>
@@ -518,12 +512,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Return : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Return : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string typeField;
@@ -578,12 +570,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Parameter : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Parameter : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string nameField;
@@ -704,12 +694,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum ParameterDirection
+    enum ParameterDirection
     {

         /// <remarks/>
@@ -728,12 +716,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Function : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Function : object, System.ComponentModel.INotifyPropertyChanged
     {

         private Parameter[] parameterField;
@@ -976,12 +962,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Type : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Type : object, System.ComponentModel.INotifyPropertyChanged
     {

         private object[] itemsField;
@@ -1207,12 +1191,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Association : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Association : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string nameField;
@@ -1520,12 +1502,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum AccessModifier
+    enum AccessModifier
     {

         /// <remarks/>
@@ -1548,12 +1528,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum MemberModifier
+    enum MemberModifier
     {

         /// <remarks/>
@@ -1573,12 +1551,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum Cardinality
+    enum Cardinality
     {

         /// <remarks/>
@@ -1594,12 +1570,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Column : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Column : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string nameField;
@@ -2094,12 +2068,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum UpdateCheck
+    enum UpdateCheck
     {

         /// <remarks/>
@@ -2110,46 +2082,40 @@

         /// <remarks/>
         WhenChanged,
+    }
+
+    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
+    [System.SerializableAttribute()]
+    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
+#if !MONO_STRICT
+    public
+#endif
+    enum AutoSync
+    {
+        /// <remarks/>
+        Never,
+
+        /// <remarks/>
+        OnInsert,
+
+        /// <remarks/>
+        OnUpdate,
+
+        /// <remarks/>
+        Always,
+
+        /// <remarks/>
+        Default,
     }

     /// <remarks/>
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum AutoSync
-    {
-
-        /// <remarks/>
-        Never,
-
-        /// <remarks/>
-        OnInsert,
-
-        /// <remarks/>
-        OnUpdate,
-
-        /// <remarks/>
-        Always,
-
-        /// <remarks/>
-        Default,
-    }
-
-    /// <remarks/>
-    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
-    [System.SerializableAttribute()]
-    [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
-    public
-#endif
- enum ClassModifier
+    enum ClassModifier
     {

         /// <remarks/>
@@ -2165,12 +2131,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class TableFunctionReturn : object, System.ComponentModel.INotifyPropertyChanged
+    partial class TableFunctionReturn : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string memberField;
@@ -2208,12 +2172,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class TableFunctionParameter : object, System.ComponentModel.INotifyPropertyChanged
+    partial class TableFunctionParameter : object, System.ComponentModel.INotifyPropertyChanged
     {

         private string parameterField;
@@ -2300,9 +2262,7 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
     enum Version
@@ -2321,12 +2281,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class TableFunction : object, System.ComponentModel.INotifyPropertyChanged
+    partial class TableFunction : object, System.ComponentModel.INotifyPropertyChanged
     {

         private TableFunctionParameter[] argumentField;
@@ -2431,12 +2389,10 @@
     [System.Diagnostics.DebuggerStepThroughAttribute()]
     [System.ComponentModel.DesignerCategoryAttribute("code")]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- partial class Table : object, System.ComponentModel.INotifyPropertyChanged
+    partial class Table : object, System.ComponentModel.INotifyPropertyChanged
     {

         private Type typeField;
@@ -2621,12 +2577,10 @@
     [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "2.0.50727.1432")]
     [System.SerializableAttribute()]
     [System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://schemas.microsoft.com/linqtosql/dbml/2007")]
-#if MONO_STRICT
-    internal
-#else
+#if !MONO_STRICT
     public
 #endif
- enum SerializationMode
+    enum SerializationMode
     {

         /// <remarks/>


Use framework methods to convert hex strings.

--- src/Faithlife.Utility/ByteUtility.cs
+++ src/Faithlife.Utility/ByteUtility.cs
@@ -19,11 +19,34 @@
 			if (value.Length % 2 != 0)
 				throw new ArgumentException("There must be an even number of characters in the string.", nameof(value));

+#if NET5_0_OR_GREATER
+			try
+			{
+				return Convert.FromHexString(value);
+			}
+			catch (Exception ex)
+			{
+				throw new ArgumentOutOfRangeException("'value' contained an invalid hex character", ex);
+			}
+#else
 			var bytes = new byte[value.Length / 2];
 			for (var index = 0; index < bytes.Length; index++)
 				bytes[index] = (byte) (ConvertToNibble(value[index * 2]) * 16 + ConvertToNibble(value[index * 2 + 1]));

 			return bytes;
+
+			static int ConvertToNibble(char ch)
+			{
+				if (ch >= '0' && ch <= '9')
+					return ch - '0';
+				else if (ch >= 'A' && ch <= 'F')
+					return ch - 'A' + 10;
+				else if (ch >= 'a' && ch <= 'f')
+					return ch - 'a' + 10;
+				else
+					throw new ArgumentOutOfRangeException(nameof(ch));
+			}
+#endif
 		}

 		/// <summary>
@@ -33,6 +56,9 @@
 		/// <returns>A string containing two hexadecimal digits for each input byte.</returns>
 		public static string ToString(byte[] bytes)
 		{
+#if NET5_0_OR_GREATER
+			return Convert.ToHexString(bytes);
+#else
 			if (bytes is null)
 				throw new ArgumentNullException(nameof(bytes));

@@ -48,18 +74,7 @@
 			}

 			return new string(chars);
-		}
-
-		private static int ConvertToNibble(char ch)
-		{
-			if (ch >= '0' && ch <= '9')
-				return ch - '0';
-			else if (ch >= 'A' && ch <= 'F')
-				return ch - 'A' + 10;
-			else if (ch >= 'a' && ch <= 'f')
-				return ch - 'a' + 10;
-			else
-				throw new ArgumentOutOfRangeException(nameof(ch));
+#endif
 		}
 	}
 }


Update AndyLevy.cs

Update AndyLevy.cs

--- src/Firehose.Web/Authors/AndyLevy.cs
+++ src/Firehose.Web/Authors/AndyLevy.cs
@@ -19,7 +19,7 @@
         public string GitHubHandle => "andylevy";
         public GeoPosition Position => new GeoPosition(42.8875, -77.281667);
         public Uri WebSite => new Uri("https://flxsql.com/");
-        public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://flxsql.com/category/powershell/feed/"); } }
+        public IEnumerable<Uri> FeedUris { get { yield return new Uri("https://www.flxsql.com/feed/"); } }
         public string FeedLanguageCode => "en";
     }
 }


can set min and max values separately

can set min and max values separately

--- src/FluentWebControls/TextBoxData.cs
+++ src/FluentWebControls/TextBoxData.cs
@@ -145,19 +145,19 @@
 				{
 					sb.Append(PropertyMetaData.MaxLength.CreateQuotedAttribute(JQueryFieldValidationType.MaxLength.Text));
 				}
+			}
+			if (PropertyMetaData != null && PropertyMetaData.MinValue > 0 || _minValue > 0)
+			{
+				var v = (PropertyMetaData == null ? null : PropertyMetaData.MinValue) ?? _minValue;
+				sb.Append(v.CreateQuotedAttribute(JQueryFieldValidationType.MinValue.Text));
+			}

-				if (PropertyMetaData.MinValue > 0 || _minValue > 0)
-				{
-					var v = PropertyMetaData.MinValue ?? _minValue;
-					sb.Append(v.CreateQuotedAttribute(JQueryFieldValidationType.MinValue.Text));
-				}
+			if (PropertyMetaData != null && PropertyMetaData.MaxValue > 0 || _maxValue > 0)
+			{
+				var v = (PropertyMetaData == null ? null : PropertyMetaData.MaxValue) ?? _maxValue;
+				sb.Append(v.CreateQuotedAttribute(JQueryFieldValidationType.MaxValue.Text));
+			}

-				if (PropertyMetaData.MaxValue > 0 || _maxValue > 0)
-				{
-					var v = PropertyMetaData.MaxValue ?? _maxValue;
-					sb.Append(v.CreateQuotedAttribute(JQueryFieldValidationType.MaxValue.Text));
-				}
-			}

 			sb.Append(_value.CreateQuotedAttribute("value"));
 			if (ReadOnly)


Made UsageMode internal

Made UsageMode internal

--- src/GeocodeSharp/Google/UsageMode.cs
+++ src/GeocodeSharp/Google/UsageMode.cs
@@ -1,6 +1,6 @@
 namespace GeocodeSharp.Google
 {
-    public enum UsageMode
+    internal enum UsageMode
     {
         Free,
         ClientKey,


Fix for never-ending near-zero transmissions

--- src/Kerbalism/Science/SubjectData.cs
+++ src/Kerbalism/Science/SubjectData.cs
@@ -50,7 +50,9 @@
 		// Note : the RnD subject science value (float) will never reach ScienceMaxValue (double)
 		// because the "last transmission value" will always be less than the float min increment.
 		// so we artifically increase the exposed RnD value by 1E-4F and clamp it to max value
-		public double ScienceRetrievedInKSC => ExistsInRnD ? Math.Min(RnDSubject.science, ScienceMaxValue) : 0.0;
+		//public double ScienceRetrievedInKSC => ExistsInRnD ? Math.Min(RnDSubject.science, ScienceMaxValue) : 0.0;
+		public double ScienceRetrievedInKSC => ExistsInRnD ? (RnDSubject.scienceCap - RnDSubject.science == 0f) ? ScienceMaxValue : RnDSubject.science : 0.0;
+

 		/// <summary> all science points recovered, transmitted or collected in flight </summary>
 		public double ScienceCollectedTotal => ScienceCollectedInFlight + ScienceRetrievedInKSC;


User call should have ConfigureAwait()

User call should have ConfigureAwait()

Former-commit-id: 62c8ba41935ecb34fb4085da4670f490e17776c6

--- src/MassTransit/RequestExtensions.cs
+++ src/MassTransit/RequestExtensions.cs
@@ -34,7 +34,7 @@
             Action<RequestContext<TRequest>> callback, CancellationToken cancellationToken = default(CancellationToken))
             where TRequest : class
         {
-            ISendEndpoint endpoint = await bus.GetSendEndpoint(address);
+            ISendEndpoint endpoint = await bus.GetSendEndpoint(address).ConfigureAwait(false);

             return await Request(bus, endpoint, message, callback, cancellationToken);
         }
@@ -59,7 +59,7 @@

             var pipe = new SendRequest<TRequest>(bus, taskScheduler, callback);

-            await sendEndpoint.Send(message, pipe, cancellationToken);
+            await sendEndpoint.Send(message, pipe, cancellationToken).ConfigureAwait(false);

             return pipe;
         }


Channels: enable configurable interval for heartbeats

--- src/NEventSocket/Channels/Channel.cs
+++ src/NEventSocket/Channels/Channel.cs
@@ -145,13 +145,13 @@
             return eventSocket.ExecuteApplication(UUID, "answer");
         }

-        public Task EnableHeartBeat()
+        public Task EnableHeartBeat(int intervalSeconds = 60)
         {
             return RunIfAnswered(
                 async () =>
                 {
                     await eventSocket.SubscribeEvents(EventName.SessionHeartbeat).ConfigureAwait(false);
-                    await eventSocket.ExecuteApplication(UUID, "enable_heartbeat").ConfigureAwait(false);
+                    await eventSocket.ExecuteApplication(UUID, "enable_heartbeat", intervalSeconds.ToString()).ConfigureAwait(false);
                 }, true);
         }


Added additional catch for Mono exception

--- src/Nancy/DefaultObjectSerializer.cs
+++ src/Nancy/DefaultObjectSerializer.cs
@@ -62,6 +62,10 @@
             {
                 return null;
             }
+	    catch (IOException)
+	    {
+		return null;
+	    }
         }
     }
-}+}


Update old twinsun link to use IANA

Update old twinsun link to use IANA

Fixes #1455.

--- src/NodaTime.TzdbCompiler/Program.cs
+++ src/NodaTime.TzdbCompiler/Program.cs
@@ -15,7 +15,7 @@
     /// <summary>
     /// Main entry point for the time zone information compiler. In theory we could support
     /// multiple sources and formats but currently we only support one:
-    /// http://www.twinsun.com/tz/tz-link.htm. This system refers to it as TZDB.
+    /// https://www.iana.org/time-zones. This system refers to it as TZDB.
     /// This also requires a windowsZone.xml file from the Unicode CLDR repository, to
     /// map Windows time zone names to TZDB IDs.
     /// </summary>


Modifying WebHost.CopyFile in order to find a TeamCity compatible way of doing
it

--HG--
branch : 1.4.x

--- src/Orchard.Specs/Hosting/WebHost.cs
+++ src/Orchard.Specs/Hosting/WebHost.cs
@@ -215,7 +215,7 @@
         }

         public void CopyFile(string source, string destination) {
-            var origin = Path.Get(Assembly.GetCallingAssembly().Location).Parent.Parent.Combine(source);
+            var origin = Path.Get(typeof(IOrchardServices).Assembly.Location).Parent.Parent.Combine(source);
             var target = _tempSite.Combine(destination);

             Directory.CreateDirectory(target.DirectoryName);


Added generator to StdTable.

Added generator to StdTable.

--- src/Peachpie.Runtime/std/StdTable.cs
+++ src/Peachpie.Runtime/std/StdTable.cs
@@ -17,6 +17,7 @@
             typeof(Traversable), typeof(Iterator), typeof(IteratorAggregate),
             typeof(ArrayAccess), typeof(Serializable),
             typeof(Closure),
+            typeof(Generator),
         };

         /// <summary>


Possible fix for RelativeSearchPath returning null

--- src/Procon.Service.Shared/Defines.cs
+++ src/Procon.Service.Shared/Defines.cs
@@ -142,9 +142,15 @@
         /// <param name="file">The file name or directory to search for</param>
         /// <returns>A list of file paths found</returns>
         public static List<String> SearchRelativeSearchPath(String file) {
+// ReSharper disable ConstantNullCoalescingCondition
+            // Despite resharper assuring me this cannot be null, it does return null when running unit tests in TeamCity,
+            // therefore it could be possible for it to be null elsewhere as well.
+            String relativePath = AppDomain.CurrentDomain.RelativeSearchPath ?? "";
+// ReSharper restore ConstantNullCoalescingCondition
+
             IEnumerable<String> paths = new List<String>() {
                 Defines.BaseDirectory
-            }.Union(AppDomain.CurrentDomain.RelativeSearchPath.Split(';').Select(p => Path.Combine(Defines.BaseDirectory, p)));
+            }.Union(relativePath.Split(';').Select(p => Path.Combine(Defines.BaseDirectory, p)));

             return paths.Where(path => File.Exists(Path.Combine(path, file)) == true).Select(path => Path.Combine(path, file)).ToList();
         }


Added Color.Lighten, added Color.Darken

Added Color.Lighten, added Color.Darken

--- src/SampSharp.GameMode/SAMP/Color.cs
+++ src/SampSharp.GameMode/SAMP/Color.cs
@@ -23,6 +23,19 @@
     /// </summary>
     public struct Color
     {
+        #region Overrides of ValueType
+
+        /// <summary>
+        ///     Returns a <see cref="string" /> representation of this Color.
+        /// </summary>
+        /// <returns>A <see cref="string" /> representation of this Color.</returns>
+        public override string ToString()
+        {
+            return ToString(ColorFormat.RGB);
+        }
+
+        #endregion
+
         #region Constructors

         /// <summary>
@@ -91,10 +104,10 @@
         /// <param name="a">The alpha value of this Color.</param>
         public Color(float r, float g, float b, float a)
             : this(
-                (byte)MathHelper.Clamp(r * byte.MaxValue, byte.MinValue, byte.MaxValue),
-                (byte)MathHelper.Clamp(g * byte.MaxValue, byte.MinValue, byte.MaxValue),
-                (byte)MathHelper.Clamp(b * byte.MaxValue, byte.MinValue, byte.MaxValue),
-                (byte)MathHelper.Clamp(a * byte.MaxValue, byte.MinValue, byte.MaxValue))
+                (byte) MathHelper.Clamp(r*byte.MaxValue, byte.MinValue, byte.MaxValue),
+                (byte) MathHelper.Clamp(g*byte.MaxValue, byte.MinValue, byte.MaxValue),
+                (byte) MathHelper.Clamp(b*byte.MaxValue, byte.MinValue, byte.MaxValue),
+                (byte) MathHelper.Clamp(a*byte.MaxValue, byte.MinValue, byte.MaxValue))
         {
         }

@@ -1519,10 +1532,10 @@
         }

         /// <summary>
-        ///     Returns a <see cref="String"/> representation of this Color.
+        ///     Returns a <see cref="string" /> representation of this Color.
         /// </summary>
         /// <param name="colorFormat">The format to use to convert the color to a string.</param>
-        /// <returns>A <see cref="String"/> representation of this Color.</returns>
+        /// <returns>A <see cref="string" /> representation of this Color.</returns>
         public string ToString(ColorFormat colorFormat)
         {
             switch (colorFormat)
@@ -1535,22 +1548,42 @@
         }

         /// <summary>
-        /// Performs linear interpolation of <see cref="Color"/>.
-        /// </summary>
-        /// <param name="value1">Source <see cref="Color"/>.</param>
-        /// <param name="value2">Destination <see cref="Color"/>.</param>
+        ///     Performs linear interpolation of <see cref="Color" />.
+        /// </summary>
+        /// <param name="value1">Source <see cref="Color" />.</param>
+        /// <param name="value2">Destination <see cref="Color" />.</param>
         /// <param name="amount">Interpolation factor.</param>
-        /// <returns>Interpolated <see cref="Color"/>.</returns>
+        /// <returns>Interpolated <see cref="Color" />.</returns>
         public static Color Lerp(Color value1, Color value2, float amount)
         {
             amount = MathHelper.Clamp(amount, 0, 1);
             return new Color(
-                (int)MathHelper.Lerp(value1.R, value2.R, amount),
-                (int)MathHelper.Lerp(value1.G, value2.G, amount),
-                (int)MathHelper.Lerp(value1.B, value2.B, amount),
-                (int)MathHelper.Lerp(value1.A, value2.A, amount));
-        }
-
+                (int) MathHelper.Lerp(value1.R, value2.R, amount),
+                (int) MathHelper.Lerp(value1.G, value2.G, amount),
+                (int) MathHelper.Lerp(value1.B, value2.B, amount),
+                (int) MathHelper.Lerp(value1.A, value2.A, amount));
+        }
+
+        /// <summary>
+        ///     Returns this color darkened specified <paramref name="amount" />.
+        /// </summary>
+        /// <param name="amount">The amount.</param>
+        /// <returns>The darkened color.</returns>
+        public Color Darken(float amount)
+        {
+            return Lerp(this, Black, amount);
+        }
+
+        /// <summary>
+        ///     Returns this color lightened specified <paramref name="amount" />.
+        /// </summary>
+        /// <param name="amount">The amount.</param>
+        /// <returns>The lightened color.</returns>
+        public Color Lighten(float amount)
+        {
+            return Lerp(this, White, amount);
+        }
+
         #endregion

         #region Operators
@@ -1586,12 +1619,12 @@
         }

         /// <summary>
-        /// Implements the operator ==.
+        ///     Implements the operator ==.
         /// </summary>
         /// <param name="a">The left color.</param>
         /// <param name="b">The right color.</param>
         /// <returns>
-        /// The result of the operator.
+        ///     The result of the operator.
         /// </returns>
         public static bool operator ==(Color a, Color b)
         {
@@ -1599,12 +1632,12 @@
         }

         /// <summary>
-        /// Implements the operator !=.
+        ///     Implements the operator !=.
         /// </summary>
         /// <param name="a">The left color.</param>
         /// <param name="b">The right color.</param>
         /// <returns>
-        /// The result of the operator.
+        ///     The result of the operator.
         /// </returns>
         public static bool operator !=(Color a, Color b)
         {
@@ -1612,12 +1645,12 @@
         }

         /// <summary>
-        /// Implements the operator *.
+        ///     Implements the operator *.
         /// </summary>
         /// <param name="value">The value.</param>
         /// <param name="scale">The scale.</param>
         /// <returns>
-        /// The result of the operator.
+        ///     The result of the operator.
         /// </returns>
         public static Color operator *(Color value, float scale)
         {
@@ -1625,11 +1658,11 @@
         }

         /// <summary>
-        /// Performs an explicit conversion from <see cref="Color"/> to <see cref="Vector3"/>.
+        ///     Performs an explicit conversion from <see cref="Color" /> to <see cref="Vector3" />.
         /// </summary>
         /// <param name="value">The value.</param>
         /// <returns>
-        /// The result of the conversion.
+        ///     The result of the conversion.
         /// </returns>
         public static explicit operator Vector3(Color value)
         {
@@ -1638,19 +1671,6 @@

         #endregion

-        #region Overrides of ValueType
-
-        /// <summary>
-        ///  Returns a <see cref="String"/> representation of this Color.
-        /// </summary>
-        /// <returns>A <see cref="String"/> representation of this Color.</returns>
-        public override string ToString()
-        {
-            return ToString(ColorFormat.RGB);
-        }
-
-        #endregion
-
         #region Equality members

         public bool Equals(Color other)
@@ -1659,10 +1679,10 @@
         }

         /// <summary>
-        /// Indicates whether this instance and a specified object are equal.
+        ///     Indicates whether this instance and a specified object are equal.
         /// </summary>
         /// <returns>
-        /// true if <paramref name="obj"/> and this instance are the same type and represent the same value; otherwise, false.
+        ///     true if <paramref name="obj" /> and this instance are the same type and represent the same value; otherwise, false.
         /// </returns>
         /// <param name="obj">Another object to compare to. </param>
         public override bool Equals(object obj)
@@ -1672,10 +1692,10 @@
         }

         /// <summary>
-        /// Returns the hash code for this instance.
+        ///     Returns the hash code for this instance.
         /// </summary>
         /// <returns>
-        /// A 32-bit signed integer that is the hash code for this instance.
+        ///     A 32-bit signed integer that is the hash code for this instance.
         /// </returns>
         public override int GetHashCode()
         {


OPTIMIZATION LINQ: T -> T? casts are trivial in SQL.

--- src/Sooda/Linq/SoodaQueryExecutor.cs
+++ src/Sooda/Linq/SoodaQueryExecutor.cs
@@ -187,6 +187,7 @@
         SoqlExpression TranslateConvert(UnaryExpression expr)
         {
             if (expr.Operand.Type == typeof(object)
+             || Nullable.GetUnderlyingType(expr.Type) == expr.Operand.Type // T -> Nullable<T>
              || (expr.Type == typeof(double) && expr.Operand.Type == typeof(int)))
                 return TranslateExpression(expr.Operand);
             throw new NotSupportedException("Convert " + expr.Operand.Type + " to " + expr.Type);


Rearranged CLI Builder AddSubCommand arguments

--- src/THNETII.Common.Cli/CliBuilder.cs
+++ src/THNETII.Common.Cli/CliBuilder.cs
@@ -150,10 +150,10 @@
             return this;
         }

-        public CliBuilder<TCommand> AddSubCommand<TSubCommand>(string name, Action<CommandLineApplication> configuration, Action<CliBuilder<TSubCommand>> subCliConfigure)
+        public CliBuilder<TCommand> AddSubCommand<TSubCommand>(string name, Action<CliBuilder<TSubCommand>> subCliConfigure, Action<CommandLineApplication> configuration)
             where TSubCommand : CliCommand
             => AddSubCommand(cli => cli.Command(name, configuration), subCliConfigure);
-        public CliBuilder<TCommand> AddSubCommand<TSubCommand>(string name, Action<CommandLineApplication> configuration, bool throwOnUnexpectedArg, Action<CliBuilder<TSubCommand>> subCliConfigure)
+        public CliBuilder<TCommand> AddSubCommand<TSubCommand>(string name, Action<CliBuilder<TSubCommand>> subCliConfigure, Action<CommandLineApplication> configuration, bool throwOnUnexpectedArg)
             where TSubCommand : CliCommand
             => AddSubCommand(cli => cli.Command(name, configuration, throwOnUnexpectedArg), subCliConfigure);


Action trace should not store when has no value

--- src/Take.Blip.Builder/FlowManager.cs
+++ src/Take.Blip.Builder/FlowManager.cs
@@ -329,7 +329,10 @@
                     ? (stateAction.ToTrace(), Stopwatch.StartNew())
                     : (null, null);

-                context.SetCurrentActionTrace(actionTrace);
+                if (actionTrace != null)
+                {
+                    context.SetCurrentActionTrace(actionTrace);
+                }

                 // Configure the action timeout, that can be defined in action or flow level
                 var executionTimeoutInSeconds =


Fix Globalisation iOS platform FxCop violations

--- src/ADAL.PCL.iOS/BrokerHelper.cs
+++ src/ADAL.PCL.iOS/BrokerHelper.cs
@@ -82,7 +82,7 @@
                     string url = brokerPayload["broker_install_url"];
                     Uri uri = new Uri(url);
                     string query = uri.Query;
-                    if (query.StartsWith("?"))
+                    if (query.StartsWith("?", StringComparison.OrdinalIgnoreCase))
                     {
                         query = query.Substring(1);
                     }


Ensure image description tool stay open for a11y checking (BL-6228)

Saving the page removes any tool's HTML from the book's page.  It needs
to be restored for seamless operation between the main window and the
a11y checking window.

--- src/BloomExe/Edit/EditingView.cs
+++ src/BloomExe/Edit/EditingView.cs
@@ -1404,6 +1404,8 @@
 					// See https://silbloom.myjetbrains.com/youtrack/issue/BL-6228. This control can lose/regain
 					// focus erratically on Linux, so we don't want this save on its LostFocus event.
 					_model.SaveNow();
+					// Restore any tool state removed by CleanHtmlAndCopyToPageDom(), which is called by _model.SaveNow().
+					RunJavaScript("if (typeof(FrameExports) !=='undefined') {FrameExports.getToolboxFrameExports().applyToolboxStateToPage();}");
 				};
 			}
 		}


Added missing extension method.

Added missing extension method.

--- src/Core/Utility/SettingsBase.cs
+++ src/Core/Utility/SettingsBase.cs
@@ -6,6 +6,7 @@
 using System.Linq;
 using Foundatio.Logging;
 using Newtonsoft.Json;
+using Samples.Core.Extensions;

 namespace Samples.Core.Utility {
     public abstract class SettingsBase<T> : SingletonBase<T>, IInitializable where T : class {


Update StyleEditor.cs

Update StyleEditor.cs

--- src/Core2D/Editor/StyleEditor.cs
+++ src/Core2D/Editor/StyleEditor.cs
@@ -938,6 +938,39 @@
         }

         /// <inheritdoc/>
+        public void OnStyleSetStartArrowDashOffset(string dashOffset)
+        {
+            if (!double.TryParse(dashOffset, _numberStyles, CultureInfo.InvariantCulture, out var value))
+            {
+                return;
+            }
+
+            var editor = _serviceProvider.GetService<IProjectEditor>();
+
+            if (editor.Renderers[0]?.State?.SelectedShape != null)
+            {
+                var shape = editor.Renderers[0]?.State?.SelectedShape;
+                var style = shape.Style;
+                if (style != null && style.StartArrowStyle != null)
+                {
+                    style.StartArrowStyle.DashOffset = value;
+                }
+            }
+
+            if (editor.Renderers?[0]?.State?.SelectedShapes?.Count > 0)
+            {
+                foreach (var shape in editor.Renderers[0].State.SelectedShapes)
+                {
+                    var style = shape.Style;
+                    if (style != null && style.StartArrowStyle != null)
+                    {
+                        style.StartArrowStyle.DashOffset = value;
+                    }
+                }
+            }
+        }
+
+        /// <inheritdoc/>
         public void OnStyleSetStartArrowStroke(string color)
         {
             IColor value;


Update StyleEditor.cs

Update StyleEditor.cs

--- src/Core2D/Editor/StyleEditor.cs
+++ src/Core2D/Editor/StyleEditor.cs
@@ -1366,6 +1366,39 @@
         }

         /// <inheritdoc/>
+        public void OnStyleSetEndArrowDashOffset(string dashOffset)
+        {
+            if (!double.TryParse(dashOffset, _numberStyles, CultureInfo.InvariantCulture, out var value))
+            {
+                return;
+            }
+
+            var editor = _serviceProvider.GetService<IProjectEditor>();
+
+            if (editor.Renderers[0]?.State?.SelectedShape != null)
+            {
+                var shape = editor.Renderers[0]?.State?.SelectedShape;
+                var style = shape.Style;
+                if (style != null && style.EndArrowStyle != null)
+                {
+                    style.EndArrowStyle.DashOffset = value;
+                }
+            }
+
+            if (editor.Renderers?[0]?.State?.SelectedShapes?.Count > 0)
+            {
+                foreach (var shape in editor.Renderers[0].State.SelectedShapes)
+                {
+                    var style = shape.Style;
+                    if (style != null && style.EndArrowStyle != null)
+                    {
+                        style.EndArrowStyle.DashOffset = value;
+                    }
+                }
+            }
+        }
+
+        /// <inheritdoc/>
         public void OnStyleSetEndArrowStroke(string color)
         {
             IColor value;


Update StyleEditor.cs

Update StyleEditor.cs

--- src/Core2D/Editor/StyleEditor.cs
+++ src/Core2D/Editor/StyleEditor.cs
@@ -395,7 +395,34 @@
         /// <inheritdoc/>
         public void OnStyleSetTextVAlignment(string alignment)
         {
-            // TODO:
+            if (!Enum.TryParse<TextVAlignment>(alignment, true, out var value))
+            {
+                return;
+            }
+
+            var editor = _serviceProvider.GetService<IProjectEditor>();
+
+            if (editor.Renderers[0]?.State?.SelectedShape != null)
+            {
+                var shape = editor.Renderers[0]?.State?.SelectedShape;
+                var style = shape.Style;
+                if (style != null && style.TextStyle != null)
+                {
+                    style.TextStyle.TextVAlignment = value;
+                }
+            }
+
+            if (editor.Renderers?[0]?.State?.SelectedShapes?.Count > 0)
+            {
+                foreach (var shape in editor.Renderers[0].State.SelectedShapes)
+                {
+                    var style = shape.Style;
+                    if (style != null && style.TextStyle != null)
+                    {
+                        style.TextStyle.TextVAlignment = value;
+                    }
+                }
+            }
         }

         /// <inheritdoc/>


Better handle if someone changes voice channels while talking

--- src/Discord.Net/DiscordClient.cs
+++ src/Discord.Net/DiscordClient.cs
@@ -673,12 +673,12 @@
 							var member = _members[data.UserId, data.GuildId];
 							if (member != null)
 							{
-								member.Update(data);
-								if (member.IsSpeaking)
+								if (data.ChannelId != member.VoiceChannelId && member.IsSpeaking)
 								{
 									member.IsSpeaking = false;
 									RaiseUserIsSpeaking(member, false);
 								}
+								member.Update(data);
 								RaiseUserVoiceStateUpdated(member);
 							}
 						}


Make LeftRight immutable.

Make LeftRight immutable.

--- src/Edulinq/OrderedEnumerable.cs
+++ src/Edulinq/OrderedEnumerable.cs
@@ -113,7 +113,7 @@

         private struct LeftRight
         {
-            internal int left, right;
+            internal readonly int left, right;
             internal LeftRight(int left, int right)
             {
                 this.left = left;


Make authenticator work

Make authenticator work

--- src/GameServer/UserLoginActor.cs
+++ src/GameServer/UserLoginActor.cs
@@ -33,12 +33,12 @@
                 throw new ResultException(ResultCodeType.ArgumentError, nameof(password));

             // verify crendential
-            var userId = await Authenticator.AuthenticateAsync(id, password);
-            if (userId <= 0)
+            var account = await Authenticator.AuthenticateAsync(id, password);
+            if (account == null)
                 throw new ResultException(ResultCodeType.LoginCredentialError);

             // try to create user actor with user-id
-            var user = await _clusterContext.UserTable.WithTimeout(TimeSpan.FromSeconds(30)).GetOrCreate(userId, null);
+            var user = await _clusterContext.UserTable.WithTimeout(TimeSpan.FromSeconds(30)).GetOrCreate(account.UserId, null);
             if (user.Actor == null)
                 throw new ResultException(ResultCodeType.InternalError);
             if (user.Created == false)
@@ -55,7 +55,7 @@
             }
             catch (Exception e)
             {
-                _logger.Error($"BindActorOrOpenChannel error (UserId={userId})", e);
+                _logger.Error($"BindActorOrOpenChannel error (UserId={account.UserId})", e);
                 user.Actor.Tell(InterfacedPoisonPill.Instance);
                 throw new ResultException(ResultCodeType.InternalError);
             }
@@ -63,7 +63,7 @@
             // once login done, stop this
             Self.Tell(InterfacedPoisonPill.Instance);

-            return Tuple.Create(userId, (IUserInitiator)boundTarget.Cast<UserInitiatorRef>());
+            return Tuple.Create(account.UserId, (IUserInitiator)boundTarget.Cast<UserInitiatorRef>());
         }
     }
 }