[TextKitDemo] Need to stop listening for notifications when not interested anymore.

This fixes a memory leak, since the event handler was keeping a reference
to the view controller, preventing it from getting freed.

See desk #60817 for a test case.

--- TextKitDemo/TextKitDemo/TextViewController.cs
+++ TextKitDemo/TextKitDemo/TextViewController.cs
@@ -9,6 +9,7 @@
 	public class TextViewController : UIViewController
 	{
 		public DemoModel model;
+		NSObject notification;

 		public TextViewController (IntPtr handle) : base (handle)
 		{
@@ -18,13 +19,26 @@
 		{
 		}

-		public override void ViewDidLoad ()
+		public override void ViewDidAppear (bool animated)
 		{
-			base.ViewDidLoad ();
+			base.ViewDidAppear (animated);

-			UIApplication.Notifications.ObserveContentSizeCategoryChanged (delegate {
+
+			if (notification != null)
+				notification.Dispose ();
+			notification = UIApplication.Notifications.ObserveContentSizeCategoryChanged (delegate {
 				PreferredContentSizeChanged ();
 			});
+		}
+
+		public override void ViewDidDisappear (bool animated)
+		{
+			base.ViewDidDisappear (animated);
+
+			if (notification != null) {
+				notification.Dispose ();
+				notification = null;
+			}
 		}

 		public virtual void PreferredContentSizeChanged ()


Improved zoom

Improved zoom

--- ThomasEditor/utils/graph/GraphControl.xaml.cs
+++ ThomasEditor/utils/graph/GraphControl.xaml.cs
@@ -102,9 +102,11 @@

         private void GraphControl_Loaded(object sender, RoutedEventArgs e)
         {
-            translateTransform.Y += (RenderSize.Height != 0 ? RenderSize.Height : 350) - 100;
+            translateTransform.Y += ((RenderSize.Height != 0 ? RenderSize.Height : 350) - 100)/10;
             translateTransform.X += 50;
             this.Loaded -= GraphControl_Loaded;
+            path.StrokeThickness = 1 / ((scaleTransform.ScaleX + scaleTransform.ScaleY) / 2.0);
+            InvalidateVisual();
         }

         private void GraphControl_MouseUp(object sender, MouseButtonEventArgs e)
@@ -115,8 +117,12 @@
         private void GraphControl_MouseWheel(object sender, MouseWheelEventArgs e)
         {
             Point pos = e.GetPosition(this);
-            scaleTransform.ScaleX += e.Delta * 0.0001;
-            scaleTransform.ScaleY += e.Delta * 0.0001;
+            double delta = e.Delta * 0.01;
+            if(scaleTransform.ScaleX + delta > 0 && scaleTransform.ScaleX + delta < 15)
+                scaleTransform.ScaleX += delta;
+            if (scaleTransform.ScaleY + delta > 0 && scaleTransform.ScaleY + delta < 15)
+                scaleTransform.ScaleY += delta;
+

             Point pos2 = e.GetPosition(this);

@@ -145,11 +151,11 @@
             double width = RenderSize.Width != 0 ? RenderSize.Width : 1000;
             double height = RenderSize.Height != 0 ? RenderSize.Height : 1000;

-            int startX = (int)(Math.Round((-translateTransform.X) / dynamicGridSpacingX) * dynamicGridSpacingX);
-            int endX = (int)(Math.Round(((-translateTransform.X + width)) / dynamicGridSpacingX) * dynamicGridSpacingX);
-
-            int startY = (int)(Math.Round((-translateTransform.Y) / dynamicGridSpacingY) * dynamicGridSpacingY);
-            int endY = (int)(Math.Round(((-translateTransform.Y + height)) / dynamicGridSpacingY) * dynamicGridSpacingY);
+            int startX = (int)(Math.Round((-translateTransform.X) / dynamicGridSpacingX) * dynamicGridSpacingX) - dynamicGridSpacingX;
+            int endX = (int)(Math.Round(((-translateTransform.X + width)) / dynamicGridSpacingX) * dynamicGridSpacingX) + dynamicGridSpacingX;
+
+            int startY = (int)(Math.Round((-translateTransform.Y) / dynamicGridSpacingY) * dynamicGridSpacingY) - dynamicGridSpacingY;
+            int endY = (int)(Math.Round(((-translateTransform.Y + height)) / dynamicGridSpacingY) * dynamicGridSpacingY) + dynamicGridSpacingY;

             drawingContext.PushTransform(new ScaleTransform(1, -1));

@@ -158,7 +164,7 @@
                 Math.Abs(endX-startX) + gridSpacing, Math.Abs(endY-startY) + gridSpacing));
             //grid

-            for (int x = startX; x < endX; x+= gridSpacing/zoomX) // parallel to y-axis grid
+            for (int x = startX; x < endX; x+= gridSpacing/zoomX) // x-axis
             {
                 drawingContext.DrawLine(new Pen(Brushes.DimGray, 1.0/zoomX), new Point(x, startY), new Point(x, endY));

@@ -169,14 +175,14 @@
                         CultureInfo.GetCultureInfo("en-us"),
                         FlowDirection.LeftToRight,
                         new Typeface("Verdana"),
-                        10/zoomX, System.Windows.Media.Brushes.Black);
+                        10.0/zoomX, System.Windows.Media.Brushes.Black);
                     ft.TextAlignment = TextAlignment.Center;
-                    drawingContext.DrawText(ft, new System.Windows.Point(x, 5));
+                    drawingContext.DrawText(ft, new System.Windows.Point(x, 5.0/zoomX));
                 }

             }

-            for (int y = startY; y < endY; y+= gridSpacing/zoomY) //parllel to x-axis grid
+            for (int y = startY; y < endY; y+= gridSpacing/zoomY) //y-axis
             {
                 drawingContext.DrawLine(new Pen(Brushes.DimGray, 1.0 / zoomY), new Point(startX, y), new Point(endX, y));

@@ -186,9 +192,9 @@
                          CultureInfo.GetCultureInfo("en-us"),
                          FlowDirection.LeftToRight,
                          new Typeface("Verdana"),
-                         10/zoomY, System.Windows.Media.Brushes.Black);
+                         10.0/zoomY, System.Windows.Media.Brushes.Black);
                     ft.TextAlignment = TextAlignment.Right;
-                    drawingContext.DrawText(ft, new System.Windows.Point(-10, y-7.5));
+                    drawingContext.DrawText(ft, new System.Windows.Point(-10.0/zoomY, y-7.5/zoomY));
                 }
                 else
                 {
@@ -196,17 +202,17 @@
                          CultureInfo.GetCultureInfo("en-us"),
                          FlowDirection.LeftToRight,
                          new Typeface("Verdana"),
-                         10, System.Windows.Media.Brushes.Black);
+                         10.0/zoomY, System.Windows.Media.Brushes.Black);
                     ft.TextAlignment = TextAlignment.Right;
-                    drawingContext.DrawText(ft, new System.Windows.Point(-10, 5));
+                    drawingContext.DrawText(ft, new System.Windows.Point(-10.0/zoomY, 5.0/zoomY));
                 }

             }

             //axis
-            drawingContext.DrawLine(new Pen(Brushes.Black, 1), new Point(startX, 0), new Point(endX, 0));
-            drawingContext.DrawLine(new Pen(Brushes.Black, 1), new Point(0, startY), new Point(0, endY));
+            drawingContext.DrawLine(new Pen(Brushes.Black, 1.0 / zoomX), new Point(startX, 0), new Point(endX, 0));
+            drawingContext.DrawLine(new Pen(Brushes.Black, 1.0 / zoomY), new Point(0, startY), new Point(0, endY));

             //unselected points


Removed "this" prefixes in SessionConstraints file

--- ToolKit.Data.NHibernate/SessionConstraints.cs
+++ ToolKit.Data.NHibernate/SessionConstraints.cs
@@ -18,7 +18,7 @@
         /// <param name="session">The NHibernate Session.</param>
         public SessionConstraint(ISession session)
         {
-            this._session = session;
+            _session = session;
         }

         /// <summary>
@@ -28,7 +28,7 @@
         {
             get
             {
-                this._nextBooleanValue = !this._nextBooleanValue;
+                _nextBooleanValue = !_nextBooleanValue;

                 return this;
             }
@@ -40,9 +40,9 @@
         /// <returns><c>true</c> if this session is closed; otherwise, <c>false</c>.</returns>
         public bool Closed()
         {
-            var sessionIsClosed = !this._session.IsConnected && !this._session.IsOpen;
+            var sessionIsClosed = !_session.IsConnected && !_session.IsOpen;

-            return this._nextBooleanValue ? sessionIsClosed : !sessionIsClosed;
+            return _nextBooleanValue ? sessionIsClosed : !sessionIsClosed;
         }

         /// <summary>
@@ -51,9 +51,9 @@
         /// <returns><c>true</c> if the session is in an active transaction; otherwise, <c>false</c>.</returns>
         public bool InTransaction()
         {
-            var sessionInTransaction = this._session.Transaction != null && this._session.Transaction.IsActive;
+            var sessionInTransaction = _session.Transaction != null && _session.Transaction.IsActive;

-            return this._nextBooleanValue ? sessionInTransaction : !sessionInTransaction;
+            return _nextBooleanValue ? sessionInTransaction : !sessionInTransaction;
         }

         /// <summary>
@@ -62,9 +62,9 @@
         /// <returns><c>true</c> if this session is null; otherwise, <c>false</c>.</returns>
         public bool Null()
         {
-            var sessionIsNull = this._session == null;
+            var sessionIsNull = _session == null;

-            return this._nextBooleanValue ? sessionIsNull : !sessionIsNull;
+            return _nextBooleanValue ? sessionIsNull : !sessionIsNull;
         }

         /// <summary>
@@ -73,9 +73,9 @@
         /// <returns><c>true</c> if the session is null or closed; otherwise, <c>false</c>.</returns>
         public bool NullOrClosed()
         {
-            var sessionIsNullOrClosed = this.Null() || this.Closed();
+            var sessionIsNullOrClosed = Null() || Closed();

-            return this._nextBooleanValue ? sessionIsNullOrClosed : !sessionIsNullOrClosed;
+            return _nextBooleanValue ? sessionIsNullOrClosed : !sessionIsNullOrClosed;
         }
     }
 }


Refresh FriendsList When a request is sent

--- ToxRt/ToxRt.Shared/ViewModel/MainViewModel.cs
+++ ToxRt/ToxRt.Shared/ViewModel/MainViewModel.cs
@@ -24,8 +24,8 @@
     }
     public class MainViewModel : NavigableViewModelBase
     {
-        #region Fields
-        private String _localId;
+        #region Fields
+        private String _localId;
         private ObservableCollection<Friend> _listFriends;
         private Profile _defaultProfile;
         private Tox _tox;
@@ -87,7 +87,7 @@
                 _defaultProfile = value;
                 RaisePropertyChanged();
             }
-        }
+        }
         public Status UserStatus
         {
             get
@@ -123,15 +123,15 @@
         {
             get
             {
-                return  _loadedCommand
-                    ?? ( _loadedCommand = new RelayCommand(async () =>
+                return _loadedCommand
+                    ?? (_loadedCommand = new RelayCommand(async () =>
                     {
                         //Load the default profile from the database
                         DefaultProfile = DataService.GetDefaultProfile();
-                        if (DefaultProfile==null)
+                        if (DefaultProfile == null)
                         {
                             //Create a default profile before starting
-                            DefaultProfile=new Profile()
+                            DefaultProfile = new Profile()
                             {
                                 ScreenName = "Tmp",
                                 StatusMessage = "Tmp",
@@ -141,7 +141,7 @@
                                 AudioNotifications = 1,
                                 CloseToTray = 1,
                                 IsDefault = 1,
-                                ProfileName = Guid.NewGuid().ToString()
+                                ProfileName = Guid.NewGuid().ToString()
                             };
                             DataService.InsertNewProfile(DefaultProfile);
                         }
@@ -149,33 +149,33 @@
                         //initiate tox       --get those option parameter from the db
                         var options = new ToxOptions(true, false);

-                        _tox = new Tox(options);
+                        _tox = new Tox(options);
                         _tox.OnFriendRequest += tox_OnFriendRequest;
                         _tox.OnFriendMessage += tox_OnFriendMessage;
-
+
                         //Load the nodes from the local db
-                        _nodes=new ObservableCollection<DHT_Node>(await DataService.LoadAllDhtNodes());
+                        _nodes = new ObservableCollection<DHT_Node>(await DataService.LoadAllDhtNodes());
                         //try to bootstap from those node
-                        if(!Boostraping())
+                        if (!Boostraping())
                         {
                             //update the nodes from the wiki [At least for now] page and reboostraping
                             UpdateNodes();
                             if (!Boostraping())
                             {
                                 Debug.WriteLine("Can't boostrap from the current nodes !");
-                            }
-                        }
+                            }
+                        }

                         _tox.Name = DefaultProfile.ScreenName;    //Everything is loadede from the Sqlite database, no .tox files or anything
                         _tox.StatusMessage = DefaultProfile.StatusMessage;
                         _tox.Start();

-                        LocalId= _tox.Id.ToString();
+                        LocalId = _tox.Id.ToString();
                         DefaultProfile.ToxId = LocalId;
-                        Debug.WriteLine("ID: {0}", LocalId);
-                    }));
-            }
-        }
+                        Debug.WriteLine("ID: {0}", LocalId);
+                    }));
+            }
+        }
         private RelayCommand _addFriendCommand;
         public RelayCommand AddFriendCommand
         {
@@ -185,7 +185,7 @@
                     ?? (_addFriendCommand = new RelayCommand(
                     () =>
                     {
-                        InnerNavigationService.NavigateTo("AddFriendView",_tox);
+                        InnerNavigationService.NavigateTo("AddFriendView", _tox);
                     }));
             }
         }
@@ -198,11 +198,11 @@
                     ?? (_searchFriendCommand = new RelayCommand(
                     () =>
                     {
-
-                    }));
-            }
-        }
-        private RelayCommand _changeStatusCommand;
+
+                    }));
+            }
+        }
+        private RelayCommand _changeStatusCommand;
         public RelayCommand ChangeStatusCommand
         {
             get
@@ -224,7 +224,7 @@
                     ?? (_addGroupeCommand = new RelayCommand(
                     () =>
                     {
-                        InnerNavigationService.NavigateTo("GroupeChatSettingsView");
+                        InnerNavigationService.NavigateTo("GroupeChatSettingsView");
                     }));
             }
         }
@@ -237,7 +237,7 @@
                     ?? (_removeSelectedFriendsCommand = new RelayCommand(
                     () =>
                     {
-
+
                     }));
             }
         }
@@ -250,7 +250,7 @@
                     ?? (_loadProfileCommand = new RelayCommand(
                     () =>
                     {
-
+
                     }));
             }
         }
@@ -263,7 +263,7 @@
                     ?? (_settingsCommand = new RelayCommand(
                     () =>
                     {
-                        NavigationService.NavigateTo("SettingsView",DefaultProfile);
+                        NavigationService.NavigateTo("SettingsView", DefaultProfile);
                     }));
             }
         }
@@ -276,7 +276,7 @@
                     ?? (_creditCommand = new RelayCommand(
                     () =>
                     {
-                        NavigationService.NavigateTo("CreditView");
+                        NavigationService.NavigateTo("CreditView");
                     }));
             }
         }
@@ -284,21 +284,21 @@
         #endregion
         #region Ctors and Methods
         public MainViewModel(INavigationService navigationService, IDataService dataService, IMessagesNavigationService innerNavigationService)
-            :base(navigationService,dataService,innerNavigationService)
-        {
-            Messenger.Default.Register<NotificationMessage>(this, (m) =>
+            : base(navigationService, dataService, innerNavigationService)
+        {
+            Messenger.Default.Register<NotificationMessage>(this, async (m) =>
             {
                 switch (m.Notification)
                 {
                     case "RefreshFriends":
-                        DataService.Get
+                        ListFriends = new ObservableCollection<Friend>(await DataService.GetAllFriends());
                         break;
-
+
                 }
             });
-
+
             //for test purpuse only
-            ListFriends=new ObservableCollection<Friend>()
+            ListFriends = new ObservableCollection<Friend>()
             {
                 new Friend()
                 {
@@ -363,7 +363,7 @@

         public override void Deactivate(object parameter)
         {
-
+
         }

         public override void GoBack()
@@ -371,6 +371,6 @@
         }
         #endregion

-
+
     }
 }


bans don't apply in anarchy mode

bans don't apply in anarchy mode

The bans are still preserved, but not enforced.

--- TwitchPlaysAssembly/Src/Helpers/UserAccess.cs
+++ TwitchPlaysAssembly/Src/Helpers/UserAccess.cs
@@ -293,11 +293,13 @@
 			ban.BannedBy = IRCConnection.Instance.ChannelName;
 		}

-		if (!unban && !HasAccess(usernickname, UserAccessData.Instance.MinimumAccessLevelForUnbanCommand)
-			&& !usernickname.ToLowerInvariant().Equals(ban.BannedBy.ToLowerInvariant())) return ban;
-
-		UnbanUser(usernickname);
-		return null;
+		unban |= HasAccess(usernickname, UserAccessData.Instance.MinimumAccessLevelForUnbanCommand)
+		              || usernickname.ToLowerInvariant().Equals(ban.BannedBy.ToLowerInvariant());
+
+		if (unban)
+			UnbanUser(usernickname);
+
+		return TwitchPlaySettings.data.AnarchyMode || unban ? null : ban;
 	}

 	public static void AddUser(string userNickName, AccessLevel level)


Removed double notify start

Removed double notify start

--- VKDiscordBot/Services/Notify/NotifyService.cs
+++ VKDiscordBot/Services/Notify/NotifyService.cs
@@ -34,7 +34,7 @@
             {
 				var guild = _data.GetGuildSettings(guildId);
 				guild.Notifys.Add(notify);
-				AddNotifyTaskAndStart(guild, notify);
+				AddNotifyTask(guild, notify);
 				_data.UpdateGuildSettings(guild.GuildId, guild);
             }
             else
@@ -43,7 +43,7 @@
             }
         }

-		private void AddNotifyTaskAndStart(GuildSettings guild, Notify notify)
+		private void AddNotifyTask(GuildSettings guild, Notify notify)
 		{
 			var notifyHashCode = guild.Notifys[guild.Notifys.IndexOf(notify)].GetHashCode();
 			var task = new NotifyTask(() =>
@@ -77,7 +77,6 @@
 				RaiseLog(severety, $"Notify task ended. TaslId={id} Resulr={result.ToString()}");
 			};
 			_notifys.Add(task);
-			_notifys[_notifys.IndexOf(task)].Start();
 			RaiseLog(LogSeverity.Debug, $"Added notify task. GuildId={guild.GuildId}");
 		}

@@ -87,7 +86,7 @@
 			{
 				foreach (var notify in guild.Notifys)
 				{
-					AddNotifyTaskAndStart(guild, notify);
+					AddNotifyTask(guild, notify);
 				}
 			}
 		}


Fix error: 'Password required' in request UpdateMetadata. Add the Password field VideoUpdateMetadata to use private mode with password;

--- VimeoDotNet/VimeoDotNet/VimeoClient_Videos.cs
+++ VimeoDotNet/VimeoDotNet/VimeoClient_Videos.cs
@@ -332,7 +332,7 @@
             }
             if (metaData.Privacy == VideoPrivacyEnum.Password)
             {
-                request.Query.Add("password", metaData.password);
+                request.Query.Add("password", metaData.Password);
             }
             if (metaData.EmbedPrivacy != VideoEmbedPrivacyEnum.Unknown)
             {


Remove useless extension

Remove useless extension

--- WalletWasabi/Extensions/NBitcoinExtensions.cs
+++ WalletWasabi/Extensions/NBitcoinExtensions.cs
@@ -122,7 +122,7 @@
 				.Where(x => includeSingle || x.Value > 1);
 		}

-		public static int GetAnonymitySet(this Transaction me, int outputIndex)
+		public static int GetAnonymitySet(this Transaction me, uint outputIndex)
 		{
 			// 1. Get the output corresponting to the output index.
 			var output = me.Outputs[outputIndex];
@@ -133,8 +133,6 @@
 			var anonSet = Math.Min(equalOutputs, inputCount);
 			return anonSet;
 		}
-
-		public static int GetAnonymitySet(this Transaction me, uint outputIndex) => GetAnonymitySet(me, (int)outputIndex);

 		public static bool IsLikelyCoinjoin(this Transaction me)
 		=> me.Inputs.Count > 1 // The tx must have more than one input in order to be a coinjoin.


Add namespace for MassSetTags tool

Add namespace for MassSetTags tool

--- Assets/Scripts/EditorTools/Editor/MassSetTags.cs
+++ Assets/Scripts/EditorTools/Editor/MassSetTags.cs
@@ -2,33 +2,38 @@
 using UnityEditor;
 using UnityEngine;

-/// <summary>Tool that applies a tag to the currently selected objects and all their child objects.</summary>
-public class MassSetTags : EditorWindow {
-	private string _tag;
+namespace UnityHelpers.EditorTools.Editor {

-	[MenuItem("UnityHelpers/Mass Set Tags")]
-	public static void Init() {
-		MassSetTags window = GetWindow<MassSetTags>();
-		window.Show();
-	}
+	/// <summary>
+	/// Tool that applies a tag to the currently selected objects and all their child objects.
+	/// </summary>
+	public class MassSetTags : EditorWindow {
+		private string _tag;

-	private void OnGUI() {
-		EditorGUILayout.HelpBox("Applies the selected tag to all selected objects and their child objects", MessageType.Info);
-		_tag = EditorGUILayout.TagField("Tag", _tag);
+		[MenuItem("UnityHelpers/Mass Set Tags")]
+		public static void Init() {
+			MassSetTags window = GetWindow<MassSetTags>();
+			window.Show();
+		}

-		if (GUILayout.Button("Apply")) {
-			foreach (GameObject go in Selection.gameObjects) {
-				Undo.RegisterFullObjectHierarchyUndo(go, "Mass set tag '" + _tag + "' for " + go.name);
-				SetTagRecursively(go, _tag);
+		private void OnGUI() {
+			EditorGUILayout.HelpBox("Applies the selected tag to all selected objects and their child objects", MessageType.Info);
+			_tag = EditorGUILayout.TagField("Tag", _tag);
+
+			if (GUILayout.Button("Apply")) {
+				foreach (GameObject go in Selection.gameObjects) {
+					Undo.RegisterFullObjectHierarchyUndo(go, "Mass set tag '" + _tag + "' for " + go.name);
+					SetTagRecursively(go, _tag);
+				}
+			}
+		}
+
+		private void SetTagRecursively(GameObject go, string tag) {
+			go.tag = tag;
+
+			foreach (Transform t in go.transform) {
+				SetTagRecursively(t.gameObject, tag);
 			}
 		}
 	}
-
-	private void SetTagRecursively(GameObject go, string tag) {
-		go.tag = tag;
-
-		foreach (Transform t in go.transform) {
-			SetTagRecursively(t.gameObject, tag);
-		}
-	}
 }


Haptics fixed for Vive

Haptics fixed for Vive

--- Assets/VRKeys/Scripts/Platforms/OpenVRHaptics.cs
+++ Assets/VRKeys/Scripts/Platforms/OpenVRHaptics.cs
@@ -18,14 +18,14 @@

 		public override void TriggerPulse () {
 			int deviceIndex = (mallet.hand == Mallet.MalletHand.Left)
-				? SteamVR_Controller.GetDeviceIndex (SteamVR_Controller.DeviceRelation.FarthestLeft)
-				: SteamVR_Controller.GetDeviceIndex (SteamVR_Controller.DeviceRelation.FarthestRight);
+				? SteamVR_Controller.GetDeviceIndex (SteamVR_Controller.DeviceRelation.Leftmost)
+				: SteamVR_Controller.GetDeviceIndex (SteamVR_Controller.DeviceRelation.Rightmost);

 			if (deviceIndex == -1) return;

 			var controller = SteamVR_Controller.Input (deviceIndex);

-			controller.TriggerHapticPulse (800, EVRButtonId.k_EButton_Grip);
+			controller.TriggerHapticPulse (800);
 		}
 	}
 }


Refactored a test to use XML-attributed events,

instead of convention-based events, in order to decrease the implicit
coupling to ConventionBasedSerializerOfComplexImmutableClasses.

--- AtomEventStore.UnitTests/AtomEventStreamTests.cs
+++ AtomEventStore.UnitTests/AtomEventStreamTests.cs
@@ -319,8 +319,8 @@
         [Theory, AutoAtomData]
         public void AppendAsyncMoreThanTwicePageSizeEventsCreatesThreeFeedPages(
             [Frozen(As = typeof(IAtomEventStorage))]AtomEventsInMemory storage,
-            AtomEventStream<TestEventX> sut,
-            Generator<TestEventX> eventGenerator)
+            AtomEventStream<XmlAttributedTestEventX> sut,
+            Generator<XmlAttributedTestEventX> eventGenerator)
         {
             var events = eventGenerator.Take(sut.PageSize * 2 + 1).ToList();
             events.ForEach(e => sut.AppendAsync(e).Wait());


tag pos invoices too

tag pos invoices too

--- BTCPayServer/Controllers/AppsPublicController.cs
+++ BTCPayServer/Controllers/AppsPublicController.cs
@@ -256,19 +256,22 @@
             var store = await _AppService.GetStore(app);
             store.AdditionalClaims.Add(new Claim(Policies.CanCreateInvoice.Key, store.Id));
             var invoice = await _InvoiceController.CreateInvoiceCore(new CreateInvoiceRequest()
-            {
-                ItemCode = choice?.Id,
-                ItemDesc = title,
-                Currency = settings.Currency,
-                Price = price,
-                BuyerEmail = email,
-                OrderId = orderId,
-                NotificationURL = string.IsNullOrEmpty(notificationUrl)? settings.NotificationUrl: notificationUrl,
-                NotificationEmail = settings.NotificationEmail,
-                RedirectURL = redirectUrl  ?? Request.GetDisplayUrl(),
-                FullNotifications = true,
-                PosData = string.IsNullOrEmpty(posData) ? null : posData
-            }, store, HttpContext.Request.GetAbsoluteRoot(), cancellationToken: cancellationToken);
+                {
+                    ItemCode = choice?.Id,
+                    ItemDesc = title,
+                    Currency = settings.Currency,
+                    Price = price,
+                    BuyerEmail = email,
+                    OrderId = orderId,
+                    NotificationURL =
+                        string.IsNullOrEmpty(notificationUrl) ? settings.NotificationUrl : notificationUrl,
+                    NotificationEmail = settings.NotificationEmail,
+                    RedirectURL = redirectUrl ?? Request.GetDisplayUrl(),
+                    FullNotifications = true,
+                    PosData = string.IsNullOrEmpty(posData) ? null : posData
+                }, store, HttpContext.Request.GetAbsoluteRoot(),
+                new List<string>() {AppService.GetAppInternalTag(appId)},
+                cancellationToken);
             return RedirectToAction(nameof(InvoiceController.Checkout), "Invoice", new { invoiceId = invoice.Data.Id });
         }


Leg Extensions, Lying Leg Curls, Standing Barbell Calf Raise

--- Cassini.FitocracyAnalyzer.Core/WorkoutFactory.cs
+++ Cassini.FitocracyAnalyzer.Core/WorkoutFactory.cs
@@ -57,8 +57,14 @@
 				return GetExerciseData (sets, Exercises.BarbellDeadlift, WeightRepsParser);
 			case "Leg Press":
 				return GetExerciseData (sets, Exercises.LegPress, WeightRepsParser);
+			case "Leg Extensions":
+				return GetExerciseData (sets, Exercises.LegExtensions, WeightRepsParser);
+			case "Lying Leg Curls":
+				return GetExerciseData (sets, Exercises.LyingLegCurls, WeightRepsParser);
 			case "Barbell Hip Thrust":
 				return GetExerciseData (sets, Exercises.BarbellHipThrust, WeightRepsParser);
+			case "Standing Barbell Calf Raise":
+				return GetExerciseData (sets, Exercises.StandingBarbellCalfRaise, WeightRepsParser);
 			case "Calf Press On The Leg Press Machine":
 				return GetExerciseData (sets, Exercises.CalfPressOnTheLegPressMachine, WeightRepsParser);
 			#endregion


Call correct URL when fetching data.

Call correct URL when fetching data.

--- ChalmersxTools/Views/PresentationToolView.cshtml
+++ ChalmersxTools/Views/PresentationToolView.cshtml
@@ -50,7 +50,7 @@

This information is not visible for students.

-                Download data
+                Download data

         }


NRE fix

NRE fix

--- Client/Systems/VesselLockSys/VesselLockSystem.cs
+++ Client/Systems/VesselLockSys/VesselLockSystem.cs
@@ -75,7 +75,7 @@
         /// </summary>
         private void UpdateActiveVesselsLocks()
         {
-            if (Enabled && VesselLockSystemReady && LockSystem.LockQuery.ControlLockBelongsToPlayer(FlightGlobals.ActiveVessel.id, SettingsSystem.CurrentSettings.PlayerName))
+            if (Enabled && VesselLockSystemReady && FlightGlobals.ActiveVessel != null && LockSystem.LockQuery.ControlLockBelongsToPlayer(FlightGlobals.ActiveVessel.id, SettingsSystem.CurrentSettings.PlayerName))
             {
                 //We have a control lock over the active vessel so if we are spectating stop doing it.
                 if (VesselCommon.IsSpectating)


optional enums don't need initialization

--- CodeGenerator/CodeGenerator/MessageSerializer.cs
+++ CodeGenerator/CodeGenerator/MessageSerializer.cs
@@ -19,7 +19,7 @@
                 cw.Bracket(m.OptionAccess + " partial " + m.OptionType + " " + m.SerializerType);
             }

-            GenerateReader(m, cw);
+            GenerateReader(m, cw, options);

             GenerateWriter(m, cw, options);
             foreach (ProtoMessage sub in m.Messages.Values)
@@ -32,7 +32,7 @@
             return;
         }

-        static void GenerateReader(ProtoMessage m, CodeWriter cw)
+        static void GenerateReader(ProtoMessage m, CodeWriter cw, Options options)
         {
             #region Helper Deserialize Methods
             string refstr = (m.OptionType == "struct") ? "ref " : "";
@@ -127,7 +127,7 @@
                     {
                         cw.WriteLine("instance." + f.CsName + " = " + f.FormatForTypeAssignment() + ";");
                     }
-                    else if (f.Rule == FieldRule.Optional)
+                    else if ((f.Rule == FieldRule.Optional) && !options.Nullable)
                     {
                         if (f.ProtoType is ProtoEnum)
                         {


well that was embarrassing

well that was embarrassing

--- CompatBot/EventHandlers/UnknownCommandHandler.cs
+++ CompatBot/EventHandlers/UnknownCommandHandler.cs
@@ -55,36 +55,23 @@
                         cmd,
                         e.Context.Message.Content[e.Context.Prefix.Length ..].Trim()
                     );
-                    try
-                    {
-                        await cmd.ExecuteAsync(updatedContext).ConfigureAwait(false);
-                    }
-                    catch { }
+                    try { await cmd.ExecuteAsync(updatedContext).ConfigureAwait(false); } catch { }
                     return;
                 }

                 var content = e.Context.Message.Content;
                 if (content is null or {Length: <3})
                     return;
-
-                var pos = content?.IndexOf(cnfe.CommandName) ?? -1;
-                if (pos < 0)
-                    return;

-                var gameTitle = content![pos..].TrimEager().Trim(40);
-                if (string.IsNullOrEmpty(gameTitle) || char.IsPunctuation(gameTitle[0]))
-                    return;
-
-                var term = gameTitle.ToLowerInvariant();
                 if (e.Context.Prefix == Config.CommandPrefix)
                 {
                     var knownCmds = GetAllRegisteredCommands(e.Context);
-                    var termParts = term.Split(' ', 4, StringSplitOptions.RemoveEmptyEntries);
+                    var termParts = content.Split(' ', 4, StringSplitOptions.RemoveEmptyEntries);
                     var normalizedTerm = string.Join(' ', termParts);
                     var terms = new string[termParts.Length];
-                    terms[0] = termParts[0];
+                    terms[0] = termParts[0].ToLowerInvariant();
                     for (var i = 1; i < termParts.Length; i++)
-                        terms[i] = terms[i - 1] + ' ' + termParts[i];
+                        terms[i] = terms[i - 1] + ' ' + termParts[i].ToLowerInvariant();
                     var cmdMatches = (
                             from t in terms
                             from kc in knownCmds
@@ -113,7 +100,7 @@
                     var interactivity = cne.Client.GetInteractivity();
                     var botMsg = await DiscordMessageExtensions.UpdateOrCreateMessageAsync(null, e.Context.Channel, msgBuilder).ConfigureAwait(false);
                     var (_, reaction) = await interactivity.WaitForMessageOrButtonAsync(botMsg, e.Context.User, TimeSpan.FromMinutes(1)).ConfigureAwait(false);
-                    string? newCmd = null, newArg = term;
+                    string? newCmd = null, newArg = content;
                     if (reaction?.Id is string btnId)
                     {
                         if (btnId == btnCompat.CustomId)


Prevent pathfinding crash (#8251)

Prevent pathfinding crash (#8251)

--- Content.Server/AI/Pathfinding/PathfindingNode.cs
+++ Content.Server/AI/Pathfinding/PathfindingNode.cs
@@ -255,7 +255,7 @@
                 // Which may or may not be intended?
                 if (entMan.TryGetComponent(entity, out AccessReaderComponent? accessReader) && !_accessReaders.ContainsKey(entity))
                 {
-                    _accessReaders.Add(entity, accessReader);
+                    _accessReaders.TryAdd(entity, accessReader);
                     ParentChunk.Dirty();
                 }
                 return;
@@ -265,11 +265,11 @@

             if (physicsComponent.BodyType != BodyType.Static)
             {
-                _physicsLayers.Add(entity, physicsComponent.CollisionLayer);
+                _physicsLayers.TryAdd(entity, physicsComponent.CollisionLayer);
             }
             else
             {
-                _blockedCollidables.Add(entity, physicsComponent.CollisionLayer);
+                _blockedCollidables.TryAdd(entity, physicsComponent.CollisionLayer);
                 GenerateMask();
                 ParentChunk.Dirty();
             }


Extract sending close or open frame into separate methods.

--- Core/Msg.Core/Transport/Connections/Connector.cs
+++ Core/Msg.Core/Transport/Connections/Connector.cs
@@ -11,24 +11,34 @@
         public static async Task<IConnection> OpenConnectionAsync (IConnection connection)
         {
             try {
-                var openFrame = FrameFactory.CreateOpenFrame ();
-                await FrameSender.SendFrame (connection, openFrame);
+                await SendOpenFrame (connection);
                 return new OpenConnection (connection);
             } catch (Exception exception) {
                 throw new OpenConnectionFailedException ("Connection failed.", exception);
             }
         }

+        static async Task SendOpenFrame (IConnection connection)
+        {
+            var openFrame = FrameFactory.CreateOpenFrame ();
+            await FrameSender.SendFrame (connection, openFrame);
+        }
+
         public static async Task<IConnection> CloseConnectionAsync (IConnection connection)
         {
             try {
-                var closeFrame = FrameFactory.CreateCloseFrame ();
-                await FrameSender.SendFrame (connection, closeFrame);
+                await SendCloseFrame (connection);
                 return new ClosedConnection ();
             } catch (Exception exception) {
                 throw new CloseConnectionFailedException ("Closing connection failed.", exception);
             }
         }
+
+        static async Task SendCloseFrame (IConnection connection)
+        {
+            var closeFrame = FrameFactory.CreateCloseFrame ();
+            await FrameSender.SendFrame (connection, closeFrame);
+        }
     }

 }


Using TypeHelper.CreateDelegate

Using TypeHelper.CreateDelegate

This syntax matches .NETCORE

--- Core/Theraot/Collections/ThreadSafe/WeakEvent.cs
+++ Core/Theraot/Collections/ThreadSafe/WeakEvent.cs
@@ -2,6 +2,7 @@

 using System;
 using System.Reflection;
+using Theraot.Core;

 namespace Theraot.Collections.ThreadSafe
 {
@@ -47,7 +48,7 @@
         {
             try
             {
-                Delegate value = Delegate.CreateDelegate(typeof(EventHandler<TEventArgs>), target, method);
+                Delegate value = method.CreateDelegate(typeof(EventHandler<TEventArgs>), target);
                 _eventHandlers.Add(value);
             }
             catch (NullReferenceException)
@@ -82,7 +83,7 @@
         {
             try
             {
-                Delegate value = Delegate.CreateDelegate(typeof(EventHandler<TEventArgs>), target, method);
+                Delegate value = method.CreateDelegate(typeof(EventHandler<TEventArgs>), target);
                 _eventHandlers.Remove(value);
             }
             catch (NullReferenceException)


Fixed validation of controller action parameters.

--- CorvallisBusAPI/Controllers/TransitController.cs
+++ CorvallisBusAPI/Controllers/TransitController.cs
@@ -1,13 +1,14 @@
 using System.Linq;
 using System.Threading.Tasks;
 using Microsoft.AspNet.Mvc;
-using Newtonsoft.Json;
 using Microsoft.Framework.OptionsModel;
 using API.DataAccess;
 using API.WebClients;
 using System;
 using API.Models;
 using System.Collections.Generic;
+using System.Net;
+using System.Net.Http;

 namespace API.Controllers
 {
@@ -34,17 +35,17 @@
                 var staticDataJson = await _repository.GetStaticDataAsync();
                 return Content(staticDataJson, "application/json");
             }
-            catch (Exception) // gotta catch 'em all
-            {
-                return new HttpStatusCodeResult(503);
+            catch
+            {
+                return new HttpStatusCodeResult((int)HttpStatusCode.ServiceUnavailable);
             }
         }

         public List<int> ParseStopIds(string stopIds)
         {
-            if (stopIds == null)
-            {
-                throw new ArgumentNullException(nameof(stopIds));
+            if (string.IsNullOrWhiteSpace(stopIds))
+            {
+                return new List<int>();
             }

             // ToList() this to force any parsing exception to happen here,
@@ -67,7 +68,12 @@
             {
                 parsedStopIds = ParseStopIds(stopIds);
             }
-            catch (Exception e) when (e is ArgumentNullException || e is FormatException)
+            catch (FormatException)
+            {
+                return HttpBadRequest();
+            }
+
+            if (parsedStopIds == null || parsedStopIds.Count == 0)
             {
                 return HttpBadRequest();
             }
@@ -77,10 +83,30 @@
                 var etas = await TransitManager.GetEtas(_repository, parsedStopIds);
                 return Json(etas);
             }
-            catch (Exception) // gotta catch 'em all
-            {
-                return new HttpStatusCodeResult(503);
-            }
+            catch
+            {
+                return new HttpStatusCodeResult((int)HttpStatusCode.ServiceUnavailable);
+            }
+        }
+
+        /// <summary>
+        /// Generates a new LatLong based on input.  Throws an exception if it can't do it.
+        /// </summary>
+        private static LatLong? ParseUserLocation(string location)
+        {
+            if (string.IsNullOrWhiteSpace(location))
+            {
+                return null;
+            }
+
+            var locationPieces = location.Split(',');
+            if (locationPieces.Length != 2)
+            {
+                throw new FormatException("2 comma-separated numbers must be provided in the location string.");
+            }
+
+            return new LatLong(double.Parse(locationPieces[0]),
+                               double.Parse(locationPieces[1]));
         }

         /// <summary>
@@ -90,48 +116,32 @@
         public async Task<ActionResult> GetFavoritesViewModel(string location, string stops)
         {
             LatLong? userLocation;
-            List<int> parsedStops;
-
-            try
-            {
-                parsedStops = ParseStopIds(stops);
+            List<int> parsedStopIds;
+
+            try
+            {
                 userLocation = ParseUserLocation(location);
-            }
-            catch (Exception e) when (e is ArgumentNullException || e is FormatException)
-            {
-                return HttpBadRequest();
-            }
-
-            // If it was somehow able to parse but couldn't get anything, they get an empty array.
-            //
-            // ...
-            //
-            // You know, kinda like how JavaScript works.
-            if (userLocation == null && parsedStops == null)
-            {
-                return Content("[]", "application/json");
-            }
-
-            try
-            {
-                var viewModel = await TransitManager.GetFavoritesViewModel(_repository, _getCurrentTime, parsedStops, userLocation, fallbackToGrayColor: false);
+                parsedStopIds = ParseStopIds(stops);
+            }
+            catch (FormatException)
+            {
+                return HttpBadRequest();
+            }
+
+            if (userLocation == null && (parsedStopIds == null || parsedStopIds.Count == 0))
+            {
+                return HttpBadRequest();
+            }
+
+            try
+            {
+                var viewModel = await TransitManager.GetFavoritesViewModel(_repository, _getCurrentTime, parsedStopIds, userLocation, fallbackToGrayColor: false);
                 return Json(viewModel);
             }
-            catch (Exception) // gotta catch 'em all
-            {
-                return new HttpStatusCodeResult(503);
-            }
-        }
-
-        /// <summary>
-        /// Generates a new LatLong based on input.  Throws an exception if it can't do it.
-        /// </summary>
-        private static LatLong? ParseUserLocation(string location)
-        {
-            var locationPieces = location?.Split(',');
-
-            return new LatLong(double.Parse(locationPieces[0]),
-                               double.Parse(locationPieces[1]));
+            catch
+            {
+                return new HttpStatusCodeResult((int)HttpStatusCode.ServiceUnavailable);
+            }
         }

         /// <summary>
@@ -147,7 +157,12 @@
             {
                 parsedStopIds = ParseStopIds(stopIds);
             }
-            catch (Exception e) when (e is ArgumentNullException || e is FormatException)
+            catch (FormatException)
+            {
+                return HttpBadRequest();
+            }
+
+            if (parsedStopIds == null || parsedStopIds.Count == 0)
             {
                 return HttpBadRequest();
             }
@@ -157,9 +172,9 @@
                 var todaySchedule = await TransitManager.GetSchedule(_repository, _getCurrentTime, parsedStopIds);
                 return Json(todaySchedule);
             }
-            catch (Exception) // gotta catch 'em all
-            {
-                return new HttpStatusCodeResult(503);
+            catch
+            {
+                return new HttpStatusCodeResult((int)HttpStatusCode.ServiceUnavailable);
             }
         }


[datatool]: fix crash when unlock has no categories

closes #52

--- DataTool/ToolLogic/Extract/ExtractHeroUnlocks.cs
+++ DataTool/ToolLogic/Extract/ExtractHeroUnlocks.cs
@@ -283,9 +283,11 @@
             }

             var eventMap = GetEventConfig();
-            var formalEventKey = unlock.STU.m_BEE9BCDA.FirstOrDefault(x => eventMap.ContainsKey(x));
-            if (eventMap.ContainsKey(formalEventKey)) {
-                eventKey = eventMap[formalEventKey];
+            if (unlock.STU.m_BEE9BCDA != null) {
+                var formalEventKey = unlock.STU.m_BEE9BCDA.FirstOrDefault(x => eventMap.ContainsKey(x));
+                if (eventMap.ContainsKey(formalEventKey)) {
+                    eventKey = eventMap[formalEventKey];
+                }
             }

             string thisPath = Path.Combine(path, unlock.GetTypeNameEnum(), eventKey, rarity, GetValidFilename(unlock.GetName()));


register reference data repository

register reference data repository

--- abremir.AllMyBricks.Data/Configuration/IoC.cs
+++ abremir.AllMyBricks.Data/Configuration/IoC.cs
@@ -14,6 +14,7 @@
             container.Register<IRepositoryService, RepositoryService>(Lifestyle.Transient);
             container.Register<IThemeRepository, ThemeRepository>(Lifestyle.Transient);
             container.Register<ISubthemeRepository, SubthemeRepository>(Lifestyle.Transient);
+            container.Register<IReferenceDataRepository, ReferenceDataRepository>(Lifestyle.Transient);

             return container;
         }


rename file inside dindexes

rename file inside dindexes

--- Duplicati/CommandLine/RecoveryTool/Recompress.cs
+++ Duplicati/CommandLine/RecoveryTool/Recompress.cs
@@ -137,13 +137,13 @@

                         Console.Write(" - downloading ({0})...", Library.Utility.Utility.FormatSizeString(entry.File.Size));

-                        FileInfo originFileInfo;
+                        DateTime originLastWriteTime;
                         FileInfo destinationFileInfo;

                         using (var tf = new Library.Utility.TempFile())
                         {
                             backend.Get(entry.File.Name, tf);
-                            originFileInfo = new FileInfo(tf);
+                            originLastWriteTime = new FileInfo(tf).LastWriteTime;
                             downloaded++;

                             if (entry.EncryptionModule != null)
@@ -162,7 +162,7 @@

                             File.Delete(tf);
                             destinationFileInfo = new FileInfo(local);
-                            destinationFileInfo.LastWriteTime = originFileInfo.LastWriteTime;
+                            destinationFileInfo.LastWriteTime = originLastWriteTime;
                         }

                         if (entry.CompressionModule != null)
@@ -170,19 +170,30 @@
                             Console.Write(" recompressing ...");

                             using (var cmOld = Library.DynamicLoader.CompressionLoader.GetModule(entry.CompressionModule, local, options))
-                            {
-                                using (var cmNew = Library.DynamicLoader.CompressionLoader.GetModule(target_compr_module, localNew, options))
+                            using (var cmNew = Library.DynamicLoader.CompressionLoader.GetModule(target_compr_module, localNew, options))
+                                foreach (var cmfile in cmOld.ListFiles(""))
                                 {
-                                    foreach (var cmfile in cmOld.ListFiles(""))
-                                        using (var sourceStream = cmOld.OpenRead(cmfile))
-                                        using (var cs = cmNew.CreateFile(cmfile, Duplicati.Library.Interface.CompressionHint.Compressible, cmOld.GetLastWriteTime(cmfile)))
+                                    string cmfileNew = cmfile;
+
+                                    if (entry.FileType == RemoteVolumeType.Index)
+                                    {
+                                        var cmFileVolume = Library.Main.Volumes.VolumeBase.ParseFilename(cmfileNew);
+                                        if (cmFileVolume != null)
+                                        {
+                                            cmfileNew = cmfileNew.Replace("." + cmFileVolume.CompressionModule, "." + target_compr_module);
+                                            if(!reencrypt)
+                                                cmfileNew = cmfileNew.Replace("." + cmFileVolume.EncryptionModule, "");
+                                        }
+                                    }
+
+                                    using (var sourceStream = cmOld.OpenRead(cmfile))
+                                        using (var cs = cmNew.CreateFile(cmfileNew, Duplicati.Library.Interface.CompressionHint.Compressible, cmOld.GetLastWriteTime(cmfile)))
                                             Library.Utility.Utility.CopyStream(sourceStream, cs);
                                 }
-                            }
-
+
                             File.Delete(local);
                             destinationFileInfo = new FileInfo(localNew);
-                            destinationFileInfo.LastWriteTime = originFileInfo.LastWriteTime;
+                            destinationFileInfo.LastWriteTime = originLastWriteTime;
                         }

                         if (reencrypt && entry.EncryptionModule != null)
@@ -196,7 +207,7 @@
                             }

                             destinationFileInfo = new FileInfo(localNew);
-                            destinationFileInfo.LastWriteTime = originFileInfo.LastWriteTime;
+                            destinationFileInfo.LastWriteTime = originLastWriteTime;
                         }

                         if (reupload)


Remove unnecessary method override.

Remove unnecessary method override.

--- Duplicati/UnitTest/CommandLineOperationsTests.cs
+++ Duplicati/UnitTest/CommandLineOperationsTests.cs
@@ -44,12 +44,6 @@
             }
         }

-        [OneTimeSetUp]
-        public override void PrepareSourceData()
-        {
-            base.PrepareSourceData();
-        }
-
         [Test]
         [Category("BulkData")]
         [Category("BulkNormal")]


Shorten diagnostics event names (#7186)

Shorten diagnostics event names (#7186)

* Remove common authority and bump up the packaging/assembly versions.

* Shorten diagnostics event names

--- sdk/eventhub/Microsoft.Azure.EventHubs/src/EventHubsDiagnosticSource.cs
+++ sdk/eventhub/Microsoft.Azure.EventHubs/src/EventHubsDiagnosticSource.cs
@@ -20,13 +20,13 @@
         public const string CorrelationContextPropertyName = "Correlation-Context";
         public const string RelatedToTagName = "RelatedTo";

-        public const string ProcessActivityName = DiagnosticSourceName + ".Process";
-
-        public const string SendActivityName = DiagnosticSourceName + ".Send";
+        public const string ProcessActivityName = "Process";
+
+        public const string SendActivityName = "Send";
         public const string SendActivityStartName = SendActivityName + ".Start";
         public const string SendActivityExceptionName = SendActivityName + ".Exception";

-        public const string ReceiveActivityName = DiagnosticSourceName + ".Receive";
+        public const string ReceiveActivityName = "Receive";
         public const string ReceiveActivityStartName = ReceiveActivityName + ".Start";
         public const string ReceiveActivityExceptionName = ReceiveActivityName + ".Exception";


Version 2.5.1

Version 2.5.1

--- Gigya.ServiceContract/Properties/AssemblyInfo.cs
+++ Gigya.ServiceContract/Properties/AssemblyInfo.cs
@@ -40,9 +40,9 @@
 [assembly: AssemblyTrademark("")]

-[assembly: AssemblyInformationalVersion("2.5.0")]// if pre-release should be in the format of "2.4.11-pre01".
-[assembly: AssemblyVersion("2.5.0")]
-[assembly: AssemblyFileVersion("2.5.0")]
+[assembly: AssemblyInformationalVersion("2.5.1")]// if pre-release should be in the format of "2.4.11-pre01".
+[assembly: AssemblyVersion("2.5.1")]
+[assembly: AssemblyFileVersion("2.5.1")]

 [assembly: AssemblyDescription("")]


cosmos db does not support order ThenBy

cosmos db does not support order ThenBy

--- Hangfire.AzureDocumentDB/DocumentDbConnection.cs
+++ Hangfire.AzureDocumentDB/DocumentDbConnection.cs
@@ -219,10 +219,9 @@
             return Storage.Client.CreateDocumentQuery<Set>(Storage.CollectionUri, queryOptions)
                 .Where(s => s.DocumentType == DocumentTypes.Set && s.Key == key)
                 .OrderBy(s => s.Score)
-                .ThenBy(s => s.CreatedOn)
-                .Select(s => s.Value)
-                .ToQueryResult()
-                .Select((s, i) => new { Value = s, Index = i })
+                .ToQueryResult()
+                .OrderBy(s => s.CreatedOn)
+                .Select((s, i) => new { s.Value, Index = i })
                 .Where(s => s.Index >= startingFrom && s.Index <= endingAt)
                 .Select(s => s.Value)
                 .ToList();


Update example

Update example

--- src/test/Console.Test.NET/Program.cs
+++ src/test/Console.Test.NET/Program.cs
@@ -18,6 +18,10 @@

         private static IControlPoint _controlPoint;
         private static IDevice _device;
+
+
+        // For this test to work you most likely need to stop the SSDP Discovery service on Windows
+        // If you don't stop the SSDP Windows Service, the service will intercept the UPnP multicasts and consequently nothing will show up in the console.

         static void Main(string[] args)
         {


Update unit test

Update unit test

ARKADE-559

--- src/Arkivverket.Arkade.Core.Tests/Report/ReportGeneratorTests.cs
+++ src/Arkivverket.Arkade.Core.Tests/Report/ReportGeneratorTests.cs
@@ -91,7 +91,6 @@
             html.Contains(Resources.Report.LabelArchiveType).Should().BeTrue();
             html.Contains(Resources.Report.LabelDateOfTesting).Should().BeTrue();
             html.Contains(Resources.Report.LabelNumberOfTestsExecuted).Should().BeTrue();
-            html.Contains(Resources.Report.LabelNumberOfFilesProcessed).Should().BeTrue();
             html.Contains(Resources.Report.LabelNumberOfErrors).Should().BeTrue();
             html.Contains("id=\"U.01\"").Should().BeTrue();
             html.Contains(Resources.Report.TestTypeContentAnalysisDisplayName).Should().BeTrue();


Hoofdform launches the chat client

Hoofdform launches the chat client

--- Ict4Participation/Ict4Participation/HoofdForm.cs
+++ Ict4Participation/Ict4Participation/HoofdForm.cs
@@ -9,6 +9,7 @@
 using System.Collections.Generic;
 using System.ComponentModel;
 using System.Data;
+using System.Diagnostics;
 using System.Drawing;
 using System.Linq;
 using System.Text;
@@ -27,6 +28,8 @@
         {
             this.InitializeComponent();
             this.Administration = a;
+            //Start chat client
+            //Process.Start("", Administration.MainAccountData(1));

             //Check if the user is a 'hulpverlener', which in that case, they should not be allowed to do as much as usual.
             if (this.Administration.MainAccountData(6) == "Hulpverlener")


Added some tests

Added some tests

--- source/Tests/FFImageLoading.Tests/ImageService/ImageServiceBaseTests.cs
+++ source/Tests/FFImageLoading.Tests/ImageService/ImageServiceBaseTests.cs
@@ -14,6 +14,12 @@
         }

         const string RemoteImage = "https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg";
+
+        public static string GetRandomImageUrl(int width = 100, int height = 100)
+        {
+            return string.Format("http://loremflickr.com/{1}/{2}/nature?filename={0}.jpg",
+                Guid.NewGuid().ToString("N"), width, height);
+        }

         [Fact]
         public void CanInitialize()
@@ -85,5 +91,46 @@
             var cachedMemory = Mock.MockImageCache.Instance.Get(RemoteImage);
             Assert.Null(cachedMemory);
         }
+
+        [Fact]
+        public async Task CanPreloadMultipleUrlImageSources()
+        {
+            IList<Task> tasks = new List<Task>();
+            int downloadsCount = 0;
+
+            for (int i = 0; i < 5; i++)
+            {
+                tasks.Add(ImageService.Instance.LoadUrl(GetRandomImageUrl())
+                          .DownloadStarted((obj) =>
+                          {
+                              downloadsCount++;
+                          })
+                          .PreloadAsync());
+            }
+
+            await Task.WhenAll(tasks);
+            Assert.Equal(5, downloadsCount);
+        }
+
+        [Fact]
+        public async Task CanWaitForSameUrlImageSources()
+        {
+            IList<Task> tasks = new List<Task>();
+            int downloadsCount = 0;
+            var source = GetRandomImageUrl();
+
+            for (int i = 0; i < 5; i++)
+            {
+                tasks.Add(ImageService.Instance.LoadUrl(source)
+                          .DownloadStarted((obj) =>
+                            {
+                                downloadsCount++;
+                            })
+                          .PreloadAsync());
+            }
+
+            await Task.WhenAll(tasks);
+            Assert.Equal(1, downloadsCount);
+        }
     }
 }


updated fix for iOS AccountStore reading   bugzilla link   should be fixed in C7

--- source/Xamarin.Auth.XamarinIOS/PlatformSpecific/KeyChainAccountStore.cs
+++ source/Xamarin.Auth.XamarinIOS/PlatformSpecific/KeyChainAccountStore.cs
@@ -35,18 +35,26 @@
 {
 	internal class KeyChainAccountStore : AccountStore
 	{
+		static Lazy <System.Reflection.MethodInfo> SecRecord_queryDictGetter = new Lazy<System.Reflection.MethodInfo> (() => {
+			return typeof (SecRecord).GetProperty ("queryDict", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetMethod;
+			});
+
+		static Lazy <IntPtr> Security_ReturnData = new Lazy<IntPtr> (() => {
+			return (IntPtr)typeof (SecRecord).Assembly.GetTypes ().First (t => t.Name == "SecItem" && t.Namespace == "Security").GetProperty ("ReturnData").GetMethod.Invoke (null, new Object [] {});
+			});
+
+		static Lazy <INativeObject> CFBoolean_True = new Lazy<INativeObject> (() => {
+			return typeof (SecRecord).Assembly.GetTypes ().First (t => t.Name == "CFBoolean" && t.Namespace == "CoreFoundation").GetField ("True").GetValue (null) as INativeObject;
+			});
+
 		public override IEnumerable<Account> FindAccountsForService(string serviceId)
         {
             var query = new SecRecord(SecKind.GenericPassword);
             query.Service = serviceId;
-			var prop = query.GetType ().GetProperty ("queryDict", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance);
-			var queryDict = prop.GetMethod.Invoke (query, new object [] {}) as NSMutableDictionary;
-
-			var SecItemType = query.GetType ().Assembly.GetTypes ().First (t => t.Name == "SecItem" && t.Namespace == "Security");
-			var ReturnDataKey = (IntPtr)SecItemType.GetProperty ("ReturnData").GetMethod.Invoke (null, new Object [] {});
-			var CFBooleanTrue = query.GetType ().Assembly.GetTypes ().First (t => t.Name == "CFBoolean" && t.Namespace == "CoreFoundation").GetField ("True").GetValue (null) as INativeObject;
-
-			queryDict.LowlevelSetObject (CFBooleanTrue.Handle, ReturnDataKey);
+
+			// Workaround for https://bugzilla.xamarin.com/show_bug.cgi?id=29977
+			var queryDict = SecRecord_queryDictGetter.Value.Invoke (query, new object [] {}) as NSMutableDictionary;
+			queryDict.LowlevelSetObject (CFBoolean_True.Value.Handle, Security_ReturnData.Value);

             SecStatusCode result;
             SecRecord[] records = SecKeyChain.QueryAsRecord(query, 1000, out result);


Udate assemblyInfo

Udate assemblyInfo

--- AssemblyInfo.cs
+++ AssemblyInfo.cs
@@ -26,4 +26,4 @@
 // [assembly: AssemblyVersion("1.16.0.0")]
 [assembly: AssemblyVersion("1.16")]
 [assembly: AssemblyFileVersion("1.16.0")]
-[assembly: AssemblyInformationalVersion("1.16.0-perso")]+[assembly: AssemblyInformationalVersion("1.16.0.0")]


Added a way for sounds to survive scene loads.

--- AudioManager.cs
+++ AudioManager.cs
@@ -59,15 +59,18 @@
         }
     }

-    public static void PlaySound(string audioName, float pitch = 1, float volumeMultiplier = 1) {
-        PlaySound(audioName, Camera.main.transform.position, pitch, volumeMultiplier);
+    public static void PlaySound(string audioName, float pitch = 1, float volumeMultiplier = 1, bool dontDestoryOnLoad = false) {
+        PlaySound(audioName, Camera.main.transform.position, pitch, volumeMultiplier, dontDestoryOnLoad);
     }

-    public static void PlaySound(string audioName, Vector3 position, float pitch = 1, float volumeMultiplier = 1) {
+    public static void PlaySound(string audioName, Vector3 position, float pitch = 1, float volumeMultiplier = 1, bool dontDestoryOnLoad = false) {
         AudioClip audioClip = null;
         if (AudioClips.TryGetValue(audioName, out audioClip)) {
             if (!IsSoundMuted) {
                 GameObject tempObject = (GameObject)GameObject.Instantiate(TempAudioSourcePrefab, position, Quaternion.identity);
+                if(dontDestoryOnLoad) {
+                    GameObject.DontDestroyOnLoad(tempObject);
+                }
                 PlaySound(audioName, tempObject.GetComponent<AudioSource>(), pitch, volumeMultiplier);
                 GameObject.Destroy(tempObject, audioClip.length);
             }
@@ -127,7 +130,7 @@

     private static GameObject GenerateTempAudioSourcePrefab() {
         _TempAudioSourcePrefab = new GameObject("TempAudioSource");
-        TempAudioSourcePrefab.AddComponent<AudioSource>();
+        _TempAudioSourcePrefab.AddComponent<AudioSource>();
         return _TempAudioSourcePrefab;
     }
 }


Removed over-verbose namespace

Removed over-verbose namespace

--- JabbR/ContentProviders/GoogleDocsFormProvider.cs
+++ JabbR/ContentProviders/GoogleDocsFormProvider.cs
@@ -25,7 +25,7 @@
             }
         }

-        protected override System.Text.RegularExpressions.Regex ParameterExtractionRegex
+        protected override Regex ParameterExtractionRegex
         {
             get
             {


NullRef when connecting to logstream applications #2498

--- Kudu.Core/Settings/DiagnosticsSettingsManager.cs
+++ Kudu.Core/Settings/DiagnosticsSettingsManager.cs
@@ -69,7 +69,14 @@
                 {
                     string fileContent = null;
                     OperationManager.Attempt(() => fileContent = FileSystemHelpers.ReadAllTextFromFile(_path));
-                    return JsonConvert.DeserializeObject<DiagnosticsSettings>(fileContent);
+
+                    var settings = JsonConvert.DeserializeObject<DiagnosticsSettings>(fileContent);
+                    if (settings == null)
+                    {
+                        throw new InvalidOperationException($"File '{_path}' content is empty or contains only white spaces.");
+                    }
+
+                    return settings;
                 }
                 catch (Exception ex)
                 {


fix #2187 site extension installed time

fix #2187 site extension installed time

--- Kudu.Core/SiteExtensions/SiteExtensionManager.cs
+++ Kudu.Core/SiteExtensions/SiteExtensionManager.cs
@@ -698,7 +698,21 @@
                 info.ExtensionUrl = String.IsNullOrEmpty(info.LocalPath) ? null : GetFullUrl(info.ExtensionUrl);
             }

-            info.FeedUrl = GetSettingManager(info.Id).GetValue(_feedUrlSetting);
+            foreach (var setting in GetSettingManager(info.Id).GetValues())
+            {
+                if (String.Equals(setting.Key, _feedUrlSetting, StringComparison.OrdinalIgnoreCase))
+                {
+                    info.FeedUrl = setting.Value.Value<string>();
+                }
+                else if (String.Equals(setting.Key, _installUtcTimestampSetting, StringComparison.OrdinalIgnoreCase))
+                {
+                    DateTime installedDateTime;
+                    if (DateTime.TryParse(setting.Value.Value<string>(), out installedDateTime))
+                    {
+                        info.InstalledDateTime = installedDateTime.ToUniversalTime();
+                    }
+                }
+            }
         }

         private static string GetUrlFromApplicationHost(SiteExtensionInfo info)


PR feedback.

PR feedback.

--- src/EditorFeatures/Core/Shared/Extensions/ITextViewExtensions.cs
+++ src/EditorFeatures/Core/Shared/Extensions/ITextViewExtensions.cs
@@ -341,8 +341,8 @@
             var visibleEnd = visibleSpansInBuffer.Last().End;

             var snapshot = subjectBuffer.CurrentSnapshot;
-            var startLine = snapshot.GetLineNumberFromPosition(visibleStart);
-            var endLine = snapshot.GetLineNumberFromPosition(visibleEnd);
+            var startLine = visibleStart.GetContainingLine().LineNumber;
+            var endLine = visibleEnd.GetContainingLine().LineNumber;

             startLine = Math.Max(startLine - extraLines, 0);
             endLine = Math.Min(endLine + extraLines, snapshot.LineCount - 1);


[MeeGo] Add header label with proper style to panel

--- src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
+++ src/Extensions/Banshee.MeeGo/Banshee.MeeGo/MediaPanelContents.cs
@@ -54,6 +54,14 @@
         {
             BorderWidth = 12;
             Spacing = 12;
+
+            var header_label = new Label {
+                Markup = String.Format ("<span font_desc=\"Droid Bold\" size=\"22000\" foreground=\"#606eff\">{0}</span>",
+                    GLib.Markup.EscapeText (Catalog.GetString ("Media"))),
+                Xalign = 0.0f
+            };
+
+            PackStart (header_label, false, false, 0);

             header_box = new HBox () {
                 Spacing = 5,


Increased version.

Increased version.

--- src/FeatureSwitcher.VstsConfiguration/Properties/AssemblyInfo.cs
+++ src/FeatureSwitcher.VstsConfiguration/Properties/AssemblyInfo.cs
@@ -32,8 +32,8 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.1.0.0")]
 #pragma warning disable CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.1.0.0")]
 #pragma warning restore CS7035 // The specified version string does not conform to the recommended format - major.minor.build.revision
 [assembly: InternalsVisibleTo("FeatureSwitcher.VstsConfiguration.Tests")]


Add Test for SemVer Parsing

Add Test for SemVer Parsing

--- src/HolzShots.Core.Tests/Net/Custom/CustomUploaderLoaderTests.cs
+++ src/HolzShots.Core.Tests/Net/Custom/CustomUploaderLoaderTests.cs
@@ -17,6 +17,8 @@
             Assert.NotNull(result.CustomData.Info);
             Assert.NotNull(result.CustomData.Uploader);
             Assert.NotNull(result.CustomData.SchemaVersion);
+
+            Assert.True(result.CustomData.Info.Version == new Semver.SemVersion(1, 0, 0));
         }
     }
 }


Remove old test theory

Remove old test theory

--- src/HolzShots.Core.Tests/Net/Custom/CustomUploaderLoaderTests.cs
+++ src/HolzShots.Core.Tests/Net/Custom/CustomUploaderLoaderTests.cs
@@ -7,7 +7,6 @@
     {
         [Theory]
         [FileStringContentData("Files/DirectUpload.net.hsjson")]
-        [FileStringContentData("Files/FotosHochladen.hsjson")]
         public void ValidateTest(string content)
         {
             var parseResult = CustomUploader.TryParse(content, out var result);


bumped assembly version

bumped assembly version

--- src/Kingdom.Constraints.Samples.Tests/Properties/AssemblyInfo.cs
+++ src/Kingdom.Constraints.Samples.Tests/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.8.*")]
+[assembly: AssemblyVersion("1.4.9.*")]
 [assembly: AssemblyFileVersion("1.0.0.0")]


DCS-30: we now use new  GetTemplateData method.

--- src/DiplomContentSystem.Services/CalendarEvents/CalendarEventService.cs
+++ src/DiplomContentSystem.Services/CalendarEvents/CalendarEventService.cs
@@ -39,6 +39,30 @@
             return response;
         }

+        public Dto.CalendarTemplateItem GetTemplateData(int diplomWorkId)
+        {
+            var result = new CalendarTemplateItem();
+            result.Stages = this.GetCalendarEvents(diplomWorkId).Items.Select(item=>{
+                return new CalendarTemplateStage()
+                {
+                    StartDate = item.StartDate.ToString("dd.MM.yyyy"),
+                    EndDate = item.EndDate.ToString("dd.MM.yyyy"),
+                    Accepted = item.Accepted,
+                    Name = item.Name
+                };
+            });
+            var i = 1;
+            foreach(var stage in result.Stages)
+            {
+                var _i = i;
+                stage.Id = _i;
+                i++;
+            }
+            result.Teacher = "Авдеев А.И.";
+            result.Student = "Курашин М.А.";
+
+            return result;
+        }
        /* public CalendarEvent Get(int id)
         {
             string[] includes = {"Speciality","Speciality.Department","Students"};


Replaced mspec tests for PUT requests

Replaced mspec tests for PUT requests

--- src/Nancy.Tests.Functional/Tests/BasicRouteInvocationsFixture.cs
+++ src/Nancy.Tests.Functional/Tests/BasicRouteInvocationsFixture.cs
@@ -84,6 +84,30 @@
             Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
         }

+        [Fact]
+        public void Should_set_default_response_values_for_basic_put_request()
+        {
+            // Given
+            // When
+            var response = this.browser.Put("/");
+
+            // Then
+            Assert.Equal(HttpStatusCode.OK, response.StatusCode);
+            Assert.Equal("text/html", response.ContentType);
+            Assert.Equal("Default put root", response.Body.AsString());
+        }
+
+        [Fact]
+        public void Should_set_response_status_code_to_not_found_when_put_request_did_not_match()
+        {
+            // Given
+            // When
+            var response = this.browser.Put("/invalid");
+
+            // Then
+            Assert.Equal(HttpStatusCode.NotFound, response.StatusCode);
+        }
+
         public class BasicRouteInvocationsModule : NancyModule
         {
             public BasicRouteInvocationsModule()


- Fixed map on background bug

- Fixed map on background bug

--- src/OpenDataApplication/OpenDataApplication/MainForm.Designer.cs
+++ src/OpenDataApplication/OpenDataApplication/MainForm.Designer.cs
@@ -44,6 +44,7 @@
             this.cSVReaderBindingSource = new System.Windows.Forms.BindingSource(this.components);
             this.mainFormBindingSource = new System.Windows.Forms.BindingSource(this.components);
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
+            this.splitContainer1.Panel1.SuspendLayout();
             this.splitContainer1.Panel2.SuspendLayout();
             this.splitContainer1.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.cSVReaderBindingSource)).BeginInit();
@@ -61,7 +62,7 @@
             this.map.GrayScaleMode = false;
             this.map.HelperLineOption = GMap.NET.WindowsForms.HelperLineOptions.DontShow;
             this.map.LevelsKeepInMemmory = 5;
-            this.map.Location = new System.Drawing.Point(12, 12);
+            this.map.Location = new System.Drawing.Point(3, 3);
             this.map.MarkersEnabled = true;
             this.map.MaxZoom = 18;
             this.map.MinZoom = 8;
@@ -74,17 +75,21 @@
             this.map.ScaleMode = GMap.NET.WindowsForms.ScaleModes.Integer;
             this.map.SelectedAreaFillColor = System.Drawing.Color.FromArgb(((int)(((byte)(33)))), ((int)(((byte)(65)))), ((int)(((byte)(105)))), ((int)(((byte)(225)))));
             this.map.ShowTileGridLines = false;
-            this.map.Size = new System.Drawing.Size(1447, 593);
+            this.map.Size = new System.Drawing.Size(841, 587);
             this.map.TabIndex = 0;
             this.map.Zoom = 0D;
             //
             // splitContainer1
             //
+            this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+            | System.Windows.Forms.AnchorStyles.Left)
+            | System.Windows.Forms.AnchorStyles.Right)));
             this.splitContainer1.Location = new System.Drawing.Point(12, 12);
             this.splitContainer1.Name = "splitContainer1";
             //
             // splitContainer1.Panel1
             //
+            this.splitContainer1.Panel1.Controls.Add(this.map);
             this.splitContainer1.Panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.splitContainer1_Panel1_Paint);
             //
             // splitContainer1.Panel2
@@ -99,15 +104,16 @@
             this.splitContainer1.Panel2.Controls.Add(this.checkBox3);
             this.splitContainer1.Panel2.Controls.Add(this.checkBox2);
             this.splitContainer1.Panel2.Controls.Add(this.checkBox1);
-            this.splitContainer1.Size = new System.Drawing.Size(1447, 593);
-            this.splitContainer1.SplitterDistance = 934;
+            this.splitContainer1.Panel2MinSize = 450;
+            this.splitContainer1.Size = new System.Drawing.Size(1341, 593);
+            this.splitContainer1.SplitterDistance = 847;
             this.splitContainer1.TabIndex = 1;
             //
             // label4
             //
             this.label4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label4.AutoSize = true;
-            this.label4.Location = new System.Drawing.Point(366, 33);
+            this.label4.Location = new System.Drawing.Point(347, 33);
             this.label4.Name = "label4";
             this.label4.Size = new System.Drawing.Size(72, 13);
             this.label4.TabIndex = 10;
@@ -117,7 +123,7 @@
             //
             this.label3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.label3.AutoSize = true;
-            this.label3.Location = new System.Drawing.Point(225, 464);
+            this.label3.Location = new System.Drawing.Point(206, 464);
             this.label3.Name = "label3";
             this.label3.Size = new System.Drawing.Size(67, 13);
             this.label3.TabIndex = 9;
@@ -128,7 +134,7 @@
             //
             this.label2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label2.AutoSize = true;
-            this.label2.Location = new System.Drawing.Point(101, 96);
+            this.label2.Location = new System.Drawing.Point(82, 96);
             this.label2.Name = "label2";
             this.label2.Size = new System.Drawing.Size(49, 13);
             this.label2.TabIndex = 8;
@@ -138,7 +144,7 @@
             //
             this.comboBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.comboBox2.FormattingEnabled = true;
-            this.comboBox2.Location = new System.Drawing.Point(88, 116);
+            this.comboBox2.Location = new System.Drawing.Point(69, 116);
             this.comboBox2.Name = "comboBox2";
             this.comboBox2.Size = new System.Drawing.Size(244, 21);
             this.comboBox2.TabIndex = 7;
@@ -147,7 +153,7 @@
             //
             this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.label1.AutoSize = true;
-            this.label1.Location = new System.Drawing.Point(101, 30);
+            this.label1.Location = new System.Drawing.Point(82, 30);
             this.label1.Name = "label1";
             this.label1.Size = new System.Drawing.Size(55, 13);
             this.label1.TabIndex = 6;
@@ -158,7 +164,7 @@
             //
             this.comboBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.comboBox1.FormattingEnabled = true;
-            this.comboBox1.Location = new System.Drawing.Point(88, 49);
+            this.comboBox1.Location = new System.Drawing.Point(69, 49);
             this.comboBox1.Name = "comboBox1";
             this.comboBox1.Size = new System.Drawing.Size(244, 21);
             this.comboBox1.TabIndex = 5;
@@ -168,7 +174,7 @@
             //
             this.checkBox4.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.checkBox4.AutoSize = true;
-            this.checkBox4.Location = new System.Drawing.Point(369, 122);
+            this.checkBox4.Location = new System.Drawing.Point(350, 122);
             this.checkBox4.Name = "checkBox4";
             this.checkBox4.Size = new System.Drawing.Size(44, 17);
             this.checkBox4.TabIndex = 3;
@@ -179,7 +185,7 @@
             //
             this.checkBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.checkBox3.AutoSize = true;
-            this.checkBox3.Location = new System.Drawing.Point(369, 99);
+            this.checkBox3.Location = new System.Drawing.Point(350, 99);
             this.checkBox3.Name = "checkBox3";
             this.checkBox3.Size = new System.Drawing.Size(50, 17);
             this.checkBox3.TabIndex = 2;
@@ -190,7 +196,7 @@
             //
             this.checkBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.checkBox2.AutoSize = true;
-            this.checkBox2.Location = new System.Drawing.Point(369, 76);
+            this.checkBox2.Location = new System.Drawing.Point(350, 76);
             this.checkBox2.Name = "checkBox2";
             this.checkBox2.Size = new System.Drawing.Size(53, 17);
             this.checkBox2.TabIndex = 1;
@@ -201,7 +207,7 @@
             //
             this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
             this.checkBox1.AutoSize = true;
-            this.checkBox1.Location = new System.Drawing.Point(369, 53);
+            this.checkBox1.Location = new System.Drawing.Point(350, 53);
             this.checkBox1.Name = "checkBox1";
             this.checkBox1.Size = new System.Drawing.Size(50, 17);
             this.checkBox1.TabIndex = 0;
@@ -220,13 +226,13 @@
             //
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(1471, 617);
+            this.ClientSize = new System.Drawing.Size(1362, 617);
             this.Controls.Add(this.splitContainer1);
-            this.Controls.Add(this.map);
             this.Name = "MainForm";
             this.Text = "OpenData";
             this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
             this.Load += new System.EventHandler(this.MainForm_Load);
+            this.splitContainer1.Panel1.ResumeLayout(false);
             this.splitContainer1.Panel2.ResumeLayout(false);
             this.splitContainer1.Panel2.PerformLayout();
             ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();


Add test

Add test

--- src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs
+++ src/EditorFeatures/CSharpTest/Classification/SemanticClassifierTests.cs
@@ -3690,6 +3690,32 @@

         [Theory]
         [CombinatorialData]
+        public async Task TestJson_RawString(TestHost testHost)
+        {
+            await TestAsync(
+@"
+class Program
+{
+    void Goo()
+    {
+        // lang=json
+        var r = """"""[/*comment*/{ 'goo': 0 }]"""""";
+    }
+}",
+testHost,
+Keyword("var"),
+Json.Array("["),
+Json.Comment("/*comment*/"),
+Json.Object("{"),
+Json.PropertyName("'goo'"),
+Json.Punctuation(":"),
+Json.Number("0"),
+Json.Object("}"),
+Json.Array("]"));
+        }
+
+        [Theory]
+        [CombinatorialData]
         public async Task TestMultiLineJson1(TestHost testHost)
         {
             await TestAsync(


Changes Triage status flags

Changes Triage status flags

--- src/SFA.DAS.Commitments.Domain/Entities/DataLock/TriageStatus.cs
+++ src/SFA.DAS.Commitments.Domain/Entities/DataLock/TriageStatus.cs
@@ -2,9 +2,9 @@
 {
     public enum TriageStatus
     {
-        None = 0,
-        Unknown = 1,
-        Pass = 2,
-        Fail = 3
+        Unknown = 0,
+        Change = 1,
+        Restart = 2,
+        FixIlr = 3
     }
 }


Use new ArrayBuilder pattern.

Use new ArrayBuilder pattern.

--- src/Features/Core/Portable/Completion/Providers/SymbolCompletionItem.cs
+++ src/Features/Core/Portable/Completion/Providers/SymbolCompletionItem.cs
@@ -8,6 +8,7 @@
 using System.Linq;
 using System.Threading;
 using System.Threading.Tasks;
+using Microsoft.CodeAnalysis.PooledObjects;
 using Microsoft.CodeAnalysis.Shared.Extensions;
 using Microsoft.CodeAnalysis.Shared.Utilities;

@@ -101,7 +102,7 @@
             if (item.Properties.TryGetValue("Symbols", out var symbolIds))
             {
                 var idList = symbolIds.Split(s_symbolSplitters, StringSplitOptions.RemoveEmptyEntries).ToList();
-                var symbols = new List<ISymbol>();
+                using var _ = ArrayBuilder<ISymbol>.GetInstance(out var symbols);

                 var compilation = await document.Project.GetCompilationAsync(cancellationToken).ConfigureAwait(false);
                 DecodeSymbols(idList, compilation, symbols);
@@ -121,13 +122,13 @@
                     }
                 }

-                return symbols.ToImmutableArray();
+                return symbols.ToImmutable();
             }

             return ImmutableArray<ISymbol>.Empty;
         }

-        private static void DecodeSymbols(List<string> ids, Compilation compilation, List<ISymbol> symbols)
+        private static void DecodeSymbols(List<string> ids, Compilation compilation, ArrayBuilder<ISymbol> symbols)
         {
             for (var i = 0; i < ids.Count;)
             {


Write Booleans in lowercase

Write Booleans in lowercase

--- src/Serilog.Sinks.Literate/Sinks/Literate/LiterateConsoleSink.cs
+++ src/Serilog.Sinks.Literate/Sinks/Literate/LiterateConsoleSink.cs
@@ -183,6 +183,8 @@

                             if (scalar.Value is string && messagePropertyToken.Format == null && messagePropertyToken.Alignment == null)
                                 Console.Write(scalar.Value);
+                            else if (scalar.Value is bool && messagePropertyToken.Format == null && messagePropertyToken.Alignment == null)
+                                Console.Write(scalar.Value.ToString().ToLowerInvariant());
                             else
                                 messagePropertyToken.Render(logEvent.Properties, Console.Out, _formatProvider);
                         }


Do not mess with non-file project window items.

--- src/GitHub.Unity/Assets/Plugins/GitHub/Editor/ProjectWindowInterface.cs
+++ src/GitHub.Unity/Assets/Plugins/GitHub/Editor/ProjectWindowInterface.cs
@@ -52,7 +52,7 @@

 		static void OnProjectWindowItemGUI(string guid, Rect itemRect)
 		{
-			if (Event.current.type != EventType.Repaint)
+			if (Event.current.type != EventType.Repaint || string.IsNullOrEmpty(guid))
 			{
 				return;
 			}


RepositoryFactory - cleanup

RepositoryFactory - cleanup

--- src/StatisticsRomania/StatisticsRomania/Lib/RepositoryFactory.cs
+++ src/StatisticsRomania/StatisticsRomania/Lib/RepositoryFactory.cs
@@ -7,21 +7,11 @@
     {
         public static IRepository<T> GetRepository<T>() where T : Data, new()
         {
-            return GetWebClientRepository<T>();
-        }
-
-        private static IRepository<T> GetWebClientRepository<T>() where T : Data, new()
-        {
             return new InMemoryRepository<T>();
         }

         public static IRepository<County> GetCountyRepository()
         {
-            return GetWebClientCountyRepository();
-        }
-
-        private static IRepository<County> GetWebClientCountyRepository()
-        {
             return new InMemoryRepository<County>();
         }
     }


updated custom style page menu

updated custom style page menu

--- MVCGridExample/Views/Demo/CustomStyleMenu.cshtml
+++ MVCGridExample/Views/Demo/CustomStyleMenu.cshtml
@@ -7,8 +7,9 @@

To create a custom style for your grid, you have 2 options.

-

-
Option 1: Implement your own IMVCGridRenderingEngine. Instructions.

-
Option 2: Use your own razor view that uses RenderingModel as its model. Instructions.

-

+
Option 1: IMVCGridRenderingEngine

+
Implement your own IMVCGridRenderingEngine. Instructions.

+
Option 2: Custom Razor View

+
Use your own razor view that uses RenderingModel as its model. Instructions.

+


adding check to make sure interface is generic

--- src/Grace/DependencyInjection/Impl/FluentExportStrategyConfiguration.cs
+++ src/Grace/DependencyInjection/Impl/FluentExportStrategyConfiguration.cs
@@ -105,7 +105,10 @@

                 if (_exportConfiguration.ActivationType.GetTypeInfo().IsGenericTypeDefinition)
                 {
-                    _exportConfiguration.AddExportAs(interfaceTypes.GetGenericTypeDefinition());
+                    if (interfaceTypes.IsConstructedGenericType)
+                    {
+                        _exportConfiguration.AddExportAs(interfaceTypes.GetGenericTypeDefinition());
+                    }
                 }
                 else
                 {


Don't create folder if save as cbz

Don't create folder if save as cbz

--- MangaRipper.Core/Controllers/WorkerController.cs
+++ MangaRipper.Core/Controllers/WorkerController.cs
@@ -133,11 +133,6 @@
             }
             if (task.Formats.Contains(OutputFormat.CBZ))
             {
-                if (!Directory.Exists(task.SaveToFolder))
-                {
-                    Directory.CreateDirectory(task.SaveToFolder);
-                }
-
                 cbz.Create(tempFolder, task.SaveToFolder + ".cbz");
             }


Actually call them callbacks after upload -_-

--- swag-sync/swag-sync/Bucket.cs
+++ swag-sync/swag-sync/Bucket.cs
@@ -133,14 +133,23 @@
                 if (completed_task == upload_task)
                 {
                     if (Exists(request, file_transfer_utility.S3Client))
-                        Trace.TraceInformation("Upload complete.");
+                    {
+                        Trace.TraceInformation("Upload complete {0}", file);
+                        FileUploadedCallback(file);
+                    }
                     else
-                        Trace.TraceInformation("Upload failed.");
+                    {
+                        Trace.TraceInformation("Upload failed {0}", file);
+                        FileFailedCallback(file);
+                    }
                 }
                 else
                 {
                     token.Cancel();
-                    Trace.TraceInformation("Upload timed out.");
+                    {
+                        Trace.TraceInformation("Upload timed out {0}", file);
+                        FileFailedCallback(file);
+                    }
                 }
             }
         }


clean up

clean up

--- src/SupaCharge.Core/ThreadingAbstractions/ThreadPoolWorkQueue.cs
+++ src/SupaCharge.Core/ThreadingAbstractions/ThreadPoolWorkQueue.cs
@@ -5,7 +5,7 @@
   public class ThreadPoolWorkQueue : IWorkQueue {
     public EmptyFuture Enqueue(Action work) {
       var future = new EmptyFuture();
-      ThreadPool.QueueUserWorkItem(w => DoWork(work, future));
+      ThreadPool.QueueUserWorkItem(o => DoWork(work, future));
       return future;
     }

@@ -17,7 +17,7 @@

     public ResultFuture<T> Enqueue<T>(Func<T> work) {
       var future = new ResultFuture<T>();
-      ThreadPool.QueueUserWorkItem(w => DoWork(work, future));
+      ThreadPool.QueueUserWorkItem(o => DoWork(work, future));
       return future;
     }

@@ -51,7 +51,7 @@
         future.Failed(e);
       }
     }
-
+
     private static void DoWork<T>(T data, Action<T> work, EmptyFuture future) {
       try {
         work(data);


Remove MemoryPersistentCache

Remove MemoryPersistentCache

--- Mapsui.Extensions/Cache/MemoryPersistentCache.cs
+++ Mapsui.Extensions/Cache/MemoryPersistentCache.cs
@@ -1,50 +0,0 @@
-using System.Collections.Concurrent;
-using System.Collections.Generic;
-using BruTile;
-using BruTile.Cache;
-using Mapsui.Cache;
-
-namespace Mapsui.Extensions.Cache
-{
-    public class MemoryPersistentCache: IPersistentCache<byte[]>, IUrlPersistentCache
-    {
-        private ConcurrentDictionary<TileIndex, byte[]> tileCache = new();
-        private ConcurrentDictionary<string, byte[]> urlCache = new();
-
-        public void Add(TileIndex index, byte[] tile)
-        {
-            tileCache[index] = tile;
-        }
-
-        public void Remove(TileIndex index)
-        {
-            tileCache.TryRemove(index, out _);
-        }
-
-        public byte[] Find(TileIndex index)
-        {
-            if (tileCache.TryGetValue(index, out var result))
-                return result;
-
-            return null;
-        }
-
-        public void Add(string url, byte[] tile)
-        {
-            urlCache[url] = tile;
-        }
-
-        public void Remove(string url)
-        {
-            urlCache.TryRemove(url, out _);
-        }
-
-        public byte[]? Find(string url)
-        {
-            if (urlCache.TryGetValue(url, out var result))
-                return result;
-
-            return null;
-        }
-    }
-}


new support approach not working yet. Moving back to old behavior.

--- MatterControlLib/DesignTools/SupportGenerator.cs
+++ MatterControlLib/DesignTools/SupportGenerator.cs
@@ -80,8 +80,8 @@

 	public class SupportGenerator
 	{
-		private readonly double minimumSupportHeight;
-		private readonly InteractiveScene scene;
+		private double minimumSupportHeight;
+		private InteractiveScene scene;

 		public SupportGenerator(InteractiveScene scene, double minimumSupportHeight)
 		{
@@ -237,7 +237,7 @@
 		{
 			var selectedItem = scene.SelectedItem;
 			var bedBounds = new RectangleDouble(Vector2.NegativeInfinity, Vector2.PositiveInfinity);
-			if(selectedItem != null)
+			if (selectedItem != null)
 			{
 				var aabb = selectedItem.GetAxisAlignedBoundingBox();
 				bedBounds = new RectangleDouble(new Vector2(aabb.MinXYZ), new Vector2(aabb.MaxXYZ));
@@ -247,7 +247,7 @@
 			{
 				var existingSupports = scene.Descendants().Where(i =>
 				{
-					if(i.GetType() == typeof(GeneratedSupportObject3D))
+					if (i.GetType() == typeof(GeneratedSupportObject3D))
 					{
 						// we have a support, check if it is within the bounds of the selected object
 						var xyCenter = new Vector2(i.GetAxisAlignedBoundingBox().Center);
@@ -427,15 +427,14 @@
 				{
 					// add a single plane at the bed so we always know the bed is a top
 					detectedPlanes.Add((x, y), new List<(double z, bool bottom)>());
+					detectedPlanes[(x, y)].Add((0, false));

 					IntersectInfo upHit = null;
+
 					for (double yOffset = -1; yOffset <= 1; yOffset++)
 					{
 						for (double xOffset = -1; xOffset <= 1; xOffset++)
 						{
-							var singlXyPlanes = new List<(double z, bool bottom)>();
-							singlXyPlanes.Add((0, false));
-
 							var halfPillar = PillarSize / 2;
 							var yPos = (gridBounds.Bottom + y) * PillarSize + halfPillar + (yOffset * halfPillar);
 							var xPos = (gridBounds.Left + x) * PillarSize + halfPillar + (xOffset * halfPillar);
@@ -447,7 +446,7 @@
 								upHit = traceData.GetClosestIntersection(upRay);
 								if (upHit != null)
 								{
-									singlXyPlanes.Add((upHit.HitPosition.Z, true));
+									detectedPlanes[(x, y)].Add((upHit.HitPosition.Z, true));

 									// make a new ray just past the last hit to keep looking for up hits
 									upRay = new Ray(new Vector3(xPos, yPos, upHit.HitPosition.Z + .001), Vector3.UnitZ, intersectionType: IntersectionType.FrontFace);
@@ -461,14 +460,12 @@
 								upHit = traceData.GetClosestIntersection(upRay);
 								if (upHit != null)
 								{
-									singlXyPlanes.Add((upHit.HitPosition.Z, false));
+									detectedPlanes[(x, y)].Add((upHit.HitPosition.Z, false));

 									// make a new ray just past the last hit to keep looking for up hits
 									upRay = new Ray(new Vector3(xPos, yPos, upHit.HitPosition.Z + .001), Vector3.UnitZ, intersectionType: IntersectionType.BackFace);
 								}
 							} while (upHit != null);
-
-							// union the sigleXyPlanes into detectedPlanes[(x, y)]
 						}
 					}
 				}
@@ -572,14 +569,14 @@
 			supportFaces = new FaceList();

 			// find all the down faces from the support candidates
-			AddSupportFaces(supportCandidates,
-				supportVerts,
-				supportFaces,
+			AddSupportFaces(supportCandidates,
+				supportVerts,
+				supportFaces,
 				(angle) => angle <= MaxOverHangAngle);

 			// find all the up faces from everything on the bed
-			AddSupportFaces(scene.Children.SelectMany(i => i.VisibleMeshes()),
-				supportVerts,
+			AddSupportFaces(scene.Children.SelectMany(i => i.VisibleMeshes()),
+				supportVerts,
 				supportFaces,
 				(angle) => angle >= 90);


Enhancement to make ClasspathResourceLoader function with assembly qualified strings.

--- src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
+++ src/Lucene.Net.Analysis.Common/Analysis/Util/ClasspathResourceLoader.cs
@@ -74,6 +74,16 @@
         {
             try
             {
+                // LUCENENET TODO: Apparently the second parameter of FindClass was used
+                // to determine what assembly a class is in (which makes this function pretty much
+                // pointless). Need to evaluate whether it makes sense to pass a "relative" type here
+                // to identify the correct assembly, since we can just pass a string to do the same.
+                if (cname.Contains(","))
+                {
+                    // Assume we have an assembly qualified name
+                    return Type.GetType(cname);
+                }
+
                 return this.clazz.Assembly.GetType(cname, true);
             }
             catch (Exception e)


Renable XmlSerializer.Generator tests

Renable XmlSerializer.Generator tests

Previously these were disabled if the generated dll was missing, now they'll fail if the DLL is missing.

--- src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs
+++ src/System.Private.Xml/tests/XmlSerializer/XmlSerializerTests.cs
@@ -32,13 +32,7 @@
             method.Invoke(null, new object[] { 1 });
 #endif
 #if XMLSERIALIZERGENERATORTESTS
-            string path = Path.GetDirectoryName(typeof(XmlSerializerTests).Assembly.Location);
-            string serializername = typeof(TypeWithDateTimeStringProperty).Assembly.GetName().Name + ".XmlSerializers.dll";
-            string serializerPath = Path.Combine(path, serializername);
-            if (File.Exists(serializerPath))
-            {
-                method.Invoke(null, new object[] { 3 });
-            }
+            method.Invoke(null, new object[] { 3 });
 #endif
         }
     }


ViewModelListBase: added OnSelectedItemsCollectionChanged and OnCollectionChanged to allow for overrides in subclasses

--- src/MvvmScarletToolkit.Observables/ViewModels/Base/ViewModelListBase.cs
+++ src/MvvmScarletToolkit.Observables/ViewModels/Base/ViewModelListBase.cs
@@ -93,18 +93,23 @@
                 .WithAsyncCancellation()
                 .Build();

-            PropertyChanging += ViewModelListBase_PropertyChanging;
-            PropertyChanged += ViewModelListBase_PropertyChanged;
-
-            SelectedItems.CollectionChanged += ViewModelListBase_CollectionChanged;
-        }
-
-        private void ViewModelListBase_CollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+            PropertyChanging += OnPropertyChanging;
+            PropertyChanged += OnPropertyChanged;
+
+            _items.CollectionChanged += OnCollectionChanged;
+            SelectedItems.CollectionChanged += OnSelectedItemsCollectionChanged;
+        }
+
+        protected virtual void OnSelectedItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
         {
             OnSelectionsChanged();
         }

-        private void ViewModelListBase_PropertyChanged(object sender, PropertyChangedEventArgs e)
+        protected virtual void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
+        {
+        }
+
+        protected virtual void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
         {
             switch (e.PropertyName)
             {
@@ -114,7 +119,7 @@
             }
         }

-        private void ViewModelListBase_PropertyChanging(object sender, PropertyChangingEventArgs e)
+        protected virtual void OnPropertyChanging(object sender, PropertyChangingEventArgs e)
         {
             switch (e.PropertyName)
             {
@@ -383,10 +388,10 @@

             if (disposing)
             {
-                PropertyChanging -= ViewModelListBase_PropertyChanging;
-                PropertyChanged -= ViewModelListBase_PropertyChanged;
-
-                SelectedItems.CollectionChanged -= ViewModelListBase_CollectionChanged;
+                PropertyChanging -= OnPropertyChanging;
+                PropertyChanged -= OnPropertyChanged;
+
+                SelectedItems.CollectionChanged -= OnSelectedItemsCollectionChanged;

                 await Clear().ConfigureAwait(false);
             }