MySQLLegacyRegionData: Extreme Spam Edition(tm)

--- OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
+++ OpenSim/Data/MySQL/MySQLLegacyRegionData.cs
@@ -402,8 +402,12 @@
             Dictionary<UUID, SceneObjectPart> prims = new Dictionary<UUID, SceneObjectPart>();
             SceneObjectGroup grp = null;

+            m_log.Debug("[REGION DB]: Entering LoadObjects()");
+
             lock (m_Connection)
             {
+                m_log.Debug("[REGION DB]: Entered LoadObjects() lock");
+
                 using (MySqlCommand cmd = m_Connection.CreateCommand())
                 {
                     cmd.CommandText = "select *, " +
@@ -419,6 +423,8 @@
                     {
                         while (reader.Read())
                         {
+                            m_log.Debug("[REGION DB]: LoadObjects() Read a prim");
+
                             SceneObjectPart prim = BuildPrim(reader);
                             if (reader["Shape"] is DBNull)
                                 prim.Shape = PrimitiveBaseShape.Default;


Applying patch #4534 by Misterblue to fix ODE physics stickiness

--- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
+++ OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
@@ -1575,6 +1575,7 @@
                 {
 //Console.WriteLine("Move " +  m_primName);
                     if (!d.BodyIsEnabled (Body))  d.BodyEnable (Body); // KF add 161009
+                    /*
                     // NON-'VEHICLES' are dealt with here
                     if (d.BodyIsEnabled(Body) && !m_angularlock.ApproxEquals(Vector3.Zero, 0.003f))
                     {
@@ -1587,6 +1588,7 @@
                             avel2.Z = 0;
                         d.BodySetAngularVel(Body, avel2.X, avel2.Y, avel2.Z);
                     }
+                    */
                     //float PID_P = 900.0f;

                     float m_mass = CalculateMass();


Make logical tree work for ScrollViewer.

--- Perspex.Themes.Default/ScrollViewerStyle.cs
+++ Perspex.Themes.Default/ScrollViewerStyle.cs
@@ -47,7 +47,7 @@
                 {
                     new ScrollContentPresenter
                     {
-                        Id = "scrollContentPresenter",
+                        Id = "contentPresenter",
                         [~ScrollContentPresenter.ContentProperty] = control[~ScrollViewer.ContentProperty],
                         [~~ScrollContentPresenter.ExtentProperty] = control[~~ScrollViewer.ExtentProperty],
                         [~~ScrollContentPresenter.OffsetProperty] = control[~~ScrollViewer.OffsetProperty],


Add x/y/width/height options to Extract-Palette.

--- PixelPet/CLI/Commands/ExtractPalettesCmd.cs
+++ PixelPet/CLI/Commands/ExtractPalettesCmd.cs
@@ -1,17 +1,26 @@
 using LibPixelPet;
 using System;
 using System.Collections.Generic;
+using System.Drawing;
 using System.Linq;

 namespace PixelPet.CLI.Commands {
 	internal class ExtractPalettesCmd : CliCommand {
 		public ExtractPalettesCmd()
 			: base("Extract-Palettes",
-				  new Parameter("palette-size", "ps", false, new ParameterValue("count", "16"))
+				  new Parameter("palette-size", "ps", false, new ParameterValue("count", "16")),
+				  new Parameter("x", "x", false, new ParameterValue("pixels", "0")),
+				  new Parameter("y", "y", false, new ParameterValue("pixels", "0")),
+				  new Parameter("width", "w", false, new ParameterValue("pixels", "-1")),
+				  new Parameter("height", "h", false, new ParameterValue("pixels", "-1"))
 			) { }

 		public override void Run(Workbench workbench, ILogger logger) {
 			int palSize = FindNamedParameter("--palette-size").Values[0].ToInt32();
+			int x = FindNamedParameter("--x").Values[0].ToInt32();
+			int y = FindNamedParameter("--y").Values[0].ToInt32();
+			int w = FindNamedParameter("--width").Values[0].ToInt32();
+			int h = FindNamedParameter("--height").Values[0].ToInt32();

 			if (palSize < 1) {
 				logger?.Log("Invalid palette size.", LogLevel.Error);
@@ -24,60 +33,62 @@
 			int addedPalettes = 0;
 			int addedColors = 0;
 			Palette pal = null;
-			foreach (Tile tile in cutter.CutTiles(workbench.Bitmap)) {
-				// Get all the unique colors in the tile.
-				List<int> tileColors = tile.EnumerateTile().Distinct().ToList();
+			using (Bitmap bmp = workbench.GetCroppedBitmap(x, y, w, h, logger)) {
+				foreach (Tile tile in cutter.CutTiles(bmp)) {
+					// Get all the unique colors in the tile.
+					List<int> tileColors = tile.EnumerateTile().Distinct().ToList();

-				if (tileColors.Count > palSize) {
-					logger?.Log("Palette tile " + ti + " has more than " + palSize + " colors.", LogLevel.Error);
-					return;
+					if (tileColors.Count > palSize) {
+						logger?.Log("Palette tile " + ti + " has more than " + palSize + " colors.", LogLevel.Error);
+						return;
+					}
+
+					int bestPal = -1;
+					int bestAdd = int.MaxValue;
+
+					// Find palettes we can add to.
+					for (int i = 0; i < workbench.PaletteSet.Count; i++) {
+						pal = workbench.PaletteSet[i].Palette;
+
+						// See if we can add to this palette.
+						int newSize = pal.Union(tileColors).Count();
+						if ((pal.MaximumSize >= 0 && newSize > pal.MaximumSize) || newSize > palSize) {
+							// Cannot add to this palette.
+							continue;
+						}
+
+						// Add to palette that would result in least new colors.
+						int add = newSize - pal.Count;
+						if (add < bestAdd) {
+							bestPal = i;
+							bestAdd = add;
+						}
+					}
+
+					// Could not find a suitable palette, so have to make a new one.
+					if (bestPal < 0) {
+						pal = new Palette(workbench.BitmapFormat, palSize);
+						workbench.PaletteSet.Add(pal);
+
+						addedPalettes++;
+
+						bestPal = workbench.PaletteSet.Count - 1;
+						bestAdd = tileColors.Count;
+					} else {
+						pal = workbench.PaletteSet[bestPal].Palette;
+					}
+
+					// Add the new colors to the palette.
+					foreach (int color in tileColors.Where(c => !pal.Contains(c))) {
+						pal.Add(color);
+						addedColors++;
+					}
+
+					ti++;
 				}

-				int bestPal = -1;
-				int bestAdd = int.MaxValue;
-
-				// Find palettes we can add to.
-				for (int i = 0; i < workbench.PaletteSet.Count; i++) {
-					pal = workbench.PaletteSet[i].Palette;
-
-					// See if we can add to this palette.
-					int newSize = pal.Union(tileColors).Count();
-					if ((pal.MaximumSize >= 0 && newSize > pal.MaximumSize) || newSize > palSize) {
-						// Cannot add to this palette.
-						continue;
-					}
-
-					// Add to palette that would result in least new colors.
-					int add = newSize - pal.Count;
-					if (add < bestAdd) {
-						bestPal = i;
-						bestAdd = add;
-					}
-				}
-
-				// Could not find a suitable palette, so have to make a new one.
-				if (bestPal < 0) {
-					pal = new Palette(workbench.BitmapFormat, palSize);
-					workbench.PaletteSet.Add(pal);
-
-					addedPalettes++;
-
-					bestPal = workbench.PaletteSet.Count - 1;
-					bestAdd = tileColors.Count;
-				} else {
-					pal = workbench.PaletteSet[bestPal].Palette;
-				}
-
-				// Add the new colors to the palette.
-				foreach (int color in tileColors.Where(c => !pal.Contains(c))) {
-					pal.Add(color);
-					addedColors++;
-				}
-
-				ti++;
+				logger?.Log("Added " + addedPalettes + " new palettes, " + addedColors + " colors total.");
 			}
-
-			logger?.Log("Added " + addedPalettes + " new palettes, " + addedColors + " colors total.");
 		}
 	}
 }


Prevent Close call started in Winforms from recursing

--- PlatformWin32/win32/WinformsSystemWindow.cs
+++ PlatformWin32/win32/WinformsSystemWindow.cs
@@ -280,6 +280,8 @@
 			base.SetVisibleCore(value);
 		}

+		private bool winformAlreadyClosing = false;
+
 		protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
 		{
 			if (AggSystemWindow != null && !AggSystemWindow.HasBeenClosed)
@@ -294,8 +296,11 @@
 				}
 				else
 				{
+					// Close the SystemWindow
 					if (!AggSystemWindow.HasBeenClosed)
 					{
+						// Store that the Close operation started here
+						winformAlreadyClosing = true;
 						AggSystemWindow.Close();
 					}

@@ -659,6 +664,12 @@

 		public void CloseSystemWindow(SystemWindow systemWindow)
 		{
+			// Prevent our call to SystemWindow.Close from recursing
+			if (this.winformAlreadyClosing)
+			{
+				return;
+			}
+
 			var rootWindow = allOpenSystemWindows.LastOrDefault();
 			if ((systemWindow == rootWindow && SingleWindowMode)
 				|| (systemWindow == MainWindowsFormsWindow.systemWindow && !SingleWindowMode))


errors on installation should halt the whole install

--- PowerShell.Module/Cmdlets/InstallPackage.cs
+++ PowerShell.Module/Cmdlets/InstallPackage.cs
@@ -221,7 +221,7 @@
                     // ShouldProcessPackageInstall(pkg.Name, pkg.Version, pkg.Source);
                     //} else {
                     if (ShouldProcessPackageInstall(pkg.Name, pkg.Version, pkg.Source)) {
-                        foreach (var installedPkg in provider.InstallPackage(pkg, this.ProviderSpecific(provider)).CancelWhen(_cancellationEvent.Token)) {
+                        foreach (var installedPkg in provider.InstallPackage(pkg, this).CancelWhen(_cancellationEvent.Token)) {
                             if (IsCanceled) {
                                 // if we're stopping, just get out asap.
                                 return false;


Applying Heightmap patch from Francis Chang, fixes display bugs and improves the overall visual quality

git-svn-id: baf6e02d125cf6f9bfcfe153b2eb83d6e1f5ace6@2172 52acb1d6-8a22-11de-b505-999d5b087335

--- Programs/examples/Heightmap/frmHeightmap.cs
+++ Programs/examples/Heightmap/frmHeightmap.cs
@@ -37,7 +37,7 @@

             // Build the picture boxes
             this.SuspendLayout();
-            for (int y = 0; y < 16; y++)
+            for (int y = 0; y < 16; y++) // Box 0,0 is on the top left
             {
                 for (int x = 0; x < 16; x++)
                 {
@@ -46,8 +46,8 @@
                     ((System.ComponentModel.ISupportInitialize)(box)).BeginInit();
                     box.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
                     box.Name = x + "," + y;
-                    box.Location = new System.Drawing.Point(x * 16, y * 16);
-                    box.Size = new System.Drawing.Size(16, 16);
+                    box.Location = new System.Drawing.Point(x * 18, y * 18);
+                    box.Size = new System.Drawing.Size(18, 18);
                     box.Visible = true;
                     box.MouseUp += new MouseEventHandler(box_MouseUp);
                     ((System.ComponentModel.ISupportInitialize)(box)).EndInit();
@@ -85,6 +85,11 @@
             LoginParams loginParams = Client.Network.DefaultLoginParams(FirstName, LastName, Password, "Heightmap",
                 "1.0.0");
             Client.Network.BeginLogin(loginParams);
+
+            this.SetDesktopLocation(1600, 0);
+            // FIXME: This really should be modified in frmHeightmap.Designer.cs, but the Prebuild bug is
+            // preventing that right now
+            this.SetClientSizeCore(18 * 16, 18 * 16);
         }

         private void box_MouseUp(object sender, MouseEventArgs e)
@@ -99,7 +104,7 @@
                         if (Client.Terrain.TerrainHeightAtPoint(Client.Network.CurrentSim.Handle,
                             x * 16 + e.X, y * 16 + e.Y, out height))
                         {
-                            MessageBox.Show(height.ToString());
+                            MessageBox.Show( string.Format("{0},{1}:{2}",x*16+e.X,255-(y*16+e.Y),height) );
                         }
                         else
                         {
@@ -140,21 +145,29 @@
             {
                 for (int xp = 0; xp < 16; xp++)
                 {
-                    float height = data[yp * 16 + xp];
-                    int colorVal = Helpers.FloatToByte(height, 0.0f, 60.0f);
-                    int lesserVal = (int)((float)colorVal * 0.75f);
+                    float height = data[(15-yp) * 16 + xp]; // data[0] is south west
                     Color color;
-
                     if (height >= simulator.WaterHeight)
-                        color = Color.FromArgb(lesserVal, colorVal, lesserVal);
+                    {
+                        float maxVal = (float)Math.Log(Math.Abs(512+1-simulator.WaterHeight),2);
+                        float lgHeight = (float)Math.Log(Math.Abs(height + 1 - simulator.WaterHeight), 2);
+                        int colorVal1 = Helpers.FloatToByte(lgHeight, simulator.WaterHeight, maxVal);
+                        int colorVal2 = Helpers.FloatToByte(height, simulator.WaterHeight, 25.0f);
+                        color = Color.FromArgb(255, colorVal2, colorVal1);
+                    }
                     else
-                        color = Color.FromArgb(lesserVal, lesserVal, colorVal);
-
-                    patch.SetPixel(xp, yp, color);
+                    {
+                        const float minVal = -5.0f;
+                        float maxVal = simulator.WaterHeight;
+                        int colorVal1 = Helpers.FloatToByte(height, -5.0f, minVal+(maxVal-minVal)*1.5f);
+                        int colorVal2 = Helpers.FloatToByte(height, -5.0f, maxVal);
+                        color = Color.FromArgb(colorVal1, colorVal2, 255);
+                    }
+                    patch.SetPixel(xp, yp, color); // 0, 0 is top left
                 }
             }

-            Boxes[x, y].Image = (System.Drawing.Image)patch;
+            Boxes[x, 15-y].Image = (System.Drawing.Image)patch;
         }

         private void frmHeightmap_FormClosing(object sender, FormClosingEventArgs e)
@@ -162,4 +175,4 @@
             Client.Network.Logout();
         }
     }
-}+}


Use viewmodel to store info in viewstate

--- R7.University/Controls/EditEduForms.ascx.cs
+++ R7.University/Controls/EditEduForms.ascx.cs
@@ -46,20 +46,17 @@
         {
             Module = module;

-            SetEduForms (eduForms);
+            var eduFormViewModels = EduFormViewModel.GetBindableList (eduForms, ViewModelContext, false);

-            comboEduForm.DataSource = EduFormViewModel.GetBindableList (eduForms, ViewModelContext, false);
+            ViewState ["eduForms"] = XmlSerializationHelper.Serialize (eduFormViewModels.ToList ());
+
+            comboEduForm.DataSource = eduFormViewModels;
             comboEduForm.DataBind ();
         }

-        protected void SetEduForms (IEnumerable<EduFormInfo> eduForms)
+        protected EduFormViewModel GetEduForm (int eduFormId)
         {
-            ViewState ["eduForms"] = eduForms.ToList ();
-        }
-
-        protected EduFormInfo GetEduForm (int eduFormId)
-        {
-            var eduForms = (List<EduFormInfo>) ViewState ["eduForms"];
+            var eduForms = XmlSerializationHelper.Deserialize<List<EduFormViewModel>> (ViewState ["eduForms"]);
             return eduForms.Single (ef => ef.EduFormID == eduFormId);
         }


- Fixed NullReferenceException - Byte arrays have to be escaped too

--- RestSharp.Portable/PostParametersContent.cs
+++ RestSharp.Portable/PostParametersContent.cs
@@ -34,13 +34,7 @@

                 var bytes = v as byte[];
                 if (bytes != null)
-                {
-#if PCL || SILVERLIGHT
-                    return bytes.Length;
-#else
-                    return bytes.LongLength;
-#endif
-                }
+                    return UrlUtility.ComputeLength(bytes);

                 s = string.Format("{0}", v);
                 return UrlUtility.ComputeLength(s, _parameter.Encoding ?? ParameterExtensions.DefaultEncoding);
@@ -58,7 +52,7 @@

                 var bytes = v as byte[];
                 if (bytes != null)
-                    return bytes;
+                    return UrlUtility.EscapeToBytes(bytes);

                 s = string.Format("{0}", v);
                 return UrlUtility.EscapeToBytes(s, _parameter.Encoding ?? ParameterExtensions.DefaultEncoding);
@@ -105,9 +99,9 @@
                 {
                     get
                     {
-                        if (_parameter == null)
+                        if (_parameter != null)
                             return _parameter.GetFullDataLength();
-                        return 1;
+                        return _data.Length;
                     }
                 }


Fix typo in class declaration.

Fix typo in class declaration.

--- Rules/UseDeclaredVarsMoreThanAssignments.cs
+++ Rules/UseDeclaredVarsMoreThanAssignments.cs
@@ -20,10 +20,10 @@
 namespace Microsoft.Windows.PowerShell.ScriptAnalyzer.BuiltinRules
 {
     /// <summary>
-    /// UseDeclaredVarsMoreThanAssigments: Analyzes the ast to check that variables are used in more than just their assignment.
+    /// UseDeclaredVarsMoreThanAssignments: Analyzes the ast to check that variables are used in more than just their assignment.
     /// </summary>
     [Export(typeof(IScriptRule))]
-    public class UseDeclaredVarsMoreThanAssigments : IScriptRule
+    public class UseDeclaredVarsMoreThanAssignments : IScriptRule
     {
         /// <summary>
         /// AnalyzeScript: Analyzes the ast to check that variables are used in more than just there assignment.


Fix thread related InvalidOperationException's

-Could not get RxApp.MainThreadScheduler to work with GoToElementState
so added a manual call to Dispatcher.BeginInvoke
- Adding observe on MainThreadScheduler fixed an exception related to
setting reminder opacity property

--- SaveAllTheTime/Views/CommitHintView.xaml.cs
+++ SaveAllTheTime/Views/CommitHintView.xaml.cs
@@ -21,10 +21,12 @@

 namespace SaveAllTheTime.Views
 {
+    using System.Reactive.Concurrency;
+
     /// <summary>
     /// Interaction logic for CommitHintView.xaml
     /// </summary>
-    public partial class CommitHintView : UserControl, IViewFor<CommitHintViewModel>
+    public partial class CommitHintView : UserControl, IViewFor<CommitHintViewModel>, IEnableLogger
     {
         public CommitHintView()
         {
@@ -38,12 +40,12 @@

             this.WhenAny(x => x.ViewModel.HintState, x => x.Value.ToString())
                 .Throttle(TimeSpan.FromMilliseconds(500), RxApp.MainThreadScheduler)
-                .Subscribe(x => VisualStateManager.GoToElementState(visualRoot, x, true));
+                .Subscribe(applyElementVisualState);

             this.WhenAnyObservable(x => x.ViewModel.RefreshStatus.ItemsInflight)
                 .Select(x => x != 0 ? "Loading" : "NotLoading")
                 .ObserveOn(RxApp.MainThreadScheduler)
-                .Subscribe(x => VisualStateManager.GoToElementState(visualRoot, x, true));
+                .Subscribe(applyElementVisualState);

             this.BindCommand(ViewModel, x => x.Open, x => x.Open);

@@ -59,17 +61,18 @@

             this.WhenAny(x => x.ViewModel.SuggestedOpacity, x => x.Value)
                 .Select(x => x + 0.25)
+                .ObserveOn(RxApp.MainThreadScheduler)
                 .BindTo(this, x => x.visualRoot.Opacity);

             this.WhenAny(x => x.IsMouseOver, x => x.Value ? "Hover" : "NoHover")
                 .ObserveOn(RxApp.MainThreadScheduler)
-                .Subscribe(x => VisualStateManager.GoToElementState(visualRoot, x, true));
+                .Subscribe(applyElementVisualState);

             this.WhenAnyObservable(
                     x => x.ViewModel.RefreshLastCommitTime.ThrownExceptions,
                     x => x.ViewModel.RefreshStatus.ThrownExceptions)
                 .ObserveOn(RxApp.MainThreadScheduler)
-                .Subscribe(_ => VisualStateManager.GoToElementState(visualRoot, "Error", true));
+                .Subscribe(_ => applyElementVisualState("Error"));

             Observable.FromEventPattern<MouseButtonEventHandler, MouseButtonEventArgs>(x => visualRoot.PreviewMouseUp += x, x => visualRoot.PreviewMouseUp += x)
                 .Where(x => x.EventArgs.ChangedButton == MouseButton.Right)
@@ -125,5 +128,10 @@
             get { return ViewModel; }
             set { ViewModel = (CommitHintViewModel)value; }
         }
+
+        void applyElementVisualState(string state)
+        {
+            Dispatcher.BeginInvoke(new Action(() => VisualStateManager.GoToElementState(visualRoot, state, true)));
+        }
     }
 }


hotfix for losing active character when using hero editor to test

--- src/DiabloInterface/D2/D2DataReader.cs
+++ src/DiabloInterface/D2/D2DataReader.cs
@@ -249,7 +249,7 @@
             if (characters.TryGetValue(playerName, out character))
             {
                 // We were just in the title screen and came back to a new character.
-                bool ResetOnBeginning = wasInTitleScreen && character.Experience == 0;
+                bool ResetOnBeginning = wasInTitleScreen && experience == 0;

                 // If we lost experience on level 1 we have a reset. Level 1 check is important or
                 // this might think we reset when losing experience in nightmare or hell after dying.


Raise APITimeout to 10 seconds

Raise APITimeout to 10 seconds

--- src/Discord.Net/DiscordClientConfig.cs
+++ src/Discord.Net/DiscordClientConfig.cs
@@ -29,7 +29,7 @@
 		private int _failedReconnectDelay = 10000;
 		/// <summary> Max time (in milliseconds) to wait for an API request to complete. </summary>
 		public int APITimeout { get { return _apiTimeout; } set { SetValue(ref _apiTimeout, value); } }
-		private int _apiTimeout = 5000;
+		private int _apiTimeout = 10000;

 		/// <summary> Gets or sets the time (in milliseconds) to wait when the websocket's message queue is empty before checking again. </summary>
 		public int WebSocketInterval { get { return _webSocketInterval; } set { SetValue(ref _webSocketInterval, value); } }


KOHelper.GetDataContextPath made public

KOHelper.GetDataContextPath made public

--- src/DotVVM.Framework/KnockoutHelper.cs
+++ src/DotVVM.Framework/KnockoutHelper.cs
@@ -87,7 +87,7 @@
             return condition + postBackCall + returnStatement;
         }

-        private static IEnumerable<string> GetContextPath(DotvvmControl control)
+        public static IEnumerable<string> GetContextPath(DotvvmControl control)
         {
             while (control != null)
             {


Created author file KurtRoggen.cs

Created author file KurtRoggen.cs

Added new author (information).


minor fix

minor fix

--- test/OpenCvSharp.Tests/ExceptionTest.cs
+++ test/OpenCvSharp.Tests/ExceptionTest.cs
@@ -1,10 +1,7 @@
-using System;
-using Xunit;
+using Xunit;

 namespace OpenCvSharp.Tests
 {
-    // ReSharper disable InconsistentNaming
-
     public class ExceptionTest : TestBase
     {
         [Fact]
@@ -24,4 +21,4 @@
             Assert.Equal(ErrorCode.StsAssert, ex.Status);
         }
     }
-}+}


Console.

Console.

--- shipping/Program.cs
+++ shipping/Program.cs
@@ -9,7 +9,8 @@
 	{
 		public static void Main (string[] args)
 		{
-			Console.WriteLine ("Hello World!");
+			Console.WriteLine ("Event sourcing demo. See http://martinfowler.com/eaaDev/EventSourcing.html");
+			Console.WriteLine ("Usage: Set breakpoints, run the tests, step through the code.");
 		}
 	}
 }


Update src/Lime.Messaging/Contents/Invoice.cs

Co-Authored-By: nickbom <d38161afe125f7fd79e29e26a98e39ae9741086e@hotmail.com>

--- src/Lime.Messaging/Contents/Invoice.cs
+++ src/Lime.Messaging/Contents/Invoice.cs
@@ -112,6 +112,6 @@
         /// The contact billed to
         /// </value>
         [DataMember(Name = BILLED_TO_KEY)]
-        public Contact BilledTo { get; set; }
+        public Contact BillTo { get; set; }
     }
-}+}


修正分组bug

修正分组bug


Refs #6 Update area index calculation algorithm to C:S 1.2 version. Adjust array size.


Refs #7 Fix exception on loading modified imported theme


Fixing initial sizing of IconPresenter

Fixing initial sizing of IconPresenter


new file extension rule

new file extension rule


Basic registration controler implementation for testing.


Adding subnet address generator

Adding subnet address generator


Remove space between -c and comment string with oggCat

Might fix oggCat on linux


Rename confusingly named "mostRecentYearToKeep" variable in DataRepository.DeleteOldData() method


release 1.51

release 1.51

--- SRNicoNico/ViewModels/MainWindowViewModel.cs
+++ SRNicoNico/ViewModels/MainWindowViewModel.cs
@@ -14,7 +14,7 @@
         //現在のバージョン
         public double CurrentVersion {

-            get { return 1.50; }
+            get { return 1.51; }
         }

         #region Title変更通知プロパティ


Revert "Fix Issue With Library File Names Are Being Appended Regardless "

This will needed to be reworked and possibly done in a different way.

--- Sharpmake.Generators/VisualStudio/Vcxproj.cs
+++ Sharpmake.Generators/VisualStudio/Vcxproj.cs
@@ -900,7 +900,7 @@
                 if (extension.StartsWith(".", StringComparison.Ordinal))
                     extension = extension.Substring(1);

-                if (string.IsNullOrWhiteSpace(extension))
+                if (extension != platformVcxproj.StaticLibraryFileExtension && extension != platformVcxproj.SharedLibraryFileExtension)
                 {
                     decoratedName = libPrefix + libraryFile;
                     if (!string.IsNullOrEmpty(platformVcxproj.StaticLibraryFileExtension))


Add step for submission with date

Add step for submission with date


- released v3.4.3

- released v3.4.3

--- Shuttle.ESB.Tests/Properties/AssemblyInfo.cs
+++ Shuttle.ESB.Tests/Properties/AssemblyInfo.cs
@@ -17,11 +17,11 @@
 [assembly: AssemblyTitle("Shuttle.ESB.Tests for .NET Framework 4.5.1")]
 #endif

-[assembly: AssemblyVersion("3.4.2.0")]
+[assembly: AssemblyVersion("3.4.3.0")]
 [assembly: AssemblyCopyright("Copyright © Eben Roux 2010-2014")]
 [assembly: AssemblyProduct("Shuttle.ESB")]
 [assembly: AssemblyCompany("Shuttle")]
 [assembly: AssemblyConfiguration("Release")]
-[assembly: AssemblyInformationalVersion("3.4.2")]
+[assembly: AssemblyInformationalVersion("3.4.3")]
 [assembly: ComVisible(false)]


Update 04-Query-Test.cs

Update 04-Query-Test.cs

Updated as per P58681876

--- .dotnet/example_code/DynamoDB/TryDax/04-Query-Test.cs
+++ .dotnet/example_code/DynamoDB/TryDax/04-Query-Test.cs
@@ -1,27 +1,11 @@
-// snippet-sourcedescription:[ ]
-// snippet-service:[dynamodb]
-// snippet-keyword:[dotNET]
-// snippet-keyword:[Amazon DynamoDB]
-// snippet-keyword:[Code Sample]
-// snippet-keyword:[ ]
-// snippet-sourcetype:[full-example]
-// snippet-sourcedate:[ ]
-// snippet-sourceauthor:[AWS]
 // snippet-start:[dynamodb.dotNET.trydax.04-Query-Test]

-/**
- * Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
- *
- * This file is licensed under the Apache License, Version 2.0 (the "License").
- * You may not use this file except in compliance with the License. A copy of
- * the License is located at
- *
- * http://aws.amazon.com/apache2.0/
- *
- * This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
- * CONDITIONS OF ANY KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations under the License.
-*/
+// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
+// SPDX-License-Identifier: Apache-2.0
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
 using Amazon.Runtime;
 using Amazon.DAX;
 using Amazon.DynamoDBv2.Model;
@@ -30,10 +14,11 @@
 {
     class Program
     {
-        static void Main(string[] args)
+        public static async Task Main(string[] args)
         {
             string endpointUri = args[0];
-            Console.WriteLine("Using DAX client - endpointUri=" + endpointUri);
+            Console.WriteLine($"Using DAX client - endpointUri={endpointUri}");
+

             var clientConfig = new DaxClientConfig(endpointUri)
             {
@@ -62,13 +47,14 @@
                             {":skval2", new AttributeValue {N = sk2.ToString()} }
                     }
                 };
-                var response = client.QueryAsync(request).Result;
-                Console.WriteLine(i + ": Query succeeded");
+                var response = await client.QueryAsync(request);
+                Console.WriteLine($"{i}: Query succeeded");
+
             }

             var endTime = DateTime.Now;
             TimeSpan timeSpan = endTime - startTime;
-            Console.WriteLine("Total time: " + timeSpan.TotalMilliseconds + " milliseconds");
+            Console.WriteLine($"Total time: {timeSpan.TotalMilliseconds} milliseconds");

             Console.WriteLine("Hit <enter> to continue...");
             Console.ReadLine();


Make Notifier thread-safe

Make Notifier thread-safe

--- Entities/Notifier.cs
+++ Entities/Notifier.cs
@@ -5,8 +5,13 @@
     /// Wraps the notification pattern, where something happens multiple times but the listeners
     /// should only be notified once.
     /// </summary>
+    /// <remarks>
+    /// The Notifier API is thread-safe.
+    /// </remarks>
     /// <typeparam name="ParamType">The type of the parameter.</typeparam>
     public class Notifier<ParamType> {
+        private object _lock = new object();
+
         /// <summary>
         /// Have we already notified the listeners?
         /// </summary>
@@ -29,17 +34,21 @@
         /// Resets this notifier so that it will notify listeners again.
         /// </summary>
         public void Reset() {
-            _activated = false;
+            lock (_lock) {
+                _activated = false;
+            }
         }

         /// <summary>
-        /// Notify the listeners if they have no already been notified.
+        /// Notify the listeners if they have not already been notified.
         /// </summary>
         public void Notify() {
-            if (_activated == false) {
-                _activated = true;
-                if (Listener != null) {
-                    Listener(_notificationParam);
+            lock (_lock) {
+                if (_activated == false) {
+                    _activated = true;
+                    if (Listener != null) {
+                        Listener(_notificationParam);
+                    }
                 }
             }
         }


Fix titles

Fix titles

--- amdl2maml/Converter.Console/Program.cs
+++ amdl2maml/Converter.Console/Program.cs
@@ -105,39 +105,50 @@

         private static async Task<CancellationToken> ConvertAsync(Parameters parameters, CancellationToken cancellationToken)
         {
+            var titles = new[]
+            {
+                "Prepping",
+                "Reading",
+                "Indexing",
+                "Parsing",
+                "Updating",
+                "Mapping",
+                "Writing",
+            };
+
             using (var stream = System.Console.OpenStandardOutput())
             using (var writer = new StreamWriter(stream))
             {
-                var runner = new Runner(parameters, cancellationToken, writer);
+                var runner = new Runner(parameters, cancellationToken, writer, titles);

                 var startTime = DateTime.Now;

                 await runner.WritePrologueAsync(startTime);

                 var paths = await runner.RunAsync((t, _) =>
-                    GetPathsAsync(parameters), "PREPPING");
+                    GetPathsAsync(parameters));

                 var srcPath = paths.Source;
                 var destPath = paths.Destination;
                 var layoutPath = paths.ContentLayout;

                 var title2id = await runner.RunAsync((t, p) =>
-                    LayoutIndexer.IndexAsync(layoutPath, t, p), "READING ");
+                    LayoutIndexer.IndexAsync(layoutPath, t, p));

                 var topics = await runner.RunAsync((t, p) =>
-                    FolderIndexer.IndexAsync(srcPath, t, p), "INDEXING");
+                    FolderIndexer.IndexAsync(srcPath, t, p));

                 topics = await runner.RunAsync((t, p) =>
-                    TopicParser.ParseAsync(topics, srcPath, t, p), "PARSING ");
+                    TopicParser.ParseAsync(topics, srcPath, t, p));

                 topics = await runner.RunAsync((t, _) =>
-                    UpdateAsync(srcPath, title2id, topics), "UPDATING");
+                    UpdateAsync(srcPath, title2id, topics));

                 var name2topic = await runner.RunAsync((t, _) =>
-                    MapAsync(topics), "MAPPING ");
+                    MapAsync(topics));

                 await runner.RunAsync((t, p) =>
-                    ConvertAsync(srcPath, destPath, topics, name2topic, t, p), "WRITING ");
+                    ConvertAsync(srcPath, destPath, topics, name2topic, t, p));

                 var endTime = DateTime.Now;

@@ -176,15 +187,21 @@
         private readonly string durationFormat;
         private readonly CancellationToken cancellationToken;
         private readonly TextWriter writer;
+        private readonly string[] titles;
+        private readonly int maxLength;
+        private int index;
         private readonly SemaphoreSlim _semaphore;

-        public Runner(Parameters parameters, CancellationToken cancellationToken, TextWriter writer)
+        public Runner(Parameters parameters, CancellationToken cancellationToken, TextWriter writer, string[] titles)
         {
             this.verbosity = parameters.Verbosity;
             this.timeFormat = GetTimeFormat(parameters);
             this.durationFormat = GetDurationFormat(parameters);
             this.cancellationToken = cancellationToken;
             this.writer = writer;
+            this.titles = titles;
+            this.maxLength = titles.Max(s => s.Length);
+            this.index = 0;
             this._semaphore = new SemaphoreSlim(1);
         }

@@ -203,15 +220,19 @@
             get { return durationFormat; }
         }

-        public async Task<TResult> RunAsync<TResult>(Func<CancellationToken, IProgress<Indicator>, Task<TResult>> taskFactory, string title)
-        {
+        public async Task<TResult> RunAsync<TResult>(Func<CancellationToken, IProgress<Indicator>, Task<TResult>> taskFactory)
+        {
+            var title = titles[index++];
+            var indent = GetIndent(title);
+            var titleUpper = title.ToUpperInvariant() + indent;
+
             var stepStartTime = DateTime.Now;

-            await WriteStepPrologueAsync(title, stepStartTime);
+            await WriteStepPrologueAsync(titleUpper, index, titles.Length, stepStartTime);

             Progress<Indicator> progress;
             EventHandler<Indicator> handler;
-            StartProgress(title, out progress, out handler);
+            StartProgress(title + indent, out progress, out handler);

             var result = await taskFactory(cancellationToken, progress);

@@ -219,7 +240,7 @@

             StopProgress(progress, handler);

-            await WriteStepEpilogueAsync(title, stepStartTime, stepEndTime);
+            await WriteStepEpilogueAsync(titleUpper, stepStartTime, stepEndTime);

             return result;
         }
@@ -251,10 +272,14 @@
             Write(DateTime.Now);
             Write(" {0:000.00}%  ", 100.0 * value.Index / value.Count);
             Write(title);
-            Write(" ");
             Write(value.Name);
             WriteLine();
             _semaphore.Release();
+        }
+
+        private string GetIndent(string title)
+        {
+            return new string(Enumerable.Repeat(' ', maxLength - title.Length + 1).ToArray());
         }

         #endregion Progress
@@ -274,7 +299,7 @@
             _semaphore.Release();
         }

-        private const string EpilogueFormat = "TOTAL    {0}";
+        private const string EpilogueFormat = " TOTAL    {0}";

         public async Task WriteEpilogueAsync(DateTime startTime, DateTime endTime)
         {
@@ -286,23 +311,23 @@
             _semaphore.Release();
         }

-        private const string StepPrologueFormat = " STARTED  {0}";
-
         #endregion Prologue/Epilogue

         #region Step

-        private async Task WriteStepPrologueAsync(string title, DateTime stepStartTime)
+        private const string StepPrologueFormat = " STEP {1}/{2} {0}";
+
+        private async Task WriteStepPrologueAsync(string title, int index, int count, DateTime stepStartTime)
         {
             if (Verbosity < Verbosity.Normal)
                 return;
             await _semaphore.WaitAsync(cancellationToken);
             await WriteAsync(stepStartTime);
-            await WriteLineAsync(string.Format(StepPrologueFormat, title));
+            await WriteLineAsync(string.Format(StepPrologueFormat, title, index, count));
             _semaphore.Release();
         }

-        private const string StepEpilogueFormat = " FINISHED {1} IN {0}";
+        private const string StepEpilogueFormat = " FINISHED {1}IN {0}";

         private async Task WriteStepEpilogueAsync(string title, DateTime stepStartTime, DateTime stepEndTime)
         {


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.23.3889.20210403164315-master-b45e62c

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "0fe6586434f29e9d1e577f2b05ff7a2792e8d704";
+        public static string Commit = "b45e62ce7236a8ab003eb03621cda345844781bc";

         public static string Version = "1.23";
-        public static string Build   = "3888";
+        public static string Build   = "3889";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 04;
         public static int BuildDay    = 03;
         public static int BuildHour   = 16;
-        public static int BuildMinute = 39;
-        public static int BuildSecond = 37;
+        public static int BuildMinute = 43;
+        public static int BuildSecond = 15;
     }
 }


Fix for showing message.

Fix for showing message.

--- Applications/Rss/Reader/ViewModels/CommonViewModel.cs
+++ Applications/Rss/Reader/ViewModels/CommonViewModel.cs
@@ -140,9 +140,8 @@
         /* ----------------------------------------------------------------- */
         protected void Send(Exception err)
         {
-            var user = err.GetType() == typeof(ArgumentException);
-            var msg = user ? err.Message : $"{err.Message} ({err.GetType().Name})";
-            var ss = new System.Text.StringBuilder();
+            var msg = $"{err.Message} ({err.GetType().Name})";
+            var ss  = new System.Text.StringBuilder();

             ss.AppendLine(Properties.Resources.ErrorUnexpected);
             ss.AppendLine();


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.40.4218.20220513175248-master-41ad952

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "c2c7b93458f7b7adf9c493194dab4cad1cabd1a0";
+        public static string Commit = "41ad9526dc8dc92a97b5c34d6b06e7fc05b4d654";

         public static string Version = "1.40";
-        public static string Build   = "4216";
+        public static string Build   = "4218";

         public static int BuildYear   = 2022;
         public static int BuildMonth  = 05;
         public static int BuildDay    = 13;
         public static int BuildHour   = 17;
-        public static int BuildMinute = 38;
-        public static int BuildSecond = 37;
+        public static int BuildMinute = 52;
+        public static int BuildSecond = 48;
     }
 }


[ci skip] Updating ServerBuildInfo_Dynamic.cs

1.25.3968.20210628185514-master-70a6f18

--- Source/ACE.Server/ServerBuildInfo_Dynamic.cs
+++ Source/ACE.Server/ServerBuildInfo_Dynamic.cs
@@ -4,17 +4,17 @@
     public static partial class ServerBuildInfo
     {
         public static string Branch = "master";
-        public static string Commit = "7d3befd0bff1e012cbab70ea383f74cf1291a697";
+        public static string Commit = "70a6f18c03996c4ff9ead9d208d84960db4c4017";

         public static string Version = "1.25";
-        public static string Build   = "3966";
+        public static string Build   = "3968";

         public static int BuildYear   = 2021;
         public static int BuildMonth  = 06;
-        public static int BuildDay    = 17;
-        public static int BuildHour   = 00;
-        public static int BuildMinute = 37;
-        public static int BuildSecond = 25;
+        public static int BuildDay    = 28;
+        public static int BuildHour   = 18;
+        public static int BuildMinute = 55;
+        public static int BuildSecond = 14;
     }
 }


test commit

test commit

--- Assets/CleaveFramework/SceneViews/LoadingSceneView.cs
+++ Assets/CleaveFramework/SceneViews/LoadingSceneView.cs
@@ -6,6 +6,7 @@
     {
         public override void Initialize()
         {
+            // test
         }

     }


- Reverted a bit of code - not working/doesn't seem right

--- Source/Mosa.Runtime.TypeSystem/TypeModule.cs
+++ Source/Mosa.Runtime.TypeSystem/TypeModule.cs
@@ -1102,8 +1102,17 @@

 			foreach (var genericType in typeSpecs.OfType<CilGenericType>().Where(t => t.BaseGenericType == baseGenericType && t.ContainsOpenGenericParameters))
 			{
-				if (genericType.GenericArguments.First(x => !x.IsOpenGenericParameter) != null)
-					return genericType;
+				//if (genericType.GenericArguments.First(x => !x.IsOpenGenericParameter) != null)
+				//    return genericType;
+
+				foreach (var sigType in genericType.GenericArguments)
+				{
+					if (!sigType.IsOpenGenericParameter)
+					{
+						return genericType;
+					}
+				}
+
 			}

 			return null;


Update the CI process to log a warning/error when there's an unknown project failure

--- Assets/MRTK/Tools/MSBuild/Scripts/UnityProjectInfo.cs
+++ Assets/MRTK/Tools/MSBuild/Scripts/UnityProjectInfo.cs
@@ -164,6 +164,7 @@

             if (!asmDefInfoMap.TryGetValue(projectKey, out AssemblyDefinitionInfo assemblyDefinitionInfo))
             {
+                Debug.LogError($"Can't find an asmdef for project: {projectKey}, this project may need to be to added to the PackageReferencesUnity2019 exclusion list");
                 throw new InvalidOperationException($"Can't find an asmdef for project: {projectKey}");
             }


no longer using Marshal.AllocHGlobal as it was causing strange test failures with the Resharper test runner

--- Source/SafetySharp/Utilities/MemoryBuffer.cs
+++ Source/SafetySharp/Utilities/MemoryBuffer.cs
@@ -30,6 +30,16 @@
 	/// </summary>
 	internal sealed unsafe class MemoryBuffer : DisposableObject
 	{
+		/// <summary>
+		///   The garbage collector handle that pins the memory to a fixed location.
+		/// </summary>
+		private GCHandle _handle;
+
+		/// <summary>
+		///   The underlying memory.
+		/// </summary>
+		private byte[] _memory;
+
 		/// <summary>
 		///   Initializes a new instance.
 		/// </summary>
@@ -67,16 +77,20 @@
 			if (sizeInBytes <= SizeInBytes)
 				return;

-			var oldBuffer = Pointer;
-			var newBuffer = Marshal.AllocHGlobal(sizeInBytes).ToPointer();
+			var oldBuffer = _memory;
+			var newBuffer = new byte[sizeInBytes];

 			if (oldBuffer != null)
-				Buffer.MemoryCopy(source: oldBuffer, destination: newBuffer, destinationSizeInBytes: sizeInBytes, sourceBytesToCopy: SizeInBytes);
+				Array.Copy(oldBuffer, newBuffer, SizeInBytes);

-			Pointer = newBuffer;
+			if (_handle.IsAllocated)
+				_handle.Free();
+
+			_memory = newBuffer;
+			_handle = GCHandle.Alloc(newBuffer, GCHandleType.Pinned);
+
+			Pointer = _handle.AddrOfPinnedObject().ToPointer();
 			SizeInBytes = sizeInBytes;
-
-			Marshal.FreeHGlobal(new IntPtr(oldBuffer));
 		}

 		/// <summary>
@@ -85,7 +99,8 @@
 		/// <param name="disposing">If true, indicates that the object is disposed; otherwise, the object is finalized.</param>
 		protected override void OnDisposing(bool disposing)
 		{
-			Marshal.FreeHGlobal(new IntPtr(Pointer));
+			if (_handle.IsAllocated)
+				_handle.Free();
 		}
 	}
 }


fixes

fixes

- FIX: removed optional parameters for compatibility reasons (C# 3.0)

--- MarcelJoachimKloubert.Blog.Net35/Serialization/Xml/XmlObjectSerializer.cs
+++ MarcelJoachimKloubert.Blog.Net35/Serialization/Xml/XmlObjectSerializer.cs
@@ -152,27 +152,65 @@

         #endregion Properties

-        #region Methods (11)
-
-        // Public Methods (6)
+        #region Methods (13)
+
+        // Public Methods (9)
+
+        /// <summary>
+        /// Erzeugt ein Wörterbuch aus XML-Daten.
+        /// </summary>
+        /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
+        /// <returns>Das Wörterbuch mit den Werten.</returns>
+        public static Dictionary<string, object> FromXml(IEnumerable<char> xml)
+        {
+            return FromXml(xml, new __IgnoreCaseEqualityComparer());
+        }
+
+        /// <summary>
+        /// Erzeugt ein Wörterbuch aus XML-Daten.
+        /// </summary>
+        /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
+        /// <returns>Das Wörterbuch mit den Werten.</returns>
+        public static Dictionary<string, object> FromXml(XmlNode xml)
+        {
+            return FromXml(xml, new __IgnoreCaseEqualityComparer());
+        }
+
+        /// <summary>
+        /// Erzeugt ein Wörterbuch aus XML-Daten.
+        /// </summary>
+        /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
+        /// <returns>Das Wörterbuch mit den Werten.</returns>
+        public static Dictionary<string, object> FromXml(XNode xml)
+        {
+            return FromXml(xml, new __IgnoreCaseEqualityComparer());
+        }

         /// <summary>
         /// Erzeugt ein Wörterbuch aus XML-Daten.
         /// </summary>
         /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
         /// <param name="keyComparer">
-        /// Der optionale, eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
+        /// Der eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
         /// zurückgegeben Wörterbuchs vergleicht.
         /// </param>
         /// <returns>Das Wörterbuch mit den Werten.</returns>
+        /// <exception cref="ArgumentNullException">
+        /// <paramref name="keyComparer" /> ist eine <see langword="null" /> Referenz.
+        /// </exception>
         /// <remarks>
         /// Ist <paramref name="keyComparer" /> eine <see langword="null" /> Referenz, wird ein
         /// Standard <see cref="IEqualityComparer{T}" /> Objekt genutzt, das die Schlüssel nicht
         /// nach Groß- und Kleinschreibung vergleicht.
         /// </remarks>
         public static Dictionary<string, object> FromXml(IEnumerable<char> xml,
-                                                         IEqualityComparer<string> keyComparer = null)
-        {
+                                                         IEqualityComparer<string> keyComparer)
+        {
+            if (keyComparer == null)
+            {
+                throw new ArgumentNullException("keyComparer");
+            }
+
             if (xml != null)
             {
                 var strXml = AsString(xml).Trim();
@@ -183,7 +221,7 @@
                 }
             }

-            return new Dictionary<string, object>(GetEqualityComparer(keyComparer));
+            return new Dictionary<string, object>(keyComparer);
         }

         /// <summary>
@@ -191,17 +229,20 @@
         /// </summary>
         /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
         /// <param name="keyComparer">
-        /// Der optionale, eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
+        /// Der eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
         /// zurückgegeben Wörterbuchs vergleicht.
         /// </param>
         /// <returns>Das Wörterbuch mit den Werten.</returns>
+        /// <exception cref="ArgumentNullException">
+        /// <paramref name="keyComparer" /> ist eine <see langword="null" /> Referenz.
+        /// </exception>
         /// <remarks>
         /// Ist <paramref name="keyComparer" /> eine <see langword="null" /> Referenz, wird ein
         /// Standard <see cref="IEqualityComparer{T}" /> Objekt genutzt, das die Schlüssel nicht
         /// nach Groß- und Kleinschreibung vergleicht.
         /// </remarks>
         public static Dictionary<string, object> FromXml(XmlNode xml,
-                                                         IEqualityComparer<string> keyComparer = null)
+                                                         IEqualityComparer<string> keyComparer)
         {
             return FromXml(xml != null ? xml.OuterXml : null,
                            keyComparer);
@@ -212,19 +253,27 @@
         /// </summary>
         /// <param name="xml">The XML-Daten aus denen das Wörterbuch erstellt werden soll.</param>
         /// <param name="keyComparer">
-        /// Der optionale, eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
+        /// Der eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
         /// zurückgegeben Wörterbuchs vergleicht.
         /// </param>
         /// <returns>Das Wörterbuch mit den Werten.</returns>
+        /// <exception cref="ArgumentNullException">
+        /// <paramref name="keyComparer" /> ist eine <see langword="null" /> Referenz.
+        /// </exception>
         /// <remarks>
         /// Ist <paramref name="keyComparer" /> eine <see langword="null" /> Referenz, wird ein
         /// Standard <see cref="IEqualityComparer{T}" /> Objekt genutzt, das die Schlüssel nicht
         /// nach Groß- und Kleinschreibung vergleicht.
         /// </remarks>
         public static Dictionary<string, object> FromXml(XNode xml,
-                                                         IEqualityComparer<string> keyComparer = null)
-        {
-            var result = new Dictionary<string, object>(GetEqualityComparer(keyComparer));
+                                                         IEqualityComparer<string> keyComparer)
+        {
+            if (keyComparer == null)
+            {
+                throw new ArgumentNullException("keyComparer");
+            }
+
+            var result = new Dictionary<string, object>(keyComparer);

             var xmlElement = ToXElement(xml);

@@ -515,7 +564,7 @@

             return result;
         }
-        // Private Methods (5)
+        // Private Methods (4)

         private static string AsString(IEnumerable<char> chars)
         {
@@ -535,11 +584,6 @@
             }

             return new string(chars.ToArray());
-        }
-
-        private static IEqualityComparer<string> GetEqualityComparer(IEqualityComparer<string> keyComparer)
-        {
-            return keyComparer ?? new __IgnoreCaseEqualityComparer();
         }

         private static string NormalizeXmlValue(string value)
@@ -597,7 +641,7 @@
         /// </exception>
         public static KeyValuePair<string, object>? XmlToKeyValuePair(XNode xml)
         {
-            return XmlToKeyValuePair(xml, null);
+            return XmlToKeyValuePair(xml, new __IgnoreCaseEqualityComparer());
         }

         /// <summary>
@@ -605,7 +649,7 @@
         /// </summary>
         /// <param name="xml">Dei XML-Daten.</param>
         /// <param name="keyComparer">
-        /// Der optionale, eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
+        /// Der eigene <see cref="IEqualityComparer{T}" />, der die Schlüssel des
         /// zurückgegeben Wörterbuchs vergleicht.
         /// </param>
         /// <returns>
@@ -613,12 +657,20 @@
         /// <paramref name="xml" /> vorhanden sind bzw. dieses ebenfalls <see langword="null" />
         /// ist.
         /// </returns>
+        /// <exception cref="ArgumentNullException">
+        /// <paramref name="keyComparer" /> ist eine <see langword="null" /> Referenz.
+        /// </exception>
         /// <exception cref="NotSupportedException">
         /// Die XML-Daten konnten nicht deserialisiert werden.
         /// </exception>
         public static KeyValuePair<string, object>? XmlToKeyValuePair(XNode xml,
                                                                       IEqualityComparer<string> keyComparer)
         {
+            if (keyComparer == null)
+            {
+                throw new ArgumentNullException("keyComparer");
+            }
+
             KeyValuePair<string, object>? result = null;

             var xmlElement = ToXElement(xml);
@@ -703,7 +755,7 @@

                     case TYPE_DICT:
                         {
-                            var dict = new Dictionary<string, object>(GetEqualityComparer(keyComparer));
+                            var dict = new Dictionary<string, object>(keyComparer);
                             foreach (var item in xmlElement.Elements(XML_ELEMENT_LISTITEM))
                             {
                                 var pair = XmlToKeyValuePair(item,


multi entries with same extension outername


Check the tenancyName parameter.

Check the tenancyName parameter.


Bug Fix: Format Exception when parsing guid key


Shlwapi.StrCmpLogicalW

Shlwapi.StrCmpLogicalW

--- Whitebell.Library/Win32Api.cs
+++ Whitebell.Library/Win32Api.cs
@@ -204,6 +204,25 @@
         }

         #endregion
+
+        #region StrCmpLogicalW (XP/Server 2003)
+
+        /// <summary>
+        /// Compares two Unicode strings.
+        /// Digits in the strings are considered as numerical content rather than text.
+        /// This test is not case-sensitive.
+        /// </summary>
+        /// <param name="psz1">A pointer to the first null-terminated string to be compared.</param>
+        /// <param name="psz2">A pointer to the second null-terminated string to be compared.</param>
+        /// <returns>Returns zero if the strings are identical.
+        /// Returns 1 if the string pointed to by psz1 has a greater value than that pointed to by psz2.
+        /// Returns -1 if the string pointed to by psz1 has a lesser value than that pointed to by psz2.
+        /// </returns>
+        [DllImport("shlwapi", CharSet = CharSet.Unicode, ExactSpelling = true)]
+        public static extern int StrCmpLogicalW(string psz1, string psz2);
+        // int StrCmpLogicalW(_In_ PCWSTR psz1, _In_ PCWSTR psz2);
+
+        #endregion
     }

     public static class Winmm


Filled out options to make more complete wrapper

--- Windows.Shell/ControlPanel.cs
+++ Windows.Shell/ControlPanel.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Runtime.InteropServices;
+using System.Text;
 using Vanara.Extensions;
 using static Vanara.PInvoke.Shell32;

@@ -10,50 +11,86 @@
 	{
 		private static SafeCP cp;

-		private static IOpenControlPanel CP => cp != null ? cp.icp : (cp = new SafeCP()).icp;
+		/// Gets a value indicating whether the most recent Control Panel view was Classic view.
+		/// <value>
+		/// <see langword="true"/> if the most recent Control Panel view was Classic view; otherwise, <see langword="false"/> for Category view.
+		/// </value>
+		public static bool IsClassicView => CP.GetCurrentView() == CPVIEW.CPVIEW_CLASSIC;
+
+		private static SafeCP CP => cp ?? (cp = new SafeCP());

 		/// Gets the path of a Control Panel item.
 		/// <param name="item">The Control Panel item.</param>
 		/// <returns>The path.</returns>
-		public static string GetPath(ControlPanelItem item) => GetPath(item.CanonicalName());
+		public static string GetPath(ControlPanelItem item) => CP.GetPath(item.CanonicalName());

 		/// Gets the path of a Control Panel GUID.
 		/// <param name="item">The Control Panel GUID.</param>
 		/// <returns>The path.</returns>
-		public static string GetPath(Guid item) => GetPath(item.ToString());
+		public static string GetPath(Guid item) => CP.GetPath(item.ToString());
+
+		/// Gets the path of a Control Panel item.
+		/// <param name="item">The Control Panel item's canonical name.</param>
+		/// <returns>The path.</returns>
+		public static string GetPath(string item) => CP.GetPath(item);
+
+		/// Opens the Control Panel.
+		/// <returns><see langword="true"/> if the Control Panel has been opened. <see langword="false"/> if an error prevented opening.</returns>
+		public static bool Open() => CP.Open();

 		/// Opens the specified Control Panel item.
 		/// <param name="item">The Control Panel item.</param>
 		/// <param name="page">Optional. The Control Panel page.</param>
+		/// <returns>
+		/// <see langword="true"/> if this item is supported and has been opened. <see langword="false"/> if an error prevented opening or
+		/// the item or page was unsupported on this OS.
+		/// </returns>
 		/// <exception cref="ArgumentOutOfRangeException">page</exception>
-		public static void Open(ControlPanelItem item, string page = null)
+		public static bool Open(ControlPanelItem item, string page = null)
 		{
 			if (page != null && Array.IndexOf(item.ValidPages(), page) == -1) throw new ArgumentOutOfRangeException(nameof(page));
-			// TODO: handle minOsVer gracefully
-			CP.Open(item.CanonicalName(), page, null);
+			return CP.Open(item.CanonicalName(), page);
 		}

-		private static string GetPath(string item)
-		{
-			var sb = new System.Text.StringBuilder(1024);
-			CP.GetPath(item, sb, (uint)sb.Capacity);
-			return sb.ToString();
-		}
+		/// Opens the specified Control Panel item.
+		/// <param name="item">The Control Panel item's canonical name.</param>
+		/// <param name="page">Optional. The Control Panel page.</param>
+		/// <returns>
+		/// <see langword="true"/> if this item is supported and has been opened. <see langword="false"/> if an error prevented opening or
+		/// the item or page was unsupported on this OS.
+		/// </returns>
+		/// <exception cref="ArgumentOutOfRangeException">page</exception>
+		public static bool Open(string item, string page = null) => CP.Open(item, page);

 		private class SafeCP : IDisposable
 		{
 			internal readonly IOpenControlPanel icp;
 			private bool disposedValue = false;

-			public SafeCP() { icp = new IOpenControlPanel(); }
+			public SafeCP() => icp = (IOpenControlPanel)new OpenControlPanel();

-			~SafeCP() { Dispose(false); }
+			~SafeCP()
+			{
+				Dispose(false);
+			}

 			public void Dispose()
 			{
 				Dispose(true);
 				GC.SuppressFinalize(this);
 			}
+
+			public CPVIEW GetCurrentView() => icp.GetCurrentView();
+
+			public string GetPath(string pszName)
+			{
+				const int cchPath = 128;
+				var pszPath = new StringBuilder(cchPath, cchPath);
+				icp.GetPath(pszName, pszPath, cchPath).ThrowIfFailed();
+				return pszPath.ToString();
+			}
+
+			public bool Open(string pszName = null, string page = null, object punkSite = null) => icp.Open(pszName, page, punkSite).Succeeded;

 			protected virtual void Dispose(bool disposing)
 			{


more tests

more tests

--- Wire.Tests/CollectionTests.cs
+++ Wire.Tests/CollectionTests.cs
@@ -1,10 +1,6 @@
 using System;
 using System.Collections.Generic;
-using System.IO;
 using System.Linq;
-using System.Linq.Expressions;
-using System.Text;
-using System.Threading.Tasks;
 using Microsoft.VisualStudio.TestTools.UnitTesting;

 namespace Wire.Tests
@@ -13,25 +9,41 @@
     public class CollectionTests : TestBase
     {
         //TODO: HashSet causes stack overflow on serialization right now
-        [TestMethod,Ignore]
+        [TestMethod, Ignore]
         public void CanSerializeSet()
         {
-            var data = new[]
+            var expected = new HashSet<Something>
             {
-                new Something()
+                new Something
                 {
                     BoolProp = true,
-                    Else = new Else()
+                    Else = new Else
                     {
                         Name = "Yoho"
                     },
                     Int32Prop = 999,
                     StringProp = "Yesbox!"
                 },
-                new Something(), new Something(), null
+                new Something(),
+                new Something(),
+                null
             };

-            var expected = new HashSet<Something>(data);
+            Serialize(expected);
+            Reset();
+            var actual = Deserialize<HashSet<Something>>();
+            CollectionAssert.AreEqual(expected.ToList(), actual.ToList());
+        }
+
+        //TODO: Dictionary causes stack overflow on serialization right now
+        [TestMethod, Ignore]
+        public void CanSerializeDictionary()
+        {
+            var expected = new Dictionary<string, string>
+            {
+                ["abc"] = "def",
+                ["ghi"] = "jkl,"
+            };

             Serialize(expected);
             Reset();
@@ -44,13 +56,15 @@
         {
             var expected = new[]
             {
-                new Something()
+                new Something
                 {
-                    BoolProp = true, Else = new Else()
+                    BoolProp = true,
+                    Else = new Else
                     {
                         Name = "Yoho"
                     },
-                    Int32Prop = 999, StringProp = "Yesbox!"
+                    Int32Prop = 999,
+                    StringProp = "Yesbox!"
                 },
                 new Something(), new Something(), null
             }.ToList();
@@ -61,20 +75,21 @@
             CollectionAssert.AreEqual(expected, actual);
         }

-
         [TestMethod]
         public void CanSerializeArray()
         {
-            var expected = new[] { new Something()
+            var expected = new[]
             {
-                BoolProp = true,
-                Else = new Else()
+                new Something
                 {
-                    Name = "Yoho"
+                    BoolProp = true,
+                    Else = new Else
+                    {
+                        Name = "Yoho"
+                    },
+                    Int32Prop = 999,
+                    StringProp = "Yesbox!"
                 },
-                Int32Prop = 999,
-                StringProp = "Yesbox!"
-            },
                 new Something(),
                 new Something(), null
             };
@@ -87,11 +102,11 @@
         [TestMethod]
         public void CanSerializePrimitiveArray()
         {
-            var expected = new[] {DateTime.MaxValue, DateTime.MinValue, DateTime.Now, DateTime.Today,};
+            var expected = new[] {DateTime.MaxValue, DateTime.MinValue, DateTime.Now, DateTime.Today};
             Serialize(expected);
             Reset();
             var actual = Deserialize<DateTime[]>();
-            CollectionAssert.AreEqual(expected,actual);
+            CollectionAssert.AreEqual(expected, actual);
         }
     }
-}
+}


DataGridEx: add value when not registered

--- WpfUtility/DataGridEx.xaml.cs
+++ WpfUtility/DataGridEx.xaml.cs
@@ -60,7 +60,8 @@
                             _autoFilterItems[pi.Name] = new AutoFilterItem(pi.Name, this);
                         }
                         var value = pi.GetValue(item, null).SafeToString(null);
-                        if (value != null) {
+                        if (value != null &&
+                            !_autoFilterItems[pi.Name].Values.ContainsKey(value)) {
                             _autoFilterItems[pi.Name].Values[value] = true;
                         }
                     });


release

release


Now possible to add raw content without referencing a script.


more data

more data


Fix NRT warnings in UT.

Fix NRT warnings in UT.


CA-188150: Fixed the issue where some of  the VIF parameters were not preserved when editing VIF properties

Signed-off-by: Mihaela Stoica <be95049f8e30d921fc7e2579c00c48bd84c40606@citrix.com>

--- XenAdmin/Dialogs/VIFDialog.cs
+++ XenAdmin/Dialogs/VIFDialog.cs
@@ -274,7 +274,7 @@
         /// <returns></returns>
         public Proxy_VIF GetNewSettings()
         {
-            Proxy_VIF proxyVIF = new Proxy_VIF();
+            Proxy_VIF proxyVIF = ExistingVif != null ? ExistingVif.ToProxy() : new Proxy_VIF();
             proxyVIF.network = new XenRef<XenAPI.Network>(SelectedNetwork.opaque_ref);
             proxyVIF.MAC = SelectedMac;
             proxyVIF.device = Device.ToString();


AdventureSample - simplify FindRoomForObject method

--- projects/AdventureSample/src/Adventure/adventure.cs
+++ projects/AdventureSample/src/Adventure/adventure.cs
@@ -456,31 +456,28 @@

     private void FindRoomForObject()
     {
-        if ((((numberOfObjects.CompareTo(0)) == (0)) ? (-1) : (0)) != (0))
+        if (numberOfObjects == 0)
         {
             return;
         }

-        FL_n = (0);
-        I_n = (0);
-        while ((I_n) <= ((numberOfObjects) - (1)))
-        {
-            if ((((objectTags[(int)(I_n)].CompareTo(noun)) == (0)) ? (-1) : (0)) != (0))
-            {
-                FL_n = (1);
-                RO_n = (objectRooms[(int)(I_n)]);
+        FL_n = 0;
+        for (I_n = 0; I_n < numberOfObjects; ++I_n)
+        {
+            if (objectTags[(int)(I_n)] == noun)
+            {
+                FL_n = 1;
+                RO_n = objectRooms[(int)(I_n)];
                 break;
             }
-
-            I_n = ((I_n) + (1));
         }

         if (FL_n != 0)
         {
-            RO_n = (objectRooms[(int)(I_n)]);
-            if ((((RO_n.CompareTo(127)) > (0)) ? (-1) : (0)) != (0))
-            {
-                RO_n = ((RO_n) - (128));
+            RO_n = objectRooms[(int)(I_n)];
+            if (RO_n > 127)
+            {
+                RO_n -= 128;
             }
         }
     }


fixes

fixes

--- Replication.EntryPoint/DI/Bootstrapper.cs
+++ Replication.EntryPoint/DI/Bootstrapper.cs
@@ -103,7 +103,7 @@
         private static IUnityContainer ConfigureQuartz(this IUnityContainer container)
         {
             return container
-                .RegisterType<IJobFactory, JobFactory>(Lifetime.Singleton, new InjectionFactory(c => c.Resolve<UnityJobFactory>()))
+                .RegisterType<IJobFactory, JobFactory>(Lifetime.Singleton, new InjectionConstructor(container.Resolve<UnityJobFactory>(), container.Resolve<ITracer>()))
                 .RegisterType<IJobStoreFactory, JobStoreFactory>(Lifetime.Singleton)
                 .RegisterType<ISchedulerManager, SchedulerManager>(Lifetime.Singleton);
         }


Protect the float of text box to prevent crash

--- EDDiscovery/RouteControl.cs
+++ EDDiscovery/RouteControl.cs
@@ -607,8 +607,12 @@

             if (routeSystems != null && routeSystems.Any())
             {
+                float dist;
+                if (!float.TryParse(textBox_Distance.Text, out dist))       // in case text is crap
+                    dist = 30;
+
                 _discoveryForm.history.FillInPositionsFSDJumps();
-                map.Prepare(routeSystems.First(), _discoveryForm.settings.MapHomeSystem, routeSystems.First(), 400 / float.Parse(textBox_Distance.Text) , _discoveryForm.history.FilterByTravel);
+                map.Prepare(routeSystems.First(), _discoveryForm.settings.MapHomeSystem, routeSystems.First(), 400 / dist , _discoveryForm.history.FilterByTravel);
                 map.SetPlanned(routeSystems);
                 map.Show();
             }


FastBuild: sort the content of the All-Configs section

--- Sharpmake.Generators/FastBuild/MasterBff.cs
+++ Sharpmake.Generators/FastBuild/MasterBff.cs
@@ -39,7 +39,7 @@
             // Dependency dictionary based on the include string (many projects might be in one .bff or a single project might generate many
             public Dictionary<string, Strings> BffIncludeToDependencyIncludes = new Dictionary<string, Strings>();
             public readonly Dictionary<string, CompilerSettings> CompilerSettings = new Dictionary<string, CompilerSettings>();
-            public readonly List<string> AllConfigsSections = new List<string>(); // All Configs section when running with a source file filter
+            public readonly Strings AllConfigsSections = new Strings(); // All Configs section when running with a source file filter
         }

         private class ConfigurationsPerBff : IEnumerable<Solution.Configuration>
@@ -435,7 +435,7 @@

             if (masterBffInfo.AllConfigsSections.Count != 0)
             {
-                using (fileGenerator.Declare("fastBuildConfigs", UtilityMethods.FBuildFormatList(masterBffInfo.AllConfigsSections, 4)))
+                using (fileGenerator.Declare("fastBuildConfigs", UtilityMethods.FBuildFormatList(masterBffInfo.AllConfigsSections.SortedValues, 4)))
                 {
                     fileGenerator.Write(Bff.Template.ConfigurationFile.AllConfigsSection);
                 }


fix get amissed

fix get amissed

--- ECheckerSource/ApiApp/Controllers/CheckedController.cs
+++ ECheckerSource/ApiApp/Controllers/CheckedController.cs
@@ -43,6 +43,12 @@
         public IEnumerable<Amissed> GetLatestAmisseds(string id)
         {
             var amissedList = this.repoChecking.GetAmissedByVehicleId(id);
+            var result = this.repoChecking.GetLatestReadyStatus(id);
+            var percent = result.Status.Split('%')[0];
+            if (percent == "100")
+            {
+                amissedList = new List<Amissed>();
+            }
             return amissedList;
         }


Initial stab at stringifying tuples

Initial stab at stringifying tuples

--- ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
+++ ExpressionToCodeLib/Internal/CSharpFriendlyTypeName.cs
@@ -2,6 +2,7 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Reflection;
+using System.Text;

 namespace ExpressionToCodeLib.Internal {
     struct CSharpFriendlyTypeName {
@@ -9,7 +10,38 @@
         public bool IncludeGenericTypeArgumentNames;

         public string GetTypeName(Type type)
-            => AliasNameOrNull(type) ?? NullableTypeNameOrNull(type.GetTypeInfo()) ?? ArrayTypeNameOrNull(type) ?? GetUnaliasedTypeName(type);
+            => AliasNameOrNull(type) ?? NullableTypeNameOrNull(type.GetTypeInfo()) ?? ArrayTypeNameOrNull(type) ?? ValueTupleTypeNameOrNull(type) ?? GetUnaliasedTypeName(type);
+
+        string ValueTupleTypeNameOrNull(Type type) {
+            if (!IsValueTupleType(type.GetTypeInfo())) {
+                return null;
+            }
+            var output = new StringBuilder();
+            output.Append("(");
+            var genericArguments = type.GetTypeInfo().GetGenericArguments();
+            var nextIdx = 0;
+            while (nextIdx < genericArguments.Length) {
+                var typePar = genericArguments[nextIdx];
+                if (nextIdx + 1 == genericArguments.Length) {
+                    if (nextIdx == 7 && IsValueTupleType(typePar.GetTypeInfo())) {
+                        genericArguments = typePar.GetTypeInfo().GetGenericArguments();
+                        nextIdx = 0;
+                    } else {
+                        output.Append(GetTypeName(typePar));
+                        break;
+                    }
+                } else {
+                    output.Append(GetTypeName(typePar));
+                    output.Append(", ");
+                    nextIdx++;
+                }
+            }
+            output.Append(")");
+            return output.ToString();
+        }
+
+        static bool IsValueTupleType(TypeInfo typeInfo)
+            => typeInfo.IsGenericType && !typeInfo.IsGenericTypeDefinition && typeInfo.Namespace == "System" && typeInfo.Name.StartsWith("ValueTuple`", StringComparison.Ordinal);

         string GetUnaliasedTypeName(Type type) {
             var typeNameWithoutNamespace =


Remove random xml comment from file header

--- Source/Csla/Server/DataPortalMethodCache.cs
+++ Source/Csla/Server/DataPortalMethodCache.cs
@@ -3,7 +3,6 @@
 //     Copyright (c) Marimer LLC. All rights reserved.
 //     Website: https://cslanet.com
 // </copyright>
-// <summary>Gets a reference to the DataPortal_Create method for</summary>
 //-----------------------------------------------------------------------
 using System;
 using System.Collections.Generic;


Wpf: Control.BackgroundColor defaults to return transparent, not black

--- Source/Eto.Platform.Wpf/Forms/WpfControl.cs
+++ Source/Eto.Platform.Wpf/Forms/WpfControl.cs
@@ -20,7 +20,7 @@
 			{
 				var brush = Control.Background as System.Windows.Media.SolidColorBrush;
                 if (brush != null) return brush.Color.ToEto ();
-                else return Colors.Black;
+                else return Colors.Transparent;
 			}
 			set
 			{


Fix SystemType on column descriptor when falling back to underlying datatype (#2517)

--- Source/LinqToDB/Mapping/ColumnDescriptor.cs
+++ Source/LinqToDB/Mapping/ColumnDescriptor.cs
@@ -42,7 +42,7 @@

 			var dataType = mappingSchema.GetDataType(MemberType);
 			if (dataType.Type.DataType == DataType.Undefined)
-				dataType = mappingSchema.GetUnderlyingDataType(dataType.SystemType, out var _);
+				dataType = mappingSchema.GetUnderlyingDataType(MemberType, out var _);

 			if (columnAttribute == null)
 			{


Fix ignoring of the applyStandardFilters parameter

--- Source/Synthesis/ContentSearchExtensions.cs
+++ Source/Synthesis/ContentSearchExtensions.cs
@@ -54,7 +54,11 @@

 			if (luceneContext != null)
 			{
-				return GetLuceneQueryable<TResult>(luceneContext, null).ApplyStandardFilters();
+				var queryable = GetLuceneQueryable<TResult>(luceneContext, null);
+
+				if(applyStandardFilters) queryable = queryable.ApplyStandardFilters();
+
+				return queryable;
 			}

 			throw new NotSupportedException("At present Synthesis only supports the Lucene provider");


refactor(message): simplify the creation / generation of paragraphs #3

--- Gitter/Gitter/Gitter.WindowsPhone/Common/Properties.cs
+++ Gitter/Gitter/Gitter.WindowsPhone/Common/Properties.cs
@@ -43,22 +43,20 @@
         private static void HtmlChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
         {
             var richTextBlock = d as RichTextBlock;
+
             if (richTextBlock == null)
                 return;

-
+            // Retrieve the HTML value for the message
             string xhtml = e.NewValue as string;

             // Generate blocks
-            _blocks = new List<Block>();
             GenerateBlocksForHtml(xhtml);

-            // Add the blocks to the RichTextBlock
+            // Add the newly generated blocks to the RichTextBlock
             richTextBlock.Blocks.Clear();
             foreach (var block in _blocks)
-            {
                 richTextBlock.Blocks.Add(block);
-            }
         }

         #endregion
@@ -67,7 +65,6 @@
         #region Properties

         private static List<Block> _blocks;
-        private static Block _currentBlock;

         #endregion

@@ -78,11 +75,12 @@
         {
             try
             {
+                _blocks = new List<Block>();
+
                 var htmlDoc = new HtmlDocument();
                 htmlDoc.LoadHtml(xhtml);

-                _currentBlock = GenerateParagraph(htmlDoc.DocumentNode);
-                _blocks.Add(_currentBlock);
+                GenerateParagraph(htmlDoc.DocumentNode);
             }
             catch (Exception ex)
             {
@@ -91,18 +89,17 @@
             }
         }

-        private static Block AddBlock()
+        private static void GenerateParagraph(HtmlNode node)
+        {
+            var p = new Paragraph();
+            AddChildren(p, node);
+            _blocks.Add(p);
+        }
+        private static Paragraph CreateEmptyParagraph()
         {
             var newBlock = new Paragraph();
             _blocks.Add(newBlock);
             return newBlock;
-        }
-
-        private static Block GenerateParagraph(HtmlNode node)
-        {
-            var p = new Paragraph();
-            AddChildren(p, node);
-            return p;
         }

         private static void AddChildren(Paragraph p, HtmlNode node)
@@ -229,10 +226,10 @@

             if (!string.IsNullOrWhiteSpace(@class))
             {
-                if (@class == "bold")
+                if (@class.Contains("bold"))
                     content.FontWeight = FontWeights.Bold;

-                if (@class == "italic")
+                if (@class.Contains("italic"))
                     content.FontStyle = FontStyle.Italic;
             }

@@ -240,7 +237,7 @@
             {
                 @class = node.Attributes["class"].Value;

-                if (@class == "mention")
+                if (@class.Contains("mention"))
                     content.FontStyle = FontStyle.Italic;
             }

@@ -302,7 +299,7 @@

         private static void GenerateQuote(HtmlNode node)
         {
-            var block = AddBlock() as Paragraph;
+            var block = CreateEmptyParagraph();
             var content = GenerateText(node, "italic");

             block.Margin = new Thickness(12, 0, 0, 0);


Fix duplicate tag save tasks.

Fix duplicate tag save tasks.

This what was fixed for Ross in 7469d57.

--- Joey/UI/Fragments/ChooseTimeEntryTagsDialogFragment.cs
+++ Joey/UI/Fragments/ChooseTimeEntryTagsDialogFragment.cs
@@ -209,12 +209,14 @@
             // Delete unused tag relations:
             var deleteTasks = modelTags
                               .Where (oldTag => !selectedTags.Any (newTag => newTag.Id == oldTag.TagId))
-                              .Select (data => new TimeEntryTagModel (data).DeleteAsync ());
+                              .Select (data => new TimeEntryTagModel (data).DeleteAsync ())
+                              .ToList();

             // Create new tag relations:
             var createTasks = selectedTags
                               .Where (newTag => !modelTags.Any (oldTag => oldTag.TagId == newTag.Id))
-            .Select (data => new TimeEntryTagModel () { TimeEntry = model, Tag = new TagModel (data) } .SaveAsync ());
+            .Select (data => new TimeEntryTagModel () { TimeEntry = model, Tag = new TagModel (data) } .SaveAsync ())
+            .ToList();

             await Task.WhenAll (deleteTasks.Concat (createTasks));


Add hdcam to junkstrings

Add hdcam to junkstrings

--- MediaFileParser/MediaTypes/MediaFile/MediaFile.Junk.cs
+++ MediaFileParser/MediaTypes/MediaFile/MediaFile.Junk.cs
@@ -20,7 +20,7 @@
         /// </summary>
         private static readonly JunkContainer JunkStrings = new JunkContainer
         {
-            "(", "xor", "aph", "ac3", "rerip", "repack", "proper", "notv", "uncut", "xvid", "saints", "caph", "rip", "xvid", "uncut", "hd-ts",
+            "(", "xor", "aph", "ac3", "rerip", "repack", "proper", "notv", "uncut", "xvid", "saints", "caph", "rip", "xvid", "uncut", "hd-ts", "hdcam",
             "[vtv]", "ppvrip", {"real", new []{"ity"}, null}, "full-rip", "ntsc", "web-rip", "webrip", "webdl", "web-dl", "h.264", "x264", "divx", "french",
             "truefrench", "unrated", "limited", "rapax-249", "readnfo", "korsub", "vraie", "vf", "dvd9", "dvd5", "dvd-9", "dvd-5", {"by", new []{typeof(MovieFile.MovieFile)}, new []{"a","the","me", "you", null}},
             {"cam", new[]{"e","p","i"}, MediaFileQuality.LowQuality}, {"ts", MediaFileQuality.LowQuality}, {"wp", MediaFileQuality.LowQuality},


Improve async

Improve async

--- Minecraft-Server-Status-Checker/Pages/MainPage.xaml.cs
+++ Minecraft-Server-Status-Checker/Pages/MainPage.xaml.cs
@@ -65,19 +65,18 @@
             {
                 Servers = new ObservableCollection<Server>();
             }
-            Refresh();

             InitializeComponent();
             Loaded += OnLoaded;
         }

-        private async void Refresh()
+        private async Task RefreshAsync()
         {
             QueueList.AddRange(Servers);
             await StartPingAsync();
         }

-        private void OnLoaded(object sender, RoutedEventArgs e)
+        private async void OnLoaded(object sender, RoutedEventArgs e)
         {
             // If the app starts in narrow mode - showing only the Master listView -
             // it is necessary to set the commands and the selection mode.
@@ -114,6 +113,8 @@
             {
                 new InvalidOperationException();
             }
+
+            await RefreshAsync();
         }

         private void PageSizeStatesGroup_CurrentStateChanged(object sender, VisualStateChangedEventArgs e)
@@ -296,6 +297,5 @@
             pinging = false;
             QueueList.Clear();
         }
-
     }
 }


[CFM_657] Kabal Songstealer

[CFM_657] Kabal Songstealer

--- SabberStoneCore/CardSets/GangsCardsGen.cs
+++ SabberStoneCore/CardSets/GangsCardsGen.cs
@@ -1034,11 +1034,10 @@
 			// - SILENCE = 1
 			// --------------------------------------------------------
 			cards.Add("CFM_657", new List<Enchantment> {
-				// TODO [CFM_657] Kabal Songstealer && Test: Kabal Songstealer_CFM_657
-				new Enchantment
-				{
-					Activation = EnchantmentActivation.BATTLECRY,
-					SingleTask = null,
+				new Enchantment
+				{
+					Activation = EnchantmentActivation.BATTLECRY,
+					SingleTask = new SilenceTask(EntityType.TARGET)
 				},
 			});


Code Optimizations 2

Code Optimizations 2

Preparing for next schedule

--- Enox.WinForms/MainWindow.cs
+++ Enox.WinForms/MainWindow.cs
@@ -128,6 +128,12 @@
                             Vector3 df = new Vector3(px, py, 0) - origin;
                             Vector3 direction = Vector3.Normalize(df);

+                            Ray r = new Ray()
+                            {
+                                Direction = direction,
+                                Origin = origin
+                            };
+
 #if DEBUG
                             if (i < 10 && y < 10)
                             {


Ensured that the activity update is run on the main thread.

--- NControl.MVVM.Droid/Platform/DroidProgressIndicator.cs
+++ NControl.MVVM.Droid/Platform/DroidProgressIndicator.cs
@@ -1,5 +1,7 @@
 using System;
 using Android.App;
+using System.Threading;
+using Xamarin.Forms;

 namespace NControl.MVVM
 {
@@ -26,18 +28,25 @@
 		/// <param name="title">Title.</param>
 		/// <param name="subtitle">Subtitle.</param>
 		public void UpdateProgress (bool visible, string title = "", string subtitle = "")
-		{
-			if (_progressDialog == null) {
-				_progressDialog = new ProgressDialog (Xamarin.Forms.Forms.Context);
-				_progressDialog.SetCancelable(false);
-			}
+		{
+			Action updateProgressAction = () => {
+				if (_progressDialog == null) {
+					_progressDialog = new ProgressDialog (Xamarin.Forms.Forms.Context);
+					_progressDialog.SetCancelable(false);
+				}

-			_progressDialog.SetMessage(title);
-			if(visible && !_progressDialog.IsShowing)
-				_progressDialog.Show();
+				_progressDialog.SetMessage(title);
+				if(visible && !_progressDialog.IsShowing)
+					_progressDialog.Show();

-			if (!visible && _progressDialog.IsShowing)
-				_progressDialog.Hide ();
+				if (!visible && _progressDialog.IsShowing)
+					_progressDialog.Hide ();
+			};
+
+			if (Android.App.Application.SynchronizationContext != SynchronizationContext.Current)
+				Device.BeginInvokeOnMainThread (updateProgressAction);
+			else
+				updateProgressAction ();
 		}
 		#endregion
 	}


Addresses mantis #3485.

Addresses mantis #3485.

--- OpenSim/Framework/Communications/Clients/AuthClient.cs
+++ OpenSim/Framework/Communications/Clients/AuthClient.cs
@@ -129,12 +129,12 @@
             Hashtable responseData = (Hashtable)UserResp.Value;
             if (responseData.ContainsKey("auth_session") && responseData["auth_session"].ToString() == "TRUE")
             {
-                System.Console.WriteLine("[Authorization]: userserver reported authorized session for user " + userID);
+                //System.Console.WriteLine("[Authorization]: userserver reported authorized session for user " + userID);
                 return true;
             }
             else
             {
-                System.Console.WriteLine("[Authorization]: userserver reported unauthorized session for user " + userID);
+                //System.Console.WriteLine("[Authorization]: userserver reported unauthorized session for user " + userID);
                 return false;
             }
         }


Block Encoder, WIP

Block Encoder, WIP

--- Src/BlockchainSharp/Encoding/BlockEncoder.cs
+++ Src/BlockchainSharp/Encoding/BlockEncoder.cs
@@ -4,18 +4,30 @@
     using System;
     using System.Collections.Generic;
     using System.Linq;
+    using System.Numerics;
     using System.Text;

     public class BlockEncoder
     {
+        private static BigIntegerEncoder bigIntegerEncoder = new BigIntegerEncoder();
+        private static HashEncoder hashEncoder = new HashEncoder();
+
         public byte[] Encode(Block block)
         {
-            return null;
+            byte[] number = bigIntegerEncoder.Encode(new BigInteger(block.Number));
+            byte[] hash = hashEncoder.Encode(block.Hash);
+
+            return Rlp.EncodeList(number, hash);
         }

         public Block Decode(byte[] bytes)
         {
-            return null;
+            IList<byte[]> list = Rlp.DecodeList(bytes);
+
+            long number = (long)bigIntegerEncoder.Decode(list[0]);
+            Hash hash = hashEncoder.Decode(list[1]);
+
+            return new Block(number, hash);
         }
     }
 }


Applied patch from Mantis #3736 , which should stop the userserver crashing when a SL viewer version 1.23 logs in. Thanks StrawberryFride

--- OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
+++ OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
@@ -587,7 +587,8 @@
             string requestBody = reader.ReadToEnd();
             reader.Close();
             requestStream.Close();
-
+            //m_log.Debug(requestBody);
+            requestBody = requestBody.Replace("<base64></base64>", "");
             string responseString = String.Empty;
             XmlRpcRequest xmlRprcRequest = null;


Code review: Avoid using BlockingCollection for reading directories, this is actually only used in a single thread, so we can optimize ourselves to use a single threaded collection and save the cost of doing thread safe operations.

--- Optimized.Crc.File.Calculator/AstarothCrcCalculator.cs
+++ Optimized.Crc.File.Calculator/AstarothCrcCalculator.cs
@@ -22,38 +22,39 @@
             BufferPool.GetBuffer(10000);
             // queues for the various actors
             var crcComputationWork = new BlockingCollection<CrcComputationWork>();
-            var readDirectoryWork = new BlockingCollection<ReadDirectoryWork>();
+            var readDirectoryWork = new Queue<ReadDirectoryWork>();
             var readFileWork = new BlockingCollection<ReadFileWork>();

             SpinCrcComputations(crcComputationWork);

             SpinFileReaders(readFileWork, crcComputationWork);

+			// Start the actors machinery by registering the initial directories
+			foreach (var path in args)
+			{
+				readDirectoryWork.Enqueue(new ReadDirectoryWork
+				{
+					DirectoryName = path
+				});
+			}
+
             SpinDirectoryReader(readDirectoryWork, readFileWork);

-            // Start the actors machinery by registering the initial directories
-            foreach (var path in args)
-            {
-                readDirectoryWork.Add(new ReadDirectoryWork
-                {
-                    DirectoryName = path
-                });
-            }
-
+
             Console.WriteLine("Running computations...");
             Console.ReadLine();
         }

-        private static void SpinDirectoryReader(BlockingCollection<ReadDirectoryWork> readDirectoryWork, BlockingCollection<ReadFileWork> readFileWork)
+		private static void SpinDirectoryReader(Queue<ReadDirectoryWork> readDirectoryWork, BlockingCollection<ReadFileWork> readFileWork)
         {
             Task.Factory.StartNew(() =>
             {
-                while (true)
-                {
-                    var work = readDirectoryWork.Take();
+                while (readDirectoryWork.Count > 0)
+                {
+                    var work = readDirectoryWork.Dequeue();
                     foreach (var directory in Directory.GetDirectories(work.DirectoryName))
                     {
-                        readDirectoryWork.Add(new ReadDirectoryWork// more work for us!
+                        readDirectoryWork.Enqueue(new ReadDirectoryWork// more work for us!
                         {
                             DirectoryName = directory
                         });


Fix cartId build error for tests

Fix cartId build error for tests

--- Tests/SessionCartPersistanceProviderTests.cs
+++ Tests/SessionCartPersistanceProviderTests.cs
@@ -17,7 +17,7 @@
             var context = TestUtilities.GetMockedHttpContext();
             var persistanceProvider = new Providers.SessionCartPersistanceProvider(context.Session);

-            var sessionKey = persistanceProvider.GetSessionKey(cartId);
+            var sessionKey = persistanceProvider.GetSessionKey(new Guid(_cartId));

             sessionKey.Should().Be("nanocart_fb622491-d7aa-4d94-bb08-3ada030c9330");
         }


fixed broken acceptance test

fixed broken acceptance test


fixes weird occlusion of constructed walls (#3404)

--- Content.Server/Construction/Completions/SnapToGrid.cs
+++ Content.Server/Construction/Completions/SnapToGrid.cs
@@ -1,4 +1,4 @@
-#nullable enable
+#nullable enable
 using System.Threading.Tasks;
 using Content.Server.Utility;
 using Content.Shared.Construction;
@@ -28,7 +28,7 @@
             entity.SnapToGrid(Offset);
             if (SouthRotation)
             {
-                entity.Transform.LocalRotation = Angle.South;
+                entity.Transform.LocalRotation = Angle.Zero;
             }
         }
     }


Fix eject sounds sometimes not playing. (#6013)

--- Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
+++ Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
@@ -177,7 +177,7 @@
                 if (slot.Item != null)
                     hands.TryPutInAnyHand(slot.Item.Value);

-                Insert(uid, slot, args.Used, args.User, true);
+                Insert(uid, slot, args.Used, args.User);
                 args.Handled = true;
                 return;
             }
@@ -189,12 +189,14 @@
         ///     Insert an item into a slot. This does not perform checks, so make sure to also use <see
         ///     cref="CanInsert"/> or just use <see cref="TryInsert"/> instead.
         /// </summary>
-        private void Insert(EntityUid uid, ItemSlot slot, EntityUid item, EntityUid? user, bool userAudio = false)
+        /// <param name="excludeUserAudio">If true, will exclude the user when playing sound. Does nothing client-side.
+        /// Useful for predicted interactions</param>
+        private void Insert(EntityUid uid, ItemSlot slot, EntityUid item, EntityUid? user, bool excludeUserAudio = false)
         {
             slot.ContainerSlot.Insert(item);
             // ContainerSlot automatically raises a directed EntInsertedIntoContainerMessage

-            PlaySound(uid, slot.InsertSound, slot.SoundOptions, userAudio ? null : user);
+            PlaySound(uid, slot.InsertSound, slot.SoundOptions, excludeUserAudio ? user : null);
         }

         /// <summary>
@@ -203,7 +205,7 @@
         /// <param name="uid">Source of the sound</param>
         /// <param name="sound">The sound</param>
         /// <param name="excluded">Optional (server-side) argument used to prevent sending the audio to a specific
-        /// user.</param>
+        /// user. When run client-side, exclusion does nothing.</param>
         private void PlaySound(EntityUid uid, SoundSpecifier? sound, AudioParams audioParams, EntityUid? excluded)
         {
             if (sound == null || !_gameTiming.IsFirstTimePredicted)
@@ -304,19 +306,21 @@
         ///     Eject an item into a slot. This does not perform checks (e.g., is the slot locked?), so you should
         ///     probably just use <see cref="TryEject"/> instead.
         /// </summary>
-        private void Eject(EntityUid uid, ItemSlot slot, EntityUid item, EntityUid? user)
+        /// <param name="excludeUserAudio">If true, will exclude the user when playing sound. Does nothing client-side.
+        /// Useful for predicted interactions</param>
+        private void Eject(EntityUid uid, ItemSlot slot, EntityUid item, EntityUid? user, bool excludeUserAudio = false)
         {
             slot.ContainerSlot.Remove(item);
             // ContainerSlot automatically raises a directed EntRemovedFromContainerMessage

-            PlaySound(uid, slot.EjectSound, slot.SoundOptions, user);
+            PlaySound(uid, slot.EjectSound, slot.SoundOptions, excludeUserAudio ? user : null);
         }

         /// <summary>
         ///     Try to eject an item from a slot.
         /// </summary>
         /// <returns>False if item slot is locked or has no item inserted</returns>
-        public bool TryEject(EntityUid uid, ItemSlot slot, EntityUid? user, [NotNullWhen(true)] out EntityUid? item)
+        public bool TryEject(EntityUid uid, ItemSlot slot, EntityUid? user, [NotNullWhen(true)] out EntityUid? item, bool excludeUserAudio = false)
         {
             item = null;

@@ -324,7 +328,7 @@
                 return false;

             item = slot.Item;
-            Eject(uid, slot, item.Value, user);
+            Eject(uid, slot, item.Value, user, excludeUserAudio);
             return true;
         }

@@ -333,7 +337,7 @@
         /// </summary>
         /// <returns>False if the id is not valid, the item slot is locked, or it has no item inserted</returns>
         public bool TryEject(EntityUid uid, string id, EntityUid user,
-            [NotNullWhen(true)] out EntityUid? item, ItemSlotsComponent? itemSlots = null)
+            [NotNullWhen(true)] out EntityUid? item, ItemSlotsComponent? itemSlots = null, bool excludeUserAudio = false)
         {
             item = null;

@@ -343,7 +347,7 @@
             if (!itemSlots.Slots.TryGetValue(id, out var slot))
                 return false;

-            return TryEject(uid, slot, user, out item);
+            return TryEject(uid, slot, user, out item, excludeUserAudio);
         }

         /// <summary>
@@ -354,9 +358,9 @@
         ///     False if the id is not valid, the item slot is locked, or it has no item inserted. True otherwise, even
         ///     if the user has no hands.
         /// </returns>
-        public bool TryEjectToHands(EntityUid uid, ItemSlot slot, EntityUid? user)
-        {
-            if (!TryEject(uid, slot, user, out var item))
+        public bool TryEjectToHands(EntityUid uid, ItemSlot slot, EntityUid? user, bool excludeUserAudio = false)
+        {
+            if (!TryEject(uid, slot, user, out var item, excludeUserAudio))
                 return false;

             if (user != null && EntityManager.TryGetComponent(user.Value, out SharedHandsComponent? hands))
@@ -390,7 +394,7 @@
                     : EntityManager.GetComponent<MetaDataComponent>(slot.Item!.Value).EntityName ?? string.Empty;

                 Verb verb = new();
-                verb.Act = () => TryEjectToHands(uid, slot, args.User);
+                verb.Act = () => TryEjectToHands(uid, slot, args.User, excludeUserAudio: true);

                 if (slot.EjectVerbText == null)
                 {
@@ -425,7 +429,7 @@
                         : EntityManager.GetComponent<MetaDataComponent>(slot.Item!.Value).EntityName ?? string.Empty;

                     Verb takeVerb = new();
-                    takeVerb.Act = () => TryEjectToHands(uid, slot, args.User);
+                    takeVerb.Act = () => TryEjectToHands(uid, slot, args.User, excludeUserAudio: true);
                     takeVerb.IconTexture = "/Textures/Interface/VerbIcons/pickup.svg.192dpi.png";

                     if (slot.EjectVerbText == null)
@@ -451,7 +455,7 @@
                     : EntityManager.GetComponent<MetaDataComponent>(args.Using.Value).EntityName ?? string.Empty;

                 Verb insertVerb = new();
-                insertVerb.Act = () => Insert(uid, slot, args.Using.Value, args.User);
+                insertVerb.Act = () => Insert(uid, slot, args.Using.Value, args.User, excludeUserAudio: true);

                 if (slot.InsertVerbText != null)
                 {


Restore accidently removed comment

Restore accidently removed comment

--- osu.Game.Rulesets.Osu/Edit/DrawableOsuEditRuleset.cs
+++ osu.Game.Rulesets.Osu/Edit/DrawableOsuEditRuleset.cs
@@ -34,6 +34,10 @@
                 d.ApplyCustomUpdateState += updateState;
             }

+            /// <summary>
+            /// Hit objects are intentionally made to fade out at a constant slower rate than in gameplay.
+            /// This allows a mapper to gain better historical context and use recent hitobjects as reference / snap points.
+            /// </summary>
             private const double editor_hit_object_fade_out_extension = 700;

             private void updateState(DrawableHitObject hitObject, ArmedState state)


Remove redundant typecast I accidentally left in (Thanks InspectCode)

--- osu.Game.Tests/Visual/Menus/TestSceneToolbarClock.cs
+++ osu.Game.Tests/Visual/Menus/TestSceneToolbarClock.cs
@@ -109,7 +109,7 @@
         {
             ToolbarClockDisplayMode initialDisplayMode = 0;

-            AddStep("Retrieve current state", () => initialDisplayMode = (ToolbarClockDisplayMode)clockDisplayMode.Value);
+            AddStep("Retrieve current state", () => initialDisplayMode = clockDisplayMode.Value);

             AddStep("Trigger click", () => toolbarClock.TriggerClick());
             AddAssert("State changed from initial", () => clockDisplayMode.Value != initialDisplayMode);