Minor Changes

Minor Changes

Started organizing variables
Started working on top and bottom stereo option

--- UnityRenderingPlugin/RenderStereoCubemap.cs
+++ UnityRenderingPlugin/RenderStereoCubemap.cs
@@ -24,12 +24,15 @@

     public bool printFPS = false, adjustFOV = false;

-
     public int faceCount = 6;
     public bool extract = true;
-
-
+
     public float fovAdjustValue=0.5f;
+
+    public enum Ceiling_Floor_StereoOption {None, PositiveX, All}
+
+    public Ceiling_Floor_StereoOption option;
+
     private float preFOVAdjustValue = 0.5f;

@@ -41,7 +44,7 @@
     private GameObject[] CameraFR;  //for right floor view

     private GameObject[] planes,planeCeiling,planeFloor;
-    private GameObject cube, cubeCeiling, cubeFloor, cameras;
+    private GameObject cube, cubeCeiling, cubeFloor, cameras,cameraCeiling,cameraFloor;

     private Vector3 prePos;
     private Transform OVRCamRig, OVRPlayer;
@@ -220,6 +223,10 @@
             renderTexturesFloor[i] = new RenderTexture(resolution, resolution, 24);
             renderTexturesFloor[i].Create();
         }
+        cube = new GameObject();
+        cubeCeiling = new GameObject();
+        cubeFloor = new GameObject();
+

         planes = new GameObject[8];
         planeCeiling = new GameObject[8];
@@ -592,6 +599,7 @@
     {
         UpdateCharacter();

+

         //if (transform.position==prePos) {
         //	return;


Renamed EnumConverters generic type to TInnerEnum, to address #2

--- VndbSharp/Converters/NullToEnumConverter.cs
+++ VndbSharp/Converters/NullToEnumConverter.cs
@@ -28,15 +28,15 @@
 		}

 		// Credits for this amazing snippet to Raif Atef (http://stackoverflow.com/users/111830/raif-atef), from http://stackoverflow.com/a/26289874
-		private static class EnumConverter<TEnum> where TEnum : struct, IConvertible
+		private static class EnumConverter<TInnerEnum> where TInnerEnum : struct, IConvertible
 		{
-			public static readonly Func<Int64, TEnum> Convert = EnumConverter<TEnum>.GenerateConverter();
+			public static readonly Func<Int64, TInnerEnum> Convert = EnumConverter<TInnerEnum>.GenerateConverter();

-			private static Func<Int64, TEnum> GenerateConverter()
+			private static Func<Int64, TInnerEnum> GenerateConverter()
 			{
 				var paramter = Expression.Parameter(typeof(Int64));
-				var dynamicMethod = Expression.Lambda<Func<Int64, TEnum>>
-					(Expression.ConvertChecked(paramter, typeof(TEnum)), paramter);
+				var dynamicMethod = Expression.Lambda<Func<Int64, TInnerEnum>>
+					(Expression.ConvertChecked(paramter, typeof(TInnerEnum)), paramter);
 				return dynamicMethod.Compile();
 			}
 		}


Alterado planejamento anual para exibir apenas as aulas da posição do docente. #20000006-896 #152

--- Src/GestaoEscolar/Academico/ControleSemanal/Cadastro.aspx.cs
+++ Src/GestaoEscolar/Academico/ControleSemanal/Cadastro.aspx.cs
@@ -615,11 +615,9 @@
             if (atributos.Length > 0)
             {
                 if (atributos[0].Description != null)
-                {
                     posicaoText = atributos[0].Description;
-                }
-
-                posicaoText = "Titular";
+                else
+                    posicaoText = "Titular";
             }

             ACA_Curso cur = new ACA_Curso { cur_id = TUR_TurmaCurriculoBO.GetSelectBy_Turma(tur_id, ApplicationWEB.AppMinutosCacheLongo).First().cur_id };
@@ -820,13 +818,15 @@
                 if ((from DataRow dr in dtPlanos.AsEnumerable()
                      where VS_ltPermissaoPlanoAula.Any(p => p.tdt_posicaoPermissao == (byte)dr["tdt_posicao"] && (p.pdc_permissaoConsulta || p.pdc_permissaoEdicao)) &&
                            Convert.ToDateTime(dr["data"]) >= Convert.ToDateTime(lblInicio.Text) &&
-                           Convert.ToDateTime(dr["data"]) <= Convert.ToDateTime(lblFim.Text)
+                           Convert.ToDateTime(dr["data"]) <= Convert.ToDateTime(lblFim.Text) &&
+                           (byte)dr["tdt_posicao"] == VS_tdt_posicao
                      select dr).Any())
                 {
                     planosPermissaoDocente = (from DataRow dr in dtPlanos.AsEnumerable()
                                               where VS_ltPermissaoPlanoAula.Any(p => p.tdt_posicaoPermissao == (byte)dr["tdt_posicao"] && (p.pdc_permissaoConsulta || p.pdc_permissaoEdicao)) &&
                                                     Convert.ToDateTime(dr["data"]) >= Convert.ToDateTime(lblInicio.Text) &&
-                                                    Convert.ToDateTime(dr["data"]) <= Convert.ToDateTime(lblFim.Text)
+                                                    Convert.ToDateTime(dr["data"]) <= Convert.ToDateTime(lblFim.Text) &&
+                                                    (byte)dr["tdt_posicao"] == VS_tdt_posicao
                                               select dr).CopyToDataTable();
                 }


20000006-1358 Agendamento de sondagem - Incluir opção para selecionar todos os períodos

--- Src/GestaoEscolar/WebControls/Sondagem/UCAgendamento.ascx.cs
+++ Src/GestaoEscolar/WebControls/Sondagem/UCAgendamento.ascx.cs
@@ -866,8 +866,6 @@
             }
         }

-        #endregion
-
         protected void ckbSelecionarTodosPeriodos_CheckedChanged(object sender, EventArgs e)
         {
             foreach (RepeaterItem rptItem in rptNivelEnsino.Items)
@@ -884,5 +882,7 @@
                 }
             }
         }
+
+        #endregion
     }
 }


Only check for TorRunning

Only check for TorRunning

--- WalletWasabi/TorSocks5/TorProcessManager.cs
+++ WalletWasabi/TorSocks5/TorProcessManager.cs
@@ -206,7 +206,7 @@

 		private CancellationTokenSource Stop { get; }

-		public void StartMonitor(TimeSpan torMisbehaviorCheckPeriod, TimeSpan checkIfRunningAfterTorMisbehavedFor, TimeSpan tryRestartAfterTorMisbehavedFor, string dataDirToStartWith)
+		public void StartMonitor(TimeSpan torMisbehaviorCheckPeriod, TimeSpan checkIfRunningAfterTorMisbehavedFor, string dataDirToStartWith)
 		{
 			Logger.LogInfo<TorProcessManager>("Starting Tor monitor...");
 			Interlocked.Exchange(ref _running, 1);
@@ -228,47 +228,11 @@
 							{
 								TimeSpan torMisbehavedFor = (DateTimeOffset.UtcNow - TorHttpClient.TorDoesntWorkSince) ?? TimeSpan.Zero;

-								if (torMisbehavedFor > tryRestartAfterTorMisbehavedFor)
-								{
-									Logger.LogInfo<TorProcessManager>($"Tor didn't work properly for {(int)torMisbehavedFor.TotalSeconds} seconds. Attempting to restart...");
-									Logger.LogInfo<TorProcessManager>($"Attempting to kill Tor...");
-									// Try killing, then starting Tor.
-									if (TorProcess != null)
-									{
-										new Thread(delegate () // Don't ask. This is the only way it worked on Win10
-										{
-											TorProcess?.Kill();
-										}).Start();
-									}
-									else if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
-									{
-										try
-										{
-											string runTorCmd = $"killall tor";
-											EnvironmentHelpers.ShellExec(runTorCmd, false); // Not always have permission and stuff.
-										}
-										catch (Exception ex)
-										{
-											Logger.LogInfo<TorProcessManager>($"Couldn't kill tor...");
-											Logger.LogDebug<TorProcessManager>(ex);
-										}
-									}
-									else
-									{
-										Logger.LogInfo<TorProcessManager>($"Couldn't kill Tor.");
-									}
-									Logger.LogInfo<TorProcessManager>($"Attempting to start Tor...");
-
-									// Give some time before trying to restart.
-									await Task.Delay(3000, Stop.Token).ConfigureAwait(false);
-									Start(true, dataDirToStartWith);
-									await Task.Delay(7000, Stop.Token).ConfigureAwait(false);
-								}
-								else if (torMisbehavedFor > checkIfRunningAfterTorMisbehavedFor)
+								if (torMisbehavedFor > checkIfRunningAfterTorMisbehavedFor)
 								{
 									Logger.LogInfo<TorProcessManager>($"Tor didn't work properly for {(int)torMisbehavedFor.TotalSeconds} seconds. Maybe it crashed. Attempting to start it...");
 									Start(true, dataDirToStartWith); // Try starting Tor, if doesn't work it'll be another issue.
-									await Task.Delay(7000, Stop.Token).ConfigureAwait(false);
+									await Task.Delay(14000, Stop.Token).ConfigureAwait(false);
 								}
 							}
 						}


Added implementation of native Regions

Added implementation of native Regions

--- Sdl.Web.Tridion.Templates/Data/DefaultModelBuilder.cs
+++ Sdl.Web.Tridion.Templates/Data/DefaultModelBuilder.cs
@@ -62,7 +62,25 @@
             var nativeRegionModels = AddNativeRegions(page.GetPropertyValue<IList<IRegion>>("Regions"));
             foreach (var nativeRegion in nativeRegionModels)
             {
-                regionModels.Add(nativeRegion.Name, nativeRegion);
+                if (!regionModels.ContainsKey(nativeRegion.Name))
+                {
+                    regionModels.Add(nativeRegion.Name, nativeRegion);
+                }
+                else
+                {
+                    var dxaRegion = regionModels[nativeRegion.Name];
+                    if (dxaRegion.Entities == null)
+                    {
+                        dxaRegion.Entities = new List<EntityModelData>();
+                    }
+                    dxaRegion.Entities.AddRange(nativeRegion.Entities);
+
+                    if (nativeRegion.Metadata != null && nativeRegion.Metadata.Any())
+                    {
+                        regionModels[nativeRegion.Name].Metadata = nativeRegion.Metadata;
+                    }
+                    dxaRegion.Regions = nativeRegion.Regions;
+                }
             }

             // Merge Page metadata and PT custom metadata
@@ -389,14 +407,17 @@
             foreach (IRegion region in regions)
             {
                 string regionName = region.RegionName;
+                string viewName = region.RegionSchema != null && string.IsNullOrEmpty(region.RegionSchema.Title) ? region.RegionSchema.Title : regionName;
+                ContentModelData metadata = ExtractCustomMetadata(region.Metadata, null);
                 var regionModelData = new RegionModelData
                 {
                     Name = regionName,
                     MvcData = new MvcData
                     {
-                        ViewName = regionName
+                        ViewName = viewName
                     },
-                    Entities = new List<EntityModelData>()
+                    Entities = new List<EntityModelData>(),
+                    Metadata = metadata
                 };

                 foreach (var cp in region.ComponentPresentations)
@@ -422,6 +443,11 @@
                         entityModel = Pipeline.CreateEntityModel(cp);
                     }

+                    if (entityModel.MvcData.ViewName != regionName)
+                    {
+                        Logger.Warning($"Component Template {cp.ComponentTemplate.Title} Metadata's Region {entityModel.MvcData.ViewName} mismatch with current Region {regionName}");
+                    }
+
                     regionModelData.Entities.Add(entityModel);
                 }


fixed tests

fixed tests

for search context extensions

--- Selenol.Tests/Elements/TestSearchContextExtensions.cs
+++ Selenol.Tests/Elements/TestSearchContextExtensions.cs
@@ -175,9 +175,9 @@
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.FileUploads()), "input[type='file']", "input", "file");
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Forms()), "form", "form", null);
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Links()), "a", "a", null);
-            yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Listboxes()), "select", "select", null);
+            yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Listboxes()), "select[multiple]", "select", null);
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.RadioButtons()), "input[type='radio']", "input", "radio");
-            yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Selects()), "select", "select", null);
+            yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Selects()), "select:not([multiple])", "select", null);
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Tables()), "table", "table", null);
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.TextAreas()), "textarea", "textarea", null);
             yield return new TestCaseData(new Func<ISearchContext, IEnumerable<BaseHtmlElement>>(x => x.Textboxes()), "input[type='text']", "input", "text");


Update SalesOrderHeader.cs

Update SalesOrderHeader.cs

--- Test/AdventureWorksFunctionalModel/Sales/SalesOrderHeader.cs
+++ Test/AdventureWorksFunctionalModel/Sales/SalesOrderHeader.cs
@@ -27,8 +27,8 @@
         [Hidden]
         public virtual byte StatusByte { get; init; }

-        //[MemberOrder(1)]
-        //public virtual OrderStatus Status { get { return (OrderStatus)StatusByte;  } }
+        [MemberOrder(1)]
+        public virtual OrderStatus Status { get { return (OrderStatus)StatusByte; } }

         [Hidden]
         public virtual int CustomerID { get; init; }


Changes ResultRequests

Changes ResultRequests

--- Skermstafir/Views/Shared/_SearchResultRequests.cshtml
+++ Skermstafir/Views/Shared/_SearchResultRequests.cshtml
@@ -17,11 +17,10 @@
 				▲ bla
 				@request.Name
 				@request.YearCreated
-				Lang
-				User
+				Tungumál
+				UserName
 				<input type="button" name="stofna" value="Stofna þýðingu" />

 		}

-


Ignore EntityChangeSet

Ignore EntityChangeSet

--- src/Abp/EntityHistory/EntityHistoryConfiguration.cs
+++ src/Abp/EntityHistory/EntityHistoryConfiguration.cs
@@ -19,6 +19,7 @@
             Selectors = new EntityHistorySelectorList();
             IgnoredTypes = new List<Type>()
             {
+                typeof(EntityChangeSet),
                 typeof(EntityChangeInfo),
                 typeof(EntityPropertyChangeInfo)
             };


Update XML comments of FindAttribute

Update XML comments of FindAttribute

--- src/Atata/Attributes/ControlSearch/FindAttribute.cs
+++ src/Atata/Attributes/ControlSearch/FindAttribute.cs
@@ -118,11 +118,11 @@
         }

         /// <summary>
-        /// Gets or sets the way this find attribute should be used.
+        /// Gets or sets the way this <see cref="FindAttribute"/> should be used.
         /// The default value is <see cref="FindAs.Scope"/>.
-        /// Each control can have 1 find attribute with <see cref="FindAs.Scope"/> value
-        /// and many other find attribute with another <see cref="FindAs"/> values, which are used as layers.
-        /// When several layer find attributes are used,
+        /// Each control can have 1 <see cref="FindAttribute"/> with <see cref="FindAs.Scope"/> value
+        /// and many other <see cref="FindAttribute"/>s with another <see cref="FindAs"/> values, which are used as layers.
+        /// When several layer attributes are used,
         /// then <see cref="Layer"/> property can be used to specify an order of each attribute.
         /// </summary>
         public FindAs As
@@ -142,8 +142,8 @@

         /// <summary>
         /// Gets or sets the layer order of find attribute.
-        /// It is useful to specify the order of layer when several layers are used.
-        /// This propery is used only in pair with <see cref="As"/> property set to any value except of <see cref="FindAs.Scope"/>.
+        /// It is useful to specify the order of the layer when several layers are used.
+        /// This property is used only paired with <see cref="As"/> property set to any value except <see cref="FindAs.Scope"/>.
         /// The default value is <c>0</c>.
         /// </summary>
         public int Layer


Display & in language name properly in settings dialog (BL-9919)

--- src/BloomExe/Collection/CollectionSettingsDialog.cs
+++ src/BloomExe/Collection/CollectionSettingsDialog.cs
@@ -44,6 +44,10 @@
 			// moved from the Designer where it was deleted if the Designer was touched
 			_xmatterList.Columns.AddRange(new[] { new ColumnHeader() { Width = 250 } });

+			_language1Name.UseMnemonic = false;	// Allow & to be part of the language display names.
+			_language2Name.UseMnemonic = false;	// This may be unlikely, but can't be ruled out.
+			_language3Name.UseMnemonic = false;	// See https://issues.bloomlibrary.org/youtrack/issue/BL-9919.
+
 			if (_collectionSettings.IsSourceCollection)
 			{
 				_language1Label.Text = LocalizationManager.GetString("CollectionSettingsDialog.LanguageTab.Language1InSourceCollection", "Language 1", "In a local language collection, we say 'Local Language', but in a source collection, Local Language has no relevance, so we use this different label");


Fix changing background color causing error (BL-11403)

Another related issue is that the background color in the preview is often outdated.

--- src/BloomExe/Publish/Android/PublishToAndroidApi.cs
+++ src/BloomExe/Publish/Android/PublishToAndroidApi.cs
@@ -164,11 +164,13 @@
 				}
 			, true);

+			// FYI, handleOnUiThread needs to be true.
+			// Otherwise, when doing a backColor POST update, this may throw an exception as some file may be missing.
+			// Also, the client may receive the wrong background color.
 			apiHandler.RegisterEndpointHandler(kApiUrlPart + "updatePreview", request =>
 			{
 				MakeBloompubPreview(request, false);
-			}, false);
-
+			}, true);

 			apiHandler.RegisterEndpointLegacy(kApiUrlPart + "thumbnail", request =>
 			{


Fix NullRef in Guid Equals

Fix NullRef in Guid Equals

--- src/Booma.Entity.Identity/Guid/NetworkEntityGuid.cs
+++ src/Booma.Entity.Identity/Guid/NetworkEntityGuid.cs
@@ -77,20 +77,12 @@
 					return false;
 			}

-			return guid1.RawGuidValue == guid2.RawGuidValue;
+			return guid1.Equals(guid2);
 		}

 		public static bool operator !=(NetworkEntityGuid guid1, NetworkEntityGuid guid2)
 		{
-			if (Object.ReferenceEquals(guid1, null))
-			{
-				if (Object.ReferenceEquals(guid2,null))
-					return false;
-				else
-					return true;
-			}
-
-			return guid1.RawGuidValue != guid2.RawGuidValue;
+			return !(guid1 == guid2);
 		}

 		public override bool Equals(object obj)
@@ -103,7 +95,10 @@

 		public bool Equals(NetworkEntityGuid other)
 		{
-			return other == this;
+			if (Object.ReferenceEquals(other, null))
+				return false;
+			else
+				return other.RawGuidValue == this.RawGuidValue;
 		}
 	}
 }


Fix invalid message on exception

Fix invalid message on exception

--- src/Core/Helper/PropertyChangedNotificatorHelper.cs
+++ src/Core/Helper/PropertyChangedNotificatorHelper.cs
@@ -51,9 +51,19 @@

         internal static MethodInfo GetRaise(Type type)
         {
-            var mi = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
-                         .Where(x => x.IsPublic | x.IsFamily | x.IsFamilyOrAssembly)
-                         .Single(x => x.GetCustomAttributes(typeof(NotificationInvocatorAttribute), true).Any());
+            MethodInfo mi;
+
+            try
+            {
+                mi = type.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic)
+                              .Where(x => x.IsPublic | x.IsFamily | x.IsFamilyOrAssembly)
+                              .Single(x => x.GetCustomAttributes(typeof(NotificationInvocatorAttribute), true).Any());
+            }
+            catch(Exception ex)
+            {
+                var msg = string.Format("Type '{0}' contains no single method marked NotificationInvocatorAttribute.", type.FullName);
+                throw new InvalidOperationException(msg, ex);
+            }

             var prms = mi.GetParameters();


Refs #1636, #95 - tussenliggende bewaren is nergens voor nodig

... ik geloof dat dat in 1.9 al verwijderd is.

--- Solution/Chiro.Gap.UpdateSvc.Service/UpdateService.cs
+++ Solution/Chiro.Gap.UpdateSvc.Service/UpdateService.cs
@@ -152,7 +152,7 @@
         /// </summary>
         /// <param name="origineel"></param>
         /// <param name="dubbel"></param>
-        /// <remarks>PERSISTEERT!</remarks>
+        /// <remarks>PERSISTEERT NIET!</remarks>
         private void DubbelVerwijderen(Persoon origineel, Persoon dubbel)
         {
             // TODO: Dit kan nog wel wat unit tests gebruiken...
@@ -168,12 +168,10 @@

                 foreach (var gp in teVerleggenGPs)
                 {
+                    dubbel.GelieerdePersoon.Remove(gp);
                     gp.Persoon = origineel;
-                }
-
-                // Dat gaan we al eens bewaren.
-
-                _personenRepo.SaveChanges();
+                    origineel.GelieerdePersoon.Add(gp);
+                }

                 // De gelieerde personen die nu nog aan dubbel hangen, moeten weg. We zetten zo veel
                 // mogelijk relevante informatie over naar de originele gelieerde personen.
@@ -212,7 +210,6 @@
                         {
                             dubbelLid.GelieerdePersoon = origineleGp;
                         }
-                        _ledenRepo.SaveChanges();
                     }

                     foreach (var dubbeleCommunicatie in dubbeleGp.Communicatie)
@@ -235,7 +232,6 @@
                             // TODO: problemen met meerdere voorkeuren fixen
                             dubbeleCommunicatie.GelieerdePersoon = origineleGp;
                         }
-                        _communicatieVormenRepo.SaveChanges();
                     }

                     foreach (var dubbeleCategorie in dubbeleGp.Categorie)
@@ -251,8 +247,6 @@
                             dubbeleCategorie.GelieerdePersoon.Add(origineleGp);
                         }
                         dubbeleCategorie.GelieerdePersoon.Remove(dubbeleGp);
-
-                        _groepenRepo.SaveChanges();
                     }

                     foreach (var dubbeleDeelnemer in dubbeleGp.Deelnemer)
@@ -269,7 +263,6 @@
                         {
                             dubbeleDeelnemer.GelieerdePersoon = origineleGp;
                         }
-                        _deelnemersRepo.SaveChanges();
                     }

                     foreach (var dubbelAbonnement in dubbeleGp.Abonnement)
@@ -289,11 +282,9 @@
                         {
                             dubbelAbonnement.GelieerdePersoon = origineleGp;
                         }
-                        _abonnementenRepo.SaveChanges();
                     }

                     _gelieerdePersonenRepo.Delete(origineleGp);
-                    _gelieerdePersonenRepo.SaveChanges();
                 }

                 // Verleg persoonsAdressen waar mogelijk
@@ -306,10 +297,6 @@
                 {
                     pa.Persoon = origineel;
                 }
-
-                // Dat gaan we al eens bewaren.
-
-                _personenRepo.SaveChanges();

                 // De persoonsadressen die nu nog aan de dubbele hangen, hangen ook aan het origineel.
                 // Verwijder.
@@ -328,7 +315,6 @@
                         }
                     }
                     _persoonsAdressenRepo.Delete(dubbelPa);
-                    _persoonsAdressenRepo.SaveChanges();
                 }

                 // Verleg verzekeringen waar mogelijk
@@ -341,14 +327,12 @@
                 {
                     pv.Persoon = origineel;
                 }
-                _personenRepo.SaveChanges();

                 foreach (var pv in dubbel.PersoonsVerzekering)
                 {
                     // Nog niet verlegde verzekeringen zijn dubbel, en mogen verwijderd worden
                     _persoonsVerzekeringenRepo.Delete(pv);
                 }
-                _personenRepo.SaveChanges();

                 // Gebruikersrechten nog

@@ -363,7 +347,6 @@
                     dubbel.Gav.Remove(g);
                     origineel.Gav.Add(g);
                 }
-                _personenRepo.SaveChanges();

                 foreach (var g in dubbel.Gav)
                 {
@@ -389,12 +372,10 @@
                         {
                             dubbelGebruikersRecht.Gav = origineel.Gav.Single();
                         }
-                        _gebruikersRechtenRepo.SaveChanges();
                     }
                 }

                 _personenRepo.Delete(dubbel);
-                _personenRepo.SaveChanges();

                 tx.Complete();
             }


Updated RelativeTimeConverter for future stuff...

--- src/Crystal3/UI/Converters/RelativeTimeConverter.cs
+++ src/Crystal3/UI/Converters/RelativeTimeConverter.cs
@@ -39,7 +39,18 @@
         {
             var time = (DateTime)value;

-            var timeDiff = DateTime.Now.Subtract(time);
+            var timeDirection = parameter ?? "past";
+
+            TimeSpan timeDiff;
+
+            if (((string)timeDirection).ToLower() == "future")
+            {
+                timeDiff = time.Subtract(DateTime.Now);
+            }
+            else
+            {
+                timeDiff = DateTime.Now.Subtract(time);
+            }

             if (timeDiff.TotalDays > 365) return string.Format(YearStringFormat, Math.Round(timeDiff.TotalDays / 365));

@@ -52,9 +63,9 @@
                     return string.Format(DayAndMonthStringFormat, months, Math.Round(timeDiff.TotalDays));
             }

-            if (timeDiff.TotalDays > 0) return string.Format(DayStringFormat, Math.Round(timeDiff.TotalDays));
+            if (timeDiff.TotalDays >= 1) return string.Format(DayStringFormat, Math.Round(timeDiff.TotalDays));

-            if (timeDiff.TotalHours > 0) return string.Format(HourFormatString, Math.Round(timeDiff.TotalHours));
+            if (timeDiff.TotalHours >= 1) return string.Format(HourFormatString, Math.Round(timeDiff.TotalHours));

             if (timeDiff.TotalMinutes > 0) return string.Format(MinuteFormatString, Math.Round(timeDiff.TotalMinutes));


Remove redundant ( obj is Nullable<T> )

Remove redundant ( obj is Nullable<T> )

--- cli/src/MsgPack/MessagePackObject.Utilities.cs
+++ cli/src/MsgPack/MessagePackObject.Utilities.cs
@@ -1155,6 +1155,8 @@
 			IEnumerable<MessagePackObject> asEnumerable;
 			MessagePackObjectDictionary asDictionary;

+			// Nullable<T> is boxed as null or underlying value type,
+			// so ( obj is Nullable<T> ) is always false.
 			if ( boxedValue == null )
 			{
 				return MessagePackObject.Nil;
@@ -1167,89 +1169,45 @@
 			{
 				return ( sbyte )boxedValue;
 			}
-			else if ( boxedValue is sbyte? )
-			{
-				return ( sbyte? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is byte )
 			{
 				return ( byte )boxedValue;
 			}
-			else if ( boxedValue is byte? )
-			{
-				return ( byte? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is short )
 			{
 				return ( short )boxedValue;
 			}
-			else if ( boxedValue is short? )
-			{
-				return ( short? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is ushort )
 			{
 				return ( ushort )boxedValue;
 			}
-			else if ( boxedValue is ushort? )
-			{
-				return ( ushort? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is int )
 			{
 				return ( int )boxedValue;
 			}
-			else if ( boxedValue is int? )
-			{
-				return ( int? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is uint )
 			{
 				return ( uint )boxedValue;
 			}
-			else if ( boxedValue is uint? )
-			{
-				return ( uint? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is long )
 			{
 				return ( long )boxedValue;
 			}
-			else if ( boxedValue is long? )
-			{
-				return ( long? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is ulong )
 			{
 				return ( ulong )boxedValue;
 			}
-			else if ( boxedValue is ulong? )
-			{
-				return ( ulong? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is float )
 			{
 				return ( float )boxedValue;
 			}
-			else if ( boxedValue is float? )
-			{
-				return ( float? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is double )
 			{
 				return ( double )boxedValue;
 			}
-			else if ( boxedValue is double? )
-			{
-				return ( double? )boxedValue ?? MessagePackObject.Nil;
-			}
 			else if ( boxedValue is bool )
 			{
 				return ( bool )boxedValue;
-			}
-			else if ( boxedValue is bool? )
-			{
-				return ( bool? )boxedValue ?? MessagePackObject.Nil;
 			}
 			else if ( ( asByteArray = boxedValue as byte[] ) != null )
 			{


Fixed DB error at start

Fixed DB error at start

--- wiquotes/DatabaseManager.cs
+++ wiquotes/DatabaseManager.cs
@@ -16,9 +16,9 @@

         public void CreatTables()
         {
-            string sql = "SELECT name FROM sqlite_master WHERE type='table' AND name='preferences'";
+            string sql = "SELECT COUNT(name) FROM sqlite_master WHERE type='table' AND name='preferences'";
             SQLiteCommand command = new SQLiteCommand(sql, connection);
-            int count  = command.ExecuteNonQuery();//TODO: other tables
+            int count  = Convert.ToInt32(command.ExecuteScalar());//TODO: other tables
             if (count != 1)
             {
                 sql = "CREATE TABLE preferences (name VARCHAR(40), code varchar(20), value varchar(500))";


Improve loading implementation for multiple persons.

--- Source/Lib/TraktApiSharp/Modules/TraktPeopleModule.cs
+++ Source/Lib/TraktApiSharp/Modules/TraktPeopleModule.cs
@@ -8,6 +8,7 @@
     using Requests.WithoutOAuth.People;
     using System;
     using System.Collections.Generic;
+    using System.Linq;
     using System.Threading.Tasks;

     public class TraktPeopleModule : TraktBaseModule
@@ -30,17 +31,16 @@
             if (ids == null || ids.Length <= 0)
                 return null;

-            var persons = new List<TraktPerson>(ids.Length);
+            var tasks = new List<Task<TraktPerson>>();

             for (int i = 0; i < ids.Length; i++)
             {
-                var show = await GetPersonAsync(ids[i], extended);
-
-                if (show != null)
-                    persons.Add(show);
+                Task<TraktPerson> task = GetPersonAsync(ids[i], extended);
+                tasks.Add(task);
             }

-            return new TraktListResult<TraktPerson> { Items = persons };
+            var people = await Task.WhenAll(tasks);
+            return new TraktListResult<TraktPerson> { Items = people.ToList() };
         }

         public async Task<TraktPersonMovieCredits> GetPersonMovieCreditsAsync(string id, TraktExtendedOption extended = null)


Fixed error that occurs when SMTP host is not defined and the list of recipients is empty.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openXDA/Main;C92521

--- Source/Libraries/FaultData/DataWriters/EmailWriter.cs
+++ Source/Libraries/FaultData/DataWriters/EmailWriter.cs
@@ -161,22 +161,25 @@
             using (FaultCurveTableAdapter faultCurveAdapter = new FaultCurveTableAdapter())
             using (FaultSummaryTableAdapter faultSummaryAdapter = new FaultSummaryTableAdapter())
             {
-                eventAdapter.Connection.ConnectionString = m_connectionString;
-                cycleDataAdapter.Connection.ConnectionString = m_connectionString;
-                faultCurveAdapter.Connection.ConnectionString = m_connectionString;
-                faultSummaryAdapter.Connection.ConnectionString = m_connectionString;
-
-                faultRecordInfo.Event = eventAdapter.GetDataByID(eventID).First();
-
-                faultRecordInfo.Meter = meterInfo.Meters.Single(m => faultRecordInfo.Event.MeterID == m.ID);
-                faultRecordInfo.Line = meterInfo.Lines.Single(l => faultRecordInfo.Event.LineID == l.ID);
-
-                faultRecordInfo.FaultCurves = faultCurveAdapter.GetDataBy(eventID).ToList();
-                faultRecordInfo.FaultSummary = faultSummaryAdapter.GetDataBy(eventID).FirstOrDefault();
-
                 faultRecordInfo.Recipients = systemInfo.Recipients.ToList();

-                WriteResults(faultRecordInfo);
+                if (faultRecordInfo.Recipients.Count > 0)
+                {
+                    eventAdapter.Connection.ConnectionString = m_connectionString;
+                    cycleDataAdapter.Connection.ConnectionString = m_connectionString;
+                    faultCurveAdapter.Connection.ConnectionString = m_connectionString;
+                    faultSummaryAdapter.Connection.ConnectionString = m_connectionString;
+
+                    faultRecordInfo.Event = eventAdapter.GetDataByID(eventID).First();
+
+                    faultRecordInfo.Meter = meterInfo.Meters.Single(m => faultRecordInfo.Event.MeterID == m.ID);
+                    faultRecordInfo.Line = meterInfo.Lines.Single(l => faultRecordInfo.Event.LineID == l.ID);
+
+                    faultRecordInfo.FaultCurves = faultCurveAdapter.GetDataBy(eventID).ToList();
+                    faultRecordInfo.FaultSummary = faultSummaryAdapter.GetDataBy(eventID).FirstOrDefault();
+
+                    WriteResults(faultRecordInfo);
+                }
             }
         }


GSF.Web: Removed unused code from WebPageController

--- Source/Libraries/GSF.Web/Hosting/WebPageController.cs
+++ Source/Libraries/GSF.Web/Hosting/WebPageController.cs
@@ -28,7 +28,6 @@
 using System.Threading.Tasks;
 using System.Web.Http;
 using System.Web.Http.Dependencies;
-using GSF.Data;
 using GSF.Web.Model;
 using GSF.Web.Security;
 using Owin;
@@ -120,7 +119,6 @@
             private readonly WebServer m_webServer;
             private readonly object m_model;
             private readonly Type m_modelType;
-            private readonly AdoDataConnection m_database;

             public WebPageControllerResolver(WebServer webServer, object model, Type modelType)
             {


Fixes DryIoc ViewModelLocator to ensure proper INavigationService is passed in.

--- Source/Xamarin/Prism.DryIoc.Forms/PrismApplication.cs
+++ Source/Xamarin/Prism.DryIoc.Forms/PrismApplication.cs
@@ -112,9 +112,12 @@
             ViewModelLocationProvider.SetDefaultViewModelFactory((view, type) =>
             {
                 var page = view as Page;
-                if (page != null)
+                if(page != null)
                 {
-                    return PageViewModelFactory(page, type);
+                    var navService = CreateNavigationService(page);
+                    return Container.WithDependencies(
+                    Parameters.Of.Type(_ => navService))
+                    .Resolve(type);
                 }
                 return Container.Resolve(type);
             });


Added WaitFor(s) to Feature_Validation_CustomValidation test

--- src/DotVVM.Samples.Tests/Feature/ValidationTests.cs
+++ src/DotVVM.Samples.Tests/Feature/ValidationTests.cs
@@ -704,25 +704,34 @@
                 var textbox = browser.First("[data-ui=name-textbox]");

                 submitButton.Click();
-                Assert.Equal(0, validationSummary.Children.Count);
-                AssertUI.HasNotClass(textbox, "has-error");
+                browser.WaitFor(() => {
+                    Assert.Equal(0, validationSummary.Children.Count);
+                    AssertUI.HasNotClass(textbox, "has-error");
+                }, 4000);

                 textbox.SendKeys("123");
                 submitButton.Click();
-                AssertUI.HasClass(textbox, "has-error");
-                Assert.Equal(1, validationSummary.Children.Count);
+                browser.WaitFor(() => {
+                    AssertUI.HasClass(textbox, "has-error");
+                    Assert.Equal(1, validationSummary.Children.Count);
+                }, 4000);

                 textbox.Clear();
                 textbox.SendKeys("Ted");
                 submitButton.Click();
-                Assert.Equal(0, validationSummary.Children.Count);
-                AssertUI.HasNotClass(textbox, "has-error");
+                browser.WaitFor(() => {
+                    Assert.Equal(0, validationSummary.Children.Count);
+                    AssertUI.HasNotClass(textbox, "has-error");
+                }, 4000);

                 textbox.SendKeys("123");
                 browser.First("[data-ui=notation-checkbox]").Click();
                 submitButton.Click();
-                AssertUI.HasClass(textbox, "has-error");
-                Assert.Equal(1, validationSummary.Children.Count);
+
+                browser.WaitFor(() => {
+                    AssertUI.HasClass(textbox, "has-error");
+                    Assert.Equal(1, validationSummary.Children.Count);
+                }, 4000);
             });
         }


reformat only

reformat only

--- Src/GoogleApis.Tools.CodeGen/ResourceBaseGenerator.cs
+++ Src/GoogleApis.Tools.CodeGen/ResourceBaseGenerator.cs
@@ -42,8 +42,10 @@
         {
             if (method.Parameters == null || method.Parameters.Count == 0)
                 yield break;
-            foreach (Parameter param in method.Parameters.Values) {
-                if (param.Required) {
+            foreach (Parameter param in method.Parameters.Values)
+            {
+                if (param.Required)
+                {
                     yield return param;
                 }
             }
@@ -54,8 +56,10 @@
         {
             if (method.Parameters == null || method.Parameters.Count == 0)
                 yield break;
-            foreach (Parameter param in method.Parameters.Values) {
-                if (param.Required == false) {
+            foreach (Parameter param in method.Parameters.Values)
+            {
+                if (param.Required == false)
+                {
                     yield return param;
                 }
             }
@@ -73,7 +77,8 @@

         protected void ResourceCallAddBodyDeclaration (Method method, CodeMemberMethod member)
         {
-            switch (method.HttpMethod) {
+            switch (method.HttpMethod)
+            {
             case "GET":
             case "DELETE":
                 // string body = null;


Added some unit tests to test the command line parameter injection.

--- System.CommandLine.Parser.UnitTests/ParserUnitTest.cs
+++ System.CommandLine.Parser.UnitTests/ParserUnitTest.cs
@@ -561,5 +561,188 @@
         }

         #endregion
+
+        #region Command Line Parameter Injection Test Methods
+
+        /// <summary>
+        /// Tests how the parser handles the command line parameter injection into an empty class.
+        /// </summary>
+        [TestMethod]
+        public void EmptyParameterContainerInjectionTest()
+        {
+            // Parses an empty command line and validates that the object was properly created
+            EmptyParameterContainer emptyParameterContainer = Parser.Parse<EmptyParameterContainer>(string.Empty);
+            Assert.IsNotNull(emptyParameterContainer);
+
+            // Parses several command line parameters and validates that the object was properly created
+            emptyParameterContainer = Parser.Parse<EmptyParameterContainer>("/on /key:value --auto --parameter=123 -aFl");
+            Assert.IsNotNull(emptyParameterContainer);
+        }
+
+        /// <summary>
+        /// Tests how the parser handles the command line parameter injection into a class that has a single non-default constructor.
+        /// </summary>
+        [TestMethod]
+        public void SingleConstructorParameterContainerInjectionTest()
+        {
+            // Parses command line parameters and validates that the object was properly created
+            SingleConstructorParameterContainer singleConstructorParameterContainer = Parser.Parse<SingleConstructorParameterContainer>("/first \"abc XYZ\" --second:-123.456");
+            Assert.IsNotNull(singleConstructorParameterContainer);
+            Assert.AreEqual(singleConstructorParameterContainer.First, "abc XYZ");
+            Assert.AreEqual(singleConstructorParameterContainer.Second, -123);
+        }
+
+        /// <summary>
+        /// Tests how the parser handles the command line parameter injection into a class that has a multiple non-default constructor.
+        /// </summary>
+        [TestMethod]
+        public void MultipleConstructorParameterContainerInjectionTest()
+        {
+            // Parses a single command line parameter and validates that the correct constructor was called
+            MultipleConstructorsParameterContainer multipleConstructorsParameterContainer = Parser.Parse<MultipleConstructorsParameterContainer>("/first true");
+            Assert.AreEqual(multipleConstructorsParameterContainer.ConstructorCalled, 1);
+
+            // Parses two command line parameters and validates that the correct constructor was called
+            multipleConstructorsParameterContainer = Parser.Parse<MultipleConstructorsParameterContainer>("/first true --second=abc");
+            Assert.AreEqual(multipleConstructorsParameterContainer.ConstructorCalled, 2);
+
+            // Parses three command line parameters and validates that the correct constructor was called
+            multipleConstructorsParameterContainer = Parser.Parse<MultipleConstructorsParameterContainer>("/first true --second=abc /third:123");
+            Assert.AreEqual(multipleConstructorsParameterContainer.ConstructorCalled, 3);
+        }
+
+        [TestMethod]
+        public void SimplePropertyParameterContainerInjectionTest()
+        {
+            // Parses command line parameters and validates that the object was properly created
+            SimplePropertyParameterContainer simplePropertyParameterContainer = Parser.Parse<SimplePropertyParameterContainer>("/string \"abc XYZ\" --number:123.456 --boolean=true");
+            Assert.IsNotNull(simplePropertyParameterContainer);
+            Assert.AreEqual(simplePropertyParameterContainer.String, "abc XYZ");
+            Assert.AreEqual(simplePropertyParameterContainer.Number, 123.456d);
+            Assert.AreEqual(simplePropertyParameterContainer.Boolean, true);
+        }
+
+        #endregion
+
+        #region Nested Types
+
+        /// <summary>
+        /// Represents an empty parameter container, which is used to test injection into an empty class.
+        /// </summary>
+        private class EmptyParameterContainer { }
+
+        /// <summary>
+        /// Represents a parameter container, which is used to test single constructors.
+        /// </summary>
+        private class SingleConstructorParameterContainer
+        {
+            #region Constructors
+
+            /// <summary>
+            /// Initializes a new <see cref="SingleConstructorParameterContainer"/> instance.
+            /// </summary>
+            /// <param name="first">The first command line parameter.</param>
+            /// <param name="second">The second command line parameter.</param>
+            public SingleConstructorParameterContainer(string first, int second)
+            {
+                this.First = first;
+                this.Second = second;
+            }
+
+            #endregion
+
+            #region Public Properties
+
+            /// <summary>
+            /// Gets or sets the "first" command line parameter.
+            /// </summary>
+            public string First { get; set; }
+
+            /// <summary>
+            /// Gets or sets the "second" command line parameter.
+            /// </summary>
+            public int Second { get; set; }
+
+            #endregion
+        }
+
+        /// <summary>
+        /// Represents a parameter container, which is used to test multiple constructors.
+        /// </summary>
+        private class MultipleConstructorsParameterContainer
+        {
+            #region Constructors
+
+            /// <summary>
+            /// Initializes a new <see cref="MultipleConstructorsParameterContainer"/> instance.
+            /// </summary>
+            /// <param name="first">The first command line parameter.</param>
+            public MultipleConstructorsParameterContainer(bool first)
+            {
+                this.ConstructorCalled = 1;
+            }
+
+            /// <summary>
+            /// Initializes a new <see cref="MultipleConstructorsParameterContainer"/> instance.
+            /// </summary>
+            /// <param name="first">The first command line parameter.</param>
+            /// <param name="second">The second command line parameter.</param>
+            public MultipleConstructorsParameterContainer(bool first, string second)
+            {
+                this.ConstructorCalled = 2;
+            }
+
+            /// <summary>
+            /// Initializes a new <see cref="MultipleConstructorsParameterContainer"/> instance.
+            /// </summary>
+            /// <param name="first">The first command line parameter.</param>
+            /// <param name="second">The second command line parameter.</param>
+            /// <param name="third">The third command line parameter.</param>
+            public MultipleConstructorsParameterContainer(bool first, string second, int third)
+            {
+                this.ConstructorCalled = 3;
+            }
+
+            #endregion
+
+            #region Public Properties
+
+            /// <summary>
+            /// Gets or sets the number of the constructor that has been called, which is used to validate that the correct constructor has been called.
+            /// </summary>
+            public int ConstructorCalled { get; set; }
+
+            #endregion
+        }
+
+        /// <summary>
+        /// Represents a parameter container, which is used to test the injection of simple data types.
+        /// </summary>
+        private class SimplePropertyParameterContainer
+        {
+            #region Public Properties
+
+            /// <summary>
+            /// Gets or sets the "number" command line parameter.
+            /// </summary>
+            [ParameterName("number")]
+            public double Number { get; set; }
+
+            /// <summary>
+            /// Gets or sets the "boolean" command line parameter.
+            /// </summary>
+            [ParameterName("boolean")]
+            public bool Boolean { get; set; }
+
+            /// <summary>
+            /// Gets or sets the "string" command line parameter.
+            /// </summary>
+            [ParameterName("string")]
+            public string String { get; set; }
+
+            #endregion
+        }
+
+        #endregion
     }
 }


Fit: rework multidim/vector linear combination fitting

--- src/Numerics/Fit.cs
+++ src/Numerics/Fit.cs
@@ -143,12 +143,43 @@
         /// Least-Squares fitting the points (X,y) = ((x0,x1,..,xk),y) to an arbitrary linear combination y : X -> p0*f0(x0) + p1*f1(x1) + ... + pk*fk(xk),
         /// returning its best fitting parameters as [p0, p1, p2, ..., pk] array.
         /// </summary>
-        public static double[] LinearCombinationVector(Vector<double>[] x, double[] y, params Func<double, double>[] functions)
+        public static double[] MultiDimensional(double[][] x, double[] y, params Func<double, double>[] functions)
         {
             return DenseMatrix
-                .OfColumns(x.Length, functions.Length, functions.Select((f, k) => DenseVector.Create(x.Length, i => f(x[i].At(k)))))
+                .OfRows(x.Length, functions.Length, x.Select(xi => functions.Select((f, k) => f(xi[k]))))
                 .QR(QRMethod.Thin).Solve(new DenseVector(y))
                 .ToArray();
         }
+
+        /// <summary>
+        /// Least-Squares fitting the points (X,y) = ((x0,x1,..,xk),y) to an arbitrary linear combination y : X -> p0*f0(x0) + p1*f1(x1) + ... + pk*fk(xk),
+        /// returning a function y' for the best fitting combination.
+        /// </summary>
+        public static Func<double[], double> MultiDimensionalFunc(double[][] x, double[] y, params Func<double, double>[] functions)
+        {
+            var parameters = MultiDimensional(x, y, functions);
+            return z => functions.Select((f, i) => parameters[i]*f(z[i])).Sum();
+        }
+
+        /// <summary>
+        /// Least-Squares fitting the points (X,y) = ((x0,x1,..,xk),y) to an arbitrary linear combination y : X -> p0*f0(x0) + p1*f1(x1) + ... + pk*fk(xk),
+        /// returning its best fitting parameters as [p0, p1, p2, ..., pk] array.
+        /// </summary>
+        public static Vector<double> Vector(Vector<double>[] x, double[] y, Func<Vector<double>, Vector<double>> functions)
+        {
+            return DenseMatrix
+                .OfRowVectors(x.Select(functions).ToArray()) // PERF: Array.map instead of seq
+                .QR(QRMethod.Thin).Solve(new DenseVector(y));
+        }
+
+        /// <summary>
+        /// Least-Squares fitting the points (X,y) = ((x0,x1,..,xk),y) to an arbitrary linear combination y : X -> p0*f0(x0) + p1*f1(x1) + ... + pk*fk(xk),
+        /// returning a function y' for the best fitting combination.
+        /// </summary>
+        public static Func<Vector<double>, double> VectorFunc(Vector<double>[] x, double[] y, Func<Vector<double>, Vector<double>> functions)
+        {
+            var parameters = Vector(x, y, functions);
+            return z => functions(z).Select((yi, i) => parameters[i]*yi).Sum();
+        }
     }
 }


fix crash on gunner bombardment

fix crash on gunner bombardment

--- TCC.Core/ViewModels/ClassManagers/GunnerBarManager.cs
+++ TCC.Core/ViewModels/ClassManagers/GunnerBarManager.cs
@@ -22,7 +22,7 @@
         {
             SessionManager.SkillsDatabase.TryGetSkill(51000, Class.Gunner, out var bfire);
             SessionManager.SkillsDatabase.TryGetSkill(130200, Class.Gunner, out var balder);
-            SessionManager.SkillsDatabase.TryGetSkill(20700, Class.Gunner, out var bombard);
+            SessionManager.SkillsDatabase.TryGetSkill(20600, Class.Gunner, out var bombard);

             BurstFire = new DurationCooldownIndicator(Dispatcher);
             Balder = new DurationCooldownIndicator(Dispatcher);
@@ -42,12 +42,12 @@

         public override bool StartSpecialSkill(SkillCooldown sk)
         {
-            if (sk.Skill.IconName == Balder.Cooldown.Skill.IconName)
+            if (Balder.Cooldown.Skill != null && sk.Skill.IconName == Balder.Cooldown.Skill.IconName)
             {
                 Balder.Cooldown.Start(sk.Cooldown);
                 return true;
             }
-            if (sk.Skill.IconName == Bombardment.Cooldown.Skill.IconName)
+            if (Bombardment.Cooldown.Skill != null && sk.Skill.IconName == Bombardment.Cooldown.Skill.IconName)
             {
                 Bombardment.Cooldown.Start(sk.Cooldown);
                 return true;


Delete MicrosoftBannerAdUnitBundle.cs

Delete MicrosoftBannerAdUnitBundle.cs

--- TIKSN.Core/Advertising/MicrosoftBannerAdUnitBundle.cs
+++ TIKSN.Core/Advertising/MicrosoftBannerAdUnitBundle.cs
@@ -1,14 +0,0 @@
-namespace TIKSN.Advertising
-{
-    public class MicrosoftBannerAdUnitBundle : MicrosoftAdUnitBundle
-    {
-        public static readonly AdUnit MicrosoftTestModeBannerAdUnit = new(AdProviders.Microsoft,
-            "3f83fe91-d6be-434d-a0ae-7351c5a997f1",
-            "10865270", true);
-
-        public MicrosoftBannerAdUnitBundle(string applicationId, string adUnitId)
-            : base(MicrosoftTestModeBannerAdUnit, applicationId, adUnitId)
-        {
-        }
-    }
-}


Update WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs

Co-authored-by: yahiheb <1ef907ec03476373b9c05d7f089a7d2fed4d8ea8@users.noreply.github.com>

--- WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
+++ WalletWasabi.Gui/Controls/WalletExplorer/SendTabViewModel.cs
@@ -96,7 +96,7 @@

 					if (Global.Config.Network == Network.Main && payjoinEndPointUri.Scheme != Uri.UriSchemeHttps)
 					{
-						Logger.LogWarning("Payjoin server is not exposed as onion service nor https. Ignoring...");
+						Logger.LogWarning("Payjoin server is not exposed as an onion service nor https. Ignoring...");
 						return null;
 					}
 				}


Fix name violation (#2084)

Fix name violation (#2084)

Fix name violation

--- WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/ECISet.cs
+++ WalletWasabi/Gma/QrCodeNet/Encoding/DataEncodation/ECISet.cs
@@ -91,9 +91,9 @@
 				Initialize(AppendOption.NameToValue);
 			}

-			if (_nameToValue.TryGetValue(encodingName, out int ECIValue))
-			{
-				return ECIValue;
+			if (_nameToValue.TryGetValue(encodingName, out int eCIValue))
+			{
+				return eCIValue;
 			}
 			else
 			{
@@ -101,55 +101,55 @@
 			}
 		}

-		internal string GetECINameByValue(int ECIValue)
+		internal string GetECINameByValue(int eCIValue)
 		{
 			if (_valueToName is null)
 			{
 				Initialize(AppendOption.ValueToName);
 			}

-			if (_valueToName.TryGetValue(ECIValue, out string ECIName))
-			{
-				return ECIName;
+			if (_valueToName.TryGetValue(eCIValue, out string eCIName))
+			{
+				return eCIName;
 			}
 			else
 			{
-				throw new ArgumentOutOfRangeException($"ECI does not contain value: {ECIValue}");
+				throw new ArgumentOutOfRangeException($"ECI does not contain value: {eCIValue}");
 			}
 		}

 		/// <remarks>ISO/IEC 18004:2006E ECI Designator Page 24</remarks>
-		/// <param name="ECIValue">Range: 0 ~ 999999</param>
+		/// <param name="eCIValue">Range: 0 ~ 999999</param>
 		/// <returns>Number of Codewords(Byte) for ECI Assignment Value</returns>
-		private static int NumOfCodewords(int ECIValue)
-		{
-			if (ECIValue >= 0 && ECIValue <= 127)
+		private static int NumOfCodewords(int eCIValue)
+		{
+			if (eCIValue >= 0 && eCIValue <= 127)
 			{
 				return 1;
 			}
-			else if (ECIValue > 127 && ECIValue <= 16383)
+			else if (eCIValue > 127 && eCIValue <= 16383)
 			{
 				return 2;
 			}
-			else if (ECIValue > 16383 && ECIValue <= 999999)
+			else if (eCIValue > 16383 && eCIValue <= 999999)
 			{
 				return 3;
 			}
 			else
 			{
-				throw new ArgumentOutOfRangeException("ECIValue should be in range: 0 to 999999");
+				throw new ArgumentOutOfRangeException($"{nameof(eCIValue)} should be in range: 0 to 999999");
 			}
 		}

 		/// <remarks>ISO/IEC 18004:2006E ECI Designator Page 24</remarks>
-		/// <param name="ECIValue">Range: 0 ~ 999999</param>
+		/// <param name="eCIValue">Range: 0 ~ 999999</param>
 		/// <returns>Number of bits for ECI Assignment Value</returns>
-		private static int NumOfAssignmentBits(int ECIValue) => NumOfCodewords(ECIValue) * 8;
+		private static int NumOfAssignmentBits(int eCIValue) => NumOfCodewords(eCIValue) * 8;

 		/// <remarks>ISO/IEC 18004:2006E ECI Designator Page 24</remarks>
-		/// <param name="ECIValue">Range: 0 ~ 999999</param>
+		/// <param name="eCIValue">Range: 0 ~ 999999</param>
 		/// <returns>Number of bits for ECI Header</returns>
-		internal static int NumOfECIHeaderBits(int ECIValue) => NumOfAssignmentBits(ECIValue) + 4;
+		internal static int NumOfECIHeaderBits(int eCIValue) => NumOfAssignmentBits(eCIValue) + 4;

 		/// <returns>ECI table in Dictionary collection</returns>
 		public Dictionary<string, int> GetECITable()


Disable non-move grammars at startup

Disable non-move grammars at startup

--- WizardsChess/WizardsChess/VoiceControl/CommandInterpreter.cs
+++ WizardsChess/WizardsChess/VoiceControl/CommandInterpreter.cs
@@ -59,6 +59,12 @@
 			{
 				throw new FormatException($"Could not compile grammar constraints. Received error {grammarCompilationResult.Status}");
 			}
+
+			// Disable unnecessary grammars
+			SpeechConstraints.EnableGrammar(speechRecognizer.Constraints, GrammarMode.MoveCommands, true);
+			SpeechConstraints.EnableGrammar(speechRecognizer.Constraints, GrammarMode.PieceConfirmation, false);
+			SpeechConstraints.EnableGrammar(speechRecognizer.Constraints, GrammarMode.YesNoCommands, false);
+			SpeechConstraints.EnableGrammar(speechRecognizer.Constraints, GrammarMode.CancelCommand, false);

 			return interpreter;
 		}
@@ -190,11 +196,9 @@
 				return;
 			}

-			//await listener.StopListeningAsync();
 			commandHypothesis = e;
 			await changeStateAsync(ListeningState.Hypothesis);
 			await speakAsync($"Did you say: {e.CommandText}");
-			//await listener.StartListeningAsync();
 		}

 		private bool isCommandFamilyValid(CommandFamily family)


switch to interval action to report the correct duration to the container action.

--- cocos2d/actions/action_intervals/CCParallel.cs
+++ cocos2d/actions/action_intervals/CCParallel.cs
@@ -5,7 +5,7 @@

 namespace Cocos2D
 {
-    public class CCParallel : CCFiniteTimeAction
+    public class CCParallel : CCActionInterval
     {
         protected CCFiniteTimeAction[] m_pActions;

@@ -20,6 +20,15 @@
         public CCParallel(params CCFiniteTimeAction[] actions)
         {
             m_pActions = actions;
+            float duration = 0f;
+            foreach (CCFiniteTimeAction action in m_pActions)
+            {
+                if (duration < action.Duration)
+                {
+                    duration = action.Duration;
+                }
+            }
+            base.InitWithDuration(duration);
         }

         public override void StartWithTarget(CCNode target)
@@ -92,13 +101,21 @@
                         return (false);
                     }
                 }
-                return (true);
+                return (base.IsDone);
             }
+        }
+
+        public override void Stop()
+        {
+            foreach (CCFiniteTimeAction action in m_pActions)
+            {
+                action.Stop();
+            }
+            base.Stop();
         }

         public override void Update(float time)
         {
-            base.Update(time);
             foreach (CCFiniteTimeAction action in m_pActions)
             {
                 if (!action.IsDone)


incrementing credit on message disposal (with Accept/Reject/etc) so that amount of fetched messages can be controlled

--- src/ReceiverLink.cs
+++ src/ReceiverLink.cs
@@ -236,7 +236,6 @@
                 {
                     if (waiter.Signal(delivery.Message))
                     {
-                        this.OnDeliverMessage();
                         return;
                     }

@@ -258,7 +257,6 @@
                 Fx.Assert(waiter == null, "waiter must be null now");
                 Fx.Assert(callback != null, "callback must not be null now");
                 callback(this, delivery.Message);
-                this.OnDeliverMessage();
             }
             else
             {
@@ -307,15 +305,6 @@
             }
         }

-        void OnDeliverMessage()
-        {
-            if (this.totalCredit > 0 &&
-                Interlocked.Increment(ref this.restored) >= (this.totalCredit / 2))
-            {
-                this.SetCredit(this.totalCredit, true);
-            }
-        }
-
         internal Message ReceiveInternal(MessageCallback callback, int timeout = 60000)
         {
             Waiter waiter = null;
@@ -326,7 +315,6 @@
                 if (first != null)
                 {
                     this.receivedMessages.Remove(first);
-                    this.OnDeliverMessage();
                     return first.Message;
                 }

@@ -363,6 +351,11 @@
         void DisposeMessage(Message message, Outcome outcome)
         {
             Delivery delivery = message.Delivery;
+            if (this.totalCredit > 0 &&
+            Interlocked.Increment(ref this.restored) >= (this.totalCredit / 2))
+            {
+                this.SetCredit(this.totalCredit, true);
+            }
             if (delivery == null || delivery.Settled)
             {
                 return;


cleanup

cleanup

--- Tests/Titanium.Web.Proxy.IntegrationTests/SslTests.cs
+++ Tests/Titanium.Web.Proxy.IntegrationTests/SslTests.cs
@@ -49,14 +49,10 @@
     {
         private ProxyServer proxyServer;

-        //share requestBody outside handlers
-        private Dictionary<Guid, string> requestBodyHistory;
-
         public ProxyTestController()
         {
             proxyServer = new ProxyServer();
             proxyServer.TrustRootCertificate = true;
-            requestBodyHistory = new Dictionary<Guid, string>();
         }

         public void StartProxy(int proxyPort)


Fix the escape being stranded ending

Fix the escape being stranded ending

The shuttle really starts moving 30 seconds before docking to the station.  It's unfair to say that it's blocked if it did not really started moving yet.

--- UnityProject/Assets/Scripts/Shuttles/EscapeShuttle.cs
+++ UnityProject/Assets/Scripts/Shuttles/EscapeShuttle.cs
@@ -11,6 +11,9 @@
 /// </summary>
 public class EscapeShuttle : NetworkBehaviour
 {
+	// Indicates at which moment (in remaining seconds) the shuttle should really start moving
+	private const int StartMovingAtCount = 30;
+
 	public MatrixInfo MatrixInfo => mm.MatrixInfo;
 	private MatrixMove mm;

@@ -30,6 +33,8 @@
 	private float escapeBlockedTime;
 	private bool isBlocked;

+	// Indicate if the shuttle really started moving toward station (It really starts moving in the StartMovingAtCount remaining seconds)
+	private bool startedMovingToStation;

 	public float DistanceToDestination => Vector2.Distance( mm.ServerState.Position, currentDestination.Position );

@@ -184,7 +189,7 @@
 		{
 			if (Status != ShuttleStatus.DockedCentcom && Status != ShuttleStatus.DockedStation)
 			{
-				if (!mm.ServerState.IsMoving || mm.ServerState.Speed < 1f)
+				if ((!mm.ServerState.IsMoving || mm.ServerState.Speed < 1f) && startedMovingToStation)
 				{
 					Logger.LogTrace("Escape shuttle is blocked.", Category.Matrix);
 					isBlocked = true;
@@ -257,6 +262,8 @@
 	/// </summary>
 	public bool CallShuttle(out string callResult, int seconds = 0)
 	{
+		startedMovingToStation = false;
+
 		if ( Status != ShuttleStatus.DockedCentcom )
 		{
 			callResult = "Can't call shuttle: not docked at Centcom!";
@@ -278,10 +285,10 @@
 		this.StartCoroutine( TickTimer(), ref timerHandle );

 		//adding a temporary listener:
-		//start actually moving ship if it's 30s before arrival and it hasn't been recalled...
+		//start actually moving ship if it's StartMovingAtCount seconds before arrival and it hasn't been recalled...
 		void Action( int time )
 		{
-			if ( time <= 30 )
+			if ( time <= StartMovingAtCount)
 			{
 				MoveToStation();
 				OnTimerUpdate.RemoveListener( Action ); //self-remove after firing once
@@ -305,6 +312,8 @@

 	public bool RecallShuttle(out string callResult)
 	{
+		startedMovingToStation = false;
+
 		if ( Status != ShuttleStatus.OnRouteStation
 		  || CurrentTimerSeconds < TooLateToRecallSeconds )
 		{
@@ -389,6 +398,7 @@
 	/// </summary>
 	public void MoveToStation()
 	{
+		startedMovingToStation = true;
 		mm.SetSpeed( 25 );
 		MoveTo( StationDest );
 	}


Bump version to 0.9.4

Bump version to 0.9.4

--- src/SolutionInfo.cs
+++ src/SolutionInfo.cs
@@ -2,12 +2,12 @@
 using System.Reflection;

 [assembly: AssemblyProductAttribute("Journalist")]
-[assembly: AssemblyVersionAttribute("0.9.3")]
-[assembly: AssemblyInformationalVersionAttribute("0.9.3")]
-[assembly: AssemblyFileVersionAttribute("0.9.3")]
+[assembly: AssemblyVersionAttribute("0.9.4")]
+[assembly: AssemblyInformationalVersionAttribute("0.9.4")]
+[assembly: AssemblyFileVersionAttribute("0.9.4")]
 [assembly: AssemblyCompanyAttribute("Anton Mednonogov")]
 namespace System {
     internal static class AssemblyVersionInformation {
-        internal const string Version = "0.9.3";
+        internal const string Version = "0.9.4";
     }
 }


Statement.Empty and new ParenGroup class

--- src/SqlGenerator.cs
+++ src/SqlGenerator.cs
@@ -105,6 +105,13 @@
 		 	string s = Regex.Replace(str, "'", @"''");
 		 	s = Regex.Replace(s, @"[']+''", @"''");
 		 	return s;
+		}
+
+		public static Statement Empty
+		{
+			get {
+				return new Statement("");
+			}
 		}
 	}

@@ -336,4 +343,12 @@
 			statement = Op.And;
 		}
 	}
+
+	public class ParenGroup : Statement
+	{
+		public ParenGroup(Statement sub)
+		{
+			statement = " ( " + sub + " ) ";
+		}
+	}
 }


Now merging conventions before export of mappings.

--- src/FluentNHibernate/Cfg/FluentMappingsContainer.cs
+++ src/FluentNHibernate/Cfg/FluentMappingsContainer.cs
@@ -127,6 +127,8 @@
                 model.Add(type);
             }

+			model.Conventions.Merge(conventionFinder);
+
             if (!string.IsNullOrEmpty(exportPath))
                 model.WriteMappingsTo(exportPath);

@@ -135,8 +137,6 @@

             if (biDirectionalManyToManyPairer != null)
                 model.BiDirectionalManyToManyPairer = biDirectionalManyToManyPairer;
-
-            model.Conventions.Merge(conventionFinder);
         }
     }
 }


added message if credentials do not exist

--- Windows8StoreApp/SearchApp/SearchApp/MainPage.xaml.cs
+++ Windows8StoreApp/SearchApp/SearchApp/MainPage.xaml.cs
@@ -136,7 +136,9 @@

             try
             {
+
                 var credentialList = vault.FindAllByResource(ConnectSetting.ResourceName);
+                credentialList = null;

                 user = credentialList[0].UserName;
                 credentialList[0].RetrievePassword();
@@ -156,7 +158,7 @@
             }
             catch (Exception ex)
             {
-                OutputInfo.Text = ex.Message;
+                OutputInfo.Text = "Please set connection information from the Settings menu";
                 return false;
             }
         }


Fixed tags with the same start scrambled at lookup time

--- Wontstop.Climb.Ui.Uwp/ViewModels/ProblemsViewModel.cs
+++ Wontstop.Climb.Ui.Uwp/ViewModels/ProblemsViewModel.cs
@@ -3,6 +3,7 @@

 using System;
 using System.Collections.Generic;
+using System.Diagnostics;
 using System.Linq;
 using System.Threading.Tasks;
 using HttpApiClient;
@@ -117,14 +118,10 @@

         private void SuggestionChosen(string tag)
         {
-            //var problem = SuggestedProblems.Single(x =>
-            //    string.Equals(tag, x.TagShort, StringComparison.OrdinalIgnoreCase));
-            //if (problem.IsVisible)
-            //{
-                var lastTag = GetLastTagFrom(Tags);
-
-                Tags = Tags.Replace(lastTag, tag);
-            //}
+            // TODO: don't update in case problem was removed
+            var lastTag = GetLastTagFrom(Tags);
+            var tags = Tags.Substring(0, Tags.Length - lastTag.Length);
+            Tags = tags + tag;
         }

         private static string GetLastTagFrom(string text)
@@ -152,12 +149,9 @@
         {
             Busy = true;

-            if (ValidateTicks())
+            if (!ShowErrorForInexistentTags())
             {
-                // TODO: send it to Problemator ...
-                await LoadSectionsAsync();
-
-                Tags = null;
+                await SaveTicksAsync();
             }

             Busy = false;
@@ -165,7 +159,15 @@
             Empty = (Sections == null) || !Sections.Any();
         }

-        private bool ValidateTicks()
+        private async Task SaveTicksAsync()
+        {
+            // TODO: send it to Problemator ...
+            await LoadSectionsAsync();
+
+            Tags = null;
+        }
+
+        private bool ShowErrorForInexistentTags()
         {
             var inexisten = GetInexistenTags();
             if (inexisten.Any())
@@ -173,10 +175,10 @@
                 _eventAggregator.PublishOnCurrentThread(
                     new ErrorMessage($"Unable to find: {string.Join(TicksSeparator, inexisten)}"));

-                return false;
+                return true;
             }

-            return true;
+            return false;
         }

         private List<string> GetInexistenTags()


Fix for Manage view

Fix for Manage view

--- AllReadyApp/Web-App/AllReady/Views/Manage/Index.cshtml
+++ AllReadyApp/Web-App/AllReady/Views/Manage/Index.cshtml
@@ -9,7 +9,7 @@

Change your account settings

-        @if (AuthorizationService.Authorize(User, "", "TenantAdmin"))
+        @if (await AuthorizationService.AuthorizeAsync(User, "", "TenantAdmin"))
         {

Phone Number:

@@ -26,7 +26,7 @@
                 }
                 ]

-            @if (AuthorizationService.Authorize(User, "", "SiteAdmin"))
+            @if (await AuthorizationService.AuthorizeAsync(User, "", "SiteAdmin"))
             {

Approve Users:


IOption ToTry extension

IOption ToTry extension

--- src/FuncSharp/DataTypes/Option/IOptionExtensions.cs
+++ src/FuncSharp/DataTypes/Option/IOptionExtensions.cs
@@ -112,5 +112,16 @@
                 _ => null
             );
         }
+
+        /// <summary>
+        /// Turns the option into a try using the exception in case of empty option.
+        /// </summary>
+        public static ITry<A> ToTry<A>(this IOption<A> option, Func<Unit, Exception> e)
+        {
+            return option.Match(
+                val => Try.Success(val),
+                _ => Try.Error<A>(e(Unit.Value))
+            );
+        }
     }
 }


Defined the assembly version to 1.0.0.*.

--- src/Giacomelli.JumpStart/Properties/AssemblyInfo.cs
+++ src/Giacomelli.JumpStart/Properties/AssemblyInfo.cs
@@ -17,7 +17,7 @@
 // The form "{Major}.{Minor}.*" will automatically update the build and revision,
 // and "{Major}.{Minor}.{Build}.*" will update just the revision.

-[assembly: AssemblyVersion("0.1.0.*")]
+[assembly: AssemblyVersion("1.0.0.*")]

 // The following attributes are used to specify the signing key for the assembly,
 // if desired. See the Mono documentation for more information about signing.


marking as virtual

marking as virtual

--- src/Grace/DependencyInjection/Impl/DisposalScope.cs
+++ src/Grace/DependencyInjection/Impl/DisposalScope.cs
@@ -28,7 +28,7 @@
         /// <summary>
         /// Dispose of scope
         /// </summary>
-        public void Dispose()
+        public virtual void Dispose()
         {
             var entry = Interlocked.Exchange(ref _entry, null);


Added Kephas.Workflow friend assembly in Kephas.Core


Clear attributes when clearing text

Clear attributes when clearing text

--- tterm/Terminal/TerminalBuffer.cs
+++ tterm/Terminal/TerminalBuffer.cs
@@ -69,7 +69,9 @@
             {
                 for (int x = left; x <= right; x++)
                 {
-                    _buffer[GetBufferIndex(x, y)] = ' ';
+                    int index = GetBufferIndex(x, y);
+                    _buffer[index] = ' ';
+                    _bufferAttributes[index] = default(CharAttributes);
                 }
             }
         }


Fixing minor bug in ThreadPart.cs

Fixing minor bug in ThreadPart.cs

--- Models/ThreadPart.cs
+++ Models/ThreadPart.cs
@@ -13,7 +13,7 @@

         public LazyField<IUser> ClosedByField { get { return _closedBy; } }
         public LazyField<PostPart> FirstPostField { get { return _firstPost; } }
-        public LazyField<PostPart> LatestPostField { get { return _firstPost; } }
+        public LazyField<PostPart> LatestPostField { get { return _latestPost; } }

         public string Title {
             get { return this.As<ITitleAspect>().Title; }


Dialects: Added constraint name getter to PostgreSQL meta data provider.

SVN: 488784591515bd4cdaa016be4ec9b172dc4e7caf@5983

--- src/NHibernate/Dialect/Schema/PostgreSQLMetadata.cs
+++ src/NHibernate/Dialect/Schema/PostgreSQLMetadata.cs
@@ -41,7 +41,7 @@

 		protected override string GetConstraintName(DataRow rs)
 		{
-			throw new NotImplementedException();
+		    return Convert.ToString(rs["CONSTRAINT_NAME"]);
 		}

 		protected override IForeignKeyMetadata GetForeignKeyMetadata(DataRow rs)


PathBase aware admin logo (#8304)

PathBase aware admin logo (#8304)

--- src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml
+++ src/OrchardCore.Themes/TheAdmin/Views/Layout.cshtml
@@ -1,4 +1,4 @@
-@inject DarkModeService DarkModeService;
+@inject DarkModeService DarkModeService;
 @inject IOptions<AdminOptions> AdminOptions;
 @{
     var adminSettings = Site.As<AdminSettings>();
@@ -32,7 +32,7 @@

-                @Site.SiteName
+                @Site.SiteName

                     @if (adminSettings.DisplayTitlesInTopbar)


Don't clear REPL first flag for empty lines

--- Mond.Repl/Program.cs
+++ Mond.Repl/Program.cs
@@ -194,20 +194,23 @@
                     Console.Write("{0,3:G}{1} ", ++_line, _first ? ">" : "|");

                     var line = _readLine();
-                    if (line != null)
+
+                    if (line == null)
+                        yield break;
+
+                    if (_first && line.StartsWith("="))
+                        line = "return " + line.Substring(1);
+
+                    foreach (var c in line)
                     {
-                        if (_first && line.StartsWith("="))
-                            line = "return " + line.Substring(1);
-
-                        foreach (var c in line)
-                        {
-                            _input.Enqueue(c);
-                        }
-
-                        _input.Enqueue('\n');
+                        _input.Enqueue(c);
                     }

-                    _first = false;
+                    _input.Enqueue('\n');
+
+                    if (!string.IsNullOrWhiteSpace(line))
+                        _first = false;
+
                     continue;
                 }


Updating Boundary script

Updating Boundary script

--- Assets/HoloToolkit/Boundary/Scripts/BoundaryManager.cs
+++ Assets/HoloToolkit/Boundary/Scripts/BoundaryManager.cs
@@ -104,7 +104,6 @@
             if (FloorQuad != null && HolographicSettings.IsDisplayOpaque)
             {
                 floorQuadInstance = Instantiate(FloorQuad);
-                floorQuadInstance.transform.SetParent(gameObject.transform.parent);

 #if UNITY_EDITOR
                 // So the floor quad does not occlude in editor testing, draw it lower.
@@ -115,14 +114,14 @@
                 // TODO: BUG: Unity: TryGetDimensions does not return true either.
                 //if (UnityEngine.Experimental.XR.Boundary.TryGetDimensions(out dimensions,
                 //UnityEngine.Experimental.XR.Boundary.Type.TrackedArea))
-                if (UnityEngine.Experimental.XR.Boundary.TryGetDimensions(out dimensions,
+                if (UnityEngine.Experimental.XR.Boundary.TryGetDimensions(out dimensions,
                     UnityEngine.Experimental.XR.Boundary.Type.TrackedArea))
                 {
                     Debug.Log("Got dimensions of tracked area.");
                     if (dimensions != null)
                     {
                         Debug.Log("Drawing floor at dimensions Y.");
-                        // Draw the floor at boundary Y.
+                        // Draw the floor at boundary Y.
                         floorQuadInstance.transform.localPosition = new Vector3(0, dimensions.y, 0);
                     }
                 }
@@ -131,7 +130,7 @@
                     Debug.Log("Drawing floor at 0,0,0.");
                     // Draw the floor at 0,0,0.
                     floorQuadInstance.transform.localPosition = Vector3.zero;
-                }
+                }
 #endif
                 floorQuadInstance.SetActive(true);
             }


Cached GestureManager in GestureManipulator. Fixed minor formatting.

--- Assets/HoloToolkit/Input/Scripts/GestureManipulator.cs
+++ Assets/HoloToolkit/Input/Scripts/GestureManipulator.cs
@@ -1,7 +1,6 @@
 // Copyright (c) Microsoft Corporation. All rights reserved.
 // Licensed under the MIT License. See LICENSE in the project root for license information.

-using HoloToolkit.Unity;
 using UnityEngine;

 namespace HoloToolkit.Unity
@@ -25,33 +24,42 @@
         public Vector3 handPositionScale = new Vector3(2.0f, 2.0f, 4.0f);  // Default tuning values, expected to be modified per application

         private Vector3 initialHandPosition;
+
         private Vector3 initialObjectPosition;

         private Interpolator targetInterpolator;

+        private GestureManager gestureManager;
+
         private bool Manipulating { get; set; }
+
+        private void Start()
+        {
+            gestureManager = GestureManager.Instance;
+
+            if (gestureManager == null)
+            {
+                Debug.LogError(string.Format("GestureManipulator on {0} could not find GestureManager instance, manipulation will not function", name));
+            }
+        }

         private void OnEnable()
         {
-            if (GestureManager.Instance != null)
+            if (gestureManager != null)
             {
-                GestureManager.Instance.ManipulationStarted += BeginManipulation;
-                GestureManager.Instance.ManipulationCompleted += EndManipulation;
-                GestureManager.Instance.ManipulationCanceled += EndManipulation;
-            }
-            else
-            {
-                Debug.LogError(string.Format("GestureManipulator enabled on {0} could not find GestureManager instance, manipulation will not function", name));
+                gestureManager.ManipulationStarted += BeginManipulation;
+                gestureManager.ManipulationCompleted += EndManipulation;
+                gestureManager.ManipulationCanceled += EndManipulation;
             }
         }

         private void OnDisable()
         {
-            if (GestureManager.Instance)
+            if (gestureManager != null)
             {
-                GestureManager.Instance.ManipulationStarted -= BeginManipulation;
-                GestureManager.Instance.ManipulationCompleted -= EndManipulation;
-                GestureManager.Instance.ManipulationCanceled -= EndManipulation;
+                gestureManager.ManipulationStarted -= BeginManipulation;
+                gestureManager.ManipulationCompleted -= EndManipulation;
+                gestureManager.ManipulationCanceled -= EndManipulation;
             }

             Manipulating = false;
@@ -59,7 +67,7 @@

         private void BeginManipulation()
         {
-            if (GestureManager.Instance != null && GestureManager.Instance.ManipulationInProgress)
+            if (gestureManager != null && gestureManager.ManipulationInProgress)
             {
                 Manipulating = true;

@@ -67,7 +75,7 @@

                 // In order to ensure that any manipulated objects move with the user, we do all our math relative to the camera,
                 // so when we save the initial hand position and object position we first transform them into the camera's coordinate space
-                initialHandPosition = Camera.main.transform.InverseTransformPoint(GestureManager.Instance.ManipulationHandPosition);
+                initialHandPosition = Camera.main.transform.InverseTransformPoint(gestureManager.ManipulationHandPosition);
                 initialObjectPosition = Camera.main.transform.InverseTransformPoint(transform.position);
             }
         }
@@ -79,12 +87,12 @@

         // Update is called once per frame
-        void Update()
+        private void Update()
         {
             if (Manipulating)
             {
                 // First step is to figure out the delta between the initial hand position and the current hand position
-                Vector3 localHandPosition = Camera.main.transform.InverseTransformPoint(GestureManager.Instance.ManipulationHandPosition);
+                Vector3 localHandPosition = Camera.main.transform.InverseTransformPoint(gestureManager.ManipulationHandPosition);
                 Vector3 initialHandToCurrentHand = localHandPosition - initialHandPosition;

                 // When performing a manipulation gesture, the hand generally only translates a relatively small amount.


reformat code

reformat code

--- Assets/Plugins/Editor/Rider/RiderAssetPostprocessor.cs
+++ Assets/Plugins/Editor/Rider/RiderAssetPostprocessor.cs
@@ -8,166 +8,171 @@

 namespace Assets.Plugins.Editor.Rider
 {
-    public class RiderAssetPostprocessor : AssetPostprocessor
+  public class RiderAssetPostprocessor : AssetPostprocessor
+  {
+    public static void OnGeneratedCSProjectFiles()
     {
-        public static void OnGeneratedCSProjectFiles()
+      if (!Rider.Enabled)
+        return;
+      var currentDirectory = Directory.GetCurrentDirectory();
+      var projectFiles = Directory.GetFiles(currentDirectory, "*.csproj");
+
+      bool isModified = false;
+      foreach (var file in projectFiles)
+      {
+        isModified = UpgradeProjectFile(file);
+      }
+
+      var slnFiles = Directory.GetFiles(currentDirectory, "*.sln"); // piece from MLTimK fork
+      foreach (var file in slnFiles)
+      {
+        string content = File.ReadAllText(file);
+        const string magicProjectGUID = @"Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"")";
+        // guid representing C# project
+        if (!content.Contains(magicProjectGUID))
         {
-            if (!Rider.Enabled)
-                return;
-            var currentDirectory = Directory.GetCurrentDirectory();
-            var projectFiles = Directory.GetFiles(currentDirectory, "*.csproj");
+          string matchGUID = @"Project\(\""\{[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\}\""\)";
+          // Unity may put a random guid, which will brake Rider goto
+          content = Regex.Replace(content, matchGUID, magicProjectGUID);
+          File.WriteAllText(file, content);
+          isModified = true;
+        }
+      }

-            bool isModified = false;
-            foreach (var file in projectFiles)
-            {
-                isModified = UpgradeProjectFile(file);
-            }
+      Rider.Log(isModified ? "Solution was post processed successfully" : "No change necessary");
+      UpdateUnitySettings(slnFiles);
+      UpdateDebugSettings();
+    }

-            var slnFiles = Directory.GetFiles(currentDirectory, "*.sln"); // piece from MLTimK fork
-            foreach (var file in slnFiles)
-            {
-                string content = File.ReadAllText(file);
-                const string magicProjectGUID = @"Project(""{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"")";
-                // guid representing C# project
-                if (!content.Contains(magicProjectGUID))
-                {
-                    string matchGUID = @"Project\(\""\{[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}\}\""\)";
-                    // Unity may put a random guid, which will brake Rider goto
-                    content = Regex.Replace(content, matchGUID, magicProjectGUID);
-                    File.WriteAllText(file, content);
-                    isModified = true;
-                }
-            }
+    private static bool UpgradeProjectFile(string file)
+    {
+      var doc = XDocument.Load(file);
+      var projectContentElement = doc.Root;
+      XNamespace xmlns = projectContentElement.Name.NamespaceName; // do not use var

-            Rider.Log(isModified ? "Solution was post processed successfully" : "No change necessary");
-            UpdateUnitySettings(slnFiles);
-            UpdateDebugSettings();
-        }
+      var xNodes = projectContentElement.Elements().ToList();
+      var targetFrameworkVersion =
+        xNodes.Elements().FirstOrDefault(childNode => childNode.Name.LocalName == "TargetFrameworkVersion");
+      targetFrameworkVersion.SetValue("v4.5"); // very useful, when system mono 4 is used

-        private static bool UpgradeProjectFile(string file)
-        {
-            var doc = XDocument.Load(file);
-            var projectContentElement = doc.Root;
-            XNamespace xmlns = projectContentElement.Name.NamespaceName; // do not use var
+      var group =
+        projectContentElement.Elements().FirstOrDefault(childNode => childNode.Name.LocalName == "PropertyGroup");

-            var xNodes = projectContentElement.Elements().ToList();
-            var targetFrameworkVersion =
-                xNodes.Elements().FirstOrDefault(childNode => childNode.Name.LocalName == "TargetFrameworkVersion");
-            targetFrameworkVersion.SetValue("v4.5"); // very useful, when system mono 4 is used
+      var lang = group.Elements("LangVersion").FirstOrDefault();
+      if (lang != null)
+      {
+        lang.SetValue("5");
+      }
+      else
+      {
+        var newLang = new XElement(xmlns + "LangVersion");
+        newLang.SetValue("5");
+        group.Add(newLang);
+      }

-            var group = projectContentElement.Elements().FirstOrDefault(childNode => childNode.Name.LocalName == "PropertyGroup");
-
-            var lang = group.Elements("LangVersion").FirstOrDefault();
-            if (lang != null)
-            {
-                lang.SetValue("5");
-            }
-            else
-            {
-                var newLang = new XElement(xmlns + "LangVersion");
-                newLang.SetValue("5");
-                group.Add(newLang);
-            }
-
-            doc.Save(file);
-            return true;
-        }
+      doc.Save(file);
+      return true;
+    }

-        private static void UpdateUnitySettings(string[] slnFiles)
-        {
-            try
-            {
-                if (slnFiles.Any())
-                    EditorPrefs.SetString("kScriptEditorArgs", "\"" + slnFiles.First() + "\"");
-                else
-                    EditorPrefs.SetString("kScriptEditorArgs", string.Empty);
-            }
-            catch (Exception e)
-            {
-                Rider.Log("Exception on updating kScriptEditorArgs: " + e.Message);
-            }
-        }
+    private static void UpdateUnitySettings(string[] slnFiles)
+    {
+      try
+      {
+        if (slnFiles.Any())
+          EditorPrefs.SetString("kScriptEditorArgs", "\"" + slnFiles.First() + "\"");
+        else
+          EditorPrefs.SetString("kScriptEditorArgs", string.Empty);
+      }
+      catch (Exception e)
+      {
+        Rider.Log("Exception on updating kScriptEditorArgs: " + e.Message);
+      }
+    }

-        // initial version copied from https://github.com/yonstorm/ProjectRider-Unity/blob/develop/Assets/Plugins/Editor/ProjectRider/ProjectValidator.cs
-        private static bool UpdateDebugSettings()
-        {
-            var workspaceFile = Path.Combine(Path.Combine(Path.Combine(Path.Combine(Directory.GetCurrentDirectory(), ".idea"),".idea."+Path.GetFileNameWithoutExtension(Rider.SlnFile)),".idea"), "workspace.xml");
-            if (!File.Exists(workspaceFile))
-            {
-                // TODO: write workspace settings from a template to be able to write debug settings before Rider is started for the first time.
-                Rider.Log(workspaceFile + " doesn't exist.");
-                return true;
-            }
+    // initial version copied from https://github.com/yonstorm/ProjectRider-Unity/blob/develop/Assets/Plugins/Editor/ProjectRider/ProjectValidator.cs
+    private static bool UpdateDebugSettings()
+    {
+      var workspaceFile =
+        Path.Combine(
+          Path.Combine(
+            Path.Combine(Path.Combine(Directory.GetCurrentDirectory(), ".idea"),
+              ".idea." + Path.GetFileNameWithoutExtension(Rider.SlnFile)), ".idea"), "workspace.xml");
+      if (!File.Exists(workspaceFile))
+      {
+        // TODO: write workspace settings from a template to be able to write debug settings before Rider is started for the first time.
+        Rider.Log(workspaceFile + " doesn't exist.");
+        return true;
+      }

-            var document = XDocument.Load(workspaceFile);
-            var runManagerElement = (from elem in document.Descendants()
-                where elem.Attribute("name") != null && elem.Attribute("name").Value.Equals("RunManager")
-                select elem).FirstOrDefault();
+      var document = XDocument.Load(workspaceFile);
+      var runManagerElement = (from elem in document.Descendants()
+        where elem.Attribute("name") != null && elem.Attribute("name").Value.Equals("RunManager")
+        select elem).FirstOrDefault();

-            if (runManagerElement == null)
-            {
-                var projectElement = document.Element("project");
-                if (projectElement == null)
-                    return false;
+      if (runManagerElement == null)
+      {
+        var projectElement = document.Element("project");
+        if (projectElement == null)
+          return false;

-                runManagerElement = new XElement("component", new XAttribute("name", "RunManager"));
-                projectElement.Add(runManagerElement);
-            }
+        runManagerElement = new XElement("component", new XAttribute("name", "RunManager"));
+        projectElement.Add(runManagerElement);
+      }

-            var editorConfigElem = (from elem in runManagerElement.Descendants()
-                where elem.Attribute("name") != null && elem.Attribute("name").Value.Equals("UnityEditor-generated")
-                select elem).FirstOrDefault();
+      var editorConfigElem = (from elem in runManagerElement.Descendants()
+        where elem.Attribute("name") != null && elem.Attribute("name").Value.Equals("UnityEditor-generated")
+        select elem).FirstOrDefault();

-            var currentDebugPort = GetDebugPort();
-            if (editorConfigElem == null)
-            {
-                editorConfigElem = new XElement("configuration");
-                var defaultAttr = new XAttribute("default", false);
-                var nameAttr = new XAttribute("name", "UnityEditor-generated");
-                var typeAttr = new XAttribute("type", "ConnectRemote");
-                var factoryNameAttr = new XAttribute("factoryName", "Mono remote");
-                var showStdErrAttr = new XAttribute("show_console_on_std_err", false);
-                var showStdOutAttr = new XAttribute("show_console_on_std_out", true);
-                var portAttr = new XAttribute("a", currentDebugPort);
-                var addressAttr = new XAttribute("b", "127.0.0.1");
+      var currentDebugPort = GetDebugPort();
+      if (editorConfigElem == null)
+      {
+        editorConfigElem = new XElement("configuration");
+        var defaultAttr = new XAttribute("default", false);
+        var nameAttr = new XAttribute("name", "UnityEditor-generated");
+        var typeAttr = new XAttribute("type", "ConnectRemote");
+        var factoryNameAttr = new XAttribute("factoryName", "Mono remote");
+        var showStdErrAttr = new XAttribute("show_console_on_std_err", false);
+        var showStdOutAttr = new XAttribute("show_console_on_std_out", true);
+        var portAttr = new XAttribute("a", currentDebugPort);
+        var addressAttr = new XAttribute("b", "127.0.0.1");

-                editorConfigElem.Add(defaultAttr, nameAttr, typeAttr, factoryNameAttr, showStdErrAttr, showStdOutAttr,
-                    portAttr, addressAttr);
+        editorConfigElem.Add(defaultAttr, nameAttr, typeAttr, factoryNameAttr, showStdErrAttr, showStdOutAttr,
+          portAttr, addressAttr);

-                var optionAdress = new XElement("option");
-                optionAdress.Add(new XAttribute("name", "address"), new XAttribute("value", "127.0.0.1"));
-                var optionPort = new XElement("option");
-                optionPort.Add(new XAttribute("name", "port"), new XAttribute("value", currentDebugPort.ToString()));
+        var optionAdress = new XElement("option");
+        optionAdress.Add(new XAttribute("name", "address"), new XAttribute("value", "127.0.0.1"));
+        var optionPort = new XElement("option");
+        optionPort.Add(new XAttribute("name", "port"), new XAttribute("value", currentDebugPort.ToString()));

-                editorConfigElem.Add(optionAdress, optionPort);
+        editorConfigElem.Add(optionAdress, optionPort);

-                runManagerElement.SetAttributeValue("selected", "Mono remote.UnityEditor-generated");
-                runManagerElement.Add(editorConfigElem);
-            }
-            else
-            {
-                editorConfigElem.Attribute("a").Value = currentDebugPort.ToString();
-                var el = editorConfigElem.Descendants("option").Single(a => a.Attribute("name").Value == "port");
-                el.Attribute("value").SetValue(currentDebugPort.ToString());
-            }
+        runManagerElement.SetAttributeValue("selected", "Mono remote.UnityEditor-generated");
+        runManagerElement.Add(editorConfigElem);
+      }
+      else
+      {
+        editorConfigElem.Attribute("a").Value = currentDebugPort.ToString();
+        var el = editorConfigElem.Descendants("option").Single(a => a.Attribute("name").Value == "port");
+        el.Attribute("value").SetValue(currentDebugPort.ToString());
+      }

-            document.Save(workspaceFile);
+      document.Save(workspaceFile);

-            // Rider doesn't like it small... :/
-            var lines = File.ReadAllLines(workspaceFile);
-            lines[0] = lines[0].Replace("utf-8", "UTF-8");
-            File.WriteAllLines(workspaceFile, lines);
+      // Rider doesn't like it small... :/
+      var lines = File.ReadAllLines(workspaceFile);
+      lines[0] = lines[0].Replace("utf-8", "UTF-8");
+      File.WriteAllLines(workspaceFile, lines);

-            return true;
-        }
+      return true;
+    }

-        private static int GetDebugPort()
-        {
-            var processId = Process.GetCurrentProcess().Id;
-            var port = 56000 + (processId % 1000);
+    private static int GetDebugPort()
+    {
+      var processId = Process.GetCurrentProcess().Id;
+      var port = 56000 + (processId % 1000);

-            return port;
-        }
+      return port;
     }
+  }
 }