Flipped PR #100 so it returns early if prop is null and also duplucated it in the HasVortoValue check

--- src/Our.Umbraco.Vorto/Extensions/IPublishedContentExtensions.cs
+++ src/Our.Umbraco.Vorto/Extensions/IPublishedContentExtensions.cs
@@ -20,6 +20,11 @@
             if (content.HasValue(propertyAlias))
             {
                 var prop = content.GetProperty(propertyAlias);
+				if (prop == null)
+				{
+					return false;
+				}
+
                 var dataValue = prop.DataValue;
                 if (dataValue == null)
                 {
@@ -95,65 +100,68 @@
             bool recursive = false, T defaultValue = default(T))
         {
             var prop = content.GetProperty(propertyAlias);
-            // prevent generation of NullReferenceException: allow return of defaultValue or traversal up the tree
-            if (prop != null)
+			if (prop == null)
+			{
+				// PR #100 - Prevent generation of NullReferenceException: allow return of defaultValue or traversal up the tree if prop is null
+				return defaultValue;
+			}
+
+            var vortoModel = prop.Value as VortoValue;
+            if (vortoModel?.Values != null)
             {
-                var vortoModel = prop.Value as VortoValue;
-                if (vortoModel?.Values != null)
-                {
-                    // Get the serialized value
-                    var bestMatchCultureName = vortoModel.FindBestMatchCulture(cultureName);
-                    if (!bestMatchCultureName.IsNullOrWhiteSpace()
-                        && vortoModel.Values.ContainsKey(bestMatchCultureName)
-                        && vortoModel.Values[bestMatchCultureName] != null
-                        && !vortoModel.Values[bestMatchCultureName].ToString().IsNullOrWhiteSpace())
-                    {
-                        var value = vortoModel.Values[bestMatchCultureName];
-
-                        // Get target datatype
-                        var targetDataType = VortoHelper.GetTargetDataTypeDefinition(vortoModel.DtdGuid);
-
-                        // Umbraco has the concept of a IPropertyEditorValueConverter which it
-                        // also queries for property resolvers. However I'm not sure what these
-                        // are for, nor can I find any implementations in core, so am currently
-                        // just ignoring these when looking up converters.
-                        // NB: IPropertyEditorValueConverter not to be confused with
-                        // IPropertyValueConverter which are the ones most people are creating
-                        var properyType = CreateDummyPropertyType(
-                            targetDataType.Id,
-                            targetDataType.PropertyEditorAlias,
-                            content.ContentType);
-
-                        var inPreviewMode = UmbracoContext.Current != null && UmbracoContext.Current.InPreviewMode;
-
-                        // Try convert data to source
-                        // We try this first as the value is stored as JSON not
-                        // as XML as would occur in the XML cache as in the act
-                        // of converting to XML this would ordinarily get called
-                        // but with JSON it doesn't, so we try this first
-                        var converted1 = properyType.ConvertDataToSource(value, inPreviewMode);
-                        if (converted1 is T) return (T)converted1;
-
-                        var convertAttempt = converted1.TryConvertTo<T>();
-                        if (convertAttempt.Success) return convertAttempt.Result;
-
-                        // Try convert source to object
-                        // If the source value isn't right, try converting to object
-                        var converted2 = properyType.ConvertSourceToObject(converted1, inPreviewMode);
-                        if (converted2 is T) return (T)converted2;
-
-                        convertAttempt = converted2.TryConvertTo<T>();
-                        if (convertAttempt.Success) return convertAttempt.Result;
-
-                        // Try just converting
-                        convertAttempt = value.TryConvertTo<T>();
-                        if (convertAttempt.Success) return convertAttempt.Result;
-
-                        // Still not right type so return default value
-                        return defaultValue;
-                    }
+                // Get the serialized value
+                var bestMatchCultureName = vortoModel.FindBestMatchCulture(cultureName);
+                if (!bestMatchCultureName.IsNullOrWhiteSpace()
+                    && vortoModel.Values.ContainsKey(bestMatchCultureName)
+                    && vortoModel.Values[bestMatchCultureName] != null
+                    && !vortoModel.Values[bestMatchCultureName].ToString().IsNullOrWhiteSpace())
+                {
+                    var value = vortoModel.Values[bestMatchCultureName];
+
+                    // Get target datatype
+                    var targetDataType = VortoHelper.GetTargetDataTypeDefinition(vortoModel.DtdGuid);
+
+                    // Umbraco has the concept of a IPropertyEditorValueConverter which it
+                    // also queries for property resolvers. However I'm not sure what these
+                    // are for, nor can I find any implementations in core, so am currently
+                    // just ignoring these when looking up converters.
+                    // NB: IPropertyEditorValueConverter not to be confused with
+                    // IPropertyValueConverter which are the ones most people are creating
+                    var properyType = CreateDummyPropertyType(
+                        targetDataType.Id,
+                        targetDataType.PropertyEditorAlias,
+                        content.ContentType);
+
+                    var inPreviewMode = UmbracoContext.Current != null && UmbracoContext.Current.InPreviewMode;
+
+                    // Try convert data to source
+                    // We try this first as the value is stored as JSON not
+                    // as XML as would occur in the XML cache as in the act
+                    // of converting to XML this would ordinarily get called
+                    // but with JSON it doesn't, so we try this first
+                    var converted1 = properyType.ConvertDataToSource(value, inPreviewMode);
+                    if (converted1 is T) return (T)converted1;
+
+                    var convertAttempt = converted1.TryConvertTo<T>();
+                    if (convertAttempt.Success) return convertAttempt.Result;
+
+                    // Try convert source to object
+                    // If the source value isn't right, try converting to object
+                    var converted2 = properyType.ConvertSourceToObject(converted1, inPreviewMode);
+                    if (converted2 is T) return (T)converted2;
+
+                    convertAttempt = converted2.TryConvertTo<T>();
+                    if (convertAttempt.Success) return convertAttempt.Result;
+
+                    // Try just converting
+                    convertAttempt = value.TryConvertTo<T>();
+                    if (convertAttempt.Success) return convertAttempt.Result;
+
+                    // Still not right type so return default value
+                    return defaultValue;
                 }
             }
+
             return recursive && content.Parent != null
                 ? content.Parent.DoInnerGetVortoValue<T>(propertyAlias, cultureName, recursive, defaultValue)
                 : defaultValue;


Fixed typo issue in autofac dependency manager

--- src/Server/Bit.Owin/Implementations/AutofacDependencyManager.cs
+++ src/Server/Bit.Owin/Implementations/AutofacDependencyManager.cs
@@ -210,7 +210,7 @@
             if (lifeCycle == DependencyLifeCycle.SingleInstance)
                 registration = registration.SingleInstance();
             else
-                registration = registration.PerScopeInstance();
+                registration = registration.InstancePerLifetimeScope();

             return this;
         }
@@ -243,7 +243,7 @@
             if (lifeCycle == DependencyLifeCycle.SingleInstance)
                 registration = registration.SingleInstance();
             else
-                registration = registration.PerScopeInstance();
+                registration = registration.InstancePerLifetimeScope();

             return this;
         }
@@ -277,7 +277,7 @@
             if (lifeCycle == DependencyLifeCycle.SingleInstance)
                 registration = registration.SingleInstance();
             else
-                registration = registration.PerScopeInstance();
+                registration = registration.InstancePerLifetimeScope();

             return this;
         }


Added error action

Added error action

--- src/ServiceBase.IdentityServer.Public/UI/Home/HomeController.cs
+++ src/ServiceBase.IdentityServer.Public/UI/Home/HomeController.cs
@@ -1,13 +1,40 @@
-using Microsoft.AspNetCore.Mvc;
+using IdentityServer4.Services;
+using Microsoft.AspNetCore.Mvc;
+using ServiceBase.IdentityServer.Public.UI.Error;
+using System.Threading.Tasks;

 namespace ServiceBase.IdentityServer.Public.UI.Home
 {
     public class HomeController : Controller
     {
+        private readonly IIdentityServerInteractionService _interaction;
+
+        public HomeController(IIdentityServerInteractionService interaction)
+        {
+            _interaction = interaction;
+        }
+
         [Route("/")]
         public IActionResult Index()
         {
             return View();
         }
+
+        /// <summary>
+        /// Shows the error page
+        /// </summary>
+        public async Task<IActionResult> Error(string errorId)
+        {
+            var vm = new ErrorViewModel();
+
+            // retrieve error details from identityserver
+            var message = await _interaction.GetErrorContextAsync(errorId);
+            if (message != null)
+            {
+                vm.Error = message;
+            }
+
+            return View("Error", vm);
+        }
     }
 }


Fix Http test that randomly fails under Windows (#16241)

--- src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs
+++ src/System.Net.Http/tests/FunctionalTests/ResponseStreamTest.cs
@@ -106,12 +106,31 @@
                 Task task = stream.ReadAsync(buffer, 0, buffer.Length, cts.Token);
                 cts.Cancel();

-                // Verify that the task completes successfully or is canceled.
+                // Verify that the task completed.
                 Assert.True(((IAsyncResult)task).AsyncWaitHandle.WaitOne(new TimeSpan(0, 5, 0)));
                 Assert.True(task.IsCompleted, "Task was not yet completed");
-                if (task.IsFaulted)
+
+                // Verify that the task completed successfully or is canceled.
+                if (PlatformDetection.IsWindows)
                 {
-                    task.GetAwaiter().GetResult();
+                    // On Windows, we may fault because canceling the task destroys the request handle
+                    // which may randomly cause an ObjectDisposedException (or other exception).
+                    Assert.True(
+                        task.Status == TaskStatus.RanToCompletion ||
+                        task.Status == TaskStatus.Canceled ||
+                        task.Status == TaskStatus.Faulted);
+                }
+                else
+                {
+                    if (task.IsFaulted)
+                    {
+                        // Propagate exception for debugging
+                        task.GetAwaiter().GetResult();
+                    }
+
+                    Assert.True(
+                        task.Status == TaskStatus.RanToCompletion ||
+                        task.Status == TaskStatus.Canceled);
                 }
             }
         }


Adjust spacing

Adjust spacing

--- src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs
+++ src/UnityExtension/Assets/Editor/GitHub.Unity/UI/HistoryView.cs
@@ -355,8 +355,9 @@
                     {
                         HistoryDetailsEntry(selection);

-                        GUILayout.Space(EditorGUIUtility.standardVerticalSpacing * 2);
+                        GUILayout.Space(EditorGUIUtility.standardVerticalSpacing);
                         GUILayout.Label("Files changed", EditorStyles.boldLabel);
+                        GUILayout.Space(-5);

                         GUILayout.BeginHorizontal();
                         {


Tiny admin log slip message fix. (#5719)

--- Content.Shared/Slippery/SharedSlipperySystem.cs
+++ Content.Shared/Slippery/SharedSlipperySystem.cs
@@ -107,7 +107,7 @@
                 PlaySound(component);
             }

-            _adminLog.Add(LogType.Slip, LogImpact.Low, $"{component.Owner} slipped on collision with {otherBody.Owner}");
+            _adminLog.Add(LogType.Slip, LogImpact.Low, $"{otherBody.Owner} slipped on collision with {component.Owner}");

             return true;
         }


Renamed ITAR to USGovernment

Renamed ITAR to USGovernment

--- Core/OfficeDevPnP.Core/AuthenticationManager.cs
+++ Core/OfficeDevPnP.Core/AuthenticationManager.cs
@@ -16,13 +16,16 @@

 namespace OfficeDevPnP.Core
 {
+    /// <summary>
+    /// Enum to identify the supported Office 365 hosting environments
+    /// </summary>
     public enum AzureEnvironment
     {
         Production=0,
         PPE=1,
         China=2,
         Germany=3,
-        Itar=4
+        USGovernment=4
     }


Add debug code.

Add debug code.

--- CreviceAppTests/US.Main.ClusterMainFormTests.cs
+++ CreviceAppTests/US.Main.ClusterMainFormTests.cs
@@ -108,14 +108,17 @@
                     });
                     Assert.AreEqual(cde.Wait(10000), true);
                     cde.Reset();
+
+                    Console.Write($"CurrentState: {form._gestureMachineCluster.Profiles[0].GestureMachine.CurrentState}");
+                    Console.Write($"IsRunning: {form._gestureMachineCluster.Profiles[0].GestureMachine.IsRunning}");
                     Assert.AreEqual(form._gestureMachineCluster.Profiles[0].RootElement.GestureCount, 2);
                     Assert.AreEqual(form._gestureMachineCluster.Profiles[0].GestureMachine.CurrentState.Depth, 0);
-                    Assert.AreEqual(form.GestureMachine.Input(SupportedKeys.PhysicalKeys.WheelUp.FireEvent), true);
+                    Assert.AreEqual(form._gestureMachineCluster.Input(SupportedKeys.PhysicalKeys.WheelUp.FireEvent), true);
                     Assert.AreEqual(cde.Wait(10000), true);
                     cde.Reset();
-                    Assert.AreEqual(form.GestureMachine.Input(SupportedKeys.PhysicalKeys.RButton.PressEvent), true);
+                    Assert.AreEqual(form._gestureMachineCluster.Input(SupportedKeys.PhysicalKeys.RButton.PressEvent), true);
                     Assert.AreEqual(form._gestureMachineCluster.Profiles[0].GestureMachine.CurrentState.Depth, 1);
-                    Assert.AreEqual(form.GestureMachine.Input(SupportedKeys.PhysicalKeys.RButton.ReleaseEvent), true);
+                    Assert.AreEqual(form._gestureMachineCluster.Input(SupportedKeys.PhysicalKeys.RButton.ReleaseEvent), true);
                     Assert.AreEqual(cde.Wait(10000), true);
                     form.Close();
                 }


Prevent server errors when accessing content from older sample projects without home page metadata

--- DancingGoat/Views/Shared/HeadersMetadata.cshtml
+++ DancingGoat/Views/Shared/HeadersMetadata.cshtml
@@ -5,7 +5,7 @@
 <meta property="og:title" content="@Model.MetadataOgTitle" />
 <meta property="og:type" content="website" />
 <meta property="og:url" content="@(Request.Url?.AbsoluteUri)" />
-<meta property="og:image" content="@(Model.MetadataOgImage.FirstOrDefault()?.Url)" />
+<meta property="og:image" content="@(Model.MetadataOgImage?.FirstOrDefault()?.Url)" />
 <meta property="og:description" content="@Model.MetadataOgDescription" />

 <meta name="twitter:card" content="summary_large_image">
@@ -13,4 +13,4 @@
 <meta name="twitter:creator" content="@Model.MetadataTwitterCreator">
 <meta name="twitter:title" content="@Model.MetadataTwitterTitle">
 <meta name="twitter:description" content="@Model.MetadataOgDescription">
-<meta name="twitter:image" content="@(Model.MetadataTwitterImage.FirstOrDefault()?.Url)">+<meta name="twitter:image" content="@(Model.MetadataTwitterImage?.FirstOrDefault()?.Url)">


Add some spacing to improve readability

Add some spacing to improve readability

--- DapperTesting/Core/Data/DapperUserRepository.cs
+++ DapperTesting/Core/Data/DapperUserRepository.cs
@@ -2,7 +2,6 @@
 using System.Collections.Generic;
 using System.Data.SqlClient;
 using System.Linq;
-
 using Dapper;
 using DapperTesting.Core.Model;

@@ -36,28 +35,36 @@
         public bool Delete(int id)
         {
             const string sql = "DELETE FROM [Users] WHERE [Id] = @userId";
+
             var deleted = Execute(c => c.Execute(sql, new { userId = id }));
+
             return deleted == 1;
         }

         public User Get(int id)
         {
             const string sql = "SELECT * FROM [Users] WHERE [Id] = @userId";
+
             var user = Fetch(c => c.Query<User>(sql, new { userId = id }).SingleOrDefault());
+
             return user;
         }

         public User Get(string email)
         {
             const string sql = "SELECT * FROM [Users] WHERE [Email] = @email";
+
             var user = Fetch(c => c.Query<User>(sql, new { email })).SingleOrDefault();
+
             return user;
         }

         public List<User> GetAll()
         {
             const string sql = "SELECT * FROM [Users]";
+
             var users = Fetch(c => c.Query<User>(sql));
+
             return users.ToList();
         }

@@ -66,6 +73,7 @@
             try
             {
                 const string sql = "UPDATE [Users] SET [DisplayName] = @displayName, [Email] = @email, [Active] = @active WHERE [Id] = @userId";
+
                 var updated = Execute(c => c.Execute(sql, new
                 {
                     userId = user.Id,
@@ -73,6 +81,7 @@
                     email = user.Email,
                     active = user.Active
                 }));
+
                 return updated == 1;
             }
             catch (SqlException)


Updated version

Updated version

--- DataTables.Queryable/Properties/AssemblyInfo.cs
+++ DataTables.Queryable/Properties/AssemblyInfo.cs
@@ -28,6 +28,6 @@
 //      Minor Version
 //      Build Number

-[assembly: AssemblyVersion("1.3.0")]
-[assembly: AssemblyFileVersion("1.3.0")]
-[assembly: AssemblyInformationalVersion("1.3.0")]
+[assembly: AssemblyVersion("1.4.0")]
+[assembly: AssemblyFileVersion("1.4.0")]
+[assembly: AssemblyInformationalVersion("1.4.0")]


Fixed dublicate job name

Fixed dublicate job name

FIXED: Wrong default job name in options

--- DetectPublicApiChanges/Jobs/DetectChangesJob.cs
+++ DetectPublicApiChanges/Jobs/DetectChangesJob.cs
@@ -20,7 +20,7 @@
 		/// <value>
 		/// The name of the job.
 		/// </value>
-		public string JobName => "DetectObsoletes";
+		public string JobName => "DetectChanges";

 		/// <summary>
 		/// Initializes a new instance of the <see cref="DetectChangesJob"/> class.


Increased retry window

Increased retry window

--- DragonSpark/Diagnostics/DefaultRetryStrategy.cs
+++ DragonSpark/Diagnostics/DefaultRetryStrategy.cs
@@ -4,5 +4,5 @@
 {
 	public static DefaultRetryStrategy Default { get; } = new();

-	DefaultRetryStrategy() : base(1.35f) {}
+	DefaultRetryStrategy() : base(1.75f) {}
 }


CamView State Save/Load Bugfix #FIX: Fixed the currently active CamView state not being loaded correctly from editor user data.

--- DualityEditorPlugins/CamView/Modules/CamView.cs
+++ DualityEditorPlugins/CamView/Modules/CamView.cs
@@ -833,8 +833,8 @@
 				this.oldColorDialogColor = Color.FromArgb(color.A, color.R, color.G, color.B);
 				this.selectedColorDialogColor = this.oldColorDialogColor;
 			}
-			node.GetElementValue("Perspective", this.loadTempPerspective);
-			node.GetElementValue("ActiveState", this.loadTempState);
+			this.loadTempPerspective = node.GetElementValue("Perspective", this.loadTempPerspective);
+			this.loadTempState = node.GetElementValue("ActiveState", this.loadTempState);

 			XElement snapToGridSizeElement = node.Element("SnapToGridSize");
 			if (snapToGridSizeElement != null)


Adding missing documentation

Adding missing documentation

--- Fluent.Ribbon/Controls/GalleryGroupContainer.cs
+++ Fluent.Ribbon/Controls/GalleryGroupContainer.cs
@@ -153,7 +153,7 @@

         #endregion

-        public Panel RealItemsPanel
+        private Panel RealItemsPanel
         {
             get
             {
@@ -179,6 +179,10 @@
             DefaultStyleKeyProperty.OverrideMetadata(typeof(GalleryGroupContainer), new FrameworkPropertyMetadata(typeof(GalleryGroupContainer)));
         }

+        /// <summary>
+        /// Invoked when the <see cref="P:System.Windows.Controls.ItemsControl.ItemsPanel"/> property changes.
+        /// </summary>
+        /// <param name="oldItemsPanel">Old value of the <see cref="P:System.Windows.Controls.ItemsControl.ItemsPanel"/> property.</param><param name="newItemsPanel">New value of the <see cref="P:System.Windows.Controls.ItemsControl.ItemsPanel"/> property.</param>
         protected override void OnItemsPanelChanged(ItemsPanelTemplate oldItemsPanel, ItemsPanelTemplate newItemsPanel)
         {
             base.OnItemsPanelChanged(oldItemsPanel, newItemsPanel);


Finished unit tests for the idea controller

--- IdeaWeb.Test/Controllers/IdeaControllerTests.cs
+++ IdeaWeb.Test/Controllers/IdeaControllerTests.cs
@@ -1,4 +1,5 @@
 using System.Collections.Generic;
+using System.Linq;
 using System.Threading.Tasks;
 using IdeaWeb.Controllers;
 using IdeaWeb.Data;
@@ -56,6 +57,238 @@

             ViewResult result = await _controller.Details(expected.Id) as ViewResult;

+            AssertViewResultContainsExpectedId(expected, result);
+        }
+
+        [Test]
+        public async Task CreatePersistsNewIdea()
+        {
+            var idea = new Idea
+            {
+                Name = "New idea",
+                Description = "Persist an idea",
+                Rating = 1
+            };
+            await _controller.Create(idea);
+
+            // Fetch the ideas back out of the database
+            var ideas = await _context.Ideas.ToListAsync();
+            Assert.That(ideas, Has.Count.EqualTo(NUM_IDEAS + 1));
+            Assert.That(ideas, Has.One.EqualTo(idea).Using(new IdeaEqualityComparer()));
+        }
+
+        [Test]
+        public async Task CreateRedirectsToHome()
+        {
+            var idea = new Idea
+            {
+                Name = "New idea",
+                Description = "Persist an idea",
+                Rating = 1
+            };
+            RedirectToActionResult result = await _controller.Create(idea) as RedirectToActionResult;
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result.ActionName, Is.EqualTo("Index"));
+            Assert.That(result.ControllerName, Is.EqualTo("Home"));
+        }
+
+        [Test]
+        public async Task CreateWithInvalidModelDoesNotPersist()
+        {
+            var idea = new Idea
+            {
+                Description = "Persist an idea",
+                Rating = 1
+            };
+            _controller.ModelState.AddModelError("TestError", "TestError");
+            await _controller.Create(idea);
+
+            // Ensure the idea is not in the database
+            var ideas = await _context.Ideas.ToListAsync();
+            Assert.That(ideas, Has.Count.EqualTo(NUM_IDEAS));
+            Assert.That(ideas, Has.None.EqualTo(idea).Using(new IdeaEqualityComparer()));
+        }
+
+        [Test]
+        public async Task CreateWithInvalidModelUnpersistedModel()
+        {
+            var idea = new Idea
+            {
+                Description = "Persist an idea",
+                Rating = 1
+            };
+            _controller.ModelState.AddModelError("TestError", "TestError");
+            var result = await _controller.Create(idea) as ViewResult;
+
+            Assert.That(result?.Model, Is.Not.Null);
+            Assert.That(result.Model, Is.EqualTo(idea).Using(new IdeaEqualityComparer()));
+        }
+
+
+        [TestCase(null)]
+        [TestCase(-1)]
+        [TestCase(10000000)]
+        public async Task EditGetWithNullOrMissingIdReturnsNotFound(int? id)
+        {
+            IActionResult result = await _controller.Edit(id);
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result, Is.TypeOf<NotFoundResult>());
+        }
+
+        [Test]
+        public async Task EditGetReturnsIdea()
+        {
+            // Get a valid idea out of the db
+            var expected = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(expected, Is.Not.Null);
+
+            ViewResult result = await _controller.Edit(expected.Id) as ViewResult;
+
+            AssertViewResultContainsExpectedId(expected, result);
+        }
+
+
+        [TestCase(-1)]
+        [TestCase(10000000)]
+        public async Task EditPostWithNullOrMissingIdReturnsNotFound(int id)
+        {
+            var idea = new Idea
+            {
+                Id = id,
+                Name = "Invalid"
+            };
+            IActionResult result = await _controller.Edit(id, idea);
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result, Is.TypeOf<NotFoundResult>());
+        }
+
+        [Test]
+        public async Task EditPersistsChanges()
+        {
+            // Get a valid idea out of the db and update it
+            var idea = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(idea, Is.Not.Null);
+            idea.Description += "Updated";
+
+            await _controller.Edit(idea.Id, idea);
+
+            // Fetch the idea back out of the database
+            var updated = await _context.Ideas.SingleOrDefaultAsync(m => m.Id == idea.Id);
+            Assert.That(updated, Is.Not.Null);
+            Assert.That(updated.Description, Is.EqualTo(idea.Description));
+        }
+
+        [Test]
+        public async Task EditRedirectsToDetails()
+        {
+            // Get a valid idea out of the db and update it
+            var idea = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(idea, Is.Not.Null);
+            idea.Description = "Updated";
+
+            RedirectToActionResult result = await _controller.Edit(idea.Id, idea) as RedirectToActionResult;
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result.ActionName, Is.EqualTo("Details"));
+            Assert.That(result.RouteValues["Id"], Is.EqualTo(idea.Id));
+        }
+
+        [Test]
+        public async Task EditWithInvalidModelDoesNotSave()
+        {
+            // Get a valid idea out of the db and update it
+            var idea = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(idea, Is.Not.Null);
+
+            // In-memory database, work on a copy
+            var copy = new Idea
+            {
+                Id = idea.Id,
+                Description = idea.Description + "Updated"
+            };
+
+            _controller.ModelState.AddModelError("TestError", "TestError");
+            await _controller.Edit(copy.Id, copy);
+
+            // Fetch the idea back out of the database
+            var updated = await _context.Ideas.SingleOrDefaultAsync(m => m.Id == idea.Id);
+            Assert.That(updated, Is.Not.Null);
+            Assert.That(updated.Description, Is.Not.EqualTo(copy.Description));
+        }
+
+        [Test]
+        public async Task EditWithDifferentIdReturnsNotFound()
+        {
+            // Get a valid idea out of the db and update it
+            var idea = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(idea, Is.Not.Null);
+
+            IActionResult result = await _controller.Edit(10000, idea);
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result, Is.TypeOf<NotFoundResult>());
+        }
+
+        [Test]
+        public async Task EditWithInvalidIdReturnsNotFound()
+        {
+            // Get a valid idea out of the db and update it
+            var idea = new Idea
+            {
+                Id = 10000,
+                Name = "Invalid",
+                Description = "Doesn't exist"
+            };
+
+            IActionResult result = await _controller.Edit(idea.Id, idea);
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result, Is.TypeOf<NotFoundResult>());
+        }
+
+
+        [TestCase(null)]
+        [TestCase(-1)]
+        [TestCase(10000000)]
+        public async Task DeleteWithNullOrMissingIdReturnsNotFound(int? id)
+        {
+            IActionResult result = await _controller.Delete(id);
+
+            Assert.That(result, Is.Not.Null);
+            Assert.That(result, Is.TypeOf<NotFoundResult>());
+        }
+
+        [Test]
+        public async Task DeleteReturnsIdea()
+        {
+            // Get a valid idea out of the db
+            var expected = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(expected, Is.Not.Null);
+
+            ViewResult result = await _controller.Delete(expected.Id) as ViewResult;
+
+            AssertViewResultContainsExpectedId(expected, result);
+        }
+
+        [Test]
+        public async Task DeleteConfirmedDeletesIdea()
+        {
+            // Get a valid idea out of the db
+            var idea = await _context.Ideas.FirstOrDefaultAsync();
+            Assume.That(idea, Is.Not.Null);
+
+            await _controller.DeleteConfirmed(idea.Id);
+
+            // Fetch the idea back out of the database
+            var result = await _context.Ideas.SingleOrDefaultAsync(i => i.Id == idea.Id);
+            Assert.That(result, Is.Null);
+        }
+
+        private static void AssertViewResultContainsExpectedId(Idea expected, ViewResult result)
+        {
             Assert.That(result?.Model, Is.Not.Null);

             Idea idea = result.Model as Idea;
@@ -68,70 +301,5 @@
                 Assert.That(idea.Rating, Is.EqualTo(expected.Rating));
             });
         }
-
-        [Test]
-        public async Task CreatePersistsNewIdea()
-        {
-            var idea = new Idea
-            {
-                Name = "New idea",
-                Description = "Persist an idea",
-                Rating = 1
-            };
-            await _controller.Create(idea);
-
-            // Fetch the ideas back out of the database
-            var ideas = await _context.Ideas.ToListAsync();
-            Assert.That(ideas, Has.Count.EqualTo(NUM_IDEAS + 1));
-            Assert.That(ideas, Has.One.EqualTo(idea).Using(new IdeaEqualityComparer()));
-        }
-
-        [Test]
-        public async Task CreateRedirectsToHome()
-        {
-            var idea = new Idea
-            {
-                Name = "New idea",
-                Description = "Persist an idea",
-                Rating = 1
-            };
-            RedirectToActionResult result = await _controller.Create(idea) as RedirectToActionResult;
-
-            Assert.That(result, Is.Not.Null);
-            Assert.That(result.ActionName, Is.EqualTo("Index"));
-            Assert.That(result.ControllerName, Is.EqualTo("Home"));
-        }
-
-        [Test]
-        public async Task CreateMissingNameDoesNotPersist()
-        {
-            var idea = new Idea
-            {
-                Description = "Persist an idea",
-                Rating = 1
-            };
-            _controller.ModelState.AddModelError("TestError", "TestError");
-            await _controller.Create(idea);
-
-            // Ensure the idea is not in the database
-            var ideas = await _context.Ideas.ToListAsync();
-            Assert.That(ideas, Has.Count.EqualTo(NUM_IDEAS));
-            Assert.That(ideas, Has.None.EqualTo(idea).Using(new IdeaEqualityComparer()));
-        }
-
-        [Test]
-        public async Task CreateMissingNameReturnsUnpersistedModel()
-        {
-            var idea = new Idea
-            {
-                Description = "Persist an idea",
-                Rating = 1
-            };
-            _controller.ModelState.AddModelError("TestError", "TestError");
-            var result = await _controller.Create(idea) as ViewResult;
-
-            Assert.That(result?.Model, Is.Not.Null);
-            Assert.That(result.Model, Is.EqualTo(idea).Using(new IdeaEqualityComparer()));
-        }
     }
 }


Added missing Pages property to ExhibitResult

--- HiP-DataStore.Model/Rest/ExhibitResult.cs
+++ HiP-DataStore.Model/Rest/ExhibitResult.cs
@@ -9,15 +9,26 @@
     public class ExhibitResult
     {
         public int Id { get; set; }
+
         public string Name { get; set; }
+
         public string Description { get; set; }
+
         public int? Image { get; set; }
+
         public float Latitude { get; set; }
+
         public float Longitude { get; set; }
+
         public bool Used { get; set; }
+
+        public int[] Pages { get; set; }
+
         [JsonConverter(typeof(StringEnumConverter))]
         public ContentStatus Status { get; set; }
+
         public int[] Tags { get; set; }
+
         public DateTimeOffset Timestamp { get; set; }

         public ExhibitResult()
@@ -33,6 +44,7 @@
             Latitude = x.Latitude;
             Longitude = x.Longitude;
             Used = x.Referencees.Count > 0;
+            Pages = x.Pages.Select(id => (int)id).ToArray();
             Status = x.Status;
             Tags = x.Tags.Select(id => (int)id).ToArray();
             Timestamp = x.Timestamp;


Mockup-Buttons entfernt

Mockup-Buttons entfernt

--- ILK-Protokoll/Views/Shared/_Footer.cshtml
+++ ILK-Protokoll/Views/Shared/_Footer.cshtml
@@ -1,22 +1,4 @@
 @using System.Reflection
-
-@if (System.Environment.MachineName == "ILK-PROTO")
-{
-

-
Extra small

-
Small

-
Medium

-
Large

-
-

-
-	<button type="button" class="btn btn-default">Default</button>
-	<button type="button" class="btn btn-primary">Primary</button>
-	<button type="button" class="btn btn-success">Success</button>
-	<button type="button" class="btn btn-info">Info</button>
-	<button type="button" class="btn btn-warning">Warning</button>
-	<button type="button" class="btn btn-danger">Danger</button>
-}


add match module to test

add match module to test

--- IPTables.Net.Tests/IptablesLibraryTest.cs
+++ IPTables.Net.Tests/IptablesLibraryTest.cs
@@ -62,12 +62,12 @@
             {
                 IptcInterface iptc = new IptcInterface("filter");

-                var status = iptc.ExecuteCommand("iptables -A test2 -d 1.1.1.1 -j ACCEPT");
+                var status = iptc.ExecuteCommand("iptables -A test2 -d 1.1.1.1 -m comment \"C\" -j ACCEPT");
                 Assert.AreEqual(1, status);

                 var rules = iptc.GetRules("test2");
                 Assert.AreEqual(1, rules.Count);
-                Assert.AreEqual("-A test2 -d 1.1.1.1 -j ACCEPT", iptc.GetRuleString("test2", rules[0]));
+                Assert.AreEqual("-A test2 -d 1.1.1.1/32 -m comment \"C\" -j ACCEPT", iptc.GetRuleString("test2", rules[0]));
             }
         }
     }


missing semi colon

missing semi colon

--- IPTables.Net/Iptables/IpTablesChainSet.cs
+++ IPTables.Net/Iptables/IpTablesChainSet.cs
@@ -32,7 +32,7 @@
         {
             foreach (var tablePair in IPTablesTables.DefaultTables)
             {
-                AddDefaultChains(tablePair.Key, system)
+                AddDefaultChains(tablePair.Key, system);
             }
         }


Fixed a casting bug in 'UnknownRoleProperties' validator

--- LabXml/Validator/Roles/UnknownRoleProperties.cs
+++ LabXml/Validator/Roles/UnknownRoleProperties.cs
@@ -25,7 +25,7 @@
                 foreach (var role in machine.Roles.Where(r => validRoleProperties.ContainsKey(r.Name.ToString())))
                 {
                     var validKeys = new List<string>();
-                    var keysFromModule = ((object[])((PSObject)validRoleProperties[role.Name.ToString()]).BaseObject).Cast<string>().ToArray();
+                    var keysFromModule = ((object[])validRoleProperties[role.Name.ToString()]).Cast<string>().ToArray();

                     if (keysFromModule.GetType().IsArray)
                         validKeys.AddRange(keysFromModule);


Fixed update file extension on Linux

Fixed update file extension on Linux

--- MatterControlLib/AboutPage/UpdateControlData.cs
+++ MatterControlLib/AboutPage/UpdateControlData.cs
@@ -132,7 +132,7 @@
 				}
 				else if (AggContext.OperatingSystem == OSType.X11)
 				{
-					return "tar.gz";
+					return "deb";
 				}
 				else if (AggContext.OperatingSystem == OSType.Android)
 				{


tweaked log message for getting masters

tweaked log message for getting masters

--- ModAnalyzer/Analysis/Services/ArchiveService.cs
+++ ModAnalyzer/Analysis/Services/ArchiveService.cs
@@ -85,7 +85,7 @@
             foreach (ModOption archiveModOption in ArchiveModOptions) {
                 if (archiveModOption.PluginPaths.Count > 0) CreatePluginAnalyzer();
                 foreach (string pluginPath in archiveModOption.PluginPaths) {
-                    _backgroundWorker.ReportMessage("Getting missing masters for: " + pluginPath, true);
+                    _backgroundWorker.ReportMessage("Getting masters for: " + pluginPath, true);
                     GetPluginMissingMasters(pluginPath);
                 }
             }


Update AppDriver.cs

Update AppDriver.cs

--- source/WinCap.Driver/Drivers/AppDriver.cs
+++ source/WinCap.Driver/Drivers/AppDriver.cs
@@ -154,7 +154,7 @@
             do
             {
                 Thread.Sleep(10);
-            } while (settingsWindow.Instance == null || (Visibility)settingsWindow.Instance.Visibility != Visibility.Visible);
+            } while (settingsWindow.Instance == null || !(bool)settingsWindow.Instance?.DataContext?.IsInitialized);
             return settingsWindow.Instance;
         }


Add missing clamping test in CategoryTests

Bug: 183436582
Change-Id: I01cb6f8029ecbbe512f1c4e971b749ad36a1a88d

--- sdk/unity/Assets/Falken/Tests/CategoryTest.cs
+++ sdk/unity/Assets/Falken/Tests/CategoryTest.cs
@@ -193,6 +193,37 @@
             category.InvalidateNonFalkenFieldValue();
             Assert.IsNull(category.ReadFieldIfValid());
         }
+
+        [Test]
+        public void CategoryClampingTest()
+        {
+          WeaponEnumContainer weaponContainer = new WeaponEnumContainer();
+          FieldInfo weaponField =
+              typeof(WeaponEnumContainer).GetField("weapon");
+          Falken.Category attribute = new Falken.Category();
+          attribute.BindAttribute(weaponField, weaponContainer, _falkenContainer);
+
+          var recovered_logs = new List<String>();
+          System.EventHandler<Falken.Log.MessageArgs> handler = (
+              object source, Falken.Log.MessageArgs args) =>
+          {
+              recovered_logs.Add(args.Message);
+          };
+          Falken.Log.OnMessage += handler;
+          var expected_logs = new List<String>() {
+              "Attempted to set the clamping configuration" +
+                " of attribute weapon, which is of type Categorical" +
+                " and therefore it does not support clamping",
+              "Attempted to read the clamping configuration of attribute" +
+                " weapon, which is of type Categorical and therefore it" +
+                " does not support clamping" };
+          using (var ignoreErrorMessages = new IgnoreErrorMessages())
+          {
+            attribute.EnableClamping = true;
+            Assert.IsTrue(attribute.EnableClamping);
+          }
+          Assert.That(recovered_logs, Is.EquivalentTo(expected_logs));
+        }
     }

     public class CategoryContainerTest


filter search works fine

filter search works fine

--- Inventory.MVC/Views/Document/Index.cshtml
+++ Inventory.MVC/Views/Document/Index.cshtml
@@ -11,7 +11,6 @@
       .Name("vertical")
       .Orientation(SplitterOrientation.Horizontal)
       .HtmlAttributes(new { style = "height: 800px; " })
-
       .Panes(verticalPanes =>
       {
           verticalPanes.Add()
@@ -20,7 +19,7 @@
               .MaxSize("600px")
               .HtmlAttributes(new { id = "top-pane" })
               .Content(
-               Html.Kendo().ToolBar()
+                  Html.Kendo().ToolBar()
                       .Name("ToolBar")
                       .Items(items =>
                       {
@@ -30,53 +29,103 @@
                               buttons.Add().Text("Промени").Togglable(true).Group("text-align").SpriteCssClass("k-tool-icon k-justifyCenter");
                               buttons.Add().Text("Изтрий").Togglable(true).Group("text-align").SpriteCssClass("k-tool-icon k-justifyRight");
                           });
-
                       }).ToHtmlString() +
-
                   Html.Kendo().TreeView()
                       .Events(events => events.Change("tvSelect"))
-    .Name("treeview")
+                      .Name("treeview")
               //.DataUrlField("id")
-    .DataTextField("Name")
-    .DataSource(dataSource => dataSource
-        .Read(read => read
-            .Action("GetFolders", "Document")
-        )
-    ).ToHtmlString()
-
+                      .DataTextField("Name")
+                      .DataSource(dataSource => dataSource
+                          .Read(read => read
+                              .Action("GetFolders", "Document")
+                          )
+                      ).ToHtmlString()
               );

           verticalPanes.Add().Size("100%").HtmlAttributes(new { id = "right-pane" })
               .Content(
-
- Html.Kendo().Grid<FileViewModel>().Name("FileViewModel")
- .AddBaseOptions(DataSourceType.Ajax)
-
+                  Html.Kendo().Grid<FileViewModel>().Name("FileViewModel")
+                      .AddBaseOptions(DataSourceType.Ajax)
+                      .Events(e => e.DataBound("gridDataBound"))
                       .DataSource(dataSource => dataSource
-                                 .Ajax()
-
-
-
-
-                                 .Read(read => read.Action("ReadFiles", "Document").Data("getTreeviewSelectedItem"))
-
-                                 )
-                                 .ToolBar(t => t.Template(Html.Kendo().ToolBar()
-    .Name("ToolBar2")
-    .Items(items =>
-    {
-        items.Add().Template(Html.Kendo().TextBox().Name("tbSearch").ToHtmlString());
-        items.Add().Template(Html.Kendo().Button().Name("btnSearch").Content("Търси").ToHtmlString());
-    }).ToHtmlString()))
-
-            .ToHtmlString()
-
-
+                          .Ajax()
+                          .Events(e => e.RequestEnd("dsRequestEnd"))
+                          .Read(read => read.Action("ReadFiles", "Document").Data("getTreeviewSelectedItem"))
+                      )
+                      .ToolBar(t => t.Template(Html.Kendo().ToolBar()
+                          .Name("ToolBar2")
+                          .Items(items =>
+                          {
+                              items.Add().Template(Html.Kendo().TextBox().Name("tbSearch").ToHtmlString());
+                              items.Add().Template(Html.Kendo().Button().Name("btnSearch").Content("Търси").Events(e => e.Click("btnSearchClick")).ToHtmlString());
+                          }).ToHtmlString()))
+                      .ToHtmlString()
               );
       })
 )

 <script type="text/javascript">
+    var initialDataSource;
+
+    var isReinitNeed = true;
+
+    function gridDataBound(a, b, c) {
+        if (isReinitNeed === false) {
+            var grid = $("#FileViewModel").data("kendoGrid");
+            //var gridData = grid.dataSource.view();
+            var gridData = grid.dataSource.data(); // this fixes colours when grouping
+            initialDataSource = gridData;
+            isReinitNeed = true;
+        }
+    }
+
+    function dsRequestEnd(a, b, c) {
+
+        isReinitNeed = false;
+    }
+
+
+    function btnSearchClick(e) {
+        debugger;
+        var grid = $("#FileViewModel").data("kendoGrid");
+        //var gridData = grid.dataSource.view();
+        //var gridData = grid.dataSource.data(); // this fixes colours when grouping
+
+        var gridData = initialDataSource;
+
+        var tbSearch = $("#tbSearch");
+        var searchVal = tbSearch.val();
+        var arrResult = [];
+        for (var i = 0; i < gridData.length; i++) {
+
+            var currData = gridData[i];
+
+            for (var property in currData) {
+
+                if (currData.hasOwnProperty(property)) {
+
+                    var valToCheck = currData[property];
+                    if (valToCheck != null) {
+                        if (valToCheck.toString().indexOf(searchVal.toString()) > -1) {
+                            arrResult.push(gridData[i]);
+                            break;
+                        }
+                    }
+                }
+            }
+        }
+
+        grid.dataSource.data(arrResult);
+        //grid.dataSource.data = arrResult;
+        //grid.dataSource.read();
+
+        //grid.dataSource.read();
+        grid.refresh();
+
+
+
+    }
+
     function tvSelect(e) {
         // `this` refers to the TreeView object
         var dataItem = this.dataItem(e.node);
@@ -87,7 +136,6 @@
     }

     function getTreeviewSelectedItem() {
-        debugger;
         var treeview = $("#treeview").data("kendoTreeView");
         var selected = treeview.select();
         var fullName = "";


Made background timer more aggressive.

Made background timer more aggressive.

--- JabbR/App_Start/Startup.BackgroundWork.cs
+++ JabbR/App_Start/Startup.BackgroundWork.cs
@@ -16,7 +16,7 @@
         // Background task info
         private static volatile bool _sweeping;
         private static Timer _backgroundTimer;
-        private static readonly TimeSpan _sweepInterval = TimeSpan.FromMinutes(10);
+        private static readonly TimeSpan _sweepInterval = TimeSpan.FromMinutes(2);

         private static void StartBackgroundWork(IKernel kernel, IDependencyResolver resolver)
         {
@@ -97,7 +97,7 @@
                     // Fix users that are marked as inactive but have no clients
                     user.Status = (int)UserStatus.Offline;
                 }
-                else if (elapsed.TotalMinutes > 15)
+                else if (elapsed.TotalMinutes > 5)
                 {
                     user.Status = (int)UserStatus.Inactive;
                     inactiveUsers.Add(user);


Fix models view dapter item type typo.

Fix models view dapter item type typo.

The BaseModelsViewAdapter had a typo in the GetItemViewType method,
which made it treat every row as a loading indicator.

--- Joey/UI/Adapters/BaseModelsViewAdapter.cs
+++ Joey/UI/Adapters/BaseModelsViewAdapter.cs
@@ -56,7 +56,7 @@
             if (position == modelsView.Count && modelsView.IsLoading)
                 return ViewTypeLoaderPlaceholder;

-            return ViewTypeLoaderPlaceholder;
+            return ViewTypeContent;
         }

         public override View GetView (int position, View convertView, ViewGroup parent)


Add TODO.

Add TODO.

--- Dasher.Schemata.Tests/SchemaTests.cs
+++ Dasher.Schemata.Tests/SchemaTests.cs
@@ -13,6 +13,7 @@

 namespace Dasher.Schemata.Tests
 {
+    // TODO better default names for schema (consider type name, though careful with generics...)
     // TODO support recursive types
     // TODO reflect integral conversions supported by dasher
     // TODO test writing empty message to complex with all-default values


Put back in raising Progress after computing hash is complete again. Whoops ...

--- DieFledermaus/DieFledermausStream.cs
+++ DieFledermaus/DieFledermausStream.cs
@@ -2655,6 +2655,8 @@

             OnProgress(_encFmt == MausEncryptionFormat.None ? MausProgressState.VerifyingHash : MausProgressState.ComputingHash);
             byte[] hashActual = ComputeHash(_bufferStream, _hashFunc);
+            if (_encFmt != MausEncryptionFormat.None)
+                OnProgress(new MausProgressEventArgs(MausProgressState.ComputingHashCompleted, hashActual));
             if (_encFmt == MausEncryptionFormat.None || _rsaSignature != null)
             {
                 if (_encFmt == MausEncryptionFormat.None)
@@ -3207,6 +3209,7 @@
             {
                 OnProgress(MausProgressState.ComputingHash);
                 hashChecksum = ComputeHash(_bufferStream, _hashFunc);
+                OnProgress(new MausProgressEventArgs(MausProgressState.ComputingHashCompleted, hashChecksum));
                 if (_rsaSignParamBC != null)
                 {
                     OnProgress(MausProgressState.SigningRSA);
@@ -3363,6 +3366,7 @@
                         _bufferStream.Reset();
                         OnProgress(MausProgressState.ComputingHash);
                         hashChecksum = ComputeHash(_bufferStream, _hashFunc);
+                        OnProgress(new MausProgressEventArgs(MausProgressState.ComputingHashCompleted, hashChecksum));
                     }
                     writer.Write(hashChecksum);


Avoid KeyNotFoundException

Avoid KeyNotFoundException

--- main/HSSF/Record/RecordFactory.cs
+++ main/HSSF/Record/RecordFactory.cs
@@ -422,7 +422,10 @@
          */
         public static Type GetRecordClass(int sid)
         {
-            I_RecordCreator rc = _recordCreatorsById[(short)sid];
+            I_RecordCreator rc = null;
+            if (_recordCreatorsById.ContainsKey((short)sid))
+                rc = _recordCreatorsById[(short)sid];
+
             if (rc == null)
             {
                 return null;


clean up LastCompact property

clean up LastCompact property

--- Duplicati/Library/Main/Controller.cs
+++ Duplicati/Library/Main/Controller.cs
@@ -83,11 +83,6 @@
         private ControllerMultiLogTarget m_logTarget;

         /// <summary>
-        /// Time of last compact operation
-        /// </summary>
-        private DateTime m_lastcompact;
-
-        /// <summary>
         /// Constructs a new interface for performing backup and restore operations
         /// </summary>
         /// <param name="backend">The url for the backend to use</param>
@@ -117,9 +112,9 @@
             Library.UsageReporter.Reporter.Report("USE_COMPRESSION", m_options.CompressionModule);
             Library.UsageReporter.Reporter.Report("USE_ENCRYPTION", m_options.EncryptionModule);

-            if (!m_options.NoAutoCompact && (m_lastcompact > DateTime.MinValue) && (m_lastcompact.Add(m_options.AutoCompactInterval) > DateTime.Now))
-            {
-                Logging.Log.WriteInformationMessage(LOGTAG, "CompactResults", "Skipping auto compaction until {0}", m_lastcompact.Add(m_options.AutoCompactInterval));
+            if (!m_options.NoAutoCompact && (LastCompact > DateTime.MinValue) && (LastCompact.Add(m_options.AutoCompactInterval) > DateTime.Now))
+            {
+                Logging.Log.WriteInformationMessage(LOGTAG, "CompactResults", "Skipping auto compaction until {0}", LastCompact.Add(m_options.AutoCompactInterval));
                 m_options.RawOptions["no-auto-compact"] = "true";
             }

@@ -1108,11 +1103,10 @@
             set { m_options.MaxDownloadPrSecond = value; }
         }

-        public DateTime LastCompact
-        {
-            get { return m_lastcompact; }
-            set { m_lastcompact = value; }
-        }
+        /// <summary>
+        /// Time of last compact operation
+        /// </summary>
+        public DateTime LastCompact { get; set; }

         #region IDisposable Members


AddStepHandlerTest: GremlinqTestBase.

AddStepHandlerTest: GremlinqTestBase.

--- test/ExRam.Gremlinq.Core.Tests/AddStepHandlerTest.cs
+++ test/ExRam.Gremlinq.Core.Tests/AddStepHandlerTest.cs
@@ -2,23 +2,29 @@
 using System.Threading.Tasks;
 using VerifyXunit;
 using Xunit;
+using Xunit.Abstractions;

 namespace ExRam.Gremlinq.Core.Tests
 {
     [UsesVerify]
-    public class AddStepHandlerTest
+    public class AddStepHandlerTest : GremlinqTestBase
     {
+        public AddStepHandlerTest(ITestOutputHelper testOutputHelper) : base(testOutputHelper)
+        {
+
+        }
+
         [Fact]
         public async Task Empty()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
         }

         [Fact]
         public async Task Base_type()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<Step>((steps, step, env, overridden, recurse) => steps.Push(new VStep(ImmutableArray.Create<object>("id"))))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
         }
@@ -26,7 +32,7 @@
         [Fact]
         public async Task Irrelevant()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<HasKeyStep>((steps, step, env, overridden, recurse) => steps.Push(new HasLabelStep(ImmutableArray.Create("should not be here"))))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
         }
@@ -34,7 +40,7 @@
         [Fact]
         public async Task Override1()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => overridden(steps, new HasLabelStep(step.Labels.Add("added label")), env, recurse))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
         }
@@ -42,7 +48,7 @@
         [Fact]
         public async Task Override2()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => overridden(steps, new HasLabelStep(step.Labels.Add("added label override 1")), env, recurse))
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => overridden(steps, new HasLabelStep(step.Labels.Add("added label override 2")), env, recurse))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
@@ -51,7 +57,7 @@
         [Fact]
         public async Task Recurse()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => recurse.AddStep(steps, new VStep(ImmutableArray.Create<object>("id")), env))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
         }
@@ -60,7 +66,7 @@
         [Fact]
         public async Task Recurse_to_previous_override()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<VStep>((steps, step, env, overridden, recurse) => overridden(steps, new VStep(step.Ids.Add("another id")), env, recurse))
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => recurse.AddStep(steps, new VStep(ImmutableArray.Create<object>("id")), env))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));
@@ -69,7 +75,7 @@
         [Fact]
         public async Task Recurse_to_later_override()
         {
-            await Verifier.Verify(AddStepHandler.Empty
+            await Verify(AddStepHandler.Empty
                 .Override<HasLabelStep>((steps, step, env, overridden, recurse) => recurse.AddStep(steps, new VStep(ImmutableArray.Create<object>("id")), env))
                 .Override<VStep>((steps, step, env, overridden, recurse) => overridden(steps, new VStep(step.Ids.Add("another id")), env, recurse))
                 .AddStep(ImmutableStack<Step>.Empty, new HasLabelStep(ImmutableArray.Create("label")), GremlinQueryEnvironment.Empty));


Remove Sleep(1) and replace ManualResetEvent with AutoResetEvent

--- Engine/DataFeeds/LiveSynchronizer.cs
+++ Engine/DataFeeds/LiveSynchronizer.cs
@@ -28,7 +28,7 @@
     /// </summary>
     public class LiveSynchronizer : Synchronizer
     {
-        private readonly ManualResetEvent _newLiveDataEmitted = new ManualResetEvent(false);
+        private readonly AutoResetEvent _newLiveDataEmitted = new AutoResetEvent(false);

         /// <summary>
         /// Initializes the instance of the Synchronizer class
@@ -83,8 +83,6 @@
                     break;
                 }

-                _newLiveDataEmitted.Reset();
-
                 // check for cancellation
                 if (cancellationToken.IsCancellationRequested) break;

@@ -100,9 +98,6 @@
                     // the heartbeat of the application
                     nextEmit = frontierUtc.RoundDown(Time.OneSecond).Add(Time.OneSecond);
                 }
-
-                // take a short nap
-                Thread.Sleep(1);
             }

             if (shouldSendExtraEmptyPacket)


Support system colors (see #73)

Support system colors (see #73)

--- AngleSharp/Css/Colors.cs
+++ AngleSharp/Css/Colors.cs
@@ -16,6 +16,7 @@

         static readonly Dictionary<String, Color> _colors = new Dictionary<String, Color>(StringComparer.OrdinalIgnoreCase)
         {
+            // Extended color keywords
             { "aliceblue", new Color(240, 248, 255) },
             { "antiquewhite", new Color(250, 235, 215) },
             { "aqua", new Color(0, 255, 255) },
@@ -163,7 +164,36 @@
             { "whitesmoke", new Color(245, 245, 245) },
             { "yellow", new Color(255, 255, 0) },
             { "yellowgreen", new Color(154, 205, 50) },
-            { "transparent", new Color(0, 0, 0) }
+            { "transparent", new Color(0, 0, 0) },
+            // CSS2 system colors
+            { "activeborder", new Color(255, 255, 255) },
+            { "activecaption", new Color(204, 204, 204) },
+            { "appworkspace", new Color(255, 255, 255) },
+            { "background", new Color(99, 99, 206) },
+            { "buttonface", new Color(221, 221, 221) },
+            { "buttonhighlight", new Color(221, 221, 221) },
+            { "buttonshadow", new Color(136, 136, 136) },
+            { "buttontext", new Color(0, 0, 0) },
+            { "captiontext", new Color(0, 0, 0) },
+            { "graytext", new Color(128, 128, 128) },
+            { "highlight", new Color(181, 213, 255) },
+            { "highlighttext", new Color(0, 0, 0) },
+            { "inactiveborder", new Color(255, 255, 255) },
+            { "inactivecaption", new Color(255, 255, 255) },
+            { "inactivecaptiontext", new Color(127, 127, 127) },
+            { "infobackground", new Color(251, 252, 197) },
+            { "infotext", new Color(0, 0, 0) },
+            { "menu", new Color(247, 247, 247) },
+            { "menutext", new Color(0, 0, 0) },
+            { "scrollbar", new Color(255, 255, 255) },
+            { "threeddarkshadow", new Color(102, 102, 102) },
+            { "threedface", new Color(255, 255, 255) },
+            { "threedhighlight", new Color(221, 221, 221) },
+            { "threedlightshadow", new Color(192, 192, 192) },
+            { "threedshadow", new Color(136, 136, 136) },
+            { "window", new Color(255, 255, 255) },
+            { "windowframe", new Color(204, 204, 204) },
+            { "windowtext", new Color(0, 0, 0) }
         };

         #endregion


(BDF): ignore empty entries.

(BDF): ignore empty entries.


Ajout méthode permettant de capturer la position du curseur et de renvoyer la puissance du coup

--- Enigmas/Components/Clou/EnergyBar.cs
+++ Enigmas/Components/Clou/EnergyBar.cs
@@ -85,9 +85,60 @@

             //Replace le curseur sur la base de la barre
             cursor.Location = new Point(0, 346);
+        }

+        /// <summary>
+        /// Lance l'animation du curseur
+        /// </summary>
+        public void StartCursor()
+        {
             //Relance le timer
             timer.Start();
         }
+
+        /// <summary>
+        /// Stop le curseur et capture sa position
+        /// </summary>
+        /// <returns>La puissance du coup</returns>
+        public int CaptureCursorPower()
+        {
+            //Stop le timer
+            timer.Stop();
+
+            //Capture la position du curseur et définit la puissance du coup en fonction de sa position
+            if(cursor.Location.Y < 0 || cursor.Location.Y >= 0 && cursor.Location.Y <= 89)
+            {
+                ResetCursorPosition();
+
+                //20 de puissance
+                return 20;
+            }
+            else if(cursor.Location.Y >= 90 && cursor.Location.Y <= 179)
+            {
+                ResetCursorPosition();
+
+                //15 de puissance
+                return 15;
+            }
+            else if(cursor.Location.Y >= 180 && cursor.Location.Y <= 269)
+            {
+                ResetCursorPosition();
+
+                //10 de puissance
+                return 10;
+            }
+            else if(cursor.Location.Y >= 270 && cursor.Location.Y <= 356 || cursor.Location.Y > 356)
+            {
+                ResetCursorPosition();
+
+                //5 de puissance
+                return 5;
+            }
+            else
+            {
+                ResetCursorPosition();
+                return 0;
+            }
+        }
     }
 }


Removed comment

Removed comment

--- Espera/Espera.Core.Tests/SongTest.cs
+++ Espera/Espera.Core.Tests/SongTest.cs
@@ -4,9 +4,6 @@

 namespace Espera.Core.Tests
 {
-    /// <summary>
-    /// Summary description for SongTest
-    /// </summary>
     [TestClass]
     public class SongTest
     {


- Minor change

- Minor change

--- EventTracker/Mediator/LogMediator.cs
+++ EventTracker/Mediator/LogMediator.cs
@@ -23,7 +23,11 @@
                 sb.AppendFormat(", Info: {0}", interactionInfo.EventText);

             //Raise event
-            NewLogEvent(sb.ToString());
+            if (NewLogEvent != null)
+            {
+                //Notify subscribers
+                NewLogEvent(sb.ToString());
+            }
         }

         /// <summary>


Charger gump id updated.

Charger gump id updated.

--- ExampleScripts/UOErebor/chargers.csx
+++ ExampleScripts/UOErebor/chargers.csx
@@ -7,8 +7,8 @@

     private static EventJournal journal = UO.CreateEventJournal();

-    private static Charger fireCharger = new Charger((GumpTypeId)0x9600057B, 2257, 6254, Trace);
-    private static Charger energyCharger = new Charger((GumpTypeId)0x9600057B, 2281, 6256, Trace);
+    private static Charger fireCharger = new Charger((GumpTypeId)0x9600057E, 2257, 6254, Trace);
+    private static Charger energyCharger = new Charger((GumpTypeId)0x9600057E, 2281, 6256, Trace);

     private static int GetLevel(Charger charger)
     {


nant.build

nant.build

--- Examples/CreateWindowTest/Program.cs
+++ Examples/CreateWindowTest/Program.cs
@@ -4,6 +4,7 @@
 using System;
 using System.Collections.Generic;
 using ERY.AgateLib;
+using ERY.AgateLib.Geometry;

 namespace ERY.CreateWindowTest
 {
@@ -102,4 +103,4 @@
             }
         }
     }
-}+}


added property rigidbody to position saver

--- Helper.cs
+++ Helper.cs
@@ -19,6 +19,8 @@
     public class Rigidbody2DPositionSaver : PositionSaver
     {
         Rigidbody2D m_body;
+
+        public Rigidbody2D body { get { return m_body; } }

         public Rigidbody2DPositionSaver(Rigidbody2D body) : base(body.transform)
         {


Move exception test case to member data pattern.

--- Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
+++ Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
@@ -14,6 +14,8 @@
         public interface ITestCase
         {
             void Run();
+
+            void ExpectException();
         }

         public static IEnumerable<object[]> TestCases
@@ -141,6 +143,15 @@
             }
         }

+        public static IEnumerable<object[]> ExceptionCases
+        {
+            get
+            {
+                yield return new TestCase<MyViewModel>(m => m.GetByTwoRoutings());
+                yield return new TestCase<MyViewModel>(m => m.GetWithoutRoutings());
+            }
+        }
+
         [Theory]
         [MemberData("TestCases")]
         public void Test_URL_builder(ITestCase testCase)
@@ -148,18 +159,11 @@
             testCase.Run();
         }

-        [Fact]
-        public void GetUrl_should_throw_exception_when_method_has_two_attributes()
-        {
-            Assert.Throws<Exception>(
-                () => Url.Builder.GetUrl<MyViewModel>(m => m.GetByTwoRoutings()));
-        }
-
-        [Fact]
-        public void GetUrl_should_throw_exception_when_method_has_no_attributes()
-        {
-            Assert.Throws<Exception>(
-                () => Url.Builder.GetUrl<MyViewModel>(m => m.GetWithoutRoutings()));
+        [Theory]
+        [MemberData("ExceptionCases")]
+        public void Throws_URL_builder_exception(ITestCase testCase)
+        {
+            testCase.ExpectException();
         }

         public class Url : NancyModule
@@ -181,6 +185,11 @@
             private readonly object parameters;

             private readonly string url;
+
+            public TestCase(Expression<Func<T, object>> expression)
+            {
+                this.expression = expression;
+            }

             public TestCase(Expression<Func<T, object>> expression, string url)
             {
@@ -220,6 +229,12 @@
                 Assert.Equal(this.url, url);
             }

+            public void ExpectException()
+            {
+                // TODO catch specified URL builder exception
+                Assert.Throws<Exception>(() => Url.Builder.GetUrl<T>(this.expression));
+            }
+
             public override string ToString()
             {
                 return string.Format("{0} {1}", typeof(T).Name, this.expression);


Add test cases about URL builder from interface.

--- Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
+++ Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
@@ -143,6 +143,14 @@
                     m => m.Get(),
                     new { prefix = "passed-constructor-parameters" },
                     "/route-prefix/passed-constructor-parameters");
+
+                yield return new TestCase<IInterfaceViewModel>(
+                    m => m.Get(),
+                    "/interface");
+
+                yield return new TestCase<IInterfaceViewModel>(
+                    m => m.GetWithParamter("value"),
+                    "/interface/value");
             }
         }


Add test case to cover expression not method call case.

--- Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
+++ Nancy.AttributeRouting.Tests/UrlBuilderTests.cs
@@ -170,6 +170,9 @@
         {
             get
             {
+                yield return new ExceptionTestCase<MyViewModel, ArgumentException>(
+                    m => "anything other than a method call expression");
+
                 yield return new ExceptionTestCase<MyViewModel, MultipleRouteAttributesException>(
                     m => m.GetByTwoRoutings());


Admin menu icon for modules added

Admin menu icon for modules added

--- NetCoreCMS.Framework/Utility/AdminMenuHelper.cs
+++ NetCoreCMS.Framework/Utility/AdminMenuHelper.cs
@@ -27,7 +27,7 @@
                         {
                             var key = adminMenuDic.Keys.Where(x => x.Name == atrib.Name).FirstOrDefault();

-                            if ( key == null )
+                            if (key == null)
                             {
                                 adminMenuDic.Add(atrib, new List<AdminMenuItem>());
                                 key = atrib;
@@ -36,7 +36,7 @@
                             foreach (var item in actions)
                             {
                                 var menuItem = item.GetCustomAttribute<AdminMenuItem>();
-                                if(menuItem != null)
+                                if (menuItem != null)
                                 {
                                     adminMenuDic[key].Add(menuItem);
                                 }
@@ -48,7 +48,7 @@
                         //TODO: Log error. Raise global error message.
                     }
                 }
-            }
+            }
             return adminMenuDic;
         }

@@ -99,16 +99,26 @@
             var menuStr = "";
             foreach (var item in adminMenuDic)
             {
-                menuStr += "
 " + item.Key.Name + " "
+                string icon = "fa-gears";
+                if (!string.IsNullOrEmpty(item.Key.IconCls))
+                {
+                    icon = item.Key.IconCls;
+                }
+                menuStr += "
 " + item.Key.Name + " "
                             + "
";
                 foreach (var subItem in item.Value.OrderBy(x => x.Order))
                 {
+                    icon = "fa-gear";
+                    if (!string.IsNullOrEmpty(subItem.IconCls))
+                    {
+                        icon = subItem.IconCls;
+                    }
                     var qStr = "";
                     if (!string.IsNullOrEmpty(subItem.QueryString))
                     {
                         qStr = "/?" + subItem.QueryString;
                     }
-                    menuStr += "
" + subItem.Name + "
";
+                    menuStr += "
" + subItem.Name + "
";
                 }
                 menuStr += "

";
             }
@@ -117,4 +127,4 @@
         }

     }
-}
+}


Fix the help for load oar.

Fix the help for load oar.

--- OpenSim/Region/Framework/Scenes/SceneManager.cs
+++ OpenSim/Region/Framework/Scenes/SceneManager.cs
@@ -704,11 +704,11 @@
                 "Load a region's data from OAR archive.  \n" +
                 "--merge will merge the oar with the existing scene.  \n" +
                 "--skip-assets will load the oar but ignore the assets it contains. \n" +
-                "OffsetX will change where the X location of the oar is loaded, and the same for Y and Z.  \n" +
-                "FlipX flips the region on the X axis.  \n" +
-                "FlipY flips the region on the Y axis.  \n" +
-                "UseParcelOwnership changes who the default owner of objects whose owner cannot be found from the Estate Owner to the parcel owner on which the object is found.  \n" +
-                "CheckOwnership asks for each UUID that is not found on the grid what user it should be changed to (useful for changing UUIDs from other grids, but very long with many users).  ", LoadOar);
+                "--OffsetX will change where the X location of the oar is loaded, and the same for Y and Z.  \n" +
+                "--FlipX flips the region on the X axis.  \n" +
+                "--FlipY flips the region on the Y axis.  \n" +
+                "--UseParcelOwnership changes who the default owner of objects whose owner cannot be found from the Estate Owner to the parcel owner on which the object is found.  \n" +
+                "--CheckOwnership asks for each UUID that is not found on the grid what user it should be changed to (useful for changing UUIDs from other grids, but very long with many users).  ", LoadOar);

             MainConsole.Instance.Commands.AddCommand("save oar", "save oar [-v|--version=N] [<OAR path>]", "Save a region's data to an OAR archive -v|--version=N generates scene objects as per older versions of the serialization (e.g. -v=0)" + Environment.NewLine
                                            + "The OAR path must be a filesystem path."


Use ToString() rather than a cast (more robust)

--- OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
+++ OpenSim/Region/ScriptEngine/Shared/LSL_Types.cs
@@ -560,7 +560,7 @@
                 else if (m_data[itemIndex] is Int32)
                     return new LSLInteger((int)m_data[itemIndex]);
                 else if (m_data[itemIndex] is LSL_Types.LSLString)
-                    return new LSLInteger((string)m_data[itemIndex]);
+                    return new LSLInteger(m_data[itemIndex].ToString());
                 else
                     throw new InvalidCastException();
             }


add country code to company file

add country code to company file

--- MYOB.API.SDK/SDK/Contracts/CompanyFile.cs
+++ MYOB.API.SDK/SDK/Contracts/CompanyFile.cs
@@ -43,5 +43,9 @@
         /// </summary>
         public Guid? LauncherId { get; set; }

+        /// <summary>
+        /// Country code.
+        /// </summary>
+        public String Country { get; set; }
     }
 }


Update GlowWindow.xaml.cs

Update GlowWindow.xaml.cs

Fixes the cursor when owner.ResizeMode is ResizeMode.NoResize or ResizeMode.CanMinimize.

--- MahApps.Metro/Controls/GlowWindow.xaml.cs
+++ MahApps.Metro/Controls/GlowWindow.xaml.cs
@@ -48,11 +48,15 @@
                                                : new Rect(0, ActualHeight - edgeSize, ActualWidth, edgeSize).Contains(p)
                                                      ? HitTestValues.HTBOTTOMLEFT
                                                      : HitTestValues.HTLEFT;
-                    getCursor = p => new Rect(0, 0, ActualWidth, edgeSize).Contains(p)
+                    getCursor = p => {
+                        return (owner.ResizeMode == ResizeMode.NoResize || owner.ResizeMode == ResizeMode.CanMinimize)
+                                    ? owner.Cursor
+                                    : new Rect(0, 0, ActualWidth, edgeSize).Contains(p)
                                          ? Cursors.SizeNWSE
                                          : new Rect(0, ActualHeight - edgeSize, ActualWidth, edgeSize).Contains(p)
                                                ? Cursors.SizeNESW
                                                : Cursors.SizeWE;
+                    };
                     break;
                 case GlowDirection.Right:
                     glow.Orientation = Orientation.Vertical;
@@ -66,11 +70,15 @@
                                                : new Rect(0, ActualHeight - edgeSize, ActualWidth, edgeSize).Contains(p)
                                                      ? HitTestValues.HTBOTTOMRIGHT
                                                      : HitTestValues.HTRIGHT;
-                    getCursor = p => new Rect(0, 0, ActualWidth, edgeSize).Contains(p)
+                    getCursor = p =>  {
+                        return (owner.ResizeMode == ResizeMode.NoResize || owner.ResizeMode == ResizeMode.CanMinimize)
+                                    ? owner.Cursor
+                                    : new Rect(0, 0, ActualWidth, edgeSize).Contains(p)
                                          ? Cursors.SizeNESW
                                          : new Rect(0, ActualHeight - edgeSize, ActualWidth, edgeSize).Contains(p)
                                                ? Cursors.SizeNWSE
                                                : Cursors.SizeWE;
+                    };
                     break;
                 case GlowDirection.Top:
                     glow.Orientation = Orientation.Horizontal;
@@ -85,12 +93,16 @@
                                                           ActualHeight).Contains(p)
                                                      ? HitTestValues.HTTOPRIGHT
                                                      : HitTestValues.HTTOP;
-                    getCursor = p => new Rect(0, 0, edgeSize - glowSize, ActualHeight).Contains(p)
+                    getCursor = p =>  {
+                        return (owner.ResizeMode == ResizeMode.NoResize || owner.ResizeMode == ResizeMode.CanMinimize)
+                                    ? owner.Cursor
+                                    : new Rect(0, 0, edgeSize - glowSize, ActualHeight).Contains(p)
                                          ? Cursors.SizeNWSE
                                          : new Rect(Width - edgeSize + glowSize, 0, edgeSize - glowSize, ActualHeight).
                                                Contains(p)
                                                ? Cursors.SizeNESW
                                                : Cursors.SizeNS;
+                    };
                     break;
                 case GlowDirection.Bottom:
                     glow.Orientation = Orientation.Horizontal;
@@ -105,12 +117,16 @@
                                                           ActualHeight).Contains(p)
                                                      ? HitTestValues.HTBOTTOMRIGHT
                                                      : HitTestValues.HTBOTTOM;
-                    getCursor = p => new Rect(0, 0, edgeSize - glowSize, ActualHeight).Contains(p)
+                    getCursor = p =>  {
+                        return (owner.ResizeMode == ResizeMode.NoResize || owner.ResizeMode == ResizeMode.CanMinimize)
+                                    ? owner.Cursor
+                                    : new Rect(0, 0, edgeSize - glowSize, ActualHeight).Contains(p)
                                          ? Cursors.SizeNESW
                                          : new Rect(Width - edgeSize + glowSize, 0, edgeSize - glowSize, ActualHeight).
                                                Contains(p)
                                                ? Cursors.SizeNWSE
                                                : Cursors.SizeNS;
+                    };
                     break;
             }

@@ -240,4 +256,4 @@
             return IntPtr.Zero;
         }
     }
-}+}


Version bump to v1.0.1

Version bump to v1.0.1

--- MarkdownDocNet/Properties/AssemblyInfo.cs
+++ MarkdownDocNet/Properties/AssemblyInfo.cs
@@ -6,7 +6,7 @@
 // set of attributes. Change these attribute values to modify the information
 // associated with an assembly.
 [assembly: AssemblyTitle("MarkdownDocNet")]
-[assembly: AssemblyDescription("A Markdown documentation generator for .NET XML documentation files.")]
+[assembly: AssemblyDescription("A Markdown documentation generator for .NET XML documentation files. More information at https://github.com/LukasBoersma/MarkdownDocNet")]
 [assembly: AssemblyConfiguration("")]
 [assembly: AssemblyCompany("Lukas Boersma")]
 [assembly: AssemblyProduct("MarkdownDocNet")]
@@ -32,5 +32,5 @@
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.0.0.0")]
-[assembly: AssemblyFileVersion("1.0.0.0")]
+[assembly: AssemblyVersion("1.0.1.0")]
+[assembly: AssemblyFileVersion("1.0.1.0")]


[050dev] Adding useful message

[050dev] Adding useful message

--- OpusOptionInterfacePropertyGenerator/Program.cs
+++ OpusOptionInterfacePropertyGenerator/Program.cs
@@ -340,6 +340,7 @@

             if (Parameters.Mode.GenerateProperties == (parameters.mode & Parameters.Mode.GenerateProperties))
             {
+                System.Console.WriteLine("Generating properties...");
                 WritePropertiesFile(parameters, propertyList);
             }
         }


RGB to HSL and back

RGB to HSL and back

cleanup

--- Nez.Portable/Utils/Extensions/ColorExt.cs
+++ Nez.Portable/Utils/Extensions/ColorExt.cs
@@ -8,17 +8,9 @@
 		private const string HEX = "0123456789ABCDEF";

-		static public byte HexToByte(char c)
-		{
-			return (byte) HEX.IndexOf(char.ToUpper(c));
-		}
+		static public byte HexToByte(char c) => (byte)HEX.IndexOf(char.ToUpper(c));

-
-		static public Color Invert(this Color color)
-		{
-			return new Color(255 - color.R, 255 - color.G, 255 - color.B, color.A);
-		}
-
+		static public Color Invert(this Color color) => new Color(255 - color.R, 255 - color.G, 255 - color.B, color.A);

 		static public Color HexToColor(string hex)
 		{
@@ -29,54 +21,46 @@
 			return new Color(r, g, b);
 		}

-
 		public static Color HexToColor(int hex)
 		{
-			var r = (byte) (hex >> 16);
-			var g = (byte) (hex >> 8);
-			var b = (byte) (hex >> 0);
+			var r = (byte)(hex >> 16);
+			var g = (byte)(hex >> 8);
+			var b = (byte)(hex >> 0);

 			return new Color(r, g, b);
 		}

-
 		static public Color Grayscale(this Color color)
 		{
-			return new Color((int) (color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
-				(int) (color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
-				(int) (color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
+			return new Color((int)(color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
+				(int)(color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
+				(int)(color.R * 0.3 + color.G * 0.59 + color.B * 0.11),
 				color.A);
 		}
-

 		public static Color Add(this Color color, Color second)
 		{
 			return new Color(color.R + second.R, color.G + second.G, color.B + second.B, color.A + second.A);
 		}

-
 		/// <summary>
 		/// first - second
 		/// </summary>
-		/// <param name="first">First.</param>
-		/// <param name="second">Second.</param>
 		public static Color Subtract(this Color color, Color second)
 		{
 			return new Color(color.R - second.R, color.G - second.G, color.B - second.B, color.A - second.A);
 		}

-
 		public static Color Multiply(this Color self, Color second)
 		{
 			return new Color
 			{
-				R = (byte) (self.R * second.R / 255),
-				G = (byte) (self.G * second.G / 255),
-				B = (byte) (self.B * second.B / 255),
-				A = (byte) (self.A * second.A / 255)
+				R = (byte)(self.R * second.R / 255),
+				G = (byte)(self.G * second.G / 255),
+				B = (byte)(self.B * second.B / 255),
+				A = (byte)(self.A * second.A / 255)
 			};
 		}
-

 		/// <summary>
 		/// linearly interpolates Color from - to
@@ -86,11 +70,10 @@
 		/// <param name="t">T.</param>
 		public static Color Lerp(Color from, Color to, float t)
 		{
-			var t255 = (int) (t * 255);
+			var t255 = (int)(t * 255);
 			return new Color(from.R + (to.R - from.R) * t255 / 255, from.G + (to.G - from.G) * t255 / 255,
 				from.B + (to.B - from.B) * t255 / 255, from.A + (to.A - from.A) * t255 / 255);
 		}
-

 		/// <summary>
 		/// linearly interpolates Color from - to
@@ -101,11 +84,99 @@
 		public static void Lerp(ref Color from, ref Color to, out Color result, float t)
 		{
 			result = new Color();
-			var t255 = (int) (t * 255);
-			result.R = (byte) (from.R + (to.R - from.R) * t255 / 255);
-			result.G = (byte) (from.G + (to.G - from.G) * t255 / 255);
-			result.B = (byte) (from.B + (to.B - from.B) * t255 / 255);
-			result.A = (byte) (from.A + (to.A - from.A) * t255 / 255);
+			var t255 = (int)(t * 255);
+			result.R = (byte)(from.R + (to.R - from.R) * t255 / 255);
+			result.G = (byte)(from.G + (to.G - from.G) * t255 / 255);
+			result.B = (byte)(from.B + (to.B - from.B) * t255 / 255);
+			result.A = (byte)(from.A + (to.A - from.A) * t255 / 255);
+		}
+
+		public static (float, float, float) RgbToHsl(Color color)
+		{
+			var h = 0f;
+			var s = 0f;
+			var l = 0f;
+
+			var r = color.R / 255f;
+			var g = color.G / 255f;
+			var b = color.B / 255f;
+			var min = MathHelper.Min(MathHelper.Min(r, g), b);
+			var max = MathHelper.Max(MathHelper.Max(r, g), b);
+			var delta = max - min;
+
+			// luminance is the ave of max and min
+			l = (max + min) / 2f;
+
+			if (delta > 0)
+			{
+				if (l < 0.5f)
+					s = delta / (max + min);
+				else
+					s = delta / (2 - max - min);
+
+				var deltaR = (((max - r) / 6f) + (delta / 2f)) / delta;
+				var deltaG = (((max - g) / 6f) + (delta / 2f)) / delta;
+				var deltaB = (((max - b) / 6f) + (delta / 2f)) / delta;
+
+				if (r == max)
+					h = deltaB - deltaG;
+				else if (g == max)
+					h = (1f / 3f) + deltaR - deltaB;
+				else if (b == max)
+					h = (2f / 3f) + deltaG - deltaR;
+
+				if (h < 0)
+					h += 1;
+
+				if (h > 1)
+					h -= 1;
+			}
+
+			return (h, s, l);
+		}
+
+		public static Color HslToRgb(float h, float s, float l)
+		{
+			float HueToRgb(float v1, float v2, float vH)
+			{
+				vH += (vH < 0) ? 1 : 0;
+				vH -= (vH > 1) ? 1 : 0;
+				var ret = v1;
+
+				if ((6 * vH) < 1)
+					ret = (v1 + (v2 - v1) * 6 * vH);
+				else if ((2 * vH) < 1)
+					ret = v2;
+
+				else if ((3 * vH) < 2)
+					ret = v1 + (v2 - v1) * ((2f / 3f) - vH) * 6f;
+
+				return Mathf.Clamp01(ret);
+			}
+
+			var c = new Color();
+			c.A = 255;
+
+			if (s == 0)
+			{
+				c.R = (byte)(l * 255f);
+				c.G = (byte)(l * 255f);
+				c.B = (byte)(l * 255f);
+			}
+			else
+			{
+				var v2 = (l + s) - (s * l);
+				if (l < 0.5f)
+					v2 = l * (1 + s);
+
+				var v1 = 2f * l - v2;
+
+				c.R = (byte)(255f * HueToRgb(v1, v2, h + (1f / 3f)));
+				c.G = (byte)(255f * HueToRgb(v1, v2, h));
+				c.B = (byte)(255f * HueToRgb(v1, v2, h - (1f / 3f)));
+			}
+
+			return c;
 		}
 	}
 }


Fix parameter's default values for constructors

--- NiL.JS/Core/Functions/ConstructorProxy.cs
+++ NiL.JS/Core/Functions/ConstructorProxy.cs
@@ -346,7 +346,9 @@
                         return _constructors[i];
                     }

-                    if (pass == 1 || _constructors[i]._parameters.Length == len)
+                    if (pass == 1
+                        || _constructors[i]._parameters.Length == len
+                        || (_constructors[i]._parameters.Length >= len && _constructors[i]._parameters.Count(x => !x.IsOptional) <= len))
                     {
                         if (len == 0)
                         {