cached delegates are now private

cached delegates are now private

--- Dapper.Compose/Query.cs
+++ Dapper.Compose/Query.cs
@@ -85,58 +85,17 @@
             using (var results = await db.QueryMultipleAsync(Sql, param, transaction, commandTimeout, commandType))
                 return await ReadAsync(results);
         }
-
-        /// <summary>
-        /// The materializer for a single result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, T> Single = Query.Reader<T, T>("ReadSingle");
-
-        /// <summary>
-        /// The materializer for a single result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, Task<T>> SingleAsync = Query.Reader<T, Task<T>>("ReadSingleAsync");
-
-        /// <summary>
-        /// The materializer for a single optional result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, T> SingleOrDefault = Query.Reader<T, T>("ReadSingleOrDefault");
-
-        /// <summary>
-        /// The materializer for a single optional result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, Task<T>> SingleOrDefaultAsync = Query.Reader<T, Task<T>>("ReadSingleOrDefaultAsync");
-
-        /// <summary>
-        /// The materializer for the first result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, T> First = Query.Reader<T, T>("ReadFirst");
-
-        /// <summary>
-        /// The materializer for the first result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, Task<T>> FirstAsync = Query.Reader<T, Task<T>>("ReadFirstAsync");
-
-        /// <summary>
-        /// The materializer for the first optional result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, T> FirstOrDefault = Query.Reader<T, T>("ReadFirstOrDefault");
-
-        /// <summary>
-        /// The materializer for the first optional result.
-        /// </summary>
-        public static readonly Func<SqlMapper.GridReader, Task<T>> FirstOrDefaultAsync = Query.Reader<T, Task<T>>("ReadFirstOrDefaultAsync");
-
-        /// <summary>
-        /// The materializer for a list of results.
-        /// </summary>
-        // passing buffered = true means the result is already a list
-        public static readonly Func<SqlMapper.GridReader, List<T>> List = x => x.Read<T>(true) as List<T>;
-
-        /// <summary>
-        /// The materializer for a list of results.
-        /// </summary>
-        // passing buffered = true means the result is already a list
-        public static readonly Func<SqlMapper.GridReader, Task<List<T>>> ListAsync = async x => await x.ReadAsync<T>(true) as List<T>;
+
+        internal static readonly Func<SqlMapper.GridReader, T> Single = Query.Reader<T, T>(nameof(SqlMapper.GridReader.ReadSingle));
+        internal static readonly Func<SqlMapper.GridReader, Task<T>> SingleAsync = Query.Reader<T, Task<T>>(nameof(SqlMapper.GridReader.ReadSingleAsync));
+        internal static readonly Func<SqlMapper.GridReader, T> SingleOrDefault = Query.Reader<T, T>(nameof(SqlMapper.GridReader.ReadSingleOrDefault));
+        internal static readonly Func<SqlMapper.GridReader, Task<T>> SingleOrDefaultAsync = Query.Reader<T, Task<T>>(nameof(SqlMapper.GridReader.ReadSingleOrDefaultAsync));
+        internal static readonly Func<SqlMapper.GridReader, T> First = Query.Reader<T, T>("ReadFirst");
+        internal static readonly Func<SqlMapper.GridReader, Task<T>> FirstAsync = Query.Reader<T, Task<T>>(nameof(SqlMapper.GridReader.ReadFirstAsync));
+        internal static readonly Func<SqlMapper.GridReader, T> FirstOrDefault = Query.Reader<T, T>(nameof(SqlMapper.GridReader.ReadFirstOrDefault));
+        internal static readonly Func<SqlMapper.GridReader, Task<T>> FirstOrDefaultAsync = Query.Reader<T, Task<T>>(nameof(SqlMapper.GridReader.ReadFirstOrDefaultAsync));
+        internal static readonly Func<SqlMapper.GridReader, List<T>> List = x => x.Read<T>(true) as List<T>;
+        internal static readonly Func<SqlMapper.GridReader, Task<List<T>>> ListAsync = async x => await x.ReadAsync<T>(true) as List<T>;
     }

     /// <summary>
@@ -151,7 +110,7 @@
                          .GetMethods()
                          .Single(x => x.Name.Equals(name, StringComparison.Ordinal) && x.IsGenericMethodDefinition)
                          .MakeGenericMethod(typeof(T));
-            return (Func<SqlMapper.GridReader, TReturn>)Delegate.CreateDelegate(typeof(Func<SqlMapper.GridReader, TReturn>), null, method);
+            return (Func<SqlMapper.GridReader, TReturn>)method.CreateDelegate(typeof(Func<SqlMapper.GridReader, TReturn>), null);
         }

         /// <summary>
@@ -187,7 +146,7 @@
         /// <returns></returns>
         public static Query<T> First<T>(string sql, params object[] parameters)
         {
-            return new Query<T>(Query<T>.First, Query<T>.FirstOrDefaultAsync, sql, parameters);
+            return new Query<T>(Query<T>.First, Query<T>.FirstAsync, sql, parameters);
         }

         /// <summary>


Revert "CMF1-1305 Added PageSchemaId to xpm metadata"

This reverts commit a03c7ac7866601a4be5b4b7475b8fac1d135e7f5.

--- Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs
+++ Sdl.Web.Tridion.Templates.R2/Data/DefaultModelBuilder.cs
@@ -594,8 +594,7 @@
                 { "PageID", GetTcmIdentifier(page) },
                 { "PageModified", page.RevisionDate },
                 { "PageTemplateID", GetTcmIdentifier(page.PageTemplate) },
-                { "PageTemplateModified", page.PageTemplate.RevisionDate },
-                { "PageSchemaID", GetDxaIdentifier(page.PageTemplate.PageSchema) }
+                { "PageTemplateModified", page.PageTemplate.RevisionDate }
             };
         }


Add NaturalLanguageTools.ToPascal

Add NaturalLanguageTools.ToPascal

--- Signum.Utilities/NaturalLanguage/NaturalLanguageTools.cs
+++ Signum.Utilities/NaturalLanguage/NaturalLanguageTools.cs
@@ -179,6 +179,27 @@
             Abbreviation,
         }

+        public static string ToPascal(this string str, bool firstUpper)
+        {
+            StringBuilder sb = new StringBuilder(str.Length);
+
+            bool upper = true;
+            for (int i = 0; i < str.Length; i++)
+            {
+                char c = str[i];
+                if (!char.IsLetter(c) && !char.IsNumber(c))
+                    upper = true;
+                else
+                {
+                    sb.Append(upper ? char.ToUpper(c) : char.ToLower(c));
+
+                    if (char.IsLetter(c))
+                        upper = false;
+                }
+            }
+
+            return sb.ToString();
+        }

         /// <param name="genderAwareText">Se ha[n] encontrado [1m:un|1f:una|m:unos|f:unas] {0} eliminad[1m:o|1f:a|m:os|f:as]</param>
         /// <param name="gender">Masculine, Femenine, Neutrum, Inanimate, Animate</param>


WorldObject_Properties comments

WorldObject_Properties comments

--- Source/ACE.Server/WorldObjects/WorldObject_Properties.cs
+++ Source/ACE.Server/WorldObjects/WorldObject_Properties.cs
@@ -687,6 +687,9 @@
         }

+        // ========================================
+        //= ========== Other Properties ===========
+        // ========================================
         public int? CharacterOptions1Mapping
         {
             get => GetProperty(PropertyInt.CharacterOptions1);
@@ -1571,9 +1574,9 @@

-        #region Positions
-
-
+        // ========================================
+        //= ======== Position Properties ==========
+        // ========================================
         //public Position Location
         //{
         //    get { return GetPosition(PositionType.Location); }
@@ -1761,9 +1764,5 @@
             get { return GetPosition(PositionType.TeleportedCharacter); }
             set { SetPosition(PositionType.TeleportedCharacter, value); }
         }
-        #endregion
-
-
-
     }
 }


Fixed SmtpClient to call OnNoRecipientsAccepted even in the non-PIPELINE case

Fixes issue #491

--- MailKit/Net/Smtp/SmtpClient.cs
+++ MailKit/Net/Smtp/SmtpClient.cs
@@ -363,13 +363,10 @@

 		void FlushCommandQueue (MimeMessage message, MailboxAddress sender, IList<MailboxAddress> recipients, CancellationToken cancellationToken)
 		{
-			if (queued.Count == 0)
-				return;
-
 			try {
 				var responses = new List<SmtpResponse> ();
 				Exception rex = null;
-				int count = 0;
+				int accepted = 0;
 				int rcpt = 0;

 				// Note: queued commands are buffered by the stream
@@ -393,12 +390,12 @@
 						break;
 					case SmtpCommand.RcptTo:
 						if (ProcessRcptToResponse (message, recipients[rcpt++], responses[i]))
-							count++;
+							accepted++;
 						break;
 					}
 				}

-				if (count == 0)
+				if (accepted == 0)
 					OnNoRecipientsAccepted (message);

 				if (rex != null)
@@ -1525,7 +1522,7 @@
 			return value.TrimEnd (',');
 		}

-		void RcptTo (FormatOptions options, MimeMessage message, MailboxAddress mailbox, CancellationToken cancellationToken)
+		bool RcptTo (FormatOptions options, MimeMessage message, MailboxAddress mailbox, CancellationToken cancellationToken)
 		{
 			var command = string.Format ("RCPT TO:<{0}>", GetAddrspec (options, mailbox));

@@ -1538,12 +1535,12 @@

 			if ((capabilities & SmtpCapabilities.Pipelining) != 0) {
 				QueueCommand (SmtpCommand.RcptTo, command, cancellationToken);
-				return;
+				return false;
 			}

 			var response = SendCommand (command, cancellationToken);

-			ProcessRcptToResponse (message, mailbox, response);
+			return ProcessRcptToResponse (message, mailbox, response);
 		}

 		class SendContext
@@ -1704,13 +1701,20 @@
 				// queue their commands instead of sending them immediately.
 				MailFrom (format, message, sender, extensions, cancellationToken);

-				for (int i = 0; i < recipients.Count; i++)
-					RcptTo (format, message, recipients[i], cancellationToken);
-
-				// Note: if PIPELINING is supported, this will flush all outstanding
-				// MAIL FROM and RCPT TO commands to the server and then process all
-				// of their responses.
-				FlushCommandQueue (message, sender, recipients, cancellationToken);
+				int accepted = 0;
+				for (int i = 0; i < recipients.Count; i++) {
+					if (RcptTo (format, message, recipients[i], cancellationToken))
+						accepted++;
+				}
+
+				if (queued.Count > 0) {
+					// Note: if PIPELINING is supported, this will flush all outstanding
+					// MAIL FROM and RCPT TO commands to the server and then process all
+					// of their responses.
+					FlushCommandQueue (message, sender, recipients, cancellationToken);
+				} else if (accepted == 0) {
+					OnNoRecipientsAccepted (message);
+				}

 				if ((extensions & SmtpExtension.BinaryMime) != 0)
 					Bdat (format, message, cancellationToken, progress);


Fixed a broken unit test

Fixed a broken unit test

--- Source/Tests/Repositories/OrganizationRepositoryTests.cs
+++ Source/Tests/Repositories/OrganizationRepositoryTests.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using Exceptionless.Api.Tests.Utility;
 using Exceptionless.Core.Billing;
 using Exceptionless.Core.Messaging.Models;


Localization du module GestionInfosClub

Localization du module GestionInfosClub

--- GestAssoc/GestAssoc.Modules.GestionInfosClub/Commands/SaveFormulaireInfosClubCommand.cs
+++ GestAssoc/GestAssoc.Modules.GestionInfosClub/Commands/SaveFormulaireInfosClubCommand.cs
@@ -8,6 +8,7 @@
 using System;
 using System.Collections.Generic;
 using System.Windows.Input;
+using GlblRes = global::GestAssoc.Modules.GestionInfosClub.Properties.Resources;

 namespace GestAssoc.Modules.GestionInfosClub.Commands
 {
@@ -35,11 +36,11 @@
 				if (this.IsValidForSaving(itemToSave, out errorsList)) {
 					UIServices.SetBusyState();
 					service.SaveInfosClub(itemToSave);
-					NotificationHelper.WriteNotification("Enregistrement effectué.");
+					NotificationHelper.WriteNotification(GlblRes.Log_EnregistrementTermine);
 					new ShowViewCommand(ViewNames.ConsultationInfosClub.ToString()).Execute(null);
 				}
 				else {
-					errorsList.Insert(0, "Saisie non valide. Enregistrement annulé.");
+					errorsList.Insert(0, GlblRes.Log_EnregistrementAnnule);
 					NotificationHelper.WriteNotificationList(errorsList);
 				}
 			}
@@ -56,15 +57,15 @@
 			errorsList = new List<string>();

 			if (string.IsNullOrWhiteSpace(itemToSave.Nom)) {
-				errorsList.Add("Nom obligatoire.");
+				errorsList.Add(GlblRes.Err_NomObligatoire);
 			}

 			if (string.IsNullOrWhiteSpace(itemToSave.Adresse)) {
-				errorsList.Add("Adresse obligatoire.");
+				errorsList.Add(GlblRes.Err_AdresseObligatoire);
 			}

 			if (itemToSave.Ville == null) {
-				errorsList.Add("Ville obligatoire.");
+				errorsList.Add(GlblRes.Err_VilleObligatoire);
 			}

 			return errorsList.Count == 0;


Add an AssemblyResolutionException constructor that takes an inner exception.

--- Mono.Cecil/BaseAssemblyResolver.cs
+++ Mono.Cecil/BaseAssemblyResolver.cs
@@ -45,7 +45,12 @@
 		}

 		public AssemblyResolutionException (AssemblyNameReference reference)
-			: base (string.Format ("Failed to resolve assembly: '{0}'", reference))
+			: this (reference, null)
+		{
+		}
+
+		public AssemblyResolutionException (AssemblyNameReference reference, Exception innerException)
+			: base (string.Format ("Failed to resolve assembly: '{0}'", reference), innerException)
 		{
 			this.reference = reference;
 		}


Controller brackets

Controller brackets

--- Presentation.Web/Controllers/API/V1/UI_Configuration/UIModuleConfigurationController.cs
+++ Presentation.Web/Controllers/API/V1/UI_Configuration/UIModuleConfigurationController.cs
@@ -9,89 +9,90 @@
 using Presentation.Web.Models.API.V1.UI_Configuration;
 using Swashbuckle.Swagger.Annotations;

-namespace Presentation.Web.Controllers.API.V1.UI_Configuration;
+namespace Presentation.Web.Controllers.API.V1.UI_Configuration
+{
+    [InternalApi]
+    [RoutePrefix("api/v1/organizations/{organizationId}/ui-config/modules/{module}")]
+    public class UIModuleConfigurationController : BaseApiController
+    {
+        private readonly IUIModuleCustomizationService _uiVisibilityConfigurationService;

-[InternalApi]
-[RoutePrefix("api/v1/organizations/{organizationId}/ui-config/modules/{module}")]
-public class UIModuleConfigurationController : BaseApiController
-{
-    private readonly IUIModuleCustomizationService _uiVisibilityConfigurationService;
+        public UIModuleConfigurationController(IUIModuleCustomizationService uiVisibilityConfigurationService)
+        {
+            _uiVisibilityConfigurationService = uiVisibilityConfigurationService;
+        }

-    public UIModuleConfigurationController(IUIModuleCustomizationService uiVisibilityConfigurationService)
-    {
-        _uiVisibilityConfigurationService = uiVisibilityConfigurationService;
-    }
+        [HttpGet]
+        [Route]
+        [SwaggerResponse(HttpStatusCode.OK, Type = typeof(ApiReturnDTO<UIModuleCustomizationDTO>))]
+        [SwaggerResponse(HttpStatusCode.Forbidden)]
+        [SwaggerResponse(HttpStatusCode.NotFound)]
+        [SwaggerResponse(HttpStatusCode.Unauthorized)]
+        public HttpResponseMessage Get(int organizationId, string module)
+        {
+            return _uiVisibilityConfigurationService
+                .GetModuleConfigurationForOrganization(organizationId, module)
+                .Match(entities => Ok(entities.Select(ToDto).ToList()), FromOperationError);
+        }

-    [HttpGet]
-    [Route]
-    [SwaggerResponse(HttpStatusCode.OK, Type = typeof(ApiReturnDTO<UIModuleCustomizationDTO>))]
-    [SwaggerResponse(HttpStatusCode.Forbidden)]
-    [SwaggerResponse(HttpStatusCode.NotFound)]
-    [SwaggerResponse(HttpStatusCode.Unauthorized)]
-    public HttpResponseMessage Get(int organizationId, string module)
-    {
-        return _uiVisibilityConfigurationService
-            .GetModuleConfigurationForOrganization(organizationId, module)
-            .Match(entities => Ok(entities.Select(ToDto).ToList()), FromOperationError);
-    }
+        [HttpPut]
+        [Route]
+        [SwaggerResponse(HttpStatusCode.NoContent)]
+        [SwaggerResponse(HttpStatusCode.BadRequest)]
+        [SwaggerResponse(HttpStatusCode.Forbidden)]
+        [SwaggerResponse(HttpStatusCode.NotFound)]
+        [SwaggerResponse(HttpStatusCode.Unauthorized)]
+        public HttpResponseMessage Put(int organizationId, string module, [FromBody] UIModuleCustomizationDTO dto)
+        {
+            return _uiVisibilityConfigurationService
+                .Put(
+                    organizationId,
+                    module,
+                    ToEntity(dto, organizationId, module)
+                )
+                .Match(_ => NoContent(), FromOperationError);
+        }

-    [HttpPut]
-    [Route]
-    [SwaggerResponse(HttpStatusCode.NoContent)]
-    [SwaggerResponse(HttpStatusCode.BadRequest)]
-    [SwaggerResponse(HttpStatusCode.Forbidden)]
-    [SwaggerResponse(HttpStatusCode.NotFound)]
-    [SwaggerResponse(HttpStatusCode.Unauthorized)]
-    public HttpResponseMessage Put(int organizationId, string module, [FromBody] UIModuleCustomizationDTO dto)
-    {
-        return _uiVisibilityConfigurationService
-            .Put(
-                organizationId,
-                module,
-                ToEntity(dto, organizationId, module)
-                )
-            .Match(_ => NoContent(), FromOperationError);
-    }
+        private static UIModuleCustomization ToEntity(
+            UIModuleCustomizationDTO value,
+            int organizationId,
+            string module)
+        {
+            return new UIModuleCustomization
+            {
+                OrganizationId = organizationId,
+                Module = module,
+                Nodes = value.Nodes.Select(NodeToEntity).ToList()
+            };
+        }

-    private static UIModuleCustomization ToEntity(
-        UIModuleCustomizationDTO value,
-        int organizationId,
-        string module)
-    {
-        return new UIModuleCustomization
+        private static CustomizedUINode NodeToEntity(
+            CustomizedUINodeDTO value)
         {
-            OrganizationId = organizationId,
-            Module = module,
-            Nodes = value.Nodes.Select(NodeToEntity).ToList()
-        };
-    }
+            return new CustomizedUINode()
+            {
+                Key = value.Key,
+                Enabled = value.Enabled
+            };
+        }

-    private static CustomizedUINode NodeToEntity(
-        CustomizedUINodeDTO value)
-    {
-        return new CustomizedUINode()
+        private static UIModuleCustomizationDTO ToDto(
+            UIModuleCustomization value)
         {
-            Key = value.Key,
-            Enabled = value.Enabled
-        };
-    }
+            return new UIModuleCustomizationDTO()
+            {
+                Nodes = value.Nodes.Select(NodeToDto).ToList()
+            };
+        }

-    private static UIModuleCustomizationDTO ToDto(
-        UIModuleCustomization value)
-    {
-        return new UIModuleCustomizationDTO()
+        private static CustomizedUINodeDTO NodeToDto(
+            CustomizedUINode value)
         {
-            Nodes = value.Nodes.Select(NodeToDto).ToList()
-        };
-    }
-
-    private static CustomizedUINodeDTO NodeToDto(
-        CustomizedUINode value)
-    {
-        return new CustomizedUINodeDTO()
-        {
-            Key = value.Key,
-            Enabled = value.Enabled
-        };
+            return new CustomizedUINodeDTO()
+            {
+                Key = value.Key,
+                Enabled = value.Enabled
+            };
+        }
     }
 }


added remove option function again

added remove option function again

--- Presentation.Web/Controllers/OData/AttachedOptions/AttachedOptionsFunctionController.cs
+++ Presentation.Web/Controllers/OData/AttachedOptions/AttachedOptionsFunctionController.cs
@@ -36,7 +36,7 @@
             _OptionRepository = OptionRepository;
             _LocalOptionRepository = LocalOptionRepository;
         }
-        /*
+
         [System.Web.Http.HttpDelete]
         [EnableQuery]
         [ODataRoute("RemoveOption(id={id}, objectId={objectId}, type={type}, entityType={entityType})")]
@@ -64,6 +64,6 @@
             }

             return StatusCode(HttpStatusCode.NoContent);
-        }*/
+        }
     }
 }


Fixed invalid cast exception.

Fixed invalid cast exception.

For the case when the segments instantiated/used declaratively in code.

--- SegmentedControl/SegmentedControl.FormsPlugin.Android/SegmentedControlImplementation.cs
+++ SegmentedControl/SegmentedControl.FormsPlugin.Android/SegmentedControlImplementation.cs
@@ -2,13 +2,13 @@
 using Xamarin.Forms;
 using SegmentedControl.FormsPlugin.Android;
 using Xamarin.Forms.Platform.Android;
-using Android.Widget;
-using Android.Views;
-using Android.Graphics.Drawables;
-
+using Android.Widget;
+using Android.Views;
+using Android.Graphics.Drawables;
+
 [assembly: ExportRenderer(typeof(SegmentedControl.FormsPlugin.Abstractions.SegmentedControl), typeof(SegmentedControlRenderer))]
 namespace SegmentedControl.FormsPlugin.Android
-{
+{
 	/// <summary>
 	/// SegmentedControl Renderer
 	/// </summary>
@@ -24,55 +24,55 @@
 			var layoutInflater = LayoutInflater.From(Forms.Context);

 			if (Control == null)
-			{
-				// Instantiate the native control and assign it to the Control property with
-				// the SetNativeControl method
-
+			{
+				// Instantiate the native control and assign it to the Control property with
+				// the SetNativeControl method
+
 				nativeControl = (RadioGroup)layoutInflater.Inflate(Resource.Layout.RadioGroup, null);
 				SetNativeControl(nativeControl);
 			}

 			if (e.OldElement != null)
-			{
-				// Unsubscribe from event handlers and cleanup any resources
-
-				if (nativeControl != null)
+			{
+				// Unsubscribe from event handlers and cleanup any resources
+
+				if (nativeControl != null)
 					nativeControl.CheckedChange -= NativeControl_CheckedChange;
 			}

 			if (e.NewElement != null)
-			{
-				// Configure the control and subscribe to event handlers
-
-				for (var i = 0; i < e.NewElement.Children.Count; i++)
-				{
-					var o = e.NewElement.Children[i];
+			{
+				// Configure the control and subscribe to event handlers
+
+				for (var i = 0; i < e.NewElement.Children.Count; i++)
+				{
+					var o = e.NewElement.Children[i];
 					var v = (RadioButton)layoutInflater.Inflate(Resource.Layout.RadioButton, null);

-					v.LayoutParameters = new RadioGroup.LayoutParams(0, LayoutParams.WrapContent, 1f);
+					v.LayoutParameters = new RadioGroup.LayoutParams(0, LayoutParams.WrapContent, 1f);
 					v.Text = o.Text;

 					if (i == Element.SelectedSegment)
 					{
 						v.SetTextColor(Color.FromHex("#ffffff00").ToAndroid());
 						_v = v;
-					}
+					}
 					else {
 						v.SetTextColor(Element.TintColor.ToAndroid());
 					}
-
-					if (i == 0)
-						v.SetBackgroundResource(Resource.Drawable.segmented_control_first_background);
-					else if (i == e.NewElement.Children.Count - 1)
+
+					if (i == 0)
+						v.SetBackgroundResource(Resource.Drawable.segmented_control_first_background);
+					else if (i == e.NewElement.Children.Count - 1)
 						v.SetBackgroundResource(Resource.Drawable.segmented_control_last_background);

 					SetTintColor(i, v);
-
-					nativeControl.AddView(v);
-				}
-
-				var option = (RadioButton)nativeControl.GetChildAt(Element.SelectedSegment);
-				nativeControl.Check(option.Id);
+
+					nativeControl.AddView(v);
+				}
+
+				var option = (RadioButton)nativeControl.GetChildAt(Element.SelectedSegment);
+				nativeControl.Check(option.Id);
 				e.NewElement.SelectedText = e.NewElement.Children[Element.SelectedSegment].Text;

 				nativeControl.CheckedChange += NativeControl_CheckedChange;
@@ -82,44 +82,44 @@
 			}
 		}

-        void Element_SelectTab (int index)
-		{
-			var newoption = (RadioButton)nativeControl.GetChildAt(index);
-			nativeControl.Check(newoption.Id);
+        void Element_SelectTab (int index)
+		{
+			var newoption = (RadioButton)nativeControl.GetChildAt(index);
+			nativeControl.Check(newoption.Id);
 		}

 		void Element_SetTintColor(Color color)
 		{
 			Element.TintColor = color;

-			for (var i = 0; i < Element.Children.Count; i++)
-			{
+			for (var i = 0; i < Element.Children.Count; i++)
+			{
 				var v = (RadioButton)nativeControl.GetChildAt(i);

-				if (i == Element.SelectedSegment)
-					v.SetTextColor(Color.FromHex("#ffffff00").ToAndroid());
-				else
+				if (i == Element.SelectedSegment)
+					v.SetTextColor(Color.FromHex("#ffffff00").ToAndroid());
+				else
 					v.SetTextColor(Element.TintColor.ToAndroid());
-
-				SetTintColor(i, v);
+
+				SetTintColor(i, v);
 			}
 		}

 		void NativeControl_CheckedChange(object sender, RadioGroup.CheckedChangeEventArgs e)
 		{
-			var rg = (RadioGroup)sender;
-			if (rg.CheckedRadioButtonId != -1)
-			{
-				var id = rg.CheckedRadioButtonId;
-				var radioButton = rg.FindViewById(id);
-				var radioId = rg.IndexOfChild(radioButton);
+			var rg = (RadioGroup)sender;
+			if (rg.CheckedRadioButtonId != -1)
+			{
+				var id = rg.CheckedRadioButtonId;
+				var radioButton = rg.FindViewById(id);
+				var radioId = rg.IndexOfChild(radioButton);
 				var btn = (RadioButton)rg.GetChildAt(radioId);
 				_v.SetTextColor(Element.TintColor.ToAndroid());
 				btn.SetTextColor(Color.FromHex("#ffffff00").ToAndroid());
-				_v = btn;
+				_v = btn;
 				var selection = btn.Text;
-				Element.SelectedSegment = radioId;
-				Element.SelectedText = selection; // this will call ValueChanged in PCL
+				Element.SelectedSegment = radioId;
+				Element.SelectedText = selection; // this will call ValueChanged in PCL
 			}
 		}

@@ -128,24 +128,21 @@
 			GradientDrawable selectedShape;
 			GradientDrawable unselectedShape;

-			var gradientDrawable = (StateListDrawable)button.Background;
-			var drawableContainerState = (DrawableContainer.DrawableContainerState)gradientDrawable.GetConstantState();
+			var gradientDrawable = (StateListDrawable)button.Background;
+			var drawableContainerState = (DrawableContainer.DrawableContainerState)gradientDrawable.GetConstantState();
 			var children = drawableContainerState.GetChildren();
-			if (index == Element.Children.Count - 1)
-			{
-				selectedShape = (GradientDrawable)children[0];
-				unselectedShape = (GradientDrawable)children[1];
-			}
-			else {
-				var selectedItem = (InsetDrawable)children[0];
-				var unselectedItem = (InsetDrawable)children[1];
-				selectedShape = (GradientDrawable)selectedItem.Drawable;  // TODO: not working on API 18
-				unselectedShape = (GradientDrawable)unselectedItem.Drawable;
-			}
-
-			selectedShape.SetStroke(3, Element.TintColor.ToAndroid());
-			selectedShape.SetColor(Element.TintColor.ToAndroid());
-			unselectedShape.SetStroke(3, Element.TintColor.ToAndroid());
+
+			selectedShape = children[0] is GradientDrawable
+				? (GradientDrawable)children[0]
+				: (GradientDrawable)((InsetDrawable)children[0]).Drawable;
+
+			unselectedShape = children[1] is GradientDrawable
+				? (GradientDrawable)children[1]
+				: (GradientDrawable)((InsetDrawable)children[1]).Drawable;
+
+			selectedShape.SetStroke(3, Element.TintColor.ToAndroid());
+			selectedShape.SetColor(Element.TintColor.ToAndroid());
+			unselectedShape.SetStroke(3, Element.TintColor.ToAndroid());
 		}

 		protected override void Dispose(bool disposing)
@@ -170,4 +167,4 @@
 			var temp = DateTime.Now;
 		}
     }
-}+}


Import all dependencies for the model #575

- fixed typo in UT
- UT :+1:

--- SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs
+++ SemanticData/Tests/USNodeSetValidationUnitTestProject/XMLModelsCorrectModelsUnitTest.cs
@@ -62,7 +62,7 @@
     {
       FileInfo _testDataFileInfo = new FileInfo(@"CorrectModels\VariableTypeTest\VariableTypeTest.NodeSet2.xml");
       Assert.IsTrue(_testDataFileInfo.Exists);
-      List<IUANodeContext> _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 5, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/ObjectTypeTest").Uri);
+      List<IUANodeContext> _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 5, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest").Uri);
       Assert.IsFalse(_nodes.Where<IUANodeContext>(x => x.UANode == null).Any<IUANodeContext>());
       Assert.AreEqual<int>(3, _nodes.Where<IUANodeContext>(x => x.UANode is UAType).Count<IUANodeContext>());
     }
@@ -73,7 +73,7 @@
     {
       FileInfo _testDataFileInfo = new FileInfo(@"CorrectModels\DataTypeTest\DataTypeTest.NodeSet2.xml");
       Assert.IsTrue(_testDataFileInfo.Exists);
-      List<IUANodeContext> _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 18, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/VariableTypeTest").Uri);
+      List<IUANodeContext> _nodes = ValidateAndExportModelUnitTest(_testDataFileInfo, 18, new UriBuilder("http://cas.eu/UA/CommServer/UnitTests/DataTypeTest").Uri);
       Assert.IsFalse(_nodes.Where<IUANodeContext>(x => x.UANode == null).Any<IUANodeContext>());
       Assert.AreEqual<int>(4, _nodes.Where<IUANodeContext>(x => x.UANode is UAType).Count<IUANodeContext>());
     }


Removed config file setting for FIPS compliance and added code to check the registry instead.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS05]$/tvacodelibrary/Main;C68455

--- Source/OldCode/TVACodeLibrary/Source/Libraries/TVA.Core/Security/Cryptography/Cipher.cs
+++ Source/OldCode/TVACodeLibrary/Source/Libraries/TVA.Core/Security/Cryptography/Cipher.cs
@@ -45,6 +45,8 @@
 //  06/30/2011 - Stephen C. Wills - applying changes from Jian (Ryan) Zuo
 //       Added ManagedEncryption setting to the config file to allow the user to switch to
 //       wrappers over FIPS-compliant algorithms.
+//  07/05/2011 - Stephen C. Wills
+//       Removed config file setting for FIPS compliance. Checks the registry instead.
 //
 //*******************************************************************************************************

@@ -289,6 +291,7 @@
 using System.Security.Cryptography;
 using System.Text;
 using System.Threading;
+using Microsoft.Win32;
 using TVA.Collections;
 using TVA.Configuration;
 using TVA.IO;
@@ -649,7 +652,6 @@
             string localCacheFileName = DefaultCacheFileName;
             double retryDelayInterval = DefaultRetryDelayInterval;
             int maximumRetryAttempts = DefaultMaximumRetryAttempts;
-            s_managedEncryption = DefaultManagedEncryption;

             // Load cryptographic settings
             ConfigurationFile config = ConfigurationFile.Current;
@@ -658,12 +660,13 @@
             settings.Add("CryptoCache", localCacheFileName, "Path and file name of cryptographic key and initialization vector cache.");
             settings.Add("CacheRetryDelayInterval", retryDelayInterval, "Wait interval, in milliseconds, before retrying load of cryptographic key and initialization vector cache.");
             settings.Add("CacheMaximumRetryAttempts", maximumRetryAttempts, "Maximum retry attempts allowed for loading cryptographic key and initialization vector cache.");
-            settings.Add("ManagedEncryption", s_managedEncryption, "Turn this off if the security policy for FIPS-compliant algorithms is enabled in order to use the .NET wrappers for FIPS-compliant encryption algorithms.");

             localCacheFileName = FilePath.GetAbsolutePath(settings["CryptoCache"].ValueAs(localCacheFileName));
             retryDelayInterval = settings["CacheRetryDelayInterval"].ValueAs(retryDelayInterval);
             maximumRetryAttempts = settings["CacheMaximumRetryAttempts"].ValueAs(maximumRetryAttempts);
-            s_managedEncryption = settings["ManagedEncryption"].ValueAs(s_managedEncryption);
+
+            // Determine if the user needs to use FIPS-compliant algorithms.
+            s_managedEncryption = Registry.GetValue("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Lsa\\FipsAlgorithmPolicy", "Enabled", 0).ToString() == "0";

             // Initialize local cryptographic key and initialization vector cache (application may only have read-only access to this cache)
             localKeyIVCache = new KeyIVCache()


Remove random depth step

Remove random depth step

--- osu.Framework.VisualTests/Tests/TestCaseDynamicDepth.cs
+++ osu.Framework.VisualTests/Tests/TestCaseDynamicDepth.cs
@@ -81,13 +81,6 @@
                 green.Depth = 0;
                 purple.Depth = float.MinValue;
             });
-            AddStep(@"random depths", () =>
-            {
-                red.Depth = RNG.NextSingle();
-                blue.Depth = RNG.NextSingle();
-                green.Depth = RNG.NextSingle();
-                purple.Depth = RNG.NextSingle();
-            });
         }

         private class DepthBox : Container


Centralise hover state handling (and fix back-to-front conditionals)

--- osu.Game/Beatmaps/Drawables/Cards/BeatmapCardContent.cs
+++ osu.Game/Beatmaps/Drawables/Cards/BeatmapCardContent.cs
@@ -56,7 +56,7 @@
                 AutoSizeAxes = Axes.Y,
                 CornerRadius = BeatmapCard.CORNER_RADIUS,
                 Masking = true,
-                Unhovered = _ => collapseIfNotHovered(),
+                Unhovered = _ => updateFromHoverChange(),
                 Children = new Drawable[]
                 {
                     background = new Box
@@ -78,10 +78,10 @@
                         Alpha = 0,
                         Hovered = _ =>
                         {
-                            queueExpandedStateChange(true);
+                            updateFromHoverChange();
                             return true;
                         },
-                        Unhovered = _ => collapseIfNotHovered(),
+                        Unhovered = _ => updateFromHoverChange(),
                         Child = dropdownScroll = new ExpandedContentScrollContainer
                         {
                             RelativeSizeAxes = Axes.X,
@@ -125,11 +125,8 @@

         public void CancelExpand() => scheduledExpandedChange?.Cancel();

-        private void collapseIfNotHovered()
-        {
-            if (!content.IsHovered && !dropdownContent.IsHovered)
-                queueExpandedStateChange(false);
-        }
+        private void updateFromHoverChange() =>
+            queueExpandedStateChange(content.IsHovered || dropdownContent.IsHovered, 100);

         private void queueExpandedStateChange(bool newState, int delay = 0)
         {


Update the length once during construction

--- osu.Game/Beatmaps/WorkingBeatmap_VirtualBeatmapTrack.cs
+++ osu.Game/Beatmaps/WorkingBeatmap_VirtualBeatmapTrack.cs
@@ -9,6 +9,9 @@
 {
     public partial class WorkingBeatmap
     {
+        /// <summary>
+        /// A type of <see cref="TrackVirtual"/> which provides a valid length based on the <see cref="HitObject"/>s of an <see cref="IBeatmap"/>.
+        /// </summary>
         private class VirtualBeatmapTrack : TrackVirtual
         {
             private readonly IBeatmap beatmap;
@@ -16,6 +19,7 @@
             public VirtualBeatmapTrack(IBeatmap beatmap)
             {
                 this.beatmap = beatmap;
+                updateVirtualLength();
             }

             protected override void UpdateState()


Used the faster HasText() method in place of the native Contains() for TextFilterBase.

--- Repo2.SDK.WPF45/ViewModelTools/TextFilterBase.cs
+++ Repo2.SDK.WPF45/ViewModelTools/TextFilterBase.cs
@@ -12,10 +12,10 @@
     {
         public event PropertyChangedEventHandler PropertyChanged = delegate { };

-        private EventHandler _textFilterChanged;
-        public event EventHandler TextFilterChanged
+        private      EventHandler _textFilterChanged;
+        public event EventHandler  TextFilterChanged
         {
-            add { _textFilterChanged -= value; _textFilterChanged += value; }
+            add    { _textFilterChanged -= value; _textFilterChanged += value; }
             remove { _textFilterChanged -= value; }
         }

@@ -55,7 +55,7 @@

             try
             {
-                list.RemoveAll(x => !propertyGetter(x).ToLower().Contains(findThis));
+                list.RemoveAll(x => !propertyGetter(x).ToLower().HasText(findThis));
             }
             catch { }
         }


fixes unit tests

fixes unit tests

--- ReqIFSharp.Tests/ReqIFDeSerializerTestFixture.cs
+++ ReqIFSharp.Tests/ReqIFDeSerializerTestFixture.cs
@@ -127,11 +127,11 @@
             Assert.AreEqual(AmountOfDataTypes, reqIfContent.DataTypes.Count);
             Assert.AreEqual(AmountOfSpecTypes, reqIfContent.SpecTypes.Count);
             Assert.AreEqual(AmountOfSpecObjects, reqIfContent.SpecObjects.Count);
-            Assert.AreEqual(AmountOfSpecRelations, reqIfContent.SpecRelations.Count);
+            Assert.AreEqual(1, reqIfContent.SpecRelations.Count);
             Assert.AreEqual(AmountOfSpecifications, reqIfContent.Specifications.Count);
             Assert.AreEqual(AmountOfSpecificationChildren, reqIfContent.Specifications[0].Children.Count);
             Assert.AreEqual(AmountOfSpecificationSubChildren, reqIfContent.Specifications[0].Children[0].Children.Count);
-            Assert.AreEqual(AmountOfSpecRelationGroups, reqIfContent.SpecRelationGroups.Count);
+            Assert.AreEqual(1, reqIfContent.SpecRelationGroups.Count);
         }

         /// <summary>


better handling of errors during initialization

git-svn-id: 6eea8ec865c4fa60105bc56808c028bdcf72a817@2041 079b0acf-d9fa-0310-9935-e5ade295c882

--- Rhino.PersistentHashTable/PersistentHashTable.cs
+++ Rhino.PersistentHashTable/PersistentHashTable.cs
@@ -11,7 +11,6 @@
         private readonly Instance instance;
         private bool needToDisposeInstance;
         private readonly string database;
-        public Action<InstanceParameters> Configure;
         private readonly string path;

         public Guid Id { get; private set; }
@@ -19,7 +18,7 @@
         public PersistentHashTable(string database)
         {
             this.database = database;
-        	path = database;
+            path = database;
             if (Path.IsPathRooted(database) == false)
                 path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, database);
             this.database = Path.Combine(path, Path.GetFileName(database));
@@ -35,48 +34,49 @@
             instance.Parameters.SystemDirectory = Path.Combine(path, "system");
             instance.Parameters.LogFileDirectory = Path.Combine(path, "logs");

-            if (Configure != null)
-                Configure(instance.Parameters);
-
             try
             {
                 instance.Init();
+
+                needToDisposeInstance = true;
+
+                EnsureDatabaseIsCreatedAndAttachToDatabase();
+
+                SetIdFromDb();
             }
             catch (Exception e)
             {
+                if (needToDisposeInstance)
+                    instance.Dispose();
+                needToDisposeInstance = false;
                 throw new InvalidOperationException("Could not open cache: " + database, e);
             }
-            needToDisposeInstance = true;
-
-            EnsureDatabaseIsCreatedAndAttachToDatabase();
-
-            SetIdFromDb();
         }

         private void SetIdFromDb()
         {
-        	try
-        	{
-        		instance.WithDatabase(database, (session, dbid) =>
-        		{
-        			using (var details = new Table(session, dbid, "details", OpenTableGrbit.ReadOnly))
-        			{
-        				Api.JetMove(session, details, JET_Move.First, MoveGrbit.None);
-        				var columnids = Api.GetColumnDictionary(session, details);
-        				var column = Api.RetrieveColumn(session, details, columnids["id"]);
-        				Id = new Guid(column);
-        				var schemaVersion = Api.RetrieveColumnAsString(session, details, columnids["schema_version"]);
-        				if(schemaVersion!=SchemaCreator.SchemaVersion)
-        					throw new InvalidOperationException("The version on disk ("+schemaVersion+") is different that the version supported by this library: "+SchemaCreator.SchemaVersion + Environment.NewLine+
-        					                                    "You need to migrate the disk version to the library version, alternatively, if the data isn't important, you can delete the file and it will be re-created (with no data) with the library version.");
-        			}
-        		});
-        	}
-        	catch (Exception e)
-        	{
-        		throw new InvalidOperationException("Could not read db details from disk. It is likely that there is a version difference between the library and the db on the disk." + Environment.NewLine +
-				"You need to migrate the disk version to the library version, alternatively, if the data isn't important, you can delete the file and it will be re-created (with no data) with the library version.", e);
-        	}
+            try
+            {
+                instance.WithDatabase(database, (session, dbid) =>
+                {
+                    using (var details = new Table(session, dbid, "details", OpenTableGrbit.ReadOnly))
+                    {
+                        Api.JetMove(session, details, JET_Move.First, MoveGrbit.None);
+                        var columnids = Api.GetColumnDictionary(session, details);
+                        var column = Api.RetrieveColumn(session, details, columnids["id"]);
+                        Id = new Guid(column);
+                        var schemaVersion = Api.RetrieveColumnAsString(session, details, columnids["schema_version"]);
+                        if (schemaVersion != SchemaCreator.SchemaVersion)
+                            throw new InvalidOperationException("The version on disk (" + schemaVersion + ") is different that the version supported by this library: " + SchemaCreator.SchemaVersion + Environment.NewLine +
+                                                                "You need to migrate the disk version to the library version, alternatively, if the data isn't important, you can delete the file and it will be re-created (with no data) with the library version.");
+                    }
+                });
+            }
+            catch (Exception e)
+            {
+                throw new InvalidOperationException("Could not read db details from disk. It is likely that there is a version difference between the library and the db on the disk." + Environment.NewLine +
+                "You need to migrate the disk version to the library version, alternatively, if the data isn't important, you can delete the file and it will be re-created (with no data) with the library version.", e);
+            }
         }

         private void EnsureDatabaseIsCreatedAndAttachToDatabase()


Extracted a method for registering consumers from an assembly.

--- Rhino.ServiceBus/Hosting/AbstractBootStrapper.cs
+++ Rhino.ServiceBus/Hosting/AbstractBootStrapper.cs
@@ -35,21 +35,28 @@
                 AllTypes.Of<IDeploymentAction>()
                     .FromAssembly(Assembly),
                 AllTypes.Of<IEnvironmentValidationAction>()
-                    .FromAssembly(Assembly),
-                AllTypes
-					.FromAssembly(Assembly)
-					.Where(type =>
-						typeof(IMessageConsumer).IsAssignableFrom(type) &&
-                        typeof(IOccasionalMessageConsumer).IsAssignableFrom(type) == false &&
-						IsTypeAcceptableForThisBootStrapper(type)
+                    .FromAssembly(Assembly)
+                );
+			RegisterConsumersFrom (Assembly);
+        }
+
+		protected virtual void RegisterConsumersFrom(Assembly assembly)
+		{
+			container.Register (
+				 AllTypes
+					.FromAssembly (assembly)
+					.Where (type =>
+						typeof (IMessageConsumer).IsAssignableFrom (type) &&
+						typeof (IOccasionalMessageConsumer).IsAssignableFrom (type) == false &&
+						IsTypeAcceptableForThisBootStrapper (type)
 					)
-					.Configure(registration =>
+					.Configure (registration =>
 					{
-						registration.LifeStyle.Is(LifestyleType.Transient);
-						ConfigureConsumer(registration);
+						registration.LifeStyle.Is (LifestyleType.Transient);
+						ConfigureConsumer (registration);
 					})
-                );
-        }
+				);
+		}

     	protected virtual void ConfigureConsumer(ComponentRegistration registration)
     	{


Revert CrytoConfiguration to using Credential implementation

--- Rock.Encryption/Symmetric/CryptoConfiguration.cs
+++ Rock.Encryption/Symmetric/CryptoConfiguration.cs
@@ -12,6 +12,6 @@
         /// Gets the collection of credentials that will be available for encryption or
         /// decryption operations.
         /// </summary>
-        public List<ICredential> Credentials { get; set; } = new List<ICredential>();
+        public List<Credential> Credentials { get; set; } = new List<Credential>();
     }
 }


refs #16 Calculate a integer Position from the floating-point Position

--- RollingBallGame/RollingBallGame/GameCore/Ball.cs
+++ RollingBallGame/RollingBallGame/GameCore/Ball.cs
@@ -22,7 +22,10 @@
 		{
 			get
 			{
-				throw new NotImplementedException();
+				GridPoint ret;
+				ret.X = (int)Math.Round(Position.X);
+				ret.Y = (int)Math.Round(Position.Y);
+				return ret;
 			}
 		}


Cursor changes when over clickable hotspots

--- SENECA/Assets/Scripts/Game_World/Interactable.cs
+++ SENECA/Assets/Scripts/Game_World/Interactable.cs
@@ -6,8 +6,9 @@
 public class Interactable : MonoBehaviour
 {
 	public Collider2D myCollider;
-
-	public AudioSource myAudioSource;
+    public Texture2D hoverCursor;
+    public CursorMode cursorMode = CursorMode.Auto;
+    public AudioSource myAudioSource;
 	public AudioClip clip;
 	// Use this for initialization
 	void Start () {
@@ -16,7 +17,18 @@

 	}

-	void OnMouseDown()
+    void OnMouseEnter()
+    {
+        hoverCursor = Resources.Load("Sprites/HARTO_Images/Icons_Emotions/Confused") as Texture2D;
+        Cursor.SetCursor(hoverCursor, Vector2.zero, cursorMode);
+    }
+
+    void OnMouseExit()
+    {
+        Cursor.SetCursor(null, Vector2.zero, cursorMode);
+    }
+
+    void OnMouseDown()
 	{
 		if (transform.name == "Priya"&& GameManager.instance.tutorialIsDone)
 		{


動画タイトルにドットバイドットという文字列が含まれていたら旧鯖から動画を再生するように

--- SRNicoNico/ViewModels/Video/VideoHtml5Handler.cs
+++ SRNicoNico/ViewModels/Video/VideoHtml5Handler.cs
@@ -55,7 +55,7 @@
                     autoPlay = true;
                 }

-                if(Owner.ApiData.Video.DmcInfo != null) {
+                if(Owner.ApiData.Video.DmcInfo != null && !Owner.ApiData.Video.Title.Contains("ドットバイドット")) {

                     var dmc = new NicoNicoDmcSession(Owner.ApiData.Video.DmcInfo);
                     var session = await dmc.CreateAsync();


Added additional check for null values

Added additional check for null values

--- SS.Integration.Adapter.Diagnostics/Supervisor.cs
+++ SS.Integration.Adapter.Diagnostics/Supervisor.cs
@@ -379,7 +379,7 @@
             var activeListeners = GetListenersBySport().SelectMany(l => l).ToDictionary(l => l.FixtureId);

             //filter fixtures for which stream listener does not exist
-            foreach (var fixtureOverview in _fixtures.Values.Where(f=> !activeListeners.ContainsKey(f.Id)))
+            foreach (var fixtureOverview in _fixtures.Values.Where(f=> f != null && f.Id != null && !activeListeners.ContainsKey(f.Id)))
             {
                 CleanUpFixtureData(fixtureOverview.Id);
             }


Fix model key frame in raw project

Fix model key frame in raw project

--- Scallion/Raw/Components/Project/ModelKeyFrame.cs
+++ Scallion/Raw/Components/Project/ModelKeyFrame.cs
@@ -11,17 +11,14 @@
     {
         public int IKBonesCount { get; set; }
         public int ExternalParentBonesCount { get; set; }
-        public bool IsVisible { get; set; }

         internal override void SerializeKeyFrameValue(MoSerializer archive)
         {
-            archive.WriteByte((byte)(IsVisible ? 1 : 0));
             archive.Serialize(Value);
         }

         internal override void DeserializeKeyFrameValue(MoDeserializer archive)
         {
-            IsVisible = archive.ReadByte() == 1;
             Value = archive.Deserialize(new ModelState()
             {
                 IKBonesCount = IKBonesCount,
@@ -36,10 +33,13 @@
         public int ExternalParentBonesCount { get; set; }
         public List<bool> IKEnabled { get; set; }
         public List<BoneReference> ExternalParentBoneStatuses { get; set; }
+        public bool IsVisible { get; set; }

         public override void Serialize(MoSerializer archive)
         {
+            archive.WriteByte((byte)(IsVisible ? 1 : 0));
+
             foreach (bool status in IKEnabled)
                 archive.WriteByte((byte)(status ? 1 : 0));

@@ -49,6 +49,7 @@

         public override void Deserialize(MoDeserializer archive)
         {
+            IsVisible = archive.ReadByte() == 1;
             IKEnabled = archive.DeserializeList(IKBonesCount, () => archive.ReadByte() == 1);
             ExternalParentBoneStatuses = archive.DeserializeList(ExternalParentBonesCount, () => new BoneReference(archive.ReadInt32(), archive.ReadInt32()));
         }


Forgot edit.

Forgot edit.

--- Sensus.Shared/DataStores/Local/LocalDataStore.cs
+++ Sensus.Shared/DataStores/Local/LocalDataStore.cs
@@ -122,12 +122,6 @@
             });
         }

-        protected abstract bool IsTooLarge();
-
-        public abstract Task WriteToRemoteAsync(CancellationToken cancellationToken);
-
-        public abstract void CreateTarFromLocalData(string outputPath);
-
         public Task ShareLocalDataAsync()
         {
             return Task.Run(async () =>
@@ -144,5 +138,11 @@
                 }
             });
         }
+
+        protected abstract bool IsTooLarge();
+
+        public abstract Task WriteToRemoteAsync(CancellationToken cancellationToken);
+
+        public abstract void CreateTarFromLocalData(string outputPath);
     }
 }


allow protocols to start with only ScriptProbe and unschedule scripts

--- Sensus.Shared/Probes/User/Scripts/ScriptProbe.cs
+++ Sensus.Shared/Probes/User/Scripts/ScriptProbe.cs
@@ -204,6 +204,8 @@
                 {
                     if (scriptRunner.Enabled)
                     {
+                        int currentLength = collectionDescription.Length;
+
                         foreach (Trigger trigger in scriptRunner.Triggers)
                         {
                             collectionDescription.Append((collectionDescription.Length == 0 ? "" : Environment.NewLine) + scriptRunner.Name + ":  When " + trigger.Probe.DisplayName + " is " + uppercaseSplitter.Replace(trigger.Condition.ToString(), " ").ToLower() + " " + trigger.ConditionValue + ".");
@@ -218,6 +220,11 @@
                         {
                             collectionDescription.Append((collectionDescription.Length == 0 ? "" : Environment.NewLine) + scriptRunner.Name + ":  " + scriptRunner.ScheduleTriggerReadableDescription + ".");
                         }
+
+                        if (collectionDescription.Length == currentLength)
+						{
+                            collectionDescription.Append((collectionDescription.Length == 0 ? "" : Environment.NewLine) + scriptRunner.Name + ": Manually triggered or scheduled.");
+						}
                     }
                 }


Vector region containment checking added

--- Nucleus/Nucleus/Geometry/Vector.cs
+++ Nucleus/Nucleus/Geometry/Vector.cs
@@ -858,6 +858,20 @@
             if (absX > absZ && absX >= absY) return Direction.X;
             else if (absY > absZ && absY > absX) return Direction.Y;
             else return Direction.Z;
+        }
+
+        /// <summary>
+        /// Is this vector inside the bounding region specified by its limiting coordinate values
+        /// on the XY plane?
+        /// </summary>
+        /// <param name="minX"></param>
+        /// <param name="maxX"></param>
+        /// <param name="minY"></param>
+        /// <param name="maxY"></param>
+        /// <returns></returns>
+        public bool InRegion(double minX, double maxX, double minY, double maxY)
+        {
+            return X >= minX && X <= maxX && Y >= minY && Y <= maxY;
         }

         /// <summary>


fix line endings ind status

fix line endings ind status

--- SimpleHttpServerExtensions/ResponseExtensions.cs
+++ SimpleHttpServerExtensions/ResponseExtensions.cs
@@ -32,7 +32,7 @@
         public static ServerResponse Do503(this ServerResponse res, Exception ex)
         {
             res.StatusCode = 503;
-            res.StatusDescription = ex.Message.Length < 513 ? ex.Message : string.Empty;
+            res.StatusDescription = ex.Message.Length < 513 ? ex.Message.Replace("\r\n", "") : string.Empty;
             return res;
         }


added web service method that powershell can call

--- Sitecore.TestStar.Core/WebService/TestService.cs
+++ Sitecore.TestStar.Core/WebService/TestService.cs
@@ -73,6 +73,19 @@
         }

 		[WebMethod]
+		///@TestCalls is a list of strings in the format AssemblyName::ClassName
+		public List<JSONWebTestResult> RunWebTests(string EnvironmentID, string SiteID, List<string> TestCalls) {
+			List<JSONWebTestResult> resultSet = new List<JSONWebTestResult>();
+			foreach (string s in TestCalls) {
+				string[] arr = s.Split(new string[] { "::" }, StringSplitOptions.RemoveEmptyEntries);
+				if (arr.Length < 2)
+					continue;
+				resultSet.AddRange(RunWebTest(EnvironmentID, SiteID, arr[0], arr[1]));
+			}
+			return resultSet;
+		}
+
+		[WebMethod]
 		///@TestCalls is a list of strings in the format AssemblyName::Category
 		public JSONGenScriptResult CreateUnitTestScript(string ScriptName, List<string> TestCalls) {
 			if (string.IsNullOrEmpty(ScriptName))


[trunk] Don't say you've written a file if it's writing to stdout

--- OpusOptionCodeGenerator/Program.cs
+++ OpusOptionCodeGenerator/Program.cs
@@ -535,9 +535,13 @@
                 WriteLine(writer, 1, "}");
                 WriteLine(writer, 0, "}");
             }
-            if (null != parameters.outputPropertiesPathName)
-            {
-                Log("Wrote file '{0}'", parameters.outputPropertiesPathName);
+            // flush to disk
+            if (!parameters.toStdOut)
+            {
+                if (null != parameters.outputPropertiesPathName)
+                {
+                    Log("Wrote file '{0}'", parameters.outputPropertiesPathName);
+                }
             }
         }


Performance changes

Performance changes

--- Source/HelixToolkit.Wpf/Helpers/ContourHelper.cs
+++ Source/HelixToolkit.Wpf/Helpers/ContourHelper.cs
@@ -8,17 +8,21 @@
 {
     using System;
     using System.Collections.Generic;
+    using System.Linq;
     using System.Windows;
     using System.Windows.Media.Media3D;

     ///
-    /// Contour helper.
+    /// Provides functionality to calculate a contour slice through a 3 vertex facet.
     ///
     /// <remarks>
-    /// See http://paulbourke.net/papers/conrec/ for further information.
+    /// See CONREC for further information.
     /// </remarks>
     internal class ContourHelper
     {
+        ///
+        /// Provides the indices for the various <see cref="ContourFacetResult"/> cases.
+        ///
         private static readonly IDictionary<ContourFacetResult, int[,]> ResultIndices
             = new Dictionary<ContourFacetResult, int[,]>
         {
@@ -31,27 +35,22 @@
         };

         ///
-        /// The original mesh.
-        ///
-        private readonly MeshGeometry3D originalMesh;
-
-        ///
-        /// The a.
+        /// The parameter 'a' of the plane equation.
         ///
         private readonly double a;

         ///
-        /// The b.
+        /// The parameter 'b' of the plane equation.
         ///
         private readonly double b;

         ///
-        /// The c.
+        /// The parameter 'c' of the plane equation.
         ///
         private readonly double c;

         ///
-        /// The d.
+        /// The parameter 'd' of the plane equation.
         ///
         private readonly double d;

@@ -80,7 +79,20 @@
         ///
         private int positionCount;

+        ///
+        /// Indicates whether the mesh uses texture coordinates.
+        ///
         private readonly bool hasTextureCoordinates;
+
+        ///
+        /// The original mesh positions.
+        ///
+        private readonly Point3D[] meshPositions;
+
+        ///
+        /// The original mesh texture coordinates.
+        ///
+        private readonly Point[] meshTextureCoordinates;

         ///
         /// Initializes a new instance of the <see cref="ContourHelper"/> class.
@@ -92,20 +104,26 @@
         /// The plane normal.
         /// </param>
         /// <param name="originalMesh">
-        /// The orginal mesh.
+        /// The original mesh.
+        /// </param>
+        /// <param name="hasTextureCoordinates">
+        /// Indicates whether texture coordinates need calculating.
         /// </param>
         public ContourHelper(Point3D planeOrigin, Vector3D planeNormal, MeshGeometry3D originalMesh, bool hasTextureCoordinates = false)
         {
-            this.originalMesh = originalMesh;
             this.hasTextureCoordinates = hasTextureCoordinates;
-            positionCount = originalMesh.Positions.Count;
+            this.positionCount = originalMesh.Positions.Count;
+
+            this.meshPositions = originalMesh.Positions.ToArray();
+            this.meshTextureCoordinates = originalMesh.TextureCoordinates.ToArray();
+
             // Determine the equation of the plane as
-            // Ax + By + Cz + D = 0
-            var l = Math.Sqrt(planeNormal.X * planeNormal.X + planeNormal.Y * planeNormal.Y + planeNormal.Z * planeNormal.Z);
-            a = planeNormal.X / l;
-            b = planeNormal.Y / l;
-            c = planeNormal.Z / l;
-            d = -(planeNormal.X * planeOrigin.X + planeNormal.Y * planeOrigin.Y + planeNormal.Z * planeOrigin.Z);
+            // ax + by + cz + d = 0
+            var l = Math.Sqrt((planeNormal.X * planeNormal.X) + (planeNormal.Y * planeNormal.Y) + (planeNormal.Z * planeNormal.Z));
+            this.a = planeNormal.X / l;
+            this.b = planeNormal.Y / l;
+            this.c = planeNormal.Z / l;
+            this.d = -((planeNormal.X * planeOrigin.X) + (planeNormal.Y * planeOrigin.Y) + (planeNormal.Z * planeOrigin.Z));
         }

         ///
@@ -176,8 +194,7 @@
         /// All triangle indices that are created, when 1 or more points fall below the contour plane.
         /// </param>
         public void ContourFacet(int index0, int index1, int index2,
-            out Point3D[] positions, out Point[] textureCoordinates,
-            out int[] triangleIndices)
+            out Point3D[] positions, out Point[] textureCoordinates, out int[] triangleIndices)
         {
             this.SetData(index0, index1, index2);

@@ -185,22 +202,22 @@
             switch (facetResult)
             {
                 case ContourFacetResult.ZeroOnly:
-                    triangleIndices = new [] { index0, positionCount++, positionCount++ };
+                    triangleIndices = new[] { index0, positionCount++, positionCount++ };
                     break;
                 case ContourFacetResult.OneAndTwo:
                     triangleIndices = new[] { index1, index2, positionCount, positionCount++, positionCount++, index1 };
                     break;
                 case ContourFacetResult.OneOnly:
-                    triangleIndices = new [] { index1, positionCount++, positionCount++ };
+                    triangleIndices = new[] { index1, positionCount++, positionCount++ };
                     break;
                 case ContourFacetResult.ZeroAndTwo:
                     triangleIndices = new[] { index2, index0, positionCount, positionCount++, positionCount++, index2 };
                     break;
                 case ContourFacetResult.TwoOnly:
-                    triangleIndices = new [] { index2, positionCount++, positionCount++ };
+                    triangleIndices = new[] { index2, positionCount++, positionCount++ };
                     break;
                 case ContourFacetResult.ZeroAndOne:
-                    triangleIndices = new [] { index0, index1, positionCount, positionCount++, positionCount++, index0 };
+                    triangleIndices = new[] { index0, index1, positionCount, positionCount++, positionCount++, index0 };
                     break;
                 case ContourFacetResult.All:
                     positions = new Point3D[0];
@@ -214,18 +231,19 @@
                     triangleIndices = new int[0];
                     return;
             }
+
             var facetIndices = ResultIndices[facetResult];
-            positions = new []
-            {
-                CreateNewPosition(facetIndices[0,0], facetIndices[0, 1]),
-                CreateNewPosition(facetIndices[1,0], facetIndices[1, 1])
+            positions = new[]
+            {
+                this.CreateNewPosition(facetIndices[0, 0], facetIndices[0, 1]),
+                this.CreateNewPosition(facetIndices[1, 0], facetIndices[1, 1])
             };
-            if (hasTextureCoordinates)
-            {
-                textureCoordinates = new []
+            if (this.hasTextureCoordinates)
+            {
+                textureCoordinates = new[]
                 {
-                    CreateNewTexture(facetIndices[0, 0], facetIndices[0, 1]),
-                    CreateNewTexture(facetIndices[1, 0], facetIndices[1, 1])
+                    this.CreateNewTexture(facetIndices[0, 0], facetIndices[0, 1]),
+                    this.CreateNewTexture(facetIndices[1, 0], facetIndices[1, 1])
                 };
             }
             else
@@ -234,92 +252,144 @@
             }
         }

+        ///
+        /// Gets the <see cref="ContourFacetResult"/> for the current facet.
+        ///
+        /// <returns>a facet result.</returns>
         private ContourFacetResult GetContourFacet()
         {
-            if (IsSideAlone(0))
-            {
-                return sides[0] > 0 ? ContourFacetResult.ZeroOnly : ContourFacetResult.OneAndTwo;
-            }
-            if (IsSideAlone(1))
-            {
-                return sides[1] > 0 ? ContourFacetResult.OneOnly : ContourFacetResult.ZeroAndTwo;
-            }
-            if (IsSideAlone(2))
-            {
-                return sides[2] > 0 ? ContourFacetResult.TwoOnly : ContourFacetResult.ZeroAndOne;
-            }
-            if (AllSidesBelowContour())
+            if (this.IsSideAlone(0))
+            {
+                return this.sides[0] > 0 ? ContourFacetResult.ZeroOnly : ContourFacetResult.OneAndTwo;
+            }
+
+            if (this.IsSideAlone(1))
+            {
+                return this.sides[1] > 0 ? ContourFacetResult.OneOnly : ContourFacetResult.ZeroAndTwo;
+            }
+
+            if (this.IsSideAlone(2))
+            {
+                return this.sides[2] > 0 ? ContourFacetResult.TwoOnly : ContourFacetResult.ZeroAndOne;
+            }
+
+            if (this.AllSidesBelowContour())
             {
                 return ContourFacetResult.All;
             }
+
             return ContourFacetResult.None;
         }

+        ///
+        /// Initializes the facet data and calculates the <see cref="sides"/> values from the specified triangle indices.
+        ///
+        /// <param name="index0">The first triangle index of the facet.</param>
+        /// <param name="index1">The second triangle index of the facet.</param>
+        /// <param name="index2">The third triangle index of the facet.</param>
         private void SetData(int index0, int index1, int index2)
         {
-            indices[0] = index0;
-            indices[1] = index1;
-            indices[2] = index2;
-
-            points[0] = originalMesh.Positions[index0];
-            points[1] = originalMesh.Positions[index1];
-            points[2] = originalMesh.Positions[index2];
-
-            if (hasTextureCoordinates)
-            {
-                textures[0] = originalMesh.TextureCoordinates[index0];
-                textures[1] = originalMesh.TextureCoordinates[index1];
-                textures[2] = originalMesh.TextureCoordinates[index2];
-            }
-
-            sides[0] = a * points[0].X + b * points[0].Y + c * points[0].Z + d;
-            sides[1] = a * points[1].X + b * points[1].Y + c * points[1].Z + d;
-            sides[2] = a * points[2].X + b * points[2].Y + c * points[2].Z + d;
-        }
-
+            this.indices[0] = index0;
+            this.indices[1] = index1;
+            this.indices[2] = index2;
+
+            this.points[0] = this.meshPositions[index0];
+            this.points[1] = this.meshPositions[index1];
+            this.points[2] = this.meshPositions[index2];
+
+            if (this.hasTextureCoordinates)
+            {
+                this.textures[0] = this.meshTextureCoordinates[index0];
+                this.textures[1] = this.meshTextureCoordinates[index1];
+                this.textures[2] = this.meshTextureCoordinates[index2];
+            }
+
+            this.sides[0] = (this.a * this.points[0].X) + (this.b * this.points[0].Y) + (this.c * this.points[0].Z) + this.d;
+            this.sides[1] = (this.a * this.points[1].X) + (this.b * this.points[1].Y) + (this.c * this.points[1].Z) + this.d;
+            this.sides[2] = (this.a * this.points[2].X) + (this.b * this.points[2].Y) + (this.c * this.points[2].Z) + this.d;
+        }
+
+        ///
+        /// Calculates the position at the plane intersection for the side specified by two triangle indices.
+        ///
+        /// <param name="index0">The first index.</param>
+        /// <param name="index1">The second index.</param>
+        /// <returns>The interpolated position.</returns>
         private Point3D CreateNewPosition(int index0, int index1)
         {
-            var firstPoint = points[index0];
-            var secondPoint = points[index1];
-            var firstSide = sides[index0];
-            var secondSide = sides[index1];
+            var firstPoint = this.points[index0];
+            var secondPoint = this.points[index1];
+            var firstSide = this.sides[index0];
+            var secondSide = this.sides[index1];
             return new Point3D(
                 CalculatePoint(firstPoint.X, secondPoint.X, firstSide, secondSide),
                 CalculatePoint(firstPoint.Y, secondPoint.Y, firstSide, secondSide),
                 CalculatePoint(firstPoint.Z, secondPoint.Z, firstSide, secondSide));
         }

+        ///
+        /// Calculates the texture coordinate at the plane intersection for the side specified by two triangle indices.
+        ///
+        /// <param name="index0">The first index.</param>
+        /// <param name="index1">The second index.</param>
+        /// <returns>The interpolated texture coordinate.</returns>
         private Point CreateNewTexture(int index0, int index1)
         {
-            var firstTexture = textures[index0];
-            var secondTexture = textures[index1];
-            var firstSide = sides[index0];
-            var secondSide = sides[index1];
+            var firstTexture = this.textures[index0];
+            var secondTexture = this.textures[index1];
+            var firstSide = this.sides[index0];
+            var secondSide = this.sides[index1];
+
             return new Point(
                 CalculatePoint(firstTexture.X, secondTexture.X, firstSide, secondSide),
                 CalculatePoint(firstTexture.Y, secondTexture.Y, firstSide, secondSide));
         }

+        ///
+        /// Calculates a new point coordinate.
+        ///
+        /// <param name="firstPoint">
+        /// The first point coordinate.
+        /// </param>
+        /// <param name="secondPoint">
+        /// The second point coordinate.
+        /// </param>
+        /// <param name="firstSide">
+        /// The first side.
+        /// </param>
+        /// <param name="secondSide">
+        /// The second side.
+        /// </param>
+        /// <returns></returns>
         private static double CalculatePoint(double firstPoint, double secondPoint, double firstSide, double secondSide)
         {
             return firstPoint - (firstSide * (secondPoint - firstPoint) / (secondSide - firstSide));
         }

+        ///
+        /// Determines whether the vertex at the specified index is at the opposite side of the other two vertices.
+        ///
+        /// <param name="index">The index.</param>
+        /// <returns><c>true</c> if the vertex is on its own side.</returns>
         private bool IsSideAlone(int index)
         {
             Func<int, int> getNext = i => i + 1 > 2 ? 0 : i + 1;

             var firstSideIndex = getNext(index);
             var secondSideIndex = getNext(firstSideIndex);
-            return sides[index] * sides[firstSideIndex] < 0
-                && sides[index] * sides[secondSideIndex] < 0;
-        }
-
+            return this.sides[index] * this.sides[firstSideIndex] < 0
+                && this.sides[index] * this.sides[secondSideIndex] < 0;
+        }
+
+        ///
+        /// Determines whether all sides of the facet are below the contour.
+        ///
+        /// <returns><c>true</c> if all sides are below the contour.</returns>
         private bool AllSidesBelowContour()
         {
-            return sides[0] >= 0
-                && sides[1] >= 0
-                && sides[2] >= 0;
+            return this.sides[0] >= 0
+                && this.sides[1] >= 0
+                && this.sides[2] >= 0;
         }
     }
 }


Update DrawStyle.cs

Update DrawStyle.cs

[skip ci]

--- src/Draw2D.Core/Style/DrawStyle.cs
+++ src/Draw2D.Core/Style/DrawStyle.cs
@@ -1,5 +1,6 @@
 // Copyright (c) Wiesław Šoltés. All rights reserved.
 // Licensed under the MIT license. See LICENSE file in the project root for full license information.
+using Draw2D.Core.Renderers;

 namespace Draw2D.Core.Style
 {
@@ -54,6 +55,27 @@
             this.IsFilled = isFilled;
         }

+        public virtual void Invalidate(ShapeRenderer r)
+        {
+            if ((this.IsDirty == true)
+                || (_stroke?.IsDirty ?? false)
+                || (_fill?.IsDirty ?? false))
+            {
+                r.InvalidateCache(this);
+                this.IsDirty = false;
+
+                if (_stroke != null)
+                {
+                    _stroke.IsDirty = false;
+                }
+
+                if (_fill != null)
+                {
+                    _fill.IsDirty = false;
+                }
+            }
+        }
+
         public DrawStyle Copy()
         {
             return new DrawStyle()


Add frame counter to give DrawVis a bit more activity.

--- osu.Framework.VisualTests/VisualTestGame.cs
+++ osu.Framework.VisualTests/VisualTestGame.cs
@@ -48,15 +48,19 @@
                     Colour = Color4.Tomato
                 });

-                Add(text = new SpriteText());
+                Add(text = new SpriteText()
+                {
+                    Anchor = Anchor.Centre,
+                    Origin = Anchor.Centre,
+                });

                 box.RotateTo(360 * 10, 60000);
             }

             protected override void Update()
             {
-                text.Text = (num++).ToString();
                 base.Update();
+                text.Text = $@"frame count: {num++}";
             }
         }
     }


Fix potential nullref when requesting the current display

--- osu.Framework/Platform/DesktopGameWindow.cs
+++ osu.Framework/Platform/DesktopGameWindow.cs
@@ -33,7 +33,7 @@

         public readonly BindableBool MapAbsoluteInputToWindow = new BindableBool();

-        public override DisplayDevice GetCurrentDisplay() => DisplayDevice.FromRectangle(Bounds);
+        public override DisplayDevice GetCurrentDisplay() => DisplayDevice.FromRectangle(Bounds) ?? DisplayDevice.Default;

         protected DesktopGameWindow()
             : base(default_width, default_height)


Save "was window maximised" in a field and use it instead

--- osu.Framework/Platform/SDL2DesktopWindow.cs
+++ osu.Framework/Platform/SDL2DesktopWindow.cs
@@ -921,6 +921,12 @@
         }

         /// <summary>
+        /// Stores whether the window used to be in maximised state or not.
+        /// Used to properly decide what window state to pick when switching to windowed mode (see <see cref="WindowMode"/> change event)
+        /// </summary>
+        private bool windowMaximised;
+
+        /// <summary>
         /// Should be run on a regular basis to check for external window state changes.
         /// </summary>
         private void updateWindowSpecifics()
@@ -934,6 +940,9 @@

             var currentState = ((SDL.SDL_WindowFlags)SDL.SDL_GetWindowFlags(SDLWindowHandle)).ToWindowState();

+            if (currentState == WindowState.Normal || currentState == WindowState.Maximised)
+                windowMaximised = currentState == WindowState.Maximised;
+
             if (windowState != currentState)
             {
                 windowState = currentState;
@@ -968,6 +977,8 @@
                     SDL.SDL_SetWindowSize(SDLWindowHandle, Size.Width, Size.Height);

                     updateWindowPositionFromConfig();
+
+                    windowMaximised = false;
                     break;

                 case WindowState.Fullscreen:
@@ -991,6 +1002,7 @@
                 case WindowState.Maximised:
                     SDL.SDL_SetWindowFullscreen(SDLWindowHandle, (uint)SDL.SDL_bool.SDL_FALSE);
                     SDL.SDL_MaximizeWindow(SDLWindowHandle);
+                    windowMaximised = true;
                     break;

                 case WindowState.Minimised:
@@ -1098,16 +1110,7 @@
                         break;

                     case Configuration.WindowMode.Windowed:
-                        // todo: this will cause WindowState value to stay at Fullscreen/Borderless for a whole frame
-                        // but is required for taking correct actions based on whether the window is maximised or not.
-                        ScheduleCommand(() =>
-                        {
-                            SDL.SDL_SetWindowFullscreen(SDLWindowHandle, (uint)SDL.SDL_bool.SDL_FALSE);
-
-                            var sdlWindowState = ((SDL.SDL_WindowFlags)SDL.SDL_GetWindowFlags(SDLWindowHandle)).ToWindowState();
-                            Debug.Assert(sdlWindowState == WindowState.Maximised || sdlWindowState == WindowState.Normal);
-                            WindowState = sdlWindowState;
-                        });
+                        WindowState = windowMaximised ? WindowState.Maximised : WindowState.Normal;
                         break;
                 }


Add 10K mod to incompatibility list

Add 10K mod to incompatibility list

--- osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs
+++ osu.Game.Rulesets.Mania/Mods/ManiaKeyMod.cs
@@ -39,6 +39,7 @@
             typeof(ManiaModKey7),
             typeof(ManiaModKey8),
             typeof(ManiaModKey9),
+            typeof(ManiaModKey10),
         }.Except(new[] { GetType() }).ToArray();
     }
 }


Remove redundant test step

Remove redundant test step

--- osu.Game.Tests/Visual/TestCaseHoldToQuit.cs
+++ osu.Game.Tests/Visual/TestCaseHoldToQuit.cs
@@ -26,7 +26,7 @@

             var text = holdToQuit.Children.OfType<SpriteText>().Single();

-            AddStep("Text fade in", () =>
+            AddStep("Trigger text fade in/out", () =>
             {
                 exitAction = false;
                 holdToQuit.Button.TriggerOnMouseDown();
@@ -34,14 +34,6 @@
             });

             AddUntilStep(() => text.IsPresent && !exitAction, "Text visible");
-
-            AddStep("Text fade out", () =>
-            {
-                exitAction = false;
-                holdToQuit.Button.TriggerOnMouseDown();
-                holdToQuit.Button.TriggerOnMouseUp();
-            });
-
             AddUntilStep(() => !text.IsPresent && !exitAction, "Text is not visible");

             AddStep("Trigger exit action", () =>


Allow to verify import blocks (#1415)

Allow to verify import blocks (#1415)

* Verify Import

* Default true

--- src/neo/Ledger/Blockchain.cs
+++ src/neo/Ledger/Blockchain.cs
@@ -23,7 +23,7 @@
     {
         public partial class ApplicationExecuted { }
         public class PersistCompleted { public Block Block; }
-        public class Import { public IEnumerable<Block> Blocks; }
+        public class Import { public IEnumerable<Block> Blocks; public bool Verify = true; }
         public class ImportCompleted { }
         public class FillMemoryPool { public IEnumerable<Transaction> Transactions; }
         public class FillCompleted { }
@@ -239,12 +239,14 @@
             return View.GetTransaction(hash);
         }

-        private void OnImport(IEnumerable<Block> blocks)
+        private void OnImport(IEnumerable<Block> blocks, bool verify)
         {
             foreach (Block block in blocks)
             {
                 if (block.Index <= Height) continue;
                 if (block.Index != Height + 1)
+                    throw new InvalidOperationException();
+                if (verify && !block.Verify(currentSnapshot))
                     throw new InvalidOperationException();
                 Persist(block);
                 SaveHeaderHashList();
@@ -453,7 +455,7 @@
             switch (message)
             {
                 case Import import:
-                    OnImport(import.Blocks);
+                    OnImport(import.Blocks, import.Verify);
                     break;
                 case FillMemoryPool fill:
                     OnFillMemoryPool(fill.Transactions);


fix validatorscount (#1770)

fix validatorscount (#1770)

Co-authored-by: Tommo-L <5c7fb4650c990e1c41cf5fbcddce0649d197c3f8@neo.org>

--- src/neo/ProtocolSettings.cs
+++ src/neo/ProtocolSettings.cs
@@ -47,9 +47,9 @@
         {
             this.Magic = section.GetValue("Magic", 0x4F454Eu);
             this.AddressVersion = section.GetValue("AddressVersion", (byte)0x35);
-            IConfigurationSection section_sv = section.GetSection("StandbyValidators");
-            if (section_sv.Exists())
-                this.StandbyCommittee = section_sv.GetChildren().Select(p => p.Get<string>()).ToArray();
+            IConfigurationSection section_sc = section.GetSection("StandbyCommittee");
+            if (section_sc.Exists())
+                this.StandbyCommittee = section_sc.GetChildren().Select(p => p.Get<string>()).ToArray();
             else
                 this.StandbyCommittee = new[]
                 {


Test commit

Test commit

--- ScadaScheme/ScadaSchemeEditor/FrmAbout.cs
+++ ScadaScheme/ScadaSchemeEditor/FrmAbout.cs
@@ -20,7 +20,7 @@
  *
  * Author   : Mikhail Shiryaev
  * Created  : 2013
- * Modified : 2014
+ * Modified : 2014_
  */

 using System;


Correctly escape resolve symbols in multiline strings.

--- Scripting/Parser/Texts/MulitlineString.cs
+++ Scripting/Parser/Texts/MulitlineString.cs
@@ -25,7 +25,7 @@
             {
                 if (line.Contains("%"))
                 {
-                    percentResolve = true;
+                    percentResolve = false;
                     line = line.Replace("%", string.Empty);
                 }
                 if (line.Contains("`"))
@@ -81,7 +81,7 @@
             var str = new StringBuilder(code.Length);
             string resolve = Resolve.ToString();
             string escape = Escape.ToString();
-            string resolveEscaped = string.Concat(resolve, escape);
+            string resolveEscaped = string.Concat(escape, resolve);
             string escapeEscaped = new string(Escape, 2);

             while ((line = reader.ReadLine()) != null)


Win32 dll load exception fix

Win32 dll load exception fix

--- CommunicationInterface/CommunicationManager.cs
+++ CommunicationInterface/CommunicationManager.cs
@@ -33,8 +33,16 @@
             // Query from external assemblies
             foreach (string FileName in DLLFileNames)
             {
-                Assembly DLLAssembly = Assembly.LoadFrom(FileName);
-                QueryImplementationFromAssembly(ImplementationDictionary, DLLAssembly);
+                Assembly DLLAssembly = null;
+                try
+                {
+                    DLLAssembly = Assembly.LoadFrom(FileName);
+                    if (DLLAssembly != null)
+                    {
+                        QueryImplementationFromAssembly(ImplementationDictionary, DLLAssembly);
+                    }
+                }
+                catch (Exception) { }   // Load win32 dll will cause exception, Ignore this kind of exception
             }

             // Query implementation in current assembly


Remove redundant initialization in Custom

--- Corale.Colore/Razer/Keyboard/Effects/Custom.cs
+++ Corale.Colore/Razer/Keyboard/Effects/Custom.cs
@@ -70,10 +70,7 @@
             _keys = new Color[Constants.MaxKeys];

             for (var index = 0; index < Constants.MaxKeys; index++)
-            {
-                this[(Key)index] = color;
                 this[index] = color;
-            }
         }

         /// <summary>


Removed deletion of unused bitmaps of Pin

--- Mapsui.UI.Forms/Objects/Pin.cs
+++ Mapsui.UI.Forms/Objects/Pin.cs
@@ -443,10 +443,6 @@
                 if (_bitmapId != -1)
                 {
                     // There is already a registered bitmap, so delete it
-                    BitmapRegistry.Instance.Unregister(_bitmapId);
-                    if (!string.IsNullOrEmpty(_bitmapIdKey))
-                        _bitmapIds.Remove(_bitmapIdKey);
-                    // We don't have any bitmap up to now
                     _bitmapId = -1;
                     _bitmapIdKey = string.Empty;
                 }


Prepare 0.4.0

Prepare 0.4.0

--- SimpleDnsCrypt/Properties/AssemblyInfo.cs
+++ SimpleDnsCrypt/Properties/AssemblyInfo.cs
@@ -14,5 +14,5 @@
     ResourceDictionaryLocation.None,
     ResourceDictionaryLocation.SourceAssembly
 )]
-[assembly: AssemblyVersion("0.3.9")]
-[assembly: AssemblyFileVersion("0.3.9")]
+[assembly: AssemblyVersion("0.4.0")]
+[assembly: AssemblyFileVersion("0.4.0")]


Added check to drivereportservice to not calculate viapoints on routes with less than 2 points.

--- Core.ApplicationServices/DriveReportService.cs
+++ Core.ApplicationServices/DriveReportService.cs
@@ -126,28 +126,32 @@
             // If the report is calculated or from an app, then we would like to store the points.
             if (report.KilometerAllowance != KilometerAllowance.Read || report.IsFromApp)
             {
-                for (var i = 0; i < createdReport.DriveReportPoints.Count; i++)
-                {
-                    var currentPoint = createdReport.DriveReportPoints.ElementAt(i);
-
-                    if (i == report.DriveReportPoints.Count - 1)
-                    {
-                        // last element
-                        currentPoint.PreviousPointId = createdReport.DriveReportPoints.ElementAt(i - 1).Id;
-                    }
-                    else if (i == 0)
-                    {
-                        // first element
-                        currentPoint.NextPointId = createdReport.DriveReportPoints.ElementAt(i + 1).Id;
-                    }
-                    else
-                    {
-                        // between first and last
-                        currentPoint.NextPointId = createdReport.DriveReportPoints.ElementAt(i + 1).Id;
-                        currentPoint.PreviousPointId = createdReport.DriveReportPoints.ElementAt(i - 1).Id;
-                    }
-                }
-                _driveReportRepository.Save();
+                // Reports from app with manual distance have no drivereportpoints.
+                if (report.DriveReportPoints.Count > 1)
+                {
+                    for (var i = 0; i < createdReport.DriveReportPoints.Count; i++)
+                    {
+                        var currentPoint = createdReport.DriveReportPoints.ElementAt(i);
+
+                        if (i == report.DriveReportPoints.Count - 1)
+                        {
+                            // last element
+                            currentPoint.PreviousPointId = createdReport.DriveReportPoints.ElementAt(i - 1).Id;
+                        }
+                        else if (i == 0)
+                        {
+                            // first element
+                            currentPoint.NextPointId = createdReport.DriveReportPoints.ElementAt(i + 1).Id;
+                        }
+                        else
+                        {
+                            // between first and last
+                            currentPoint.NextPointId = createdReport.DriveReportPoints.ElementAt(i + 1).Id;
+                            currentPoint.PreviousPointId = createdReport.DriveReportPoints.ElementAt(i - 1).Id;
+                        }
+                    }
+                    _driveReportRepository.Save();
+                }
             }


Adding tests

Adding tests

--- Tests/ComposableAsync.Resilient.Test/RetryPolicyTests.cs
+++ Tests/ComposableAsync.Resilient.Test/RetryPolicyTests.cs
@@ -208,6 +208,21 @@
             await _ForAllForEverWithTimeOut.Enqueue(_FakeTask);
             watch.Stop();
             watch.Elapsed.Should().BeCloseTo(TimeSpan.FromMilliseconds(times * _TimeOut), 100);
+        }
+
+        [Theory]
+        [InlineData(1, 100)]
+        [InlineData(2, 300)]
+        [InlineData(3, 600)]
+        [InlineData(4, 700)]
+        public async Task ForAllException_WithWait_Enqueue_Action_TillNoException_WithTimeoutSeries(int times, int expectedTimeInMs)
+        {
+            var replay = RetryPolicy.ForAllException().WithWaitBetweenRetry(100, 200, 300, 100).ForEver();
+            _FakeAction.SetUpExceptions(times);
+            var watch = Stopwatch.StartNew();
+            await replay.Enqueue(_FakeAction);
+            watch.Stop();
+            watch.Elapsed.Should().BeCloseTo(TimeSpan.FromMilliseconds(expectedTimeInMs), 50);
         }

         [Theory]


Prepare 0.2.9

Prepare 0.2.9

--- SimpleDnsCrypt/Properties/AssemblyInfo.cs
+++ SimpleDnsCrypt/Properties/AssemblyInfo.cs
@@ -14,5 +14,5 @@
     ResourceDictionaryLocation.None,
     ResourceDictionaryLocation.SourceAssembly
 )]
-[assembly: AssemblyVersion("0.2.8")]
-[assembly: AssemblyFileVersion("0.2.8")]
+[assembly: AssemblyVersion("0.2.9")]
+[assembly: AssemblyFileVersion("0.2.9")]


ServiceProvider is not available in the contstructor of a grain, moved initialisation of siloDetailsProvider to OnActivate()

--- OrleansDashboard/DashboardGrain.cs
+++ OrleansDashboard/DashboardGrain.cs
@@ -18,21 +18,9 @@
         private List<GrainTraceEntry> history = new List<GrainTraceEntry>();

-        private readonly ISiloDetailsProvider siloDetailsProvider;
-
-        public DashboardGrain()
-        {
-            // note: normally we would use dependency injection
-            // but since we do not have access to the registered services collection
-            // from within a bootstrapper we do it this way:
-            // first try to resolve from the container, if not present in container
-            // then instantiate the default
-            this.siloDetailsProvider =
-                (this.ServiceProvider.GetService(typeof(ISiloDetailsProvider)) as ISiloDetailsProvider)
-                ?? new MembershipTableSiloDetailsProvider(this.GrainFactory);
-
-        }
-
+        private ISiloDetailsProvider siloDetailsProvider;
+
+

         private async Task Callback(object _)
         {
@@ -102,6 +90,16 @@

         public override Task OnActivateAsync()
         {
+            // note: normally we would use dependency injection
+            // but since we do not have access to the registered services collection
+            // from within a bootstrapper we do it this way:
+            // first try to resolve from the container, if not present in container
+            // then instantiate the default
+            this.siloDetailsProvider =
+                (this.ServiceProvider.GetService(typeof(ISiloDetailsProvider)) as ISiloDetailsProvider)
+                ?? new MembershipTableSiloDetailsProvider(this.GrainFactory);
+
+
             this.Counters = new DashboardCounters();
             this.RegisterTimer(this.Callback, null, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1));
             this.StartTime = DateTime.UtcNow;


Refactor tests.

Refactor tests.

--- Source/WordExtractionTests/WordExtractorTests.cs
+++ Source/WordExtractionTests/WordExtractorTests.cs
@@ -1,4 +1,5 @@
 using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System.Collections.Generic;
 using System.Linq;

 namespace WordExtraction.Tests
@@ -62,14 +63,14 @@

         private static void PerformTest(string testString, string[] expectedResult)
         {
-            string[] result = ExtractWords(testString);
-            CollectionAssert.AreEqual(result, expectedResult);
+            IEnumerable<string> result = ExtractWords(testString);
+            Assert.IsTrue(result.SequenceEqual(expectedResult));
         }

-        private static string[] ExtractWords(string text)
+        private static IEnumerable<string> ExtractWords(string text)
         {
             var wordExtractor = new WordExtractor();
-            string[] result = wordExtractor.GetWords(text).Select(x => x.ToString()).ToArray();
+            IEnumerable<string> result = wordExtractor.GetWords(text).Select(x => x.ToString());
             return result;
         }
     }


fix ambiguous reference in cref attributes

--- Ds3/Helpers/IBaseJob.cs
+++ Ds3/Helpers/IBaseJob.cs
@@ -74,8 +74,8 @@
         /// requests. It also performs requests in parallel for situations
         /// where doing so can improve performance.
         /// </summary>
-        /// <seealso cref="FileHelpers.BuildFileGetter"/>
-        /// <seealso cref="FileHelpers.BuildFilePutter"/>
+        /// <seealso cref="FileHelpers.BuildFileGetter(string)"/>
+        /// <seealso cref="FileHelpers.BuildFilePutter(string, string)"/>
         /// <param name="createStreamForTransferItem">Opens a stream for a given transfer item.</param>
         void Transfer(Func<TItem, Stream> createStreamForTransferItem);


Make leaking RG deletes  parallel. Since it take a long time

--- SimpleWAWS/Code/BackgroundQueueManager.cs
+++ SimpleWAWS/Code/BackgroundQueueManager.cs
@@ -233,7 +233,6 @@
         {
             try
             {
-
                 _cleanupOperationsTriggered++;
                 var subscriptions = await CsmManager.GetSubscriptions();
                 var totalDeletedRGs = 0;
@@ -255,7 +254,7 @@

                     totalDeletedRGs += deleteLeakingRGs.Count();
                     AppInsights.TelemetryClient.TrackMetric("deletedLeakingRGs", deleteLeakingRGs.Count());
-                    foreach (var resourceGroup in deleteLeakingRGs)
+                    Parallel.ForEach(deleteLeakingRGs , async resourceGroup =>
                     {
                         try
                         {
@@ -267,7 +266,7 @@
                         {
                             SimpleTrace.Diagnostics.Error($"Leaking RG Delete Exception:{ex.ToString()}-{ex.StackTrace}-{ex.InnerException?.StackTrace.ToString() ?? String.Empty}");
                         }
-                    }
+                    });
                 }
                 AppInsights.TelemetryClient.TrackMetric("totalDeletedLeakingRGs", totalDeletedRGs);
                 AppInsights.TelemetryClient.TrackMetric("leakingRGsCleanupTime", sw.Elapsed.TotalSeconds);


[Core] perm circular check and export

[Core] perm circular check and export

--- Oxide.Core/Libraries/Permission.cs
+++ Oxide.Core/Libraries/Permission.cs
@@ -101,7 +101,26 @@
             Utility.DatafileToProto<Dictionary<string, GroupData>>("oxide.groups");
             userdata = ProtoStorage.Load<Dictionary<string, UserData>>("oxide.users") ?? new Dictionary<string, UserData>();
             groupdata = ProtoStorage.Load<Dictionary<string, GroupData>>("oxide.groups") ?? new Dictionary<string, GroupData>();
+            foreach (var pair in groupdata)
+            {
+                if (!string.IsNullOrEmpty(pair.Value.ParentGroup) && HasCircularParent(pair.Key, pair.Value.ParentGroup))
+                {
+                    Interface.Oxide.LogWarning("Detected circular parent group for '{0}'! Removing parent '{1}'", pair.Key, pair.Value.ParentGroup);
+                    pair.Value.ParentGroup = null;
+                }
+            }
             IsLoaded = true;
+        }
+
+        /// <summary>
+        /// Exports user/group data to json
+        /// </summary>
+        [LibraryFunction("Export")]
+        public void Export(string prefix = "auth")
+        {
+            if (!IsLoaded) return;
+            Interface.Oxide.DataFileSystem.WriteObject(prefix + ".groups", groupdata);
+            Interface.Oxide.DataFileSystem.WriteObject(prefix + ".users", userdata);
         }

         /// <summary>
@@ -747,6 +766,15 @@
             parent = parent.ToLower();

             if (!string.IsNullOrEmpty(data.ParentGroup) && data.ParentGroup.Equals(parent)) return true;
+            if (HasCircularParent(groupname, parent)) return false;
+            // Change and save
+            data.ParentGroup = parent;
+            SaveGroups();
+            return true;
+        }
+
+        private bool HasCircularParent(string groupname, string parent)
+        {
             //Get parent data
             GroupData parentData;
             if (!groupdata.TryGetValue(parent, out parentData)) return false;
@@ -755,14 +783,11 @@
             while (!string.IsNullOrEmpty(parentData.ParentGroup))
             {
                 //found itself?
-                if (!groups.Add(parentData.ParentGroup)) return false;
+                if (!groups.Add(parentData.ParentGroup)) return true;
                 //get next parent
                 if (!groupdata.TryGetValue(parent, out parentData)) return false;
             }
-            // Change and save
-            data.ParentGroup = parent;
-            SaveGroups();
-            return true;
+            return false;
         }

         #endregion


Fixing regression in CCSprite:

Fixing regression in CCSprite:

* when setting a SpriteFrame, the offset pos needs to be in points rather than pixels

--- src/sprite_nodes/CCSprite.cs
+++ src/sprite_nodes/CCSprite.cs
@@ -272,8 +272,6 @@
             }
             set
             {
-                unflippedOffsetPositionFromCenter = value.OffsetInPixels;
-
                 CCTexture2D newTexture = value.Texture;
                 // update texture before updating texture rect
                 if (newTexture != texture)
@@ -283,6 +281,7 @@

                 // update rect
                 float contentScaleFactor = Director.ContentScaleFactor;
+                unflippedOffsetPositionFromCenter = value.OffsetInPixels.PixelsToPoints(contentScaleFactor);
                 IsTextureRectRotated = value.IsRotated;
                 SetTextureRect(value.RectInPixels.PixelsToPoints(contentScaleFactor),
                     IsTextureRectRotated,


Fix issue with ZxingActivity.OnResume() crashing when ZXing can't get exclusive access to the camera. The exception cannot be caught from an app so it will crash instead of failing gracefully.

--- Source/ZXing.Net.Mobile.Android/ZxingActivity.cs
+++ Source/ZXing.Net.Mobile.Android/ZxingActivity.cs
@@ -137,8 +137,15 @@
         {
             base.OnResume ();

-            if (!waitingForPermission && canScan)
-                StartScanning ();
+            try
+            {
+                if (!waitingForPermission && canScan)
+                    StartScanning ();
+            }
+            catch (Exception ex) {
+                Android.Util.Log.Error (MobileBarcodeScanner.TAG, ex.ToString ());
+                Finish ();
+            }
         }

         public override void OnRequestPermissionsResult (int requestCode, string[] permissions, [GeneratedEnum] Permission[] grantResults)


Implement OxideApi.Authenticate

Implement OxideApi.Authenticate

--- Oxide.PluginWebApi/Net/OxideApi.cs
+++ Oxide.PluginWebApi/Net/OxideApi.cs
@@ -1,9 +1,11 @@
 using System;
 using System.Collections.Generic;
+using System.Collections.Specialized;
 using System.Linq;
 using System.Net;
 using System.Text;
 using System.Threading.Tasks;
+using HtmlAgilityPack;

 namespace Oxide.PluginWebApi.Net
 {
@@ -15,11 +17,30 @@

         public static bool Authenticate(string username, string password)
         {
-
+            using (var webClient = new CookieWebClient(cookieContainer))
+            {
+                byte[] responseBytes = webClient.UploadValues("http://oxidemod.org/login/login", "POST", new NameValueCollection
+                {
+                    { "login", username },
+                    { "password", password }
+                });

-            return false;
+                string response = Encoding.UTF8.GetString(responseBytes);
+                var htmlDoc = new HtmlDocument();
+                htmlDoc.LoadHtml(response);
+                var rootNode = htmlDoc.DocumentNode;
+
+                var content = rootNode.SelectSingleNode("//*[@id=\"content\"]");
+
+                if (content.GetAttributeValue("class", "").Contains("error_with_login"))
+                {
+                    return false;
+                }
+
+                return true;
+            }
         }
-
+
         public OxideApi()
         {
             webClient = new CookieWebClient(cookieContainer);


exception when not anonymous and no user/pass

--- UaClient/ServiceModel/Ua/Channels/UaTcpSessionChannel.cs
+++ UaClient/ServiceModel/Ua/Channels/UaTcpSessionChannel.cs
@@ -589,6 +589,11 @@
                 }

                 var userNameIdentity = (UserNameIdentity)this.UserIdentity;
+                if (userNameIdentity.UserName == null && userNameIdentity.Password == null)
+                {
+                    throw new Exception("Authentication is not anonymous, but no username and password were provided.");
+                }
+
                 byte[] passwordBytes = System.Text.Encoding.UTF8.GetBytes(userNameIdentity.Password);
                 int plainTextLength = passwordBytes.Length + this.RemoteNonce.Length;
                 IBufferedCipher encryptor;