no message

no message

--- _Scripts/cameraBehaviour.cs
+++ _Scripts/cameraBehaviour.cs
@@ -15,6 +15,7 @@

 	private Vector3 Pivot;
 	private bool Dragging = false;
+	Vector3 cameraStartPosition; // here it works

 	private float OrthoSize
 	{
@@ -60,27 +61,25 @@
 	void ReadInputs()
 	{
 		Vector3 MouseWorldPosition = _camera.ScreenToWorldPoint(Input.mousePosition);
-		Vector3 cameraStartPosition = new Vector3();
-		//transform.Translate((Input.GetAxis("Horizontal") * Vector3.right + Input.GetAxis("Vertical") * Vector3.up) * speed * Time.deltaTime / Time.timeScale);
+		transform.Translate((Input.GetAxis("Horizontal") * Vector3.right + Input.GetAxis("Vertical") * Vector3.up) * speed * Time.deltaTime / Time.timeScale);
 		OrthoSize -= Input.GetAxis("Mouse ScrollWheel") * zoomSpeed * Time.deltaTime * 10 / Time.timeScale * ZoomSensibility.Evaluate((OrthoSize-MinOrthoSize)/ (MaxOrthoSize-MinOrthoSize));
 		if (Input.GetMouseButtonDown(1))
 		{
-			Pivot = MouseWorldPosition;
+			Pivot = Input.mousePosition;
 			cameraStartPosition = transform.position;
 			Dragging = true;
-			//Debug.Log("Pivot Position : " + Pivot);
 		}
 		if (Input.GetMouseButtonUp(1))
 		{
 			Dragging = false;
 		}
 		if (Dragging == true && Input.GetMouseButton(1))
-		{
+		{
+			Vector3 DifOnScreen = _camera.ScreenToWorldPoint(Pivot) - _camera.ScreenToWorldPoint(Input.mousePosition);
+			Debug.Log(DifOnScreen);
 			Vector2 temporare = Vector2.Lerp(new Vector2(transform.position.x, transform.position.y),
 											 new Vector2(cameraStartPosition.x, cameraStartPosition.y) +
-											 new Vector2(Pivot.x, Pivot.y) -
-											 new Vector2 (MouseWorldPosition.x, MouseWorldPosition.y), 0.5f);
-			//Debug.Log("Target : " + new Vector3(temporare.x, temporare.y, transform.position.z));
+											 new Vector2(DifOnScreen.x, DifOnScreen.y), 0.5f);
 			transform.position = new Vector3(temporare.x, temporare.y, transform.position.z);

 		}


Commented out 'CheckForIllegalCrossThreadCalls'

--- LF2.IDE/SolutionExplorer.cs
+++ LF2.IDE/SolutionExplorer.cs
@@ -78,7 +78,7 @@
 		{
 			try
 			{
-				CheckForIllegalCrossThreadCalls = false;
+				//CheckForIllegalCrossThreadCalls = false;
 				treeView.Nodes.Clear();
 				TreeNode rootNode = (TreeNode)e.Result;
 				treeView.Nodes.Add(rootNode);


Handle PlatformActions in ScrollContainer<T>

--- osu.Framework/Graphics/Containers/ScrollContainer.cs
+++ osu.Framework/Graphics/Containers/ScrollContainer.cs
@@ -9,6 +9,7 @@
 using OpenTK;
 using OpenTK.Graphics;
 using osu.Framework.Graphics.Shapes;
+using osu.Framework.Input.Bindings;
 using OpenTK.Input;

 namespace osu.Framework.Graphics.Containers
@@ -24,8 +25,7 @@
         }
     }

-    public class ScrollContainer<T> : Container<T>, DelayedLoadWrapper.IOnScreenOptimisingContainer
-        where T : Drawable
+    public class ScrollContainer<T> : Container<T>, DelayedLoadWrapper.IOnScreenOptimisingContainer, IKeyBindingHandler<PlatformAction> where T : Drawable
     {
         /// <summary>
         /// Determines whether the scroll dragger appears on the left side. If not, then it always appears on the right side.
@@ -253,20 +253,13 @@
             if (IsDragging)
                 return base.OnKeyDown(state, args);

-            var key = state.Keyboard.Keys.Last();
-            switch (key)
+            switch (args.Key)
             {
                 case Key.PageUp:
                     ScrollTo(target - displayableContent);
                     return true;
                 case Key.PageDown:
                     ScrollTo(target + displayableContent);
-                    return true;
-                case Key.Home:
-                    ScrollToTop();
-                    return true;
-                case Key.End:
-                    ScrollToEnd();
                     return true;
                 default:
                     return base.OnKeyDown(state, args);
@@ -374,7 +367,7 @@
         /// </summary>
         /// <param name="animated">Whether to animate the movement.</param>
         /// <param name="allowDuringDrag">Whether we should interrupt a user's active drag.</param>
-        public void ScrollToTop(bool animated = true, bool allowDuringDrag = false)
+        public void ScrollToStart(bool animated = true, bool allowDuringDrag = false)
         {
             if (!IsDragging || allowDuringDrag)
                 scrollTo(0, animated, DistanceDecayJump);
@@ -599,5 +592,32 @@
                 return true;
             }
         }
+
+        public bool OnPressed(PlatformAction action)
+        {
+            switch (action.ActionType)
+            {
+                case PlatformActionType.LineStart:
+                    ScrollToStart();
+                    return true;
+                case PlatformActionType.LineEnd:
+                    ScrollToEnd();
+                    return true;
+                default:
+                    return false;
+            }
+        }
+
+        public bool OnReleased(PlatformAction action)
+        {
+            switch (action.ActionType)
+            {
+                case PlatformActionType.LineStart:
+                case PlatformActionType.LineEnd:
+                    return true;
+                default:
+                    return false;
+            }
+        }
     }
 }


Fix scrollbar not clamping correctly anymore.

--- osu.Framework/Graphics/Containers/ScrollContainer.cs
+++ osu.Framework/Graphics/Containers/ScrollContainer.cs
@@ -187,7 +187,7 @@

         private void onScrollbarMovement(float value)
         {
-            scrollTo(value / scrollbar.Size.Y, false);
+            scrollTo(clamp(value / scrollbar.Size.Y), false);
         }

         private void offset(float value, bool animated = true)
@@ -238,6 +238,10 @@

                 // Lastly, we gradually nudge the target towards valid bounds.
                 target = (float)Interpolation.Lerp(clamp(target), target, Math.Exp(-DISTANCE_DECAY_CLAMPING * Clock.ElapsedFrameTime));
+
+                float clampedTarget = clamp(target);
+                if (Precision.AlmostEquals(clampedTarget, target))
+                    target = clampedTarget;
             }

             // Exponential interpolation between the target and our current scroll position.


Applied suggested changes

Applied suggested changes

--- osu.Framework/Graphics/Containers/ScrollContainer.cs
+++ osu.Framework/Graphics/Containers/ScrollContainer.cs
@@ -50,7 +50,7 @@
         private bool scrollbarOverlapsContent = true;

         /// <summary>
-        /// Determines whether the scrollbar overlaps the available content.
+        /// Whether the scrollbar overlaps the content.
         /// </summary>
         public bool ScrollbarOverlapsContent
         {
@@ -124,7 +124,7 @@
         protected override Container<Drawable> Content => content;

         /// <summary>
-        /// Determines whether the content is scrolled to the end.
+        /// Whether the content is scrolled to the end.
         /// </summary>
         /// <param name="lenience">The comparision tolerance.</param>
         /// <returns>True if the content is scrolled to the end.</returns>
@@ -316,14 +316,14 @@
         }

         /// <summary>
-        /// Offsets the position.
-        /// </summary>
-        /// <param name="offset">The scroll offset.</param>
+        /// Scrolls to a new position relative to the current scroll offset.
+        /// </summary>
+        /// <param name="offset">The amount by which we should scroll.</param>
         /// <param name="animated">Whether to animate the movement.</param>
         public void ScrollBy(float offset, bool animated = true) => scrollTo(target + offset, animated);

         /// <summary>
-        /// Scrolls to a absolute position.
+        /// Scrolls to an absolute position.
         /// </summary>
         /// <param name="value">The position to scroll to.</param>
         /// <param name="animated">Whether to animate the movement.</param>
@@ -363,10 +363,10 @@
         }

         /// <summary>
-        /// Determines the position (in relation to the current <see cref="scrollDim"/>) of a child in the content.
+        /// Determines the position of a child in the content.
         /// </summary>
         /// <param name="d">The child to get the position from.</param>
-        /// <returns>The position (in relation to the current <see cref="scrollDim"/>) of the child.</returns>
+        /// <returns>The position of the child.</returns>
         public float GetChildPosInContent(Drawable d) => d.Parent.ToSpaceOfOtherDrawable(d.Position, content)[scrollDim];

         private void updatePosition()


互动交流-分配负责部门负责人员后，导致该管理员无法登陆，提示'关键字不在字典中'错误

--- source/SiteServer.CMS/Wcm/Provider/GovInteractPermissionsDao.cs
+++ source/SiteServer.CMS/Wcm/Provider/GovInteractPermissionsDao.cs
@@ -116,10 +116,10 @@
             foreach (GovInteractPermissionsInfo permissionsInfo in permissionsInfoArrayList)
             {
                 var list = new List<string>();
-                if (sortedlist[permissionsInfo.NodeID] != null)
-                {
-                    list = sortedlist[permissionsInfo.NodeID];
-                }
+               // if (sortedlist[permissionsInfo.NodeID] != null)//ʱsortedlistΪգ'ؼֲֵ'û޷½
+               //{
+               //    list = sortedlist[permissionsInfo.NodeID];
+               //}

                 var permissionArrayList = TranslateUtils.StringCollectionToStringList(permissionsInfo.Permissions);
                 foreach (string permission in permissionArrayList)


Use a concurrent dictionary for custom transforms to avoid incorrect thread access

--- osu.Framework/Graphics/Transforms/TransformCustom.cs
+++ osu.Framework/Graphics/Transforms/TransformCustom.cs
@@ -2,8 +2,8 @@
 // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

 using osu.Framework.MathUtils;
-using System.Collections.Generic;
 using System;
+using System.Collections.Concurrent;
 using System.Reflection.Emit;
 using osu.Framework.Extensions.TypeExtensions;
 using System.Reflection;
@@ -30,7 +30,7 @@
             public WriteFunc Write;
         }

-        private static readonly Dictionary<string, Accessor> accessors = new Dictionary<string, Accessor>();
+        private static readonly ConcurrentDictionary<string, Accessor> accessors = new ConcurrentDictionary<string, Accessor>();
         private static readonly InterpolationFunc<TValue> interpolation_func;

         static TransformCustom()
@@ -122,16 +122,7 @@
             return findAccessor(type.BaseType, propertyOrFieldName);
         }

-        private static Accessor getAccessor(string propertyOrFieldName)
-        {
-            Accessor result;
-            if (accessors.TryGetValue(propertyOrFieldName, out result))
-                return result;
-
-            result = findAccessor(typeof(T), propertyOrFieldName);
-            accessors.Add(propertyOrFieldName, result);
-            return result;
-        }
+        private static Accessor getAccessor(string propertyOrFieldName) => accessors.GetOrAdd(propertyOrFieldName, _ => findAccessor(typeof(T), propertyOrFieldName));

         private readonly Accessor accessor;
         private readonly InterpolationFunc<TValue> interpolationFunc;


LiPTT

LiPTT

--- LiPTT/Compoments/Article.cs
+++ LiPTT/Compoments/Article.cs
@@ -34,8 +34,6 @@
         /// </summary>
         public double Space { get; set; }

-        //public double ViewWidth { get; set; }
-
         public ActualSizePropertyProxy ListViewProxy { get; set; }

         public Article ArticleTag
@@ -1117,8 +1115,6 @@
                 AddYoutubeView(youtubeID);
             }
         }
-
-        ///#1PoaSW6h

         /// <summary>
         /// 下載圖片，並加入到ListView


Fix build error

Fix build error

--- osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs
+++ osu.Game.Rulesets.Catch.Tests/TestCaseCatcherArea.cs
@@ -26,7 +26,6 @@
         public TestCaseCatcherArea()
         {
             AddSliderStep<float>("CircleSize", 0, 8, 5, createCatcher);
-            AddToggleStep("Hyperdash", t => catcherArea.ToggleHyperDash(t));
         }

         private void createCatcher(float size)
@@ -54,8 +53,6 @@
                 : base(beatmapDifficulty)
             {
             }
-
-            public void ToggleHyperDash(bool status) => MovableCatcher.HyperDashModifier = status ? 2 : 1;
         }
     }
 }


Remove now unnecessary (duplicating) test

--- osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs
+++ osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs
@@ -1,7 +1,6 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

-using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading;
@@ -205,29 +204,6 @@
             AddAssert("screen didn't change", () => Stack.CurrentScreen is SoloSpectator);
         }

-        [Test]
-        public void OnUserBeganPlayingCallbackInvokedOnNewAdd()
-        {
-            bool callbackInvoked = false;
-            Action<int, SpectatorState> callbackAction = (_, __) => callbackInvoked = true;
-
-            AddStep("bind first event", () => testSpectatorStreamingClient.OnUserBeganPlaying += callbackAction);
-            start();
-            AddAssert("callback invoked", () => callbackInvoked);
-
-            AddStep("reset", () =>
-            {
-                testSpectatorStreamingClient.OnUserBeganPlaying -= callbackAction;
-                callbackInvoked = false;
-            });
-
-            AddStep("bind event with run once immediately", () => testSpectatorStreamingClient.BindUserBeganPlaying(callbackAction, true));
-            AddAssert("callback invoked", () => callbackInvoked);
-
-            // Don't leave the event bound if test run succeeded.
-            AddStep("reset", () => testSpectatorStreamingClient.OnUserBeganPlaying -= callbackAction);
-        }
-
         private OsuFramedReplayInputHandler replayHandler =>
             (OsuFramedReplayInputHandler)Stack.ChildrenOfType<OsuInputManager>().First().ReplayInputHandler;


add tests for /chat command

add tests for /chat command

--- osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs
+++ osu.Game.Tests/Visual/Online/TestSceneChatOverlay.cs
@@ -1,6 +1,7 @@
 // Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
 // See the LICENCE file in the repository root for full licence text.

+using System;
 using System.Collections.Generic;
 using System.Linq;
 using NUnit.Framework;
@@ -85,6 +86,21 @@
                         case JoinChannelRequest joinChannel:
                             joinChannel.TriggerSuccess();
                             return true;
+
+                        case GetUserRequest getUser:
+                            if (getUser.Lookup.Equals("some body", StringComparison.OrdinalIgnoreCase))
+                            {
+                                getUser.TriggerSuccess(new User()
+                                {
+                                    Username = "some body",
+                                    Id = 1,
+                                });
+                            }
+                            else
+                            {
+                                getUser.TriggerFailure(new Exception());
+                            }
+                            return true;
                     }

                     return false;
@@ -322,6 +338,27 @@
             AddAssert("Current channel is channel 1", () => currentChannel == channel1);
         }

+        [Test]
+        public void TestChatCommand()
+        {
+            AddStep("Join channel 1", () => channelManager.JoinChannel(channel1));
+            AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1]));
+
+            AddStep("Open chat with user.", () => channelManager.PostCommand("chat some body"));
+            AddAssert("PM channel is selected", () =>
+                channelManager.CurrentChannel.Value.Type == ChannelType.PM && channelManager.CurrentChannel.Value.Users.Single().Username == "some body");
+
+            AddStep("Open chat with non-existant user", () => channelManager.PostCommand("chat nobody"));
+            AddAssert("Last message is error", () => channelManager.CurrentChannel.Value.Messages.Last().GetType() == typeof(ErrorMessage));
+
+            // Make sure no unnecessary requests are made when the PM chanenl is already open.
+            AddStep("Select channel 1", () => clickDrawable(chatOverlay.TabMap[channel1]));
+            AddStep("Unregister request handling", () => ((DummyAPIAccess)API).HandleRequest = null);
+            AddStep("Open chat with user.", () => channelManager.PostCommand("chat some body"));
+            AddAssert("PM channel is selected", () =>
+                channelManager.CurrentChannel.Value.Type == ChannelType.PM && channelManager.CurrentChannel.Value.Users.Single().Username == "some body");
+        }
+
         private void pressChannelHotkey(int number)
         {
             var channelKey = Key.Number0 + number;


Unskip unit tests

Unskip unit tests

Unskip unit tests now that the associated issues have been resolved.

Related to #285.

--- src/AnalyzerPowerPack/Test/Design/CodeFixes/CA1033FixerTests.cs
+++ src/AnalyzerPowerPack/Test/Design/CodeFixes/CA1033FixerTests.cs
@@ -132,8 +132,7 @@
             VerifyCSharpFix(code, expectedFixedCode);
         }

-        [WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
-        [Fact(Skip = "2616")]
+        [Fact, WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
         public void CA1033SimpleDiagnosticCasesCSharp_ImplicitImpl()
         {
             var code = @"
@@ -198,8 +197,7 @@
             VerifyCSharpFix(code, expectedFixedCode);
         }

-        [WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
-        [Fact(Skip = "2616")]
+        [Fact, WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
         public void CA1033SimpleDiagnosticCasesCSharp_Indexer()
         {
             var code = @"
@@ -746,8 +744,7 @@
             VerifyBasicFix(code, expectedFixedCode);
         }

-        [WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
-        [Fact(Skip = "2616")]
+        [Fact, WorkItem(2616, "https://github.com/dotnet/roslyn/issues/2616")]
         public void CA1033SimpleDiagnosticCasesBasic_ImplicitImpl()
         {
             var code = @"
@@ -797,8 +794,7 @@
             VerifyBasicFix(code, expectedFixedCode);
         }

-        [WorkItem(2650, "https://github.com/dotnet/roslyn/issues/2650")]
-        [Fact(Skip = "2650")]
+        [Fact, WorkItem(2650, "https://github.com/dotnet/roslyn/issues/2650")]
         public void CA1033SimpleDiagnosticCasesBasic_Indexer()
         {
             var code = @"


removal of an unused class

removal of an unused class

--- API/Entities/BoardIdentifierWrapper.cs
+++ API/Entities/BoardIdentifierWrapper.cs
@@ -1,24 +0,0 @@
-using System.Collections.Generic;
-
-namespace API.Entities
-{
-    public class Wrapper
-    {
-        public string ReplyCode { get; set; }
-        public string ReplyText { get; set; }
-        public List<Data> ReplyData { get; set; }
-        //public string ReplyData { get; set; }
-    }
-
-    public class Data
-    {
-        public string BoardId { get; set; }
-        public List<CardType> CardTypes { get; set; }
-    }
-
-    public class CardType
-    {
-        public string Id { get; set; }
-        public string Name { get; set; }
-    }
-}


closes #4

closes #4

--- src/AspNetUpgrade/AspNetUpgrade.Tests/TestFileUpgradeContext.cs
+++ src/AspNetUpgrade/AspNetUpgrade.Tests/TestFileUpgradeContext.cs
@@ -1,6 +1,5 @@
 using System.IO;
 using System.Text;
-using AspNetUpgrade.Actions;
 using AspNetUpgrade.Upgrader;
 using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;


Added logging service to login client

Added logging service to login client

--- src/Booma.Proxy.Client.Unity.Login/Client/LoginNetworkClient.cs
+++ src/Booma.Proxy.Client.Unity.Login/Client/LoginNetworkClient.cs
@@ -3,6 +3,7 @@
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using Common.Logging;
 using SceneJect.Common;
 using Sirenix.OdinInspector;
 using Sirenix.Serialization;
@@ -38,12 +39,16 @@
 		[Inject]
 		public IManagedNetworkClient<PSOBBLoginPacketPayloadClient, PSOBBLoginPacketPayloadServer> Client { get; }

+		[Inject]
+		public ILog Logger { get; }
+
 		//TODO: Is it safe or ok to await in start without ever completing?
 		private async Task Start()
 		{
 			try
 			{
-				Debug.Log("Starting login client");
+				if(Logger.IsDebugEnabled)
+					Logger.Debug("Starting login client");

 				//As soon as we start we should attempt to connect to the login server.
 				bool result = await Client.ConnectAsync(IpAddress, Port);
@@ -51,11 +56,13 @@
 				if(!result)
 					throw new InvalidOperationException($"Failed to connect to Login: {IpAddress} Port: {Port}");

-				Debug.Log($"Connected client. isConnected: {Client.isConnected}");
+				if(Logger.IsDebugEnabled)
+					Logger.Debug($"Connected client. isConnected: {Client.isConnected}");

 				while(Client.isConnected)
 				{
-					Debug.Log("Reading message.");
+					if(Logger.IsDebugEnabled)
+						Logger.Debug("Reading message.");

 					PSOBBNetworkIncomingMessage<PSOBBLoginPacketPayloadServer> message = await Client.ReadMessageAsync();

@@ -64,7 +71,9 @@
 			}
 			catch(Exception e)
 			{
-				Debug.LogError($"Error: {e.Message}\n\n Stack Trace: {e.StackTrace}");
+				if(Logger.IsDebugEnabled)
+					Logger.Debug($"Error: {e.Message}\n\n Stack Trace: {e.StackTrace}");
+
 				throw;
 			}
 		}


Adding EnsureCapacity implementation for Dictionary (dotnet/coreclr#15729)

Adding EnsureCapacity implementation for Dictionary

Signed-off-by: dotnet-bot-corefx-mirror <03c4cb6107ae99956a7681f2c97ff7104809a2bd@microsoft.com>

--- src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs
+++ src/Common/src/CoreLib/System/Collections/Generic/Dictionary.cs
@@ -373,7 +373,7 @@
             return -1;
         }

-        private void Initialize(int capacity)
+        private int Initialize(int capacity)
         {
             int size = HashHelpers.GetPrime(capacity);
             int[] buckets = new int[size];
@@ -385,6 +385,8 @@
             _freeList = -1;
             _buckets = buckets;
             _entries = new Entry[size];
+
+            return size;
         }

         private bool TryInsert(TKey key, TValue value, InsertionBehavior behavior)
@@ -759,6 +761,22 @@
             return new Enumerator(this, Enumerator.KeyValuePair);
         }

+        /// <summary>
+        /// Ensures that the dictionary can hold up to 'capacity' entries without any further expansion of its backing storage
+        /// </summary>
+        public int EnsureCapacity(int capacity)
+        {
+            if (capacity < 0)
+                ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.capacity);
+            if (_entries != null && _entries.Length >= capacity)
+                return _entries.Length;
+            if (_buckets == null)
+                return Initialize(capacity);
+            int newSize = HashHelpers.GetPrime(capacity);
+            Resize(newSize, forceNewHashCodes: false);
+            return newSize;
+        }
+
         bool ICollection.IsSynchronized
         {
             get { return false; }


Format YouTube views

Format YouTube views

--- Espera/Espera.View/ViewModels/YoutubeSongViewModel.cs
+++ Espera/Espera.View/ViewModels/YoutubeSongViewModel.cs
@@ -1,13 +1,10 @@
 using Espera.Core;
 using Rareform.Patterns.MVVM;
 using System;
-using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Net;
-using System.Text;
 using System.Windows.Input;
 using System.Windows.Media;
 using System.Windows.Media.Imaging;
@@ -75,13 +72,13 @@
             }
         }

-        public int? Views
+        public string Views
         {
             get
             {
                 var song = this.Model as YoutubeSong;

-                return song == null ? (int?)null : song.Views;
+                return song == null ? null : String.Format("{0:N0}", song.Views);
             }
         }

@@ -91,7 +88,7 @@

             worker.DoWork += (s, e) =>
             {
-                var uri = e.Argument as Uri;
+                var uri = (Uri)e.Argument;

                 using (var webClient = new WebClient())
                 {


Changed form validation code to rely on element id instead of the target (its name)

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@4888 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- MonoRail/Castle.MonoRail.Framework/Helpers/FormHelper.cs
+++ MonoRail/Castle.MonoRail.Framework/Helpers/FormHelper.cs
@@ -2250,11 +2250,13 @@

 			IBrowserValidationGenerator generator = validatorProvider.CreateGenerator(validationConfig, inputType, attributes);

-			foreach (IValidator validator in validators)
+			string id = CreateHtmlId(attributes, target, false);
+
+			foreach(IValidator validator in validators)
 			{
 				if (validator.SupportsBrowserValidation)
 				{
-					validator.ApplyBrowserValidation(validationConfig, inputType, generator, attributes, target);
+					validator.ApplyBrowserValidation(validationConfig, inputType, generator, attributes, id);
 				}
 			}
 		}


Removed Select overload that cause NVelocity to choke with Ambiguous match

git-svn-id: bab0c2de90ee11a20376049c2cdee62584491f34@3271 73e77b4c-caa6-f847-a29a-24ab75ae54b6

--- MonoRail/Castle.MonoRail.Framework/Helpers/FormHelper.cs
+++ MonoRail/Castle.MonoRail.Framework/Helpers/FormHelper.cs
@@ -982,37 +982,6 @@
 			return Select(target, selectedValue, dataSource, attributes);
 		}

-		/// <summary>
-		/// Creates a <c>select</c> element and its <c>option</c>s based on the <c>dataSource</c>.
-		/// If the <c>dataSource</c>
-		/// elements are complex objects (ie not string or primitives),
-		/// supply the parameters <c>value</c> and <c>text</c> to the dictionary to make
-		/// the helper use the specified properties to extract the <c>option</c> value and content respectively.
-		/// <para>
-		/// You can also specify the attribute <c>firstoption</c> to force the first option be
-		/// something like 'please select'. You can set the value of <c>firstoption</c> by specifying the attribute
-		/// <c>firstoptionvalue</c>. The default value is '0'.
-		/// </para>
-		/// <para>
-		/// Usually the <c>target</c> is a single value and the <c>dataSource</c> is obviously
-		/// a set with multiple items. The element types tend to be the same. If
-		/// they are not, you might have to specify the <c>suffix</c> parameters on
-		/// the <c>attributes</c> as it would not be inferred.
-		/// </para>
-		/// <para>
-		/// The target can also be a set. In this case the intersection will be
-		/// the initially selected elements.
-		/// </para>
-		/// </summary>
-		/// <param name="target">The object to get the value from and to be based on to create the element name.</param>
-		/// <param name="selectedValue"></param>
-		/// <param name="dataSource">The set of available elements</param>
-		/// <returns>The generated form element</returns>
-		public string Select(string target, object selectedValue, IEnumerable dataSource)
-		{
-			return Select(target, selectedValue, dataSource, null);
-		}
-
 		/// <summary>
 		/// Creates a <c>select</c> element and its <c>option</c>s based on the <c>dataSource</c>.
 		/// If the <c>dataSource</c>


Bendクラスにregionを追加

Bendクラスにregionを追加

--- MusicXMLUtils/Structure/Note/Notations/Technical/Bend.cs
+++ MusicXMLUtils/Structure/Note/Notations/Technical/Bend.cs
@@ -38,6 +38,7 @@
     [XmlType("bend")]
     public class Bend
     {
+        #region -- Public Properties --
         [XmlElement("bend-alter")]
         public decimal BendAlter { get; set; }

@@ -75,5 +76,6 @@

         [XmlIgnore]
         public bool LastBeatSpecified { get; set; }
+        #endregion
     }
 }


Default debug server to shorty2x

Default debug server to shorty2x

--- NTumbleBit/ClassicTumbler/Server/TumblerConfiguration.cs
+++ NTumbleBit/ClassicTumbler/Server/TumblerConfiguration.cs
@@ -135,7 +135,7 @@
 			}

 			var standardCycles = new StandardCycles(Network);
-			var cycleName = config.GetOrDefault<string>("cycle", standardCycles.Debug ? "shorty" : "kotori");
+			var cycleName = config.GetOrDefault<string>("cycle", standardCycles.Debug ? "shorty2x" : "kotori");

 			Logs.Configuration.LogInformation($"Using cycle {cycleName}");


Fix last broken test.

Fix last broken test.

--- NuGet.Extensions.Tests/Configuration/FindPackageTests.cs
+++ NuGet.Extensions.Tests/Configuration/FindPackageTests.cs
@@ -1,4 +1,5 @@
-using System.Collections.Generic;
+using System;
+using System.Collections.Generic;
 using System.Runtime.Versioning;
 using Moq;
 using NuGet.Common;
@@ -27,7 +28,7 @@
                 new DefaultPackagePathResolver(_mockFileSystem), _mockFileSystem);
         }

-        [TestCase("Should.Not.Exist.On.Feed", "0.0", null, true, Result = null)] // get latest for package id (0.0 version)
+        [TestCase("Should.Not.Exist.On.Feed", "0.0", null, true, Result = "")] // get latest for package id (0.0 version)
         [TestCase("Assembly.Common", "0.0", null, true, Result = "2.0")] // get latest for package id (0.0 version)
         [TestCase("Assembly.Data", "0.0", null, true, Result = "2.1")]  // get latest for package id (0.0 version)
         [TestCase("Assembly.Common", "1.0", null, true, Result = "2.0")] // get specific version for package id
@@ -59,7 +60,7 @@
             var pr = new PackageReference(id, SemanticVersion.Parse(version), string.IsNullOrEmpty(versionSpec) ? new VersionSpec() : VersionUtility.ParseVersionSpec(versionSpec), new FrameworkName(".NET Framework, Version=4.0"));
             var prc = new PackageResolutionManager(new Mock<ILogger>().Object, latest, new MemoryBasedPackageCache(new Mock<ILogger>().Object));
             var v = prc.ResolveInstallableVersion(Utilities.GetFactory().CreateRepository("SingleAggregate"), pr);
-            return v != null ? v.ToString() : null;
+            return v != null ? v.ToString() : "";
         }

         protected override void SetUpTest()


replace references to empty string with "string.empty"

--- OneDriveConnector/OneDriveConnector/OneDriveConnector.cs
+++ OneDriveConnector/OneDriveConnector/OneDriveConnector.cs
@@ -32,11 +32,11 @@

         private HttpClient httpClient;
         private Timer refreshTimer;
-        private string clientId = "";
-        private string clientSecret = "";
-        private string redirectUrl = "";
-        private string accessToken = "";
-        private string refreshToken = "";
+        private string clientId = string.Empty;
+        private string clientSecret = string.Empty;
+        private string redirectUrl = string.Empty;
+        private string accessToken = string.Empty;
+        private string refreshToken = string.Empty;

         /// <summary>
         /// Instantiates a OneDrive connector object. Requires a call to "login" function to complete authorization.
@@ -130,11 +130,11 @@
                 }
             }

-            clientId = "";
-            clientSecret = "";
-            redirectUrl = "";
-            accessToken = "";
-            refreshToken = "";
+            clientId = string.Empty;
+            clientSecret = string.Empty;
+            redirectUrl = string.Empty;
+            accessToken = string.Empty;
+            refreshToken = string.Empty;
             refreshTimer.Dispose();
             httpClient.DefaultRequestHeaders.Clear();
             httpClient.Dispose();


adjust DialogModule to only send broadcast alerts to root agents

--- OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -118,7 +118,8 @@
         {
             m_scene.ForEachScenePresence(delegate(ScenePresence presence)
             {
-                presence.ControllingClient.SendAlertMessage(message);
+                if (!presence.IsChildAgent)
+                    presence.ControllingClient.SendAlertMessage(message);
             });
         }

@@ -226,4 +227,4 @@
             return result;
         }
     }
-}
+}


Avoid InvalidCastException when performing CWD on a path that does not represent a directory

--- FubarDev.FtpServer.FileSystem/FileSystemExtensions.cs
+++ FubarDev.FtpServer.FileSystem/FileSystemExtensions.cs
@@ -90,11 +90,14 @@
                         currentPath.Pop();
                     continue;
                 }
-                var foundEntry = (IUnixDirectoryEntry)await fileSystem.GetEntryByNameAsync(currentDir, pathElement, cancellationToken);
-                if (foundEntry == null)
+
+                var foundEntry = await fileSystem.GetEntryByNameAsync(currentDir, pathElement, cancellationToken);
+                var foundDirEntry = foundEntry as IUnixDirectoryEntry;
+                if (foundDirEntry == null)
                     return null;
-                currentPath.Push(foundEntry);
-                currentDir = foundEntry;
+
+                currentPath.Push(foundDirEntry);
+                currentDir = foundDirEntry;
             }
             return currentDir;
         }


finally found that it is not the bug from code, but bug from packaging

--- GFDN.ThaiBahtTextFacts/ThaiBahtTextExtensionsFacts.cs
+++ GFDN.ThaiBahtTextFacts/ThaiBahtTextExtensionsFacts.cs
@@ -165,11 +165,5 @@
       Assert.Equal("ห้าพันเอ็ดล้านบาทสิบเอ็ดสตางค์", ThaiBahtTextUtil.ThaiBahtText(5001000000.11m, UsesEt.Always));
     }

-    [Fact]
-    public void Bug2501() {
-      Assert.Equal("สองพันห้าร้อยหนึ่งบาทถ้วน", (2501m).ThaiBahtText());
-      Assert.Equal("สองพันห้าร้อยหนึ่งบาทถ้วน", (2501m).ThaiBahtText(UsesEt.TensOnly));
-      Assert.Equal("สองพันห้าร้อยเอ็ดบาทถ้วน", (2501m).ThaiBahtText(UsesEt.Always));
-    }
   }
 }


Amend.

Amend.

--- Gu.Wpf.ValidationScope.Demo/DataGridScopeView.xaml.cs
+++ Gu.Wpf.ValidationScope.Demo/DataGridScopeView.xaml.cs
@@ -1,10 +1,7 @@
-namespace Gu.Wpf.ValidationScope.Demo
+namespace Gu.Wpf.ValidationScope.Demo
 {
     using System.Windows.Controls;

-    /// <summary>
-    /// Interaction logic for DataGridScopeView.xaml.
-    /// </summary>
     public partial class DataGridScopeView : UserControl
     {
         public DataGridScopeView()


CMF1-1064 Implemented code review comment

--- Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs
+++ Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs
@@ -435,7 +435,7 @@
         private string GetViewNameFromSchemaTitle(string schemaTitle)
         {
             string result = schemaTitle;
-            Regex regex = new Regex(@"\[([^\[\]]*)\]");
+            Regex regex = new Regex(@"\[([^\[\]]*+)\]");
             Match match = regex.Match(schemaTitle);
             if (match.Success)
             {


fix WaitExtensions.PrintEntries

fix WaitExtensions.PrintEntries

--- Signum.Windows.Extensions.UIAutomation/WaitExtensions.cs
+++ Signum.Windows.Extensions.UIAutomation/WaitExtensions.cs
@@ -115,43 +115,45 @@

         public static List<AutomationElement> GetAllProcessWindows(int processId, int count = -10)
         {
+            Entries.Add(new LogEntry
+            {
+                Count = count,
+                retryCount = -1,
+                StackTrace = Environment.StackTrace
+            });
+
             int retryCount = 0;
-            retry:
+        retry:
             var result = GetRecursiveProcessWindows(AutomationElement.RootElement, processId);

-            lock (Entries)
-            {
-                Entries.AddRange(result.Select(r =>
+            Entries.AddRange(result.Select(r =>
+            {
+                try
                 {
-                    try
+                    return new LogEntry
                     {
-                        return new LogEntry
-                        {
-                            Count = count,
-                            retryCount = retryCount,
-                            ClassName = r.Current.ClassName,
-                            Name = r.Current.Name,
-                            RuntimeId = r.GetRuntimeId().ToString("."),
-                            ItemStatus = r.Current.ItemStatus,
-                            StackTrace = Environment.StackTrace,
-                        };
-                    }
-                    catch (ElementNotAvailableException)
+                        Count = count,
+                        retryCount = retryCount,
+                        ClassName = r.Current.ClassName,
+                        Name = r.Current.Name,
+                        RuntimeId = r.GetRuntimeId().ToString("."),
+                        ItemStatus = r.Current.ItemStatus,
+                    };
+                }
+                catch (ElementNotAvailableException)
+                {
+                    return new LogEntry
                     {
-                        return new LogEntry
-                        {
-                            Count = count,
-                            retryCount = retryCount,
-                            ClassName = "error",
-                            Name = "error",
-                            RuntimeId = r.GetRuntimeId().ToString("."),
-                            ItemStatus = "error",
-                            StackTrace = Environment.StackTrace,
-                        };
-                    }
-                }));
-            }
-
+                        Count = count,
+                        retryCount = retryCount,
+                        ClassName = "error",
+                        Name = "error",
+                        RuntimeId = r.GetRuntimeId().ToString("."),
+                        ItemStatus = "error",
+                        StackTrace = Environment.StackTrace,
+                    };
+                }
+            }));
             if (result.IsEmpty())
             {
                 if (retryCount > 4)
@@ -177,12 +179,9 @@

         public static void PrintEntries(Exception e, string should, string current)
         {
-            lock (Entries)
-            {
-                Entries.Add(new LogEntry { Count = 987, ClassName = should, Name = current, ItemStatus = e.Message,  StackTrace = Environment.StackTrace });
-                Entries.ToCsvFile(@"c:\debugWindows.csv", append: true);
-                Entries.Clear();
-            }
+            Entries.Add(new LogEntry { Count = 987, ClassName = should, Name = current, ItemStatus = e.Message, StackTrace = Environment.StackTrace });
+            Entries.ToCsvFile(@"c:\debugWindows.csv", append: true);
+            Entries.Clear();
         }

         static List<LogEntry> Entries = new List<LogEntry>();


Test mit super-message

Test mit super-message

--- SocialInsurance.Germany.Messages.Tests/aager/AagTests.cs
+++ SocialInsurance.Germany.Messages.Tests/aager/AagTests.cs
@@ -29,7 +29,7 @@
         [Fact(DisplayName = "TestDSER v03")]
         public void TestDSER03()
         {
-            var deuevMessage = GetMessageFromFile("eaag0001.a15", "dser-agger-v03");
+            var deuevMessage = GetMessageFromFile("eaag0001.a15", "super-message");
             Assert.True(deuevMessage.DSER03.Count > 0);
         }

@@ -70,7 +70,7 @@
                 writer.Write(dsko);
                 streamObject = reader.Read();

-                while (reader.RecordName == "DSER")
+                while (reader.RecordName == "DSER" || reader.RecordName == "DSER-v02" || reader.RecordName == "DSER-v03")
                 {
                     switch (name)
                     {
@@ -86,6 +86,27 @@
                                 var record = Assert.IsType<DSER03>(streamObject);
                                 deuevMessage.DSER03.Add(record);
                                 writer.Write(record);
+                            }
+                            break;
+                        case "super-message":
+                            switch (reader.RecordName)
+                            {
+                                case "DSER-v02":
+                                    {
+                                        var record = Assert.IsType<DSER02>(streamObject);
+                                        deuevMessage.DSER02.Add(record);
+                                        writer.Write(record);
+                                    }
+                                    break;
+                                case "DSER-v03":
+                                    {
+                                        var record = Assert.IsType<DSER03>(streamObject);
+                                        deuevMessage.DSER03.Add(record);
+                                        writer.Write(record);
+                                    }
+                                    break;
+                                default:
+                                    throw new InvalidOperationException(string.Format("Unsupported record {0}", reader.RecordName));
                             }
                             break;
                         default:


Refs #95.  Spaties vervangen door tabs (guideline 38).

git-svn-id: 0ffdc289f568b1e7493e560395a00d06174c8a92@880 99b415e2-69d1-4072-8d93-0ed3a15484ab

--- Solution/Chiro.Gap.WebApp/Controllers/LedenController.cs
+++ Solution/Chiro.Gap.WebApp/Controllers/LedenController.cs
@@ -12,172 +12,171 @@

 namespace Chiro.Gap.WebApp.Controllers
 {
-    public class LedenController : BaseController
+	public class LedenController : BaseController
+	{
+		//
+		// GET: /Leden/
+		public ActionResult Index(int groepID)
+		{
+			// Recentste groepswerkjaar ophalen, en leden tonen.
+			return List(ServiceHelper.CallService<IGroepenService, int>(svc => svc.RecentsteGroepsWerkJaarIDGet(groepID)), 0, groepID);
+		}

-    {
-        //
-        // GET: /Leden/
-        public ActionResult Index(int groepID)
-        {
-            // Recentste groepswerkjaar ophalen, en leden tonen.
-            return List(ServiceHelper.CallService<IGroepenService, int>(svc => svc.RecentsteGroepsWerkJaarIDGet(groepID)), 0, groepID);
-        }
+		// De paginering zal gebeuren per groepswerkjaar, niet per grootte van de pagina
+		// Er wordt ook meegegeven welke afdeling er gevraagd is (0 is alles)
+		// GET: /Leden/List/{afdID}/{groepsWerkJaarId}
+		public ActionResult List(int groepsWerkJaarId, int afdID, int groepID)
+		{
+			// Bijhouden welke lijst we laatst bekeken en op welke pagina we zaten. Paginering gebeurt hier per werkjaar.
+			Sessie.LaatsteLijst = "Leden";
+			Sessie.LaatsteActieID = afdID;
+			Sessie.LaatstePagina = groepsWerkJaarId;

-        // De paginering zal gebeuren per groepswerkjaar, niet per grootte van de pagina
-        // Er wordt ook meegegeven welke afdeling er gevraagd is (0 is alles)
-        // GET: /Leden/List/{afdID}/{groepsWerkJaarId}
-        public ActionResult List(int groepsWerkJaarId, int afdID, int groepID)
-        {
-            // Bijhouden welke lijst we laatst bekeken en op welke pagina we zaten. Paginering gebeurt hier per werkjaar.
-            Sessie.LaatsteLijst = "Leden";
-            Sessie.LaatsteActieID = afdID;
-            Sessie.LaatstePagina = groepsWerkJaarId;
+			int paginas = 0;

-            int paginas = 0;
+			var model = new Models.LidInfoModel();
+			BaseModelInit(model, groepID);

-            var model = new Models.LidInfoModel();
-            BaseModelInit(model, groepID);
+			var list =
+				ServiceHelper.CallService<IGroepenService, IList<AfdelingInfo>>
+				(groep => groep.AfdelingenOphalen(groepsWerkJaarId));

-            var list =
-                    ServiceHelper.CallService<IGroepenService, IList<AfdelingInfo>>
-                    (groep => groep.AfdelingenOphalen(groepsWerkJaarId));
-
-            model.AfdelingsInfoDictionary = new Dictionary<int, AfdelingInfo>();
-            foreach (AfdelingInfo ai in list)
-            {
-                model.AfdelingsInfoDictionary.Add(ai.AfdelingID, ai);
-            }
+			model.AfdelingsInfoDictionary = new Dictionary<int, AfdelingInfo>();
+			foreach (AfdelingInfo ai in list)
+			{
+				model.AfdelingsInfoDictionary.Add(ai.AfdelingID, ai);
+			}

-            model.GroepsWerkJaarLijst =
-                ServiceHelper.CallService<IGroepenService, IList<GroepsWerkJaar>>
-                        (e => e.WerkJarenOphalen(groepID));
+			model.GroepsWerkJaarLijst =
+			    ServiceHelper.CallService<IGroepenService, IList<GroepsWerkJaar>>
+				    (e => e.WerkJarenOphalen(groepID));

-            GroepsWerkJaar huidig = (from g in model.GroepsWerkJaarLijst
-                                     where g.ID == groepsWerkJaarId
-                                     select g).FirstOrDefault();
+			GroepsWerkJaar huidig = (from g in model.GroepsWerkJaarLijst
+						 where g.ID == groepsWerkJaarId
+						 select g).FirstOrDefault();

-            model.GroepsWerkJaarIdZichtbaar = groepsWerkJaarId;
-            model.GroepsWerkJaartalZichtbaar = huidig.WerkJaar;
+			model.GroepsWerkJaarIdZichtbaar = groepsWerkJaarId;
+			model.GroepsWerkJaartalZichtbaar = huidig.WerkJaar;

-            if (afdID == 0)
-            {
-                model.LidInfoLijst =
-                    ServiceHelper.CallService<ILedenService, IList<LidInfo>>
-                        (lid => lid.PaginaOphalen(groepsWerkJaarId, out paginas));
+			if (afdID == 0)
+			{
+				model.LidInfoLijst =
+				    ServiceHelper.CallService<ILedenService, IList<LidInfo>>
+					(lid => lid.PaginaOphalen(groepsWerkJaarId, out paginas));

-                model.Titel = "Ledenoverzicht van het jaar " + model.GroepsWerkJaartalZichtbaar;
+				model.Titel = "Ledenoverzicht van het jaar " + model.GroepsWerkJaartalZichtbaar;

-            }
-            else
-            {
-                model.LidInfoLijst =
-                    ServiceHelper.CallService<ILedenService, IList<LidInfo>>
-                    (lid => lid.PaginaOphalenVolgensAfdeling(groepsWerkJaarId, afdID, out paginas));
+			}
+			else
+			{
+				model.LidInfoLijst =
+				    ServiceHelper.CallService<ILedenService, IList<LidInfo>>
+				    (lid => lid.PaginaOphalenVolgensAfdeling(groepsWerkJaarId, afdID, out paginas));

-                AfdelingInfo af = (from a in model.AfdelingsInfoDictionary.AsQueryable()
-                                    where a.Value.AfdelingID == afdID
-                                    select a.Value).FirstOrDefault();
+				AfdelingInfo af = (from a in model.AfdelingsInfoDictionary.AsQueryable()
+						   where a.Value.AfdelingID == afdID
+						   select a.Value).FirstOrDefault();

-                model.Titel = "Ledenoverzicht van de " + af.Naam + " van het jaar " + model.GroepsWerkJaartalZichtbaar;
-            }
-
-            model.PageHuidig = model.GroepsWerkJaarIdZichtbaar;
-            model.PageTotaal = model.LidInfoLijst.Count;
-            model.HuidigeAfdeling = afdID;
-            return View("Index", model);
-        }
+				model.Titel = "Ledenoverzicht van de " + af.Naam + " van het jaar " + model.GroepsWerkJaartalZichtbaar;
+			}

-        //
-        // GET: /Leden/Create
-        public ActionResult Create(int groepID)
-        {
-            return View();
-        }
+			model.PageHuidig = model.GroepsWerkJaarIdZichtbaar;
+			model.PageTotaal = model.LidInfoLijst.Count;
+			model.HuidigeAfdeling = afdID;
+			return View("Index", model);
+		}

-        //
-        // POST: /Leden/Create
+		//
+		// GET: /Leden/Create
+		public ActionResult Create(int groepID)
+		{
+			return View();
+		}

-        [AcceptVerbs(HttpVerbs.Post)]
-        public ActionResult Create(FormCollection collection, int groepID)
-        {
-            try
-            {
-                // TODO: Add insert logic here
+		//
+		// POST: /Leden/Create

-                return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
-            }
-            catch
-            {
-                return View();
-            }
-        }
+		[AcceptVerbs(HttpVerbs.Post)]
+		public ActionResult Create(FormCollection collection, int groepID)
+		{
+			try
+			{
+				// TODO: Add insert logic here

-        //
-        // GET: /Leden/Verwijderen/5
-        public ActionResult Verwijderen(int id, int groepID)
-        {
-            Boolean success = ServiceHelper.CallService<ILedenService, Boolean>(l => l.Verwijderen(id));
-            if (success)
-            {
-                TempData["feedback"] = "Lid is verwijderd";
-            }
-            return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
-        }
+				return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
+			}
+			catch
+			{
+				return View();
+			}
+		}

-        //
-        // GET: /Leden/AfdelingBewerken/{groepsWerkJaarID}/{lidID}
-        public ActionResult AfdelingBewerken(int groepsWerkJaarID, int lidID, int groepID)
-        {
-            var model = new LedenModel();
-            BaseModelInit(model, groepID);
+		//
+		// GET: /Leden/Verwijderen/5
+		public ActionResult Verwijderen(int id, int groepID)
+		{
+			Boolean success = ServiceHelper.CallService<ILedenService, Boolean>(l => l.Verwijderen(id));
+			if (success)
+			{
+				TempData["feedback"] = "Lid is verwijderd";
+			}
+			return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
+		}

-            var list =
-                ServiceHelper.CallService<IGroepenService, IList<AfdelingInfo>>
-                (groep => groep.AfdelingenOphalen(groepsWerkJaarID));
-            model.AfdelingsInfoDictionary = new Dictionary<int, AfdelingInfo>();
-            foreach (AfdelingInfo ai in list)
-            {
-                model.AfdelingsInfoDictionary.Add(ai.AfdelingID, ai);
-            }
+		//
+		// GET: /Leden/AfdelingBewerken/{groepsWerkJaarID}/{lidID}
+		public ActionResult AfdelingBewerken(int groepsWerkJaarID, int lidID, int groepID)
+		{
+			var model = new LedenModel();
+			BaseModelInit(model, groepID);

-            model.HuidigLid = ServiceHelper.CallService<ILedenService, LidInfo>
-                (l => l.LidOphalenMetAfdelingen(lidID));
+			var list =
+			    ServiceHelper.CallService<IGroepenService, IList<AfdelingInfo>>
+			    (groep => groep.AfdelingenOphalen(groepsWerkJaarID));
+			model.AfdelingsInfoDictionary = new Dictionary<int, AfdelingInfo>();
+			foreach (AfdelingInfo ai in list)
+			{
+				model.AfdelingsInfoDictionary.Add(ai.AfdelingID, ai);
+			}

-            model.AfdelingIDs = model.HuidigLid.AfdelingIdLijst.ToList();
+			model.HuidigLid = ServiceHelper.CallService<ILedenService, LidInfo>
+			    (l => l.LidOphalenMetAfdelingen(lidID));

-            model.Titel = "Ledenoverzicht";
-
-            return View("AfdelingBewerken", model);
-        }
+			model.AfdelingIDs = model.HuidigLid.AfdelingIdLijst.ToList();

-        //
-        // POST: /Leden/AfdelingBewerken/5
-        [AcceptVerbs(HttpVerbs.Post)]
-        public ActionResult AfdelingBewerken(LedenModel model, int groepID)
-        {
-            IList<int> selectie = new List<int>();
-            if (model.HuidigLid.Type == LidType.Kind)
-            {
-                selectie.Add(model.AfdelingID);
-            }
-            else
-            {
-                if (model.AfdelingIDs != null) // dit komt erop neer dat er iets geselecteerd
-                {
-                    selectie = model.AfdelingIDs;
-                }
-            }
+			model.Titel = "Ledenoverzicht";

-            try
-            {
-                int x = selectie.Count;
-                ServiceHelper.CallService<ILedenService>(e => e.BewarenMetAfdelingen(model.HuidigLid.LidID, selectie));
-                return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
-            }
-            catch
-            {
-                return View();
-            }
-        }
-    }
+			return View("AfdelingBewerken", model);
+		}
+
+		//
+		// POST: /Leden/AfdelingBewerken/5
+		[AcceptVerbs(HttpVerbs.Post)]
+		public ActionResult AfdelingBewerken(LedenModel model, int groepID)
+		{
+			IList<int> selectie = new List<int>();
+			if (model.HuidigLid.Type == LidType.Kind)
+			{
+				selectie.Add(model.AfdelingID);
+			}
+			else
+			{
+				if (model.AfdelingIDs != null) // dit komt erop neer dat er iets geselecteerd
+				{
+					selectie = model.AfdelingIDs;
+				}
+			}
+
+			try
+			{
+				int x = selectie.Count;
+				ServiceHelper.CallService<ILedenService>(e => e.BewarenMetAfdelingen(model.HuidigLid.LidID, selectie));
+				return RedirectToAction("List", new { groepsWerkJaarId = Sessie.LaatstePagina, afdID = Sessie.LaatsteActieID });
+			}
+			catch
+			{
+				return View();
+			}
+		}
+	}
 }


fixed double click events to fire on mouse down rather than mouse up

--- Source/MonoGame.Extended/InputListeners/MouseListener.cs
+++ Source/MonoGame.Extended/InputListeners/MouseListener.cs
@@ -25,6 +25,7 @@
         private GameTime _gameTime;
         private MouseEventArgs _previousClickArgs;
         private MouseEventArgs _mouseDownArgs;
+        private bool _hasDoubleClicked;

         public event EventHandler<MouseEventArgs> MouseDown;
         public event EventHandler<MouseEventArgs> MouseUp;
@@ -40,8 +41,23 @@
                 getButtonState(_previousState) == ButtonState.Released)
             {
                 var args = new MouseEventArgs(_gameTime.TotalGameTime, _previousState, _currentState, button);
+
                 MouseDown.Raise(this, args);
                 _mouseDownArgs = args;
+
+                if (_previousClickArgs != null)
+                {
+                    // If the last click was recent
+                    var clickMilliseconds = (args.Time - _previousClickArgs.Time).TotalMilliseconds;
+
+                    if (clickMilliseconds <= DoubleClickMilliseconds)
+                    {
+                        MouseDoubleClicked.Raise(this, args);
+                        _hasDoubleClicked = true;
+                    }
+
+                    _previousClickArgs = null;
+                }
             }
         }

@@ -59,23 +75,7 @@
                     // If the mouse hasn't moved much between mouse down and mouse up
                     if (clickMovement < DragThreshold)
                     {
-                        var hasDoubleClicked = false;
-
-                        if (_previousClickArgs != null)
-                        {
-                            // If the last click was recent
-                            var clickMilliseconds = (args.Time - _previousClickArgs.Time).TotalMilliseconds;
-
-                            if (clickMilliseconds <= DoubleClickMilliseconds)
-                            {
-                                MouseDoubleClicked.Raise(this, args);
-                                hasDoubleClicked = true;
-                            }
-
-                            _previousClickArgs = null;
-                        }
-
-                        if(!hasDoubleClicked)
+                        if(!_hasDoubleClicked)
                             MouseClicked.Raise(this, args);
                     }
                     else // If the mouse has moved between mouse down and mouse up
@@ -86,6 +86,7 @@

                 MouseUp.Raise(this, args);

+                _hasDoubleClicked = false;
                 _previousClickArgs = args;
             }
         }


- Improved x86 code generation for store of a constant #78

--- Source/Mosa.Platform.x86/Stages/IRTransformationStage.cs
+++ Source/Mosa.Platform.x86/Stages/IRTransformationStage.cs
@@ -626,14 +626,13 @@
 			Operand value = context.Operand3;
 			MosaType storeType = context.MosaType;

-			//if (value.IsR4 || storeType.IsR4) // <--- this one is right
 			if (value.IsR8 && (storeType ?? value.Type).IsR4)
 			{
 				Operand xmm1 = AllocateVirtualRegister(TypeSystem.BuiltIn.R4);
 				context.InsertBefore().AppendInstruction(X86.Cvtsd2ss, xmm1, value);
 				value = xmm1;
 			}
-			else
+			else if (value.IsMemoryAddress)
 			{
 				Operand v2 = AllocateVirtualRegister(value.Type);
 				context.InsertBefore().AppendInstruction(X86.Mov, v2, value);


New unit tests to check the proper visibility management in WoopsaObjectAdapter

--- Sources/DotNet/WoopsaTest/UnitTestWoopsaObjectAdapter.cs
+++ Sources/DotNet/WoopsaTest/UnitTestWoopsaObjectAdapter.cs
@@ -5,8 +5,24 @@

 namespace WoopsaTest
 {
+    public class ClassAInner1Inner
+    {
+        public string APropertyString { get; set; }
+
+        [WoopsaVisible(true)]
+        public string APropertyVisible { get; set; }
+
+        [WoopsaVisible(false)]
+        public string APropertyHidden { get; set; }
+    }
+
     public class ClassAInner1
     {
+        public ClassAInner1()
+        {
+            Inner = new ClassAInner1Inner();
+        }
+
         public int APropertyInt { get; set; }

         [WoopsaVisible(false)]
@@ -15,13 +31,25 @@
         [WoopsaVisible(true)]
         public int APropertyIntVisible { get; set; }

+        [WoopsaVisible(true)]
+        public ClassAInner1Inner Inner { get; set; }
+
+    }
+
+
+    public class SubClassAInner1 : ClassAInner1
+    {
+        [WoopsaVisible(true)]
+        public int ExtraProperty { get; set; }
+
     }

     [WoopsaVisibility(WoopsaVisibility.DefaultIsVisible | WoopsaVisibility.Inherited | WoopsaVisibility.ObjectClassMembers)]
-    public class SubClassAInner1 : ClassAInner1
-    {
-        public int ExtraProperty { get; set; }
-    }
+    public class SubClassAInner2 : SubClassAInner1
+    {
+
+    }
+

     public class ClassA
     {
@@ -35,6 +63,7 @@
         public DateTime APropertyDateTime { get; set; }
         public DateTime APropertyDateTime2 { get; set; }

+        [WoopsaVisible(true)]
         public ClassAInner1 Inner1 { get; set; }
     }

@@ -217,28 +246,50 @@
             Assert.IsNull(adapterA3.Properties.ByNameOrNull(nameof(aInner1.APropertyIntHidden)));
             Assert.IsNotNull(adapterA3.Properties.ByNameOrNull(nameof(aInner1.APropertyIntVisible)));
             Assert.IsNull(adapterA3.Methods.ByNameOrNull(nameof(aInner1.ToString)));
-            // DefaultVisibility
+            // Visiblity All
             WoopsaObjectAdapter adapterA4 = new WoopsaObjectAdapter(null, "a", aInner1,
                 null, null, WoopsaObjectAdapterOptions.None, WoopsaVisibility.All);
             Assert.IsNotNull(adapterA4.Properties.ByNameOrNull(nameof(aInner1.APropertyInt)));
             Assert.IsNull(adapterA4.Properties.ByNameOrNull(nameof(aInner1.APropertyIntHidden)));
             Assert.IsNotNull(adapterA4.Properties.ByNameOrNull(nameof(aInner1.APropertyIntVisible)));
             Assert.IsNotNull(adapterA4.Methods.ByNameOrNull(nameof(aInner1.ToString)));
-            // Inherited
-
-            // WoopsaVisibilityAttribute
-
-            /*
-
-            WoopsaObjectAdapter adapterA3 = new WoopsaObjectAdapter(null, "a", aInner1,
-                null, null, WoopsaObjectAdapterOptions.None, WoopsaVisibility.DefaultIsVisible
-
-                );
-            Assert.IsNotNull(adapterA3.Properties.ByNameOrNull(nameof(aInner1.APropertyInt)));
-            Assert.IsNull(adapterA3.Methods.ByNameOrNull(nameof(aInner1.ToString)));
-            //           Assert.IsNull(adapterA1.Properties.ByNameOrNull(nameof(aInner1.ExtraProperty)));
-            //          Assert.IsNotNull(adapterA2.Properties.ByNameOrNull(nameof(aInner1.ExtraProperty)));
-       */
+            // Inherited - no visibility attribute
+            SubClassAInner1 aSubInner1 = new SubClassAInner1();
+            WoopsaObjectAdapter adapterA5 = new WoopsaObjectAdapter(null, "a", aSubInner1,
+                null, null, WoopsaObjectAdapterOptions.None, WoopsaVisibility.None);
+            Assert.IsNotNull(adapterA5.Properties.ByNameOrNull(nameof(aSubInner1.ExtraProperty)));
+            Assert.IsNull(adapterA5.Properties.ByNameOrNull(nameof(aSubInner1.APropertyIntHidden)));
+            Assert.IsNull(adapterA5.Properties.ByNameOrNull(nameof(aSubInner1.APropertyIntVisible)));
+            Assert.IsNull(adapterA5.Methods.ByNameOrNull(nameof(aSubInner1.ToString)));
+            // Inherited - visibility attribute
+            SubClassAInner2 aSubInner2 = new SubClassAInner2();
+            WoopsaObjectAdapter adapterA6 = new WoopsaObjectAdapter(null, "a", aSubInner2,
+                null, null, WoopsaObjectAdapterOptions.None, WoopsaVisibility.None);
+            Assert.IsNotNull(adapterA6.Properties.ByNameOrNull(nameof(aSubInner2.ExtraProperty)));
+            Assert.IsNull(adapterA6.Properties.ByNameOrNull(nameof(aSubInner2.APropertyIntHidden)));
+            Assert.IsNotNull(adapterA6.Properties.ByNameOrNull(nameof(aSubInner2.APropertyIntVisible)));
+            Assert.IsNotNull(adapterA6.Methods.ByNameOrNull(nameof(aSubInner2.ToString)));
+            // Inner objects
+            ClassA a1 = new ClassA();
+            WoopsaObjectAdapter adapterA7 = new WoopsaObjectAdapter(null, "a", a1);
+            var a1Inner1 = adapterA7.Items.ByNameOrNull(nameof(a1.Inner1));
+            Assert.IsNotNull(a1Inner1);
+            var a1Inner1Inner = a1Inner1.Items.ByNameOrNull(nameof(ClassAInner1.Inner)) as WoopsaObjectAdapter;
+            Assert.IsNotNull(a1Inner1Inner);
+            Assert.IsNotNull(a1Inner1Inner.Properties.ByNameOrNull(
+                nameof(a1.Inner1.Inner.APropertyVisible)));
+            Assert.IsNotNull(a1Inner1Inner.Properties.ByNameOrNull(
+                nameof(a1.Inner1.Inner.APropertyString)));
+            Assert.IsNull(a1Inner1Inner.Properties.ByNameOrNull(
+                nameof(a1.Inner1.Inner.APropertyHidden)));
+            Assert.IsNull(a1Inner1Inner.Methods.ByNameOrNull(
+                nameof(a1.Inner1.Inner.ToString)));
+            // Update innerObject, retrieve again the adapter and proceeds new Checks
+            a1.Inner1 = new SubClassAInner2();
+            a1Inner1Inner = a1Inner1.Items.ByNameOrNull(nameof(ClassAInner1.Inner)) as WoopsaObjectAdapter;
+            Assert.IsNotNull(a1Inner1Inner.Methods.ByNameOrNull(
+                nameof(a1.Inner1.Inner.ToString)));
+
         }

         [TestMethod]


test for DateTimeOffset added

test for DateTimeOffset added

--- biz.dfch.CS.JustMock.Examples.Tests/StaticMockingTests.cs
+++ biz.dfch.CS.JustMock.Examples.Tests/StaticMockingTests.cs
@@ -7,13 +7,44 @@
     [TestClass]
     public class StaticMockingTests
     {
+        private Boolean called;
+
+        [TestInitialize]
+        public void TestInitialize()
+        {
+            called = false;
+        }
+
+        /**
+         * When mocking DateTimeOffset it's important to create the mock with the
+         * Behavior.CallOriginal behaviour, if DateTimeOffset is used in arrangement.
+         *
+         * Otherwise a default value will be returned because by default the Behaviour is set to RecursiveLooser as described here:
+         * http://www.telerik.com/help/justmock/basic-usage-mock-behaviors.html
+         **/
+        [TestMethod]
+        public void MockedDateTimeOffsetReturnsExpectedDateTimeOffset()
+        {
+            Mock.SetupStatic(typeof(DateTimeOffset), Behavior.CallOriginal, StaticConstructor.Mocked);
+            Mock.Arrange(() => DateTimeOffset.UtcNow).Returns(new DateTimeOffset(2015, 1, 1, 3, 10, 7, new TimeSpan()));
+
+            Assert.AreEqual(new DateTimeOffset(2015, 1, 1, 3, 10, 7, new TimeSpan()), DateTimeOffset.UtcNow);
+        }
+
+
+        /**
+         * If passing a specific parameter like "Test" in mock arrangment the mocked method will only be called
+         * if the parameter in the call (Act) matches the parameter specified in arrangement.
+         **/
+
         [TestMethod]
         public void MockedConsoleWriteLineGettingCalledWithSpecificArgument()
         {
             Mock.SetupStatic(typeof(Console), StaticConstructor.Mocked);
-            var called = false;
             Mock.Arrange(() => Console.WriteLine("Test")).DoInstead(() => { called = true; }).MustBeCalled();
+
             Console.WriteLine("Test");
+
             Assert.IsTrue(called);
         }

@@ -21,9 +52,10 @@
         public void MockedConsoleWriteLineNotGettingCalledWithSpecificArgument()
         {
             Mock.SetupStatic(typeof(Console), StaticConstructor.Mocked);
-            var called = false;
             Mock.Arrange(() => Console.WriteLine("Test")).DoInstead(() => { called = true; }).MustBeCalled();
+
             Console.WriteLine("Something");
+
             Assert.IsFalse(called);
         }
     }


SP BUG

SP BUG

--- Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
+++ Src/Asp.Net/SqlSugar/Abstract/AdoProvider/AdoProvider.cs
@@ -312,6 +312,7 @@
             }
             catch (Exception ex)
             {
+                CommandType = CommandType.Text;
                 if (ErrorEvent != null)
                     ExecuteErrorEvent(sql, parameters, ex);
                 throw ex;
@@ -346,6 +347,7 @@
             }
             catch (Exception ex)
             {
+                CommandType = CommandType.Text;
                 if (ErrorEvent != null)
                     ExecuteErrorEvent(sql, parameters, ex);
                 throw ex;
@@ -375,6 +377,7 @@
             }
             catch (Exception ex)
             {
+                CommandType = CommandType.Text;
                 if (ErrorEvent != null)
                     ExecuteErrorEvent(sql, parameters, ex);
                 throw ex;
@@ -403,6 +406,7 @@
             }
             catch (Exception ex)
             {
+                CommandType = CommandType.Text;
                 if (ErrorEvent != null)
                     ExecuteErrorEvent(sql, parameters, ex);
                 throw ex;
@@ -434,6 +438,7 @@
             }
             catch (Exception ex)
             {
+                CommandType = CommandType.Text;
                 if (ErrorEvent != null)
                     ExecuteErrorEvent(sql,parameters,ex);
                 throw ex;


Del container visual, not needed

Del container visual, not needed

--- TestAppUWP/UserControls/CartAnimationUserControl.xaml.cs
+++ TestAppUWP/UserControls/CartAnimationUserControl.xaml.cs
@@ -20,7 +20,6 @@
         private readonly CartAnimationViewModel _cartAnimationViewModel;

         private Compositor _compositor;
-        private ContainerVisual _containerVisual;

         public CartAnimationUserControl()
         {
@@ -30,8 +29,6 @@
             {
                 Visual visual = ElementCompositionPreview.GetElementVisual(this);
                 _compositor = visual.Compositor;
-                _containerVisual = _compositor.CreateContainerVisual();
-                ElementCompositionPreview.SetElementChildVisual(this, _containerVisual);
             };
         }

@@ -39,8 +36,6 @@
         {
             var frameworkElement = sender as FrameworkElement;
             if (frameworkElement == null) return;
-
-            CubicBezierEasingFunction cubicBezierEasingFunction = _compositor.CreateCubicBezierEasingFunction(new Vector2(0.5f, 0f), new Vector2(1f, 0.5f));

             Point point = frameworkElement.TransformToVisual(this).TransformPoint(new Point(0,0));
             Point targetPoint = CartPlaceholder.TransformToVisual(this).TransformPoint(new Point(CartPlaceholder.ActualWidth / 2, CartPlaceholder.ActualHeight / 2));
@@ -61,25 +56,24 @@
             spriteVisual.Brush = _compositor.CreateColorBrush(Color.FromArgb(128, 0, 139, 139));
             spriteVisual.Size = new Vector2((float) frameworkElement.Width, (float)frameworkElement.Height);
             spriteVisual.Offset = new Vector3((float) point.X, (float)point.Y, 0f);
-            _containerVisual.Children.InsertAtTop(spriteVisual);
+            ElementCompositionPreview.SetElementChildVisual(this, spriteVisual);

             Vector3KeyFrameAnimation offsetAnimation = _compositor.CreateVector3KeyFrameAnimation();
-            offsetAnimation.InsertKeyFrame(1f, new Vector3((float)targetPoint.X, (float)targetPoint.Y, 0), cubicBezierEasingFunction);
+            offsetAnimation.InsertKeyFrame(1f, new Vector3((float)targetPoint.X, (float)targetPoint.Y, 0));
             SetAnimationDefautls(offsetAnimation);

             Vector2KeyFrameAnimation sizeAnimation = _compositor.CreateVector2KeyFrameAnimation();
-            sizeAnimation.InsertKeyFrame(1f, new Vector2(0f, 0f), cubicBezierEasingFunction);
+            sizeAnimation.InsertKeyFrame(1f, new Vector2(0f, 0f));
             SetAnimationDefautls(sizeAnimation);

             CompositionScopedBatch myScopedBatch = _compositor.CreateScopedBatch(CompositionBatchTypes.Animation);
-
+
             spriteVisual.StartAnimation("Offset", offsetAnimation);
             spriteVisual.StartAnimation("Size", sizeAnimation);
             myScopedBatch.End();

             void BatchCompleted(object source, CompositionBatchCompletedEventArgs args)
             {
-                _containerVisual.Children.Remove(spriteVisual);
                 spriteVisual.Dispose();
                 myScopedBatch.Completed -= BatchCompleted;
                 myScopedBatch.Dispose();
@@ -90,7 +84,7 @@

         private static void SetAnimationDefautls(KeyFrameAnimation animation)
         {
-            TimeSpan animationDuration = TimeSpan.FromMilliseconds(500);
+            TimeSpan animationDuration = TimeSpan.FromMilliseconds(1500);
             animation.Duration = animationDuration;
             animation.IterationBehavior = AnimationIterationBehavior.Count;
             animation.IterationCount = 1;


Updated Windows tests to use the new TestData helpers (which also adds Location field testing).

--- Tests/Calendars.Plugin.WinPhone81.Tests/CalendarTests.cs
+++ Tests/Calendars.Plugin.WinPhone81.Tests/CalendarTests.cs
@@ -6,6 +6,8 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Threading.Tasks;
+
+using static Plugin.Calendars.TestUtilities.TestData;

 #if SILVERLIGHT
 namespace Plugin.Calendars.WinPhoneSL81.Tests
@@ -194,11 +196,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvents_AddsEvents()
         {
-            var events = new List<CalendarEvent> {
-                new CalendarEvent { Name = "Bob", Description = "Bob's event", Start = DateTime.Today.AddDays(5), End = DateTime.Today.AddDays(5).AddHours(2), AllDay = false },
-                new CalendarEvent { Name = "Steve", Description = "Steve's event", Start = DateTime.Today.AddDays(7), End = DateTime.Today.AddDays(8), AllDay = true },
-                new CalendarEvent { Name = "Wheeee", Description = "Fun times", Start = DateTime.Today.AddDays(13), End = DateTime.Today.AddDays(15), AllDay = true }
-            };
+            var events = GetTestEvents();
             var calendar = new Calendar { Name = _calendarName };

             await _service.AddOrUpdateCalendarAsync(calendar);
@@ -221,7 +219,12 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvents_StartAfterEndThrows()
         {
-            var calendarEvent = new CalendarEvent { Name = "Bob", Start = DateTime.Today, End = DateTime.Today.AddDays(-1) };
+            var calendarEvent = new CalendarEvent
+            {
+                Name = "Time Warp",
+                Start = DateTime.Today,
+                End = DateTime.Today.AddDays(-1)
+            };
             var calendar = new Calendar { Name = _calendarName };

             await _service.AddOrUpdateCalendarAsync(calendar);
@@ -233,7 +236,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvent_UnspecifiedCalendarThrows()
         {
-            var calendarEvent = new CalendarEvent { Name = "Bob", Start = DateTime.Today, End = DateTime.Today.AddHours(1) };
+            var calendarEvent = GetTestEvent();
             var calendar = new Calendar { Name = _calendarName };

             Assert.IsTrue(await _service.AddOrUpdateEventAsync(calendar, calendarEvent).ThrowsAsync<ArgumentException>(), "Exception wasn't thrown");
@@ -242,7 +245,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvent_NonexistentCalendarThrows()
         {
-            var calendarEvent = new CalendarEvent { Name = "Bob", Start = DateTime.Today, End = DateTime.Today.AddHours(1) };
+            var calendarEvent = GetTestEvent();
             var calendar = new Calendar { Name = _calendarName };

             // Create/delete calendar so we have a valid ID for a nonexistent calendar
@@ -256,7 +259,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvent_ReadonlyCalendarThrows()
         {
-            var calendarEvent = new CalendarEvent { Name = "Bob", Start = DateTime.Today, End = DateTime.Today.AddHours(1) };
+            var calendarEvent = GetTestEvent();
             var calendars = await _service.GetCalendarsAsync();
             var readonlyCalendars = calendars.Where(c => !c.CanEditEvents).ToList();
             var readonlyCalendar = readonlyCalendars.First();
@@ -269,16 +272,8 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvents_UpdatesEvents()
         {
-            var originalEvents = new List<CalendarEvent> {
-                new CalendarEvent { Name = "Bob", Description = "Bob's event", Start = DateTime.Today.AddDays(5), End = DateTime.Today.AddDays(5).AddHours(2), AllDay = false },
-                new CalendarEvent { Name = "Steve", Description = "Steve's event", Start = DateTime.Today.AddDays(7), End = DateTime.Today.AddDays(8), AllDay = true },
-                new CalendarEvent { Name = "Wheeee", Description = "Fun times", Start = DateTime.Today.AddDays(13), End = DateTime.Today.AddDays(15), AllDay = true }
-            };
-            var editedEvents = new List<CalendarEvent> {
-                new CalendarEvent { Name = "Bob (edited)", Description = "Bob's edited event", Start = DateTime.Today.AddDays(5).AddHours(-2), End = DateTime.Today.AddDays(5).AddHours(1), AllDay = false },
-                new CalendarEvent { Name = "Steve (edited)", Description = "Steve's edited event", Start = DateTime.Today.AddDays(6), End = DateTime.Today.AddDays(7).AddHours(-1), AllDay = false },
-                new CalendarEvent { Name = "Yay (edited)", Description = "Edited fun times", Start = DateTime.Today.AddDays(12), End = DateTime.Today.AddDays(13), AllDay = true }
-            };
+            var originalEvents = GetTestEvents();
+            var editedEvents = GetEditedTestEvents();
             var calendar = new Calendar { Name = _calendarName };
             var queryStartDate = DateTime.Today;
             var queryEndDate = queryStartDate.AddDays(30);
@@ -314,13 +309,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_AddOrUpdateEvents_CopiesEventsBetweenCalendars()
         {
-            var calendarEvent = new CalendarEvent
-            {
-                Name = "Bob",
-                Start = DateTime.Today.AddDays(5),
-                End = DateTime.Today.AddDays(5).AddHours(2),
-                AllDay = false
-            };
+            var calendarEvent = GetTestEvent();
             var calendarSource = new Calendar { Name = _calendarName };
             var calendarTarget = new Calendar { Name = _calendarName + " copy destination" };

@@ -356,13 +345,7 @@
         [TestMethod, TestCategory(_testCategory)]
         public async Task Calendars_DeleteEvent_DeletesExistingEvent()
         {
-            var calendarEvent = new CalendarEvent
-            {
-                Name = "Bob",
-                Start = DateTime.Now.AddDays(5),
-                End = DateTime.Now.AddDays(5).AddHours(2),
-                AllDay = false
-            };
+            var calendarEvent = GetTestEvent();
             var calendar = await _service.CreateCalendarAsync(_calendarName);

             await _service.AddOrUpdateEventAsync(calendar, calendarEvent);
@@ -379,13 +362,7 @@

             // Create and delete an event so that we have a valid event ID for a nonexistent event
             //
-            var calendarEvent = new CalendarEvent
-            {
-                Name = "Bob",
-                Start = DateTime.Now.AddDays(5),
-                End = DateTime.Now.AddDays(5).AddHours(2),
-                AllDay = false
-            };
+            var calendarEvent = GetTestEvent();
             await _service.AddOrUpdateEventAsync(calendar, calendarEvent);
             await _service.DeleteEventAsync(calendar, calendarEvent);

@@ -398,13 +375,7 @@
             // Create and delete a calendar and event so that we have valid IDs for nonexistent calendar/event
             //
             var calendar = await _service.CreateCalendarAsync(_calendarName);
-            var calendarEvent = new CalendarEvent
-            {
-                Name = "Bob",
-                Start = DateTime.Now.AddDays(5),
-                End = DateTime.Now.AddDays(5).AddHours(2),
-                AllDay = false
-            };
+            var calendarEvent = GetTestEvent();
             await _service.AddOrUpdateEventAsync(calendar, calendarEvent);
             await _service.DeleteCalendarAsync(calendar);

@@ -416,13 +387,7 @@
         {
             var calendar1 = await _service.CreateCalendarAsync(_calendarName);
             var calendar2 = await _service.CreateCalendarAsync(_calendarName + "2");
-            var calendarEvent = new CalendarEvent
-            {
-                Name = "Bob",
-                Start = DateTime.Now.AddDays(5),
-                End = DateTime.Now.AddDays(5).AddHours(2),
-                AllDay = false
-            };
+            var calendarEvent = GetTestEvent();
             await _service.AddOrUpdateEventAsync(calendar1, calendarEvent);

             Assert.IsFalse(await _service.DeleteEventAsync(calendar2, calendarEvent));


use a StringBuilder to render html

use a StringBuilder to render html

--- frameworks/CSharp/aspnetcore/Benchmarks/Middleware/MiddlewareHelpers.cs
+++ frameworks/CSharp/aspnetcore/Benchmarks/Middleware/MiddlewareHelpers.cs
@@ -2,6 +2,8 @@
 // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.

 using System.Collections.Generic;
+using System.Globalization;
+using System.Text;
 using System.Text.Encodings.Web;
 using System.Threading.Tasks;
 using Benchmarks.Data;
@@ -33,15 +35,22 @@
             httpContext.Response.StatusCode = StatusCodes.Status200OK;
             httpContext.Response.ContentType = "text/html; charset=UTF-8";

-            await httpContext.Response.WriteAsync("<!DOCTYPE html><title>Fortunes</title>

id	message
");
-
+            var sb = new StringBuilder();
+            sb.Append("<!DOCTYPE html><title>Fortunes</title>

id	message
");
             foreach (var item in model)
             {
-                await httpContext.Response.WriteAsync(
-                    $"
{htmlEncoder.Encode(item.Id.ToString())}	{htmlEncoder.Encode(item.Message)}
");
+                sb.Append("
");
+                sb.Append(item.Id.ToString(CultureInfo.InvariantCulture));
+                sb.Append("	");
+                sb.Append(htmlEncoder.Encode(item.Message));
+                sb.Append("
");
             }

-            await httpContext.Response.WriteAsync("
");
+            sb.Append("
");
+            var response = sb.ToString();
+            // fortunes includes multibyte characters so response.Length is incorrect
+            httpContext.Response.ContentLength = Encoding.UTF8.GetByteCount(response);
+            await httpContext.Response.WriteAsync(response);
         }
     }
 }


return setters back to public on AuthorizationRequest #4368

--- src/IdentityServer4/src/Models/Messages/AuthorizationRequest.cs
+++ src/IdentityServer4/src/Models/Messages/AuthorizationRequest.cs
@@ -17,7 +17,7 @@
         /// <summary>
         /// The client.
         /// </summary>
-        public Client Client { get; internal set; }
+        public Client Client { get; set; }

         /// <summary>
         /// The display mode passed from the authorization request.
@@ -25,7 +25,7 @@
         /// <value>
         /// The display mode.
         /// </value>
-        public string DisplayMode { get; internal set; }
+        public string DisplayMode { get; set; }

         /// <summary>
         /// Gets or sets the redirect URI.
@@ -33,7 +33,7 @@
         /// <value>
         /// The redirect URI.
         /// </value>
-        public string RedirectUri { get; internal set; }
+        public string RedirectUri { get; set; }

         /// <summary>
         /// The UI locales passed from the authorization request.
@@ -41,7 +41,7 @@
         /// <value>
         /// The UI locales.
         /// </value>
-        public string UiLocales { get; internal set; }
+        public string UiLocales { get; set; }

         /// <summary>
         /// The external identity provider requested. This is used to bypass home realm
@@ -51,7 +51,7 @@
         /// <value>
         /// The external identity provider identifier.
         /// </value>
-        public string IdP { get; internal set; }
+        public string IdP { get; set; }

         /// <summary>
         /// The tenant requested. This is provided via the <c>"tenant:"</c> prefix to
@@ -60,7 +60,7 @@
         /// <value>
         /// The tenant.
         /// </value>
-        public string Tenant { get; internal set; }
+        public string Tenant { get; set; }

         /// <summary>
         /// The expected username the user will use to login. This is requested from the client
@@ -69,7 +69,7 @@
         /// <value>
         /// The LoginHint.
         /// </value>
-        public string LoginHint { get; internal set; }
+        public string LoginHint { get; set; }

         /// <summary>
         /// Gets or sets the collection of prompt modes.
@@ -77,7 +77,7 @@
         /// <value>
         /// The collection of prompt modes.
         /// </value>
-        public IEnumerable<string> PromptModes { get; internal set; } = Enumerable.Empty<string>();
+        public IEnumerable<string> PromptModes { get; set; } = Enumerable.Empty<string>();

         /// <summary>
         /// The acr values passed from the authorization request.
@@ -85,12 +85,12 @@
         /// <value>
         /// The acr values.
         /// </value>
-        public IEnumerable<string> AcrValues { get; internal set; }
+        public IEnumerable<string> AcrValues { get; set; }

         /// <summary>
         /// The validated resources.
         /// </summary>
-        public ResourceValidationResult ValidatedResources { get; internal set; }
+        public ResourceValidationResult ValidatedResources { get; set; }

         /// <summary>
         /// Gets the entire parameter collection.


Restore edit resolver

Restore edit resolver

--- src/Languages/Editor/Impl/Projection/ProjectionBufferManager.cs
+++ src/Languages/Editor/Impl/Projection/ProjectionBufferManager.cs
@@ -32,10 +32,10 @@
             _editResolver = new LanguageEditResolver(diskBuffer);

             var contentType = _contentTypeRegistryService.GetContentType(topLevelContentTypeName);
-            ViewBuffer = projectionBufferFactoryService.CreateProjectionBuffer(null, new List<object>(0), ProjectionBufferOptions.None, contentType);
+            ViewBuffer = projectionBufferFactoryService.CreateProjectionBuffer(_editResolver, new List<object>(0), ProjectionBufferOptions.None, contentType);

             contentType = _contentTypeRegistryService.GetContentType(secondaryContentTypeName);
-            ContainedLanguageBuffer = projectionBufferFactoryService.CreateProjectionBuffer(null, new List<object>(0), ProjectionBufferOptions.WritableLiteralSpans, contentType);
+            ContainedLanguageBuffer = projectionBufferFactoryService.CreateProjectionBuffer(_editResolver, new List<object>(0), ProjectionBufferOptions.WritableLiteralSpans, contentType);

             ServiceManager.AddService<IProjectionBufferManager>(this, DiskBuffer);
             ServiceManager.AddService<IProjectionBufferManager>(this, ViewBuffer);


Delete empty directory created by New Project dialog.

The New Project dialog creates an empty directory for the project
inside the solution. The project template wizard checks if this
directory exists and is empty and then deletes it.

--- src/MonoDevelop.Dnx/MonoDevelop.Dnx/DnxProjectTemplateWizard.cs
+++ src/MonoDevelop.Dnx/MonoDevelop.Dnx/DnxProjectTemplateWizard.cs
@@ -29,14 +29,15 @@
 using System.Collections.Generic;
 using System.IO;
 using System.Linq;
+using System.Xml;
 using MonoDevelop.Core.ProgressMonitoring;
 using MonoDevelop.Ide;
+using MonoDevelop.Ide.Projects;
 using MonoDevelop.Ide.Templates;
 using MonoDevelop.Projects;
 using MonoDevelop.Ide.Gui.Pads;
 using MonoDevelop.Ide.Gui.Components;
 using MonoDevelop.Core;
-using System.Xml;

 namespace MonoDevelop.Dnx
 {
@@ -93,6 +94,8 @@
 			if (!Directory.Exists (project.BaseDirectory)) {
 				Directory.CreateDirectory (project.BaseDirectory);
 			}
+
+			RemoveProjectDirectoryCreatedByNewProjectDialog (solution.BaseDirectory, projectName);

 			project.AddConfigurations ();
 			srcFolder.AddItem (project, true);
@@ -126,6 +129,22 @@
 			DnxServices.ProjectService.LoadAspNetProjectSystem (solution);
 		}

+		void RemoveProjectDirectoryCreatedByNewProjectDialog (FilePath parentDirectory, string projectName)
+		{
+			FilePath projectDirectory = parentDirectory.Combine (projectName);
+			if (!Directory.Exists (projectDirectory))
+				return;
+
+			if (Directory.EnumerateFiles (projectDirectory).Any ())
+				return;
+
+			try {
+				Directory.Delete (projectDirectory);
+			} catch (Exception ex) {
+				LoggingService.LogError ("Unable to delete project directory.", ex);
+			}
+		}
+
 		void CreateFileFromTemplate (Project project, string projectTemplateName, string fileTemplateName)
 		{
 			if (!String.IsNullOrEmpty (projectTemplateName))


Try to track down the issue here

Try to track down the issue here

--- src/uShip.Logging/LogBuilders/LoggingEventPropertiesBuilder.cs
+++ src/uShip.Logging/LogBuilders/LoggingEventPropertiesBuilder.cs
@@ -212,6 +212,8 @@
                     {
                         var duplicatePropsException = new ArgumentException("An element with the same key already exists.");
                         duplicatePropsException.Data.Add("Key", datum.Key);
+                        duplicatePropsException.Data.Add("Value1", _props[datum.Key]);
+                        duplicatePropsException.Data.Add("Value2", datum.Value);
                         throw duplicatePropsException;
                     }


Fix remaining problem in issue 103: Creating declaration program points for methods with no return statement.

--- Celeriac/Celeriac/ILRewriter.cs
+++ Celeriac/Celeriac/ILRewriter.cs
@@ -426,10 +426,13 @@
       // compensate, declare a progrp point that will never be reached.
       if (!operations.Any(op => op.OperationCode == OperationCode.Ret))
       {
-        DeclareReturnProgramPoint(mutableMethodBody, 100, currentPptEnd);
-        // Must insert a ret or verifier thinks program will fall through.
-        generator.Emit(OperationCode.Ldc_I4_0);
-        generator.Emit(OperationCode.Ret);
+        DeclareReturnProgramPoint(mutableMethodBody,
+          RuntimeExceptionExitProgamPointSuffix, currentPptEnd);
+        // Must explcilty exit the method or else the verifier will complain.
+        // This code will never be called, but satisfies the verifier. Throwing was chosen over
+        // returning, because it's difficult to construct an appropriate return value.
+        generator.Emit(OperationCode.Ldnull);
+        generator.Emit(OperationCode.Throw);
       }

       while (generator.InTryBody)
@@ -1117,6 +1120,21 @@
         #endregion Everything else
       }
     }
+
+
+    /// <summary>
+    /// Print the declaration for a method return program point onto the stack, if the program point
+    /// should be visited.
+    /// </summary>
+    /// <param name="methodBody">Method being exited</param>
+    /// <param name="i">Instruction number to use as the label for the exit</param>
+    /// <param name="pptEnd">The end of the PPT writing block</param>
+    /// <returns>Whether the declaration was pushed into the stack</returns>
+    private bool DeclareReturnProgramPoint(IMethodBody methodBody, int i, ILGeneratorLabel pptEnd)
+    {
+      return DeclareReturnProgramPoint(
+        methodBody, i.ToString(CultureInfo.InvariantCulture), pptEnd);
+    }

     /// <summary>
     /// Print the declaration for a method return program point onto the stack, if the program point
@@ -1126,12 +1144,13 @@
     /// <param name="i">Label for the exit</param>
     /// <param name="pptEnd">The end of the PPT writing block</param>
     /// <returns>Whether the declaration was pushed into the stack</returns>
-    private bool DeclareReturnProgramPoint(IMethodBody methodBody, int i, ILGeneratorLabel pptEnd)
+    private bool DeclareReturnProgramPoint(
+        IMethodBody methodBody, string label, ILGeneratorLabel pptEnd)
     {
       // If we don't want to instrument returns then don't do anything special here
       bool instrumentReturns = celeriacArgs.ShouldPrintProgramPoint(
           FormatMethodName(MethodTransition.EXIT, methodBody.MethodDefinition),
-          i.ToString(CultureInfo.InvariantCulture));
+          label);
       if (!instrumentReturns)
       {
         return false;
@@ -1140,10 +1159,10 @@
       EmitNonceCheck(methodBody.MethodDefinition, pptEnd);
       EmitAcquireWriterLock(pptEnd);

-      // Add the i to the end of exit to ensure uniqueness
+      // Add the label to the end of exit to ensure uniqueness
       // A ret command is added even at the end of functions without
       // a return in the code by the compiler, so we catch that scenario
-      EmitMethodSignature(MethodTransition.EXIT, methodBody, label: i.ToString(CultureInfo.InvariantCulture));
+      EmitMethodSignature(MethodTransition.EXIT, methodBody, label);

       return true;
     }


Fix commit a740aad463be7992ce0193764bad4fcd11f2276a

--- Algo/Storages/Csv/CsvEntityRegistry.cs
+++ Algo/Storages/Csv/CsvEntityRegistry.cs
@@ -296,7 +296,7 @@
 			{
 				var secId = criteria.SecurityId;

-				if (secId == default)
+				if (secId == default || secId.BoardCode.IsEmpty())
 					return this.Filter(criteria);

 				var security = GetById(secId);


Reset player state after being stunned

Reset player state after being stunned

--- UnityProject/Assets/Scripts/Player/ZMPlayerController.cs
+++ UnityProject/Assets/Scripts/Player/ZMPlayerController.cs
@@ -379,6 +379,8 @@

 			Recoil();

+			Invoke("ResetMoveModState", STUN_TIME);
+
 			if (PlayerStunEvent != null) {
 				PlayerStunEvent(this, STUN_TIME);
 			}
@@ -553,6 +555,8 @@
 	void ResetControlModState() {
 		_controlModState = ControlModState.NEUTRAL;
 	}
+
+	void ResetMoveModState() { _moveModState = MoveModState.NEUTRAL; }

 	void onControllerCollider( RaycastHit2D hit )
 	{
@@ -821,7 +825,7 @@
 		light.color = _baseColor;

 		_canLunge = true;
-		EnablePlayer();
+//		EnablePlayer();
 	}

 	private void EndStun() {


LeavinsSoftware.Collection is now CLSCompliant

--- LeavinsSoftware.Collection/Properties/AssemblyInfo.cs
+++ LeavinsSoftware.Collection/Properties/AssemblyInfo.cs
@@ -1,4 +1,5 @@
-using System.Reflection;
+using System;
+using System.Reflection;
 using System.Runtime.CompilerServices;
 using System.Runtime.InteropServices;

@@ -18,3 +19,5 @@

 // The following GUID is for the ID of the typelib if this project is exposed to COM
 [assembly: Guid("197997d3-36a4-443b-b627-c6588d0c6ad6")]
+
+[assembly: CLSCompliant(true)]