Make sure to check for null before calling the checkbox callback.

--- gui4opengl/Controls/CheckBox.cs
+++ gui4opengl/Controls/CheckBox.cs
@@ -85,7 +85,7 @@
             set
             {
                 isChecked = value;
-                OnCheckedChanged(this, new MouseEventArgs());
+                if (OnCheckedChanged != null) OnCheckedChanged(this, new MouseEventArgs());

                 if (isChecked) checkBox.BackgroundTexture = CheckedTexture;
                 else checkBox.BackgroundTexture = UncheckedTexture;


Add XML Document comments for class 'Token'

--- lury-lexer/Token.cs
+++ lury-lexer/Token.cs
@@ -31,12 +31,21 @@

 namespace Lury.Compiling.Lexer
 {
+    /// <summary>
+    /// 字句解析で生成されたトークンを表します。
+    /// </summary>
     public class Token
     {
         #region -- Public Properties --

+        /// <summary>
+        /// トークンエントリを取得します。
+        /// </summary>
         public TokenEntry Entry { get; private set; }

+        /// <summary>
+        /// トークンの文字列を取得します。
+        /// </summary>
         public string Text
         {
             get
@@ -48,8 +57,14 @@
             }
         }

+        /// <summary>
+        /// トークンの長さを取得します。
+        /// </summary>
         public int Length { get; private set; }

+        /// <summary>
+        /// トークンの SourceCode での出現位置を取得します。
+        /// </summary>
         public CharPosition Position
         {
             get
@@ -58,14 +73,27 @@
             }
         }

+        /// <summary>
+        /// トークンの SourceCode でのインデクスを取得します。
+        /// </summary>
         public int Index { get; private set; }

+        /// <summary>
+        /// 字句解析されたソースコードを表す文字列を取得します。
+        /// </summary>
         public string SourceCode { get; private set; }

         #endregion

         #region -- Constructors --

+        /// <summary>
+        /// パラメータを指定して新しい Token クラスのインスタンスを初期化します。
+        /// </summary>
+        /// <param name="entry">トークンエントリ。</param>
+        /// <param name="sourceCode">字句解析された元のソースコード。</param>
+        /// <param name="index">トークンが出現したインデクス。</param>
+        /// <param name="length">トークンの長さ。</param>
         public Token(TokenEntry entry, string sourceCode, int index, int length)
         {
             if (sourceCode.Length < index + length)
@@ -81,6 +109,10 @@

         #region -- Public Methods --

+        /// <summary>
+        /// このトークンオブジェクトの現在の状態を表す文字列を取得します。
+        /// </summary>
+        /// <returns>トークンエントリの名前、出現位置そしてトークン文字列を含む文字列。</returns>
         public override string ToString()
         {
             return string.Format("{0} {1}{2}", this.Position, this.Entry.Name, this.Entry.Name.Length > 1 ? " - " + this.Text : "");


removed note

removed note

--- mef_Addin_Random.cs
+++ mef_Addin_Random.cs
@@ -120,7 +120,7 @@
 //		}
 		public override string dependencyguid {
 			get {
-				//TODO remove. This does not need a dependency. Just testing
+
 				return "NetSpell";
 			}
 		}


Sende eine Nachricht per Bot an einen User per .sendmsg

--- NadekoBot/Modules/Administration/AdministrationModule.cs
+++ NadekoBot/Modules/Administration/AdministrationModule.cs
@@ -952,37 +952,6 @@
                          }).ConfigureAwait (false);
                      });

-                cgb.CreateCommand (Prefix + "clear")
-                    .Parameter ("num",ParameterType.Required)
-                    .Parameter ("user",ParameterType.Required)
-                    .Description ("Entfernt eine Anzahl Nachrichten eines bestimmten Users aus dem Chat. **Owner Only!**\n **Benutzung**: .clear 5 @User")
-                    .Do (async e =>
-                    {
-                        await Task.Run (async () =>
-                        {
-                            if (!e.User.ServerPermissions.ManageMessages)
-                                return;
-                            int val;
-                            if (string.IsNullOrWhiteSpace (e.GetArg ("num")) || !int.TryParse (e.GetArg ("num"),out val) || val < 0)
-                                return;
-                            var tester = 0;
-                            var u = e.Channel.FindUsers (e.GetArg ("user")).FirstOrDefault ();
-                            if (u == null)
-                            {
-                                await e.Send ("Ungültiger Benutzer.").ConfigureAwait (false);
-                                return;
-                            }
-                            var msgs = (await e.Channel.DownloadMessages (100)).Where (m => m.User.Id == u.Id);
-                            foreach (var m in msgs)
-                            {
-                                if (tester <= val)
-                                {
-                                    await m.Delete ().ConfigureAwait (false);
-                                    tester++;
-                                }
-                            }
-                        });
-                    });
                 //THIS IS INTENTED TO BE USED ONLY BY THE ORIGINAL BOT OWNER
                 cgb.CreateCommand (Prefix + "adddon")
                     .Alias (Prefix + "donadd")
@@ -1034,6 +1003,33 @@
                        }
                    });

+                cgb.CreateCommand (Prefix + "sendmsg")
+                   .Description ($"Sendet eine Private Nachricht an einen User vom Bot aus.**Owner Only**\n**Benutzung**: {Prefix}sendmsg @Username Nachricht")
+                   .Parameter ("user",ParameterType.Required)
+                   .Parameter ("msg",ParameterType.Unparsed)
+                   .AddCheck (SimpleCheckers.OwnerOnly ())
+                   .Do (async e =>
+                   {
+                       var u = e.Server.FindUsers (e.GetArg ("user")).FirstOrDefault ();
+                       if (u == null)
+                       {
+                           await e.Channel.SendMessage ("Ungültiger Benutzer.").ConfigureAwait (false);
+                           return;
+                       }
+                       else if (u.Id == NadekoBot.Client.CurrentUser.Id)
+                       {
+                           await e.Channel.SendMessage ("Ich kann mir selber keine NAchricht schicken.")
+                           .ConfigureAwait (false);
+                           return;
+                       }
+
+                       var msg = e.GetArg ("msg");
+                       if (string.IsNullOrWhiteSpace (msg))
+                           return;
+
+                       await u.SendMessage ($"{e.User.Name} schreibt: {msg}");
+                   });
+
                 cgb.CreateCommand (Prefix + "announce")
                    .Description ($"Sends a message to all servers' general channel bot is connected to.**Owner Only!**\n**Benutzung**: {Prefix}announce Useless spam")
                    .Parameter ("msg",ParameterType.Unparsed)
@@ -1047,6 +1043,7 @@

                        await e.User.SendMessage (":ok:");
                    });
+
                 cgb.CreateCommand (Prefix + "whoplays")
                     .Description ("Zeigt eine Liste von Benutzern die ein gewähltes Spiel spielen.")
                     .Parameter ("game",ParameterType.Unparsed)


Fix to ignore CODEPOINT data postcodes with Positional Quality Indicator=90 (no coordinates)

--- OSCodePointDataImport/Importers/CodePointDataImporter.cs
+++ OSCodePointDataImport/Importers/CodePointDataImporter.cs
@@ -33,6 +33,8 @@
         private const string PostCodeColumnCode = "PC";
         private const string EastingColumnCode = "EA";
         private const string NorthingColumnCode = "NO";
+        private const string PositionalQualityIndicatorColumnsCode = "PQ";
+        private const int PositionalQualityIndicatesNoCoordinates = 90;

         /// <summary>
         /// Loads Code-Point CSV data files into a new table in SQL Server, converting the provided Eastings & Northings coordinates
@@ -63,6 +65,7 @@
             if (!columns.ContainsKey(PostCodeColumnCode)) throw new Exception("Could not find PostCode column in ColumnHeadersCsvFile");
             if (!columns.ContainsKey(EastingColumnCode)) throw new Exception("Could not find Easting column in ColumnHeadersCsvFile");
             if (!columns.ContainsKey(NorthingColumnCode)) throw new Exception("Could not find Northing column in ColumnHeadersCsvFile");
+            if (!columns.ContainsKey(PositionalQualityIndicatorColumnsCode)) throw new Exception("Could not find Positional Quality Indicator column in ColumnHeadersCsvFile");

             int result = 0;
             using (SqlConnection connection = new SqlConnection(String.Format("Data Source={0};Initial Catalog={1};Integrated Security=SSPI;", serverName, databaseName)))
@@ -168,18 +171,23 @@
             data.Columns.Add("InwardCode", typeof(string));
             data.Columns.Add("Longitude", typeof(double));
             data.Columns.Add("Latitude", typeof(double));
+
             long easting, northing;

             Console.WriteLine("Loading postcode data from files into memory...");
             string postCode;
             string outwardCode;
             string inwardCode;
+            int positionalQualityIndicator;
+
             DataRow row;
             PolarGeoCoordinate polarCoord;

             int eastingColumnIndex = columns[EastingColumnCode];
             int northingColumnIndex = columns[NorthingColumnCode];
             int postCodeColumnIndex = columns[PostCodeColumnCode];
+            int positionalQualityIndicatorColumnIndex = columns[PositionalQualityIndicatorColumnsCode];
+            int ignoredDueToNoCoordinates = 0;

             foreach (string fileName in Directory.GetFiles(directory, "*.csv"))
             {
@@ -189,12 +197,23 @@
                     while (stream.Peek() >= 0)
                     {
                         lineData = stream.ReadLine().Split(',');
+                        positionalQualityIndicator = int.Parse(lineData[positionalQualityIndicatorColumnIndex]);
+                        postCode = lineData[postCodeColumnIndex].Replace("\"", "");
+
+                        if (positionalQualityIndicator == PositionalQualityIndicatesNoCoordinates)
+                        {
+                            ignoredDueToNoCoordinates++;
+                            Console.WriteLine("Ignoring postcode due to no positional coordinates: " + postCode);
+                            continue;
+                        }
+
                         easting = long.Parse(lineData[eastingColumnIndex]);
                         northing = long.Parse(lineData[northingColumnIndex]);

-                        polarCoord = ConvertToLonLat(northing, easting);
+                        polarCoord = ConvertToLonLat(northing, easting);
                         row = data.NewRow();
-                        postCode = lineData[postCodeColumnIndex].Replace("\"", ""); // 1st column is the PostCode and is contained within double quotes (remove them).
+
+                            // 1st column is the PostCode and is contained within double quotes (remove them).
                         if (postCode.Contains(' '))
                         {
                             outwardCode = postCode.Substring(0, postCode.IndexOf(' '));
@@ -205,17 +224,17 @@
                             outwardCode = postCode.Substring(0, 4);
                             inwardCode = postCode.Substring(4, 3);
                         }
-
+
                         row["OutwardCode"] = outwardCode;
                         row["InwardCode"] = inwardCode;
                         row["Longitude"] = polarCoord.Lon;
                         row["Latitude"] = polarCoord.Lat;
-                        data.Rows.Add(row);
+                        data.Rows.Add(row);
                     }
                 }
             }

-            Console.WriteLine("Done! {0} rows of data prepared", data.Rows.Count.ToString());
+            Console.WriteLine("Done! {0} rows of data prepared ({1} postcodes ignored due to no coordinates)", data.Rows.Count.ToString(), ignoredDueToNoCoordinates.ToString());
             return data;
         }


Remove unused try/catch

Remove unused try/catch

--- PA.Utilities.InnoSetupTask/Microsoft/ProjectProcessor.cs
+++ PA.Utilities.InnoSetupTask/Microsoft/ProjectProcessor.cs
@@ -33,14 +33,10 @@
             this.Project.SetProperty("Configuration", config);
             this.Project.SetProperty("Platform", platform);

-            try
-            {
+
                 this.Project.ReevaluateIfNecessary();
-            }
-            catch (Exception e)
-            {
-
-            }
+
+
         }

         public ProjectProcessor(string path)
@@ -63,14 +59,9 @@
             this.Project.SetProperty("Configuration", config);
             this.Project.SetProperty("Platform", platform);

-            try
-            {
+
                 this.Project.ReevaluateIfNecessary();
-            }
-            catch (Exception e)
-            {
-
-            }
+
         }

         public void Init()
@@ -115,14 +106,21 @@
         {
 			l?.LogInfo("Fetch " + name + " property...");

+
+
 			foreach (var p in this.Project?.AllEvaluatedProperties)
 			{
-				l?.LogInfo(p.Name + " = " + p.EvaluatedValue);
+				l?.LogInfo("EP: "+ p.Name + " = " + p.EvaluatedValue);
 			}

-			foreach (var p in this.Project?.AllEvaluatedProperties)
+			foreach (var p in this.Project?.GlobalProperties)
 			{
-				l?.LogInfo(p.Name + " = " + p.EvaluatedValue);
+				l?.LogInfo("GP: "+p.Key + " = " + p.Value);
+			}
+
+			foreach (var p in this.Project?.ConditionedProperties)
+			{
+				l?.LogInfo("CP: " + p.Key + " = " + p.Value.Aggregate((a,b)=> a+";"+b));
 			}

 			var prop = this.Project?.AllEvaluatedProperties?.FirstOrDefault(p => p.Name.ToLower() == name.ToLower());


fixed testing of selfhosted for localhost


Pokemon.HatchEgg UnitTest

Pokemon.HatchEgg UnitTest


forgot to add LoadDatabaseTask and SaveDatabaseTask to the TaskTypeMapper

--- RelhaxModpack/RelhaxModpack/Automation/AutomationTask.cs
+++ RelhaxModpack/RelhaxModpack/Automation/AutomationTask.cs
@@ -31,7 +31,9 @@
             { DownloadStaticTask.TaskCommandName, typeof(DownloadStaticTask) },
             { DownloadHtmlTask.TaskCommandName, typeof(DownloadHtmlTask) },
             { DownloadBrowserTask.TaskCommandName, typeof(DownloadBrowserTask) },
-            { ShellExecuteTask.TaskCommandName, typeof(ShellExecuteTask) }
+            { ShellExecuteTask.TaskCommandName, typeof(ShellExecuteTask) },
+            { LoadDatabaseTask.TaskCommandName, typeof(LoadDatabaseTask) },
+            { SaveDatabaseTask.TaskCommandName, typeof(SaveDatabaseTask) },
         };

         public const string AttributeNameForMapping = "Command";


Fix compile error

Fix compile error

--- Runtime/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs
+++ Runtime/Microsoft.Dynamic/Debugging/DebugInfoRewriter.cs
@@ -250,7 +250,7 @@
                     node.Body,
                     newFinally != null ? newFinally : node.Finally,
                     node.Fault,
-                    newHandlers != null ? newHandlers : node.Handlers
+                    newHandlers != null ? (IEnumerable<CatchBlock>)newHandlers : node.Handlers
                 );
             }


Use string instead of String

Use string instead of String

--- Sendgrid.Webhooks/Converters/WebhookCategoryConverter.cs
+++ Sendgrid.Webhooks/Converters/WebhookCategoryConverter.cs
@@ -5,7 +5,7 @@

 namespace Sendgrid.Webhooks.Service
 {
-    public class WebhookCategoryConverter : GenericListCreationJsonConverter<String>
+    public class WebhookCategoryConverter : GenericListCreationJsonConverter<string>
     {
     }
-}+}


make exception serializable

make exception serializable

--- Sharpex.GameLibrary/Framework/Plugins/PluginException.cs
+++ Sharpex.GameLibrary/Framework/Plugins/PluginException.cs
@@ -2,9 +2,10 @@

 namespace SharpexGL.Framework.Plugins
 {
+    [Serializable]
     public class PluginException : Exception
     {
-        private string _message = "";
+        private readonly string _message = "";
         public override string Message
         {
             get


#116 - Added authentication to the request controller. Since the others are only getters they can stay public :D

--- SoraBot/SoraBot.WebApi/Controllers/RequestsController.cs
+++ SoraBot/SoraBot.WebApi/Controllers/RequestsController.cs
@@ -3,6 +3,7 @@
 using System.Threading.Tasks;
 using AutoMapper;
 using Discord;
+using Microsoft.AspNetCore.Authorization;
 using Microsoft.AspNetCore.Mvc;
 using SoraBot.Common.Extensions.Modules;
 using SoraBot.Data.Dtos;
@@ -15,6 +16,7 @@
 {
     [Route("api/[controller]")]
     [ApiController]
+    [Authorize]
     public class RequestsController : ControllerBase
     {
         private readonly IWaifuRequestRepository _waifuRequestRepo;


(GH-590) Fix page count.

(GH-590) Fix page count.

--- Source/ChocolateyGui/ViewModels/RemoteSourceViewModel.cs
+++ Source/ChocolateyGui/ViewModels/RemoteSourceViewModel.cs
@@ -234,7 +234,7 @@
                     var installed = await _chocolateyPackageService.GetInstalledPackages();
                     var outdated = await _chocolateyPackageService.GetOutdatedPackages();

-                    PageCount = (int)(((double)result.TotalCount / (double)PageSize) + 0.5);
+                    PageCount = (int)Math.Ceiling((double)result.TotalCount / (double)PageSize);
                     Packages.Clear();
                     result.Packages.ToList().ForEach(p =>
                     {


exposed two new compilation APIs

exposed two new compilation APIs

--- Source/LanguageServices/Compilation/CompilationEngine.cs
+++ Source/LanguageServices/Compilation/CompilationEngine.cs
@@ -105,7 +105,7 @@

         #endregion

-        #region private methods
+        #region constructor methods

         /// <summary>
         /// Constructor.
@@ -114,35 +114,6 @@
         private CompilationEngine(CompilationContext context)
         {
             this.CompilationContext = context;
-        }
-
-        /// <summary>
-        /// Compiles the given P# project.
-        /// </summary>
-        /// <param name="project">Project</param>
-        private void CompileProject(Project project)
-        {
-            var compilation = project.GetCompilationAsync().Result;
-
-            try
-            {
-                if (this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Library ||
-                    this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Testing ||
-                    this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Remote)
-                {
-                    this.ToFile(compilation, OutputKind.DynamicallyLinkedLibrary,
-                        project.OutputFilePath);
-                }
-                else
-                {
-                    this.ToFile(compilation, project.CompilationOptions.OutputKind,
-                        project.OutputFilePath);
-                }
-            }
-            catch (ApplicationException ex)
-            {
-                ErrorReporter.ReportAndExit(ex.Message);
-            }
         }

         #endregion
@@ -156,7 +127,7 @@
         /// <param name="outputKind">OutputKind</param>
         /// <param name="outputPath">OutputPath</param>
         /// <returns>Output</returns>
-        private string ToFile(CodeAnalysis.Compilation compilation, OutputKind outputKind, string outputPath)
+        public string ToFile(CodeAnalysis.Compilation compilation, OutputKind outputKind, string outputPath)
         {
             string assemblyFileName = null;
             if (outputKind == OutputKind.ConsoleApplication)
@@ -177,12 +148,12 @@
             {
                 outputDirectory = Path.GetDirectoryName(outputPath);
             }
-
-            this.OutputDirectoryMap.Add(compilation.AssemblyName, outputDirectory);
-
+
             string fileName = outputDirectory + Path.DirectorySeparatorChar + assemblyFileName;
             string pdbFileName = outputDirectory + Path.DirectorySeparatorChar + compilation.AssemblyName + ".pdb";
-            this.ProjectAssemblyPathMap.Add(compilation.AssemblyName, fileName);
+
+            this.OutputDirectoryMap?.Add(compilation.AssemblyName, outputDirectory);
+            this.ProjectAssemblyPathMap?.Add(compilation.AssemblyName, fileName);

             // Link external references.
             this.LinkExternalAssembliesToProject(compilation);
@@ -214,7 +185,7 @@
         /// <param name="compilation">Compilation</param>
         /// <param name="outputKind">OutputKind</param>
         /// <returns>Assembly</returns>
-        private Assembly ToAssembly(CodeAnalysis.Compilation compilation, OutputKind outputKind)
+        public Assembly ToAssembly(CodeAnalysis.Compilation compilation, OutputKind outputKind)
         {
             string assemblyFileName = null;
             if (outputKind == OutputKind.ConsoleApplication)
@@ -244,6 +215,39 @@

             var message = string.Join("\r\n", emitResult.Diagnostics);
             throw new ApplicationException(message);
+        }
+
+        #endregion
+
+        #region private methods
+
+        /// <summary>
+        /// Compiles the given P# project.
+        /// </summary>
+        /// <param name="project">Project</param>
+        private void CompileProject(Project project)
+        {
+            var compilation = project.GetCompilationAsync().Result;
+
+            try
+            {
+                if (this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Library ||
+                    this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Testing ||
+                    this.CompilationContext.ActiveCompilationTarget == CompilationTarget.Remote)
+                {
+                    this.ToFile(compilation, OutputKind.DynamicallyLinkedLibrary,
+                        project.OutputFilePath);
+                }
+                else
+                {
+                    this.ToFile(compilation, project.CompilationOptions.OutputKind,
+                        project.OutputFilePath);
+                }
+            }
+            catch (ApplicationException ex)
+            {
+                ErrorReporter.ReportAndExit(ex.Message);
+            }
         }

         #endregion


Synchrophasor: Fixed direct connected devices on the monitoring pages.

git-tfs-id: [https://tfs.codeplex.com/tfs/TFS07]$/openpdc/Synchrophasor/Current Version-VS2012;C84026

--- Source/Libraries/openPDC.UI/DataModels/RealTimeStream.cs
+++ Source/Libraries/openPDC.UI/DataModels/RealTimeStream.cs
@@ -214,6 +214,15 @@
                     "WHERE NodeID = {0} AND IsConcentrator = {1} AND Enabled = {2} ORDER BY Acronym", "nodeID", "isConcentrator", "enabled"), DefaultTimeout, database.CurrentNodeID(), database.Bool(true), database.Bool(true)).Copy());

                 resultSet.Tables[0].TableName = "PdcTable";
+
+                // Add a dummy device row in PDC table to associate PMUs which are not PDC and connected directly.
+                DataRow row = resultSet.Tables["PdcTable"].NewRow();
+                row["ID"] = 0;
+                row["Acronym"] = string.Empty;
+                row["Name"] = "Devices Connected Directly";
+                row["CompanyName"] = string.Empty;
+                row["Enabled"] = false;
+                resultSet.Tables["PdcTable"].Rows.Add(row);

                 // Get Non-PDC device list.
                 resultSet.Tables.Add(database.Connection.RetrieveData(database.AdapterType, database.ParameterizedQueryString("SELECT ID, Acronym, Name,CompanyName, ProtocolName, VendorDeviceName, " +
@@ -304,8 +313,8 @@
                         DeviceList = new ObservableCollection<RealTimeDevice>(
                             otherMeasurements.Rows
                             .Cast<DataRow>()
-                            .Where(row => row.ConvertNullableField<int>("DeviceID") == null)
-                            .Select(row => row.Field<string>("SignalReference"))
+                            .Where(measurement => measurement.ConvertNullableField<int>("DeviceID") == null)
+                            .Select(measurement => measurement.Field<string>("SignalReference"))
                             .Select(GetSourceName)
                             .Distinct()
                             .Select(source => new RealTimeDevice()
@@ -322,22 +331,22 @@
                                 MeasurementList = new ObservableCollection<RealTimeMeasurement>(
                                     otherMeasurements.Rows
                                     .Cast<DataRow>()
-                                    .Where(row => row.ConvertNullableField<int>("DeviceID") == null && row.Field<string>("SignalReference").StartsWith(source))
-                                    .Select(row => new RealTimeMeasurement()
+                                    .Where(measurement => measurement.ConvertNullableField<int>("DeviceID") == null && measurement.Field<string>("SignalReference").StartsWith(source))
+                                    .Select(measurement => new RealTimeMeasurement()
                                     {
-                                        ID = row.Field<string>("ID"),
-                                        DeviceID = row.ConvertNullableField<int>("DeviceID"),
-                                        SignalID = Guid.Parse(row.Field<object>("SignalID").ToString()),
-                                        PointID = row.ConvertField<int>("PointID"),
-                                        PointTag = row.Field<string>("PointTag"),
-                                        SignalReference = row.Field<string>("SignalReference"),
-                                        Description = row.Field<string>("description"),
-                                        SignalName = row.Field<string>("SignalName"),
-                                        SignalAcronym = row.Field<string>("SignalAcronym"),
-                                        EngineeringUnit = row.Field<string>("SignalAcronym") == "FLAG" ? "Hex" : row.Field<string>("EngineeringUnits"),
+                                        ID = measurement.Field<string>("ID"),
+                                        DeviceID = measurement.ConvertNullableField<int>("DeviceID"),
+                                        SignalID = Guid.Parse(measurement.Field<object>("SignalID").ToString()),
+                                        PointID = measurement.ConvertField<int>("PointID"),
+                                        PointTag = measurement.Field<string>("PointTag"),
+                                        SignalReference = measurement.Field<string>("SignalReference"),
+                                        Description = measurement.Field<string>("description"),
+                                        SignalName = measurement.Field<string>("SignalName"),
+                                        SignalAcronym = measurement.Field<string>("SignalAcronym"),
+                                        EngineeringUnit = measurement.Field<string>("SignalAcronym") == "FLAG" ? "Hex" : measurement.Field<string>("EngineeringUnits"),
                                         Expanded = false,
                                         Selected = false,
-                                        Selectable = row.Field<string>("SignalAcronym") == "IPHM" || row.Field<string>("SignalAcronym") == "IPHA" || row.Field<string>("SignalAcronym") == "VPHM" || row.Field<string>("SignalAcronym") == "VPHA" || row.Field<string>("SignalAcronym") == "FREQ",
+                                        Selectable = measurement.Field<string>("SignalAcronym") == "IPHM" || measurement.Field<string>("SignalAcronym") == "IPHA" || measurement.Field<string>("SignalAcronym") == "VPHM" || measurement.Field<string>("SignalAcronym") == "VPHA" || measurement.Field<string>("SignalAcronym") == "FREQ",
                                         TimeTag = "N/A",
                                         Value = "--",
                                         Quality = "N/A",
@@ -364,8 +373,8 @@
                         DeviceList = new ObservableCollection<RealTimeDevice>(
                             resultSet.Tables["MeasurementTable"].Rows
                             .Cast<DataRow>()
-                            .Where(row => row.ConvertNullableField<int>("DeviceID") == null)
-                            .Select(row => row.Field<string>("SignalReference"))
+                            .Where(measurement => measurement.ConvertNullableField<int>("DeviceID") == null)
+                            .Select(measurement => measurement.Field<string>("SignalReference"))
                             .Select(GetSourceName)
                             .Distinct()
                             .Select(source => new RealTimeDevice()
@@ -382,22 +391,22 @@
                                 MeasurementList = new ObservableCollection<RealTimeMeasurement>(
                                     resultSet.Tables["MeasurementTable"].Rows
                                     .Cast<DataRow>()
-                                    .Where(row => row.ConvertNullableField<int>("DeviceID") == null && row.Field<string>("SignalReference").StartsWith(source))
-                                    .Select(row => new RealTimeMeasurement()
+                                    .Where(measurement => measurement.ConvertNullableField<int>("DeviceID") == null && measurement.Field<string>("SignalReference").StartsWith(source))
+                                    .Select(measurement => new RealTimeMeasurement()
                                     {
-                                        ID = row.Field<string>("ID"),
-                                        DeviceID = row.ConvertNullableField<int>("DeviceID"),
-                                        SignalID = Guid.Parse(row.Field<object>("SignalID").ToString()),
-                                        PointID = row.ConvertField<int>("PointID"),
-                                        PointTag = row.Field<string>("PointTag"),
-                                        SignalReference = row.Field<string>("SignalReference"),
-                                        Description = row.Field<string>("description"),
-                                        SignalName = row.Field<string>("SignalName"),
-                                        SignalAcronym = row.Field<string>("SignalAcronym"),
-                                        EngineeringUnit = row.Field<string>("SignalAcronym") == "FLAG" ? "Hex" : row.Field<string>("EngineeringUnits"),
+                                        ID = measurement.Field<string>("ID"),
+                                        DeviceID = measurement.ConvertNullableField<int>("DeviceID"),
+                                        SignalID = Guid.Parse(measurement.Field<object>("SignalID").ToString()),
+                                        PointID = measurement.ConvertField<int>("PointID"),
+                                        PointTag = measurement.Field<string>("PointTag"),
+                                        SignalReference = measurement.Field<string>("SignalReference"),
+                                        Description = measurement.Field<string>("description"),
+                                        SignalName = measurement.Field<string>("SignalName"),
+                                        SignalAcronym = measurement.Field<string>("SignalAcronym"),
+                                        EngineeringUnit = measurement.Field<string>("SignalAcronym") == "FLAG" ? "Hex" : measurement.Field<string>("EngineeringUnits"),
                                         Expanded = false,
                                         Selected = false,
-                                        Selectable = row.Field<string>("SignalAcronym") == "IPHM" || row.Field<string>("SignalAcronym") == "IPHA" || row.Field<string>("SignalAcronym") == "VPHM" || row.Field<string>("SignalAcronym") == "VPHA" || row.Field<string>("SignalAcronym") == "FREQ",
+                                        Selectable = measurement.Field<string>("SignalAcronym") == "IPHM" || measurement.Field<string>("SignalAcronym") == "IPHA" || measurement.Field<string>("SignalAcronym") == "VPHM" || measurement.Field<string>("SignalAcronym") == "VPHA" || measurement.Field<string>("SignalAcronym") == "FREQ",
                                         TimeTag = "N/A",
                                         Value = "--",
                                         Quality = "N/A",


Binary class equality operators fix (#3812)

fix #3811

--- Source/LinqToDB/Compatibility/System/Data/Linq/Binary.cs
+++ Source/LinqToDB/Compatibility/System/Data/Linq/Binary.cs
@@ -43,7 +43,7 @@

 		public static bool operator ==(Binary? binary1, Binary? binary2)
 		{
-			if (binary1 is null && binary1 is null)
+			if (binary1 is null && binary2 is null)
 				return true;
 			if (binary1 is null || binary2 is null)
 				return false;
@@ -55,7 +55,7 @@

 		public static bool operator !=(Binary? binary1, Binary? binary2)
 		{
-			if (binary1 is null && binary1 is null)
+			if (binary1 is null && binary2 is null)
 				return false;
 			if (binary1 is null || binary2 is null)
 				return true;


Never write a zero-length message body

Never write a zero-length message body

--- src/Connection.cs
+++ src/Connection.cs
@@ -167,7 +167,7 @@
 			//Console.WriteLine ("headerLength: " + msg.HeaderData.Length);
 			//Console.WriteLine ();
 			ns.Write (msg.HeaderData, 0, msg.HeaderData.Length);
-			if (msg.Body != null) {
+			if (msg.Body != null && msg.Body.Length != 0) {
 				ns.Write (msg.Body, 0, msg.Body.Length);
 				//msg.Body.WriteTo (ns);
 			}


ISSUE: In Release mode (1.4.0.6) doesn't work single instance option FIX: declare mutex out of Main

--- SuperPutty/Program.cs
+++ SuperPutty/Program.cs
@@ -42,6 +42,10 @@

         private static bool EnforceSingleInstance = Convert.ToBoolean(
             ConfigurationManager.AppSettings["SuperPuTTY.SingleInstance"] ?? "False");
+
+        //ISSUE: In Release mode (1.4.0.6) doesn't work single instance option
+        //FIX: declare mutex out of Main
+        private static Mutex mutex;

         /// <summary>
         /// The main entry point for the application.
@@ -53,7 +57,7 @@
             log4net.Config.BasicConfigurator.Configure();

             bool onlyInstance = false;
-            Mutex mutex = new Mutex(true, "SuperPutty", out onlyInstance);
+            mutex = new Mutex(true, "SuperPutty", out onlyInstance);

             Log.InfoFormat(
                 "IsFirstRun={0}, SingleInstanceMode={1}, onlyInstance={2}",


Different mutex for putty release/debug.

This is so that I can have a release version while working on edits
for the debug version.

--- SuperPutty/Program.cs
+++ SuperPutty/Program.cs
@@ -47,7 +47,11 @@
         static void Main(string[] args)
         {
             bool onlyInstance = false;
+#if DEBUG
             Mutex mutex = new Mutex(true, "SuperPutty", out onlyInstance);
+#else
+            Mutex mutex = new Mutex(true, "SuperPuttyRelease", out onlyInstance);
+#endif
             if (!onlyInstance)
             {
                 string strArgs = "";


correction in doc

correction in doc

--- Terradue.Tep/Terradue/Tep/Controller/Data/DataPackage.cs
+++ Terradue.Tep/Terradue/Tep/Controller/Data/DataPackage.cs
@@ -47,7 +47,7 @@

 When a dataset is processed with a remote processing (e.g. WPS), the results of this data may be located in a place where there is no other function than downloading the data
 directly on its local machine to visualize or analyze it.
-This component enables export capability to *GeoServer* with support to raster and vector files. If the results include standard vector files (e.g. shapefile, geojson, csv with WKT, ...) or raster files such as geolocated images (geotiff, png with world files...),
+This component enables export capability to GeoServer with support to raster and vector files. If the results include standard vector files (e.g. shapefile, geojson, csv with WKT, ...) or raster files such as geolocated images (geotiff, png with world files...),
 the \refTepData components shall propose to the user to export them to geoserver that will resturn a new WMS layer that the web visualization widget shall display.
 It also integrates functions to "manipulate" the results and its metadata with an external tools such as GIS functions.


Added Clear function for clearing the queues

--- TrackerAsset/TrackerAsset.cs
+++ TrackerAsset/TrackerAsset.cs
@@ -687,9 +687,6 @@
         /// </summary>
         public void Start()
         {
-            queue.Clear();
-            extensions.Clear();
-
             switch (settings.StorageType)
             {
                 case StorageTypes.net:
@@ -781,6 +778,15 @@
                     }
                     break;
             }
+        }
+
+        /// <summary>
+		/// Clears the unflushed Trace queue and the unappended extensions queue
+		/// </summary>
+        public void Clear()
+        {
+            queue.Clear();
+            extensions.Clear();
         }

         /// <summary>


A minor change to TestVersionMessage.

A minor change to TestVersionMessage.

--- Test.BitcoinUtilities/P2P/Messages/TestVersionMessage.cs
+++ Test.BitcoinUtilities/P2P/Messages/TestVersionMessage.cs
@@ -27,8 +27,8 @@
                 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
                 // Node ID
                 0x3B, 0x2E, 0xB3, 0x5D, 0x8C, 0xE6, 0x17, 0x65,
-                // "/Satoshi:0.7.2/" sub-version string (string is 15 bytes long)
-                0x0F, 0x2F, 0x53, 0x61, 0x74, 0x6F, 0x73, 0x68, 0x69, 0x3A, 0x30, 0x2E, 0x37, 0x2E, 0x32, 0x2F,
+                // "/Satoshi:0.9.0/" sub-version string (string is 15 bytes long)
+                0x0F, 0x2F, 0x53, 0x61, 0x74, 0x6F, 0x73, 0x68, 0x69, 0x3A, 0x30, 0x2E, 0x39, 0x2E, 0x30, 0x2F,
                 // Last block sending node has is block #212672
                 0xC0, 0x3E, 0x03, 0x00,
                 // relay=true
@@ -44,7 +44,7 @@
             }

             Assert.That(message.ProtocolVersion, Is.EqualTo(70002));
-            Assert.That(message.UserAgent, Is.EqualTo("/Satoshi:0.7.2/"));
+            Assert.That(message.UserAgent, Is.EqualTo("/Satoshi:0.9.0/"));
             Assert.That(message.Services, Is.EqualTo(1));
             Assert.That(message.StartHeight, Is.EqualTo(212672));
             Assert.That(message.AcceptBroadcasts, Is.True);


add filter region tag

add filter region tag

--- bigtable/api/HelloWorld/HelloWorld.cs
+++ bigtable/api/HelloWorld/HelloWorld.cs
@@ -166,6 +166,10 @@
                     Mutations.SetCell(columnFamily, columnName, s_greetings[s_greetingIndex], new BigtableVersion(DateTime.UtcNow));
                 //[END writing_rows]

+                // [START creating_a_filter]
+                RowFilter filter = RowFilters.CellsPerRowLimit(1);
+                // [END creating_a_filter]
+
                 // [START getting_a_row]
                 // Read from the table.
                 Console.WriteLine("Read the first row");
@@ -174,7 +178,7 @@

                 // Read a specific row. Apply filter to return latest only cell value accross entire row.
                 Row rowRead = bigtableClient.ReadRow(
-                    tableName, rowKey: rowKeyPrefix + rowIndex, filter: RowFilters.CellsPerRowLimit(1));
+                    tableName, rowKey: rowKeyPrefix + rowIndex, filter: filter);
                 Console.WriteLine(
                     $"\tRow key: {rowRead.Key.ToStringUtf8()} " +
                     $"  -- Value: {rowRead.Families[0].Columns[0].Cells[0].Value.ToStringUtf8(),-16} " +
@@ -184,7 +188,7 @@
                 // [START scanning_all_rows]
                 Console.WriteLine("Read all rows using streaming");
                 // stream the content of the whole table. Apply filter to return latest only cell values accross all rows.
-                ReadRowsStream responseRead = bigtableClient.ReadRows(tableName, filter: RowFilters.CellsPerRowLimit(1));
+                ReadRowsStream responseRead = bigtableClient.ReadRows(tableName, filter: filter);

                 Task printRead = PrintReadRowsAsync();
                 printRead.Wait();


Hide Guid prop on SalesTaxRate

Hide Guid prop on SalesTaxRate

--- Test/AdventureWorksFunctionalModel/Sales/SalesTaxRate.cs
+++ Test/AdventureWorksFunctionalModel/Sales/SalesTaxRate.cs
@@ -28,6 +28,7 @@
         [Versioned]
         public virtual DateTime ModifiedDate { get; init; }

+        [Hidden]
         public virtual Guid rowguid { get; init; }

         public override string ToString() => $"{TaxRate}";


Revise AddToQueueFromLibraryButtonAddsItemsToQueue test

--- Tests/MatterControl.AutomationTests/LocalLibraryTests.cs
+++ Tests/MatterControl.AutomationTests/LocalLibraryTests.cs
@@ -270,8 +270,8 @@
 				Assert.IsTrue(testRunner.WaitForName("Row Item Batman", 6), "Batman part should exist after add");
 				Assert.IsTrue(testRunner.WaitForName("Row Item Fennec Fox", 2), "Fennec part should exist after add");

+				// Select both items
 				testRunner.ClickByName("Row Item Fennec Fox", 1);
-
 				Keyboard.SetKeyDownState(Keys.ControlKey, down: true);
 				testRunner.ClickByName("Row Item Batman", 1);
 				Keyboard.SetKeyDownState(Keys.ControlKey, down: false);
@@ -318,11 +318,11 @@
 				// Make sure that the Queue Count increases by one
 				Assert.AreEqual(expectedCount, QueueData.Instance.ItemCount, "Queue item count should increase by one after add");

-				// Navigate to Queue
+				// Navigate to the PrintQueueContainer
 				testRunner.ClickByName("Bread Crumb Button Home");
 				testRunner.NavigateToFolder("Print Queue Row Item Collection");

-				// Make sure that the Print Item was added
+				// Make sure that the item exists in the PrintQueueContainer
 				Assert.IsTrue(testRunner.WaitForName("Row Item Rook", 5), "Rook item should exist in the Queue after Add");

 				return Task.FromResult(0);
@@ -332,63 +332,53 @@
 		[Test]
 		public async Task AddToQueueFromLibraryButtonAddsItemsToQueue()
 		{
-			AutomationTest testToRun = (testRunner) =>
-			{
-				testRunner.CloseSignInAndPrinterSelect();
-
-				//Navigate to Local Library
-				testRunner.ClickByName("Library Tab");
-				testRunner.NavigateToFolder("Local Library Row Item Collection");
-
-				//Add an item to the library
-				string libraryItemToAdd = MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl");
-				testRunner.ClickByName("Library Add Button");
-
-				testRunner.Delay(2);
-				testRunner.Type(libraryItemToAdd);
-				testRunner.Delay(2);
-				testRunner.Type("{Enter}");
-
-				testRunner.Delay(1);
-				testRunner.ClickByName("Library Edit Button");
-				testRunner.Delay(1);
-
-				int queueCountBeforeAdd = QueueData.Instance.ItemCount;
-
-				//Select both Library Items
-				string rowItemOne = "Row Item Calibration - Box";
-				testRunner.ClickByName(rowItemOne);
-
-				string rowItemTwo = "Row Item Fennec Fox";
-				testRunner.ClickByName(rowItemTwo);
-
-				//Click the Add To Queue button
+			await MatterControlUtilities.RunTest((testRunner) =>
+			{
+				int expectedCount = QueueData.Instance.ItemCount + 2;
+
+				testRunner.CloseSignInAndPrinterSelect();
+
+				// Navigate to Local Library
+				testRunner.ClickByName("Library Tab");
+				testRunner.NavigateToFolder("Local Library Row Item Collection");
+
+				// Add an item to the library
+				testRunner.ClickByName("Library Add Button");
+				testRunner.Delay(2);
+
+				// Type file paths for each file into File Open dialog
+				testRunner.Type(string.Format("\"{0}\" \"{1}\"",
+					MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl"),
+					MatterControlUtilities.GetTestItemPath("Batman.stl")));
+
+				testRunner.Type("{Enter}");
+
+				// Select both items
+				testRunner.ClickByName("Row Item Fennec Fox", 5);
+				Keyboard.SetKeyDownState(Keys.ControlKey, down: true);
+				testRunner.ClickByName("Row Item Batman", 1);
+				Keyboard.SetKeyDownState(Keys.ControlKey, down: false);
+
+				// Click the Add To Queue button
 				testRunner.Delay(1);
 				MatterControlUtilities.LibraryAddSelectionToQueue(testRunner);
-				testRunner.Delay(2);
-
-				//Make sure Queue Count increases by the correct amount
-				int queueCountAfterAdd = QueueData.Instance.ItemCount;
-
-				Assert.IsTrue(queueCountAfterAdd == queueCountBeforeAdd + 2);
-
-				//Navigate to the Print Queue
-				testRunner.ClickByName("Queue Tab");
-				testRunner.Delay(1);
-
-				//Test that both added print items exist
-				string queueItemOne = "Queue Item Calibration - Box";
-				string queueItemTwo = "Queue Item Fennec_Fox";
-				bool queueItemOneWasAdded = testRunner.WaitForName(queueItemOne, 2);
-				bool queueItemTwoWasAdded = testRunner.WaitForName(queueItemTwo, 2);
-
-				Assert.IsTrue(queueItemOneWasAdded == true);
-				Assert.IsTrue(queueItemTwoWasAdded == true);
+
+				// TODO: Somehow thumbnail generation is happening on the UI thread and bogging this down. Leave at 15 second for a short-term workaround
+				testRunner.Delay(() => QueueData.Instance.ItemCount == expectedCount, 15, 500);
+
+				// Make sure Queue Count increases by the correct amount
+				Assert.AreEqual(expectedCount, QueueData.Instance.ItemCount);
+
+				// Navigate to the PrintQueueContainer
+				testRunner.ClickByName("Bread Crumb Button Home");
+				testRunner.NavigateToFolder("Print Queue Row Item Collection");
+
+				// Make sure that the items exist in the PrintQueueContainer
+				Assert.IsTrue(testRunner.WaitForName("Row Item Fennec Fox", 5), "Fennec item should exist in the Queue after Add");
+				Assert.IsTrue(testRunner.WaitForName("Row Item Batman", 5), "Batman item should exist in the Queue after Add");

 				return Task.FromResult(0);
-			};
-
-			await MatterControlUtilities.RunTest(testToRun);
+			});
 		}

 		[Test]


add WebGLPlayer to GetStreamingAssetsPath()

--- Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
+++ Unity/ABFetcher/AssetBundleManager/AssetBundleManager.cs
@@ -176,7 +176,8 @@
 			*/
 			else if (Application.platform == RuntimePlatform.IPhonePlayer )
 				return "file://" + Application.streamingAssetsPath;
-
+			else if (Application.platform == RuntimePlatform.WebGLPlayer )
+				return Application.streamingAssetsPath;
 			else if (Application.isMobilePlatform || Application.isConsolePlatform)
 				return Application.streamingAssetsPath;
 			else // For standalone player.


Update PlayerList.Admin.cs

Update PlayerList.Admin.cs

--- UnityProject/Assets/Scripts/Managers/PlayerList.Admin.cs
+++ UnityProject/Assets/Scripts/Managers/PlayerList.Admin.cs
@@ -247,12 +247,38 @@
 		}

 		//whitelist checking:
-		//Checks whether the userid is in either the Admins or whitelist or is server AND that the whitelist file has something in it.
+
+
+		var lines = File.ReadAllLines(whiteListPath);
+
+		Logger.Log($"{lines.Length > 0} and {CustomNetworkManager.Instance._isServer == false} and {!adminUsers.Contains(userid)} and {!whiteListUsers.Contains(userid)}");
+
+		//Adds server to admin list if not already in it.
+
+		//if (CustomNetworkManager.Instance._isServer == true && !adminUsers.Contains(userid))
+		//{
+		//	File.AppendAllLines(adminsPath, new string[]
+		//	{
+		//	"\r\n" + userid
+		//	});
+
+		//	adminUsers.Add(userid);
+		//	var user = GetByUserID(userid);
+
+		//	if (user == null) return false;
+
+		//	var newToken = System.Guid.NewGuid().ToString();
+		//	if (!loggedInAdmins.ContainsKey(userid))
+		//	{
+		//		loggedInAdmins.Add(userid, newToken);
+		//		AdminEnableMessage.Send(user.Connection, newToken);
+		//	}
+		//}
+
+		//Checks whether the userid is in either the Admins or whitelist AND that the whitelist file has something in it.
 		//Whitelist only activates if whitelist is populated.

-		var lines = File.ReadAllLines(whiteListPath);
-
-		if ((!whiteListUsers.Contains(userid) | !adminUsers.Contains(userid)) && CustomNetworkManager.Instance._isServer == false && lines.Length > 0)
+		if (lines.Length > 0 && !adminUsers.Contains(userid) && !whiteListUsers.Contains(userid) )
 		{
 			StartCoroutine(KickPlayer(playerConn, $"Server Error: This account is not whitelisted."));


Improved even more

Improved even more

--- UnityProject/Assets/Scripts/Objects/WallmountBehavior.cs
+++ UnityProject/Assets/Scripts/Objects/WallmountBehavior.cs
@@ -44,7 +44,7 @@
 	void OnDrawGizmos ()
 	{
 		Gizmos.color = Color.green;
-		GizmoUtils.DrawArrow(transform.position,(Vector3.zero - transform.up) );
+		GizmoUtils.DrawArrow(transform.position, - transform.up);
 	}

 	/// <summary>


Fixed MissingRef exception for UI_ItemImage


MaxDepth doesn't set PreserveReferences

MaxDepth doesn't set PreserveReferences

--- src/AutoMapper/AutoMapAttribute.cs
+++ src/AutoMapper/AutoMapAttribute.cs
@@ -22,7 +22,6 @@

         /// <summary>
         /// For self-referential types, limit recurse depth.
-        /// Enables PreserveReferences.
         /// </summary>
         public int MaxDepth { get; set; }

@@ -84,4 +83,4 @@
             }
         }
     }
-}+}


Add another particle layout case I've seen

The triangulation seems to have been reversed on this fbx; unclear
whether some other tool broke the fbx, but it's easy enough to support.

Change-Id: Id000b015155f569cb16a4d9cbbf78d2432bfab3d

--- UnitySDK/Assets/TiltBrush/Scripts/Editor/ParticleMesh.cs
+++ UnitySDK/Assets/TiltBrush/Scripts/Editor/ParticleMesh.cs
@@ -132,6 +132,12 @@
         (m_triangles[i  ] == v   &&
          m_triangles[i+1] == v+1 &&
          m_triangles[i+2] == v+2 &&
+         m_triangles[i+3] == v+0 &&
+         m_triangles[i+4] == v+2 &&
+         m_triangles[i+5] == v+3) ||
+        (m_triangles[i  ] == v   &&
+         m_triangles[i+1] == v+3 &&
+         m_triangles[i+2] == v+1 &&
          m_triangles[i+3] == v+0 &&
          m_triangles[i+4] == v+2 &&
          m_triangles[i+5] == v+3)) {


Add entity i/o output in dump

Add entity i/o output in dump

--- ValveResourceFormat/Resource/ResourceTypes/EntityLump.cs
+++ ValveResourceFormat/Resource/ResourceTypes/EntityLump.cs
@@ -14,6 +14,7 @@
         public class Entity
         {
             public Dictionary<uint, EntityProperty> Properties { get; } = new Dictionary<uint, EntityProperty>();
+            public List<IKeyValueCollection> Connections { get; internal set; }

             public T GetProperty<T>(string name)
                 => GetProperty<T>(EntityLumpKeyLookup.Get(name));
@@ -58,10 +59,10 @@

         public IEnumerable<Entity> GetEntities()
             => Data.GetArray("m_entityKeyValues")
-                .Select(entity => ParseEntityProperties(entity.GetArray<byte>("m_keyValuesData")))
+                .Select(entity => ParseEntityProperties(entity.GetArray<byte>("m_keyValuesData"), entity.GetArray("m_connections")))
                 .ToList();

-        private static Entity ParseEntityProperties(byte[] bytes)
+        private static Entity ParseEntityProperties(byte[] bytes, IKeyValueCollection[] connections)
         {
             using (var dataStream = new MemoryStream(bytes))
             using (var dataReader = new BinaryReader(dataStream))
@@ -135,7 +136,20 @@
                     ReadTypedValue(keyHash, keyName);
                 }

+                if (connections.Length > 0)
+                {
+                    entity.Connections = connections.ToList();
+                }
+
                 return entity;
+            }
+        }
+
+        private static void AddConnections(Entity entity, IKeyValueCollection[] connections)
+        {
+            foreach (var connection in connections)
+            {
+                Console.WriteLine();
             }
         }

@@ -199,6 +213,48 @@
                     builder.AppendLine($"{key,-30} {types[property.Value.Type],-10} {value}");
                 }

+                if (entity.Connections != null)
+                {
+                    foreach (var connection in entity.Connections)
+                    {
+                        builder.Append('@');
+                        builder.Append(connection.GetProperty<string>("m_outputName"));
+                        builder.Append(' ');
+
+                        var delay = connection.GetFloatProperty("m_flDelay");
+
+                        if (delay > 0)
+                        {
+                            builder.Append($"Delay={delay} ");
+                        }
+
+                        var timesToFire = connection.GetInt32Property("m_nTimesToFire");
+
+                        if (timesToFire == 1)
+                        {
+                            builder.Append("OnlyOnce ");
+                        }
+                        else if (timesToFire != -1)
+                        {
+                            throw new UnexpectedMagicException("Unexpected times to fire", timesToFire, nameof(timesToFire));
+                        }
+
+                        builder.Append(connection.GetProperty<string>("m_inputName"));
+                        builder.Append(' ');
+                        builder.Append(connection.GetProperty<string>("m_targetName"));
+
+                        var param = connection.GetProperty<string>("m_overrideParam");
+
+                        if (!string.IsNullOrEmpty(param) && param != "(null)")
+                        {
+                            builder.Append(' ');
+                            builder.Append(param);
+                        }
+
+                        builder.AppendLine();
+                    }
+                }
+
                 builder.AppendLine();
             }


Remove unused usings.

Remove unused usings.

--- WundergroundClient/Autocomplete/RawAutocompleteResult.cs
+++ WundergroundClient/Autocomplete/RawAutocompleteResult.cs
@@ -1,8 +1,5 @@
 using System;
-using System.Collections.Generic;
-using System.Linq;
 using System.Runtime.Serialization;
-using System.Text;

 namespace WundergroundClient.Autocomplete
 {


add BindingHelper.GetDependencyProperties()

--- src/Caliburn.Xaml/BindingHelper.cs
+++ src/Caliburn.Xaml/BindingHelper.cs
@@ -1,4 +1,7 @@
-#if NETFX_CORE
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+#if NETFX_CORE
 using Windows.UI.Xaml;
 using Windows.UI.Xaml.Data;
 #else
@@ -67,5 +70,36 @@
             bindingExpressionBase.UpdateTarget();
 #endif
         }
+
+        private static readonly Dictionary<Type, List<DependencyProperty>> DependencyPropertyCache =
+            new Dictionary<Type, List<DependencyProperty>>();
+
+        /// <summary>
+        /// Gets the dependency properties from <paramref name="type"/>.
+        /// </summary>
+        /// <param name="type">The type to inspect.</param>
+        /// <returns>The dependency properties.</returns>
+        public static IEnumerable<DependencyProperty> GetDependencyProperties(Type type)
+        {
+            List<DependencyProperty> properties;
+            if (!DependencyPropertyCache.TryGetValue(type, out properties))
+            {
+                properties = new List<DependencyProperty>();
+                for (; type != null && type != typeof (DependencyObject); type = type.GetTypeInfo().BaseType)
+                {
+                    foreach (var fieldInfo in type.GetRuntimeFields())
+                    {
+                        if (fieldInfo.IsPublic && fieldInfo.FieldType == typeof (DependencyProperty))
+                        {
+                            var dependencyProperty = fieldInfo.GetValue(null) as DependencyProperty;
+                            if (dependencyProperty != null)
+                                properties.Add(dependencyProperty);
+                        }
+                    }
+                }
+                DependencyPropertyCache[type] = properties;
+            }
+            return properties;
+        }
     }
 }


Updated wanderer to have custom speed

Updated wanderer to have custom speed

--- black_friday/Assets/Scripts/Wander.cs
+++ black_friday/Assets/Scripts/Wander.cs
@@ -21,6 +21,8 @@

     public float rayDistance = 1.0f;
     public float sideRayDistance = 0.75f;
+
+    public float wanderSpeed = 10.0f;
     void Start()
     {
         directionValues[Direction.NORTH] = Vector3.forward;
@@ -111,7 +113,7 @@
                 break;
         }

-
+        steeringForce *= wanderSpeed;
         Debug.DrawRay(this.transform.position, this.rigidbody.velocity.normalized * rayDistance, Color.red);

         Debug.DrawRay(this.transform.position, Vector3.Project(this.rigidbody.velocity, new Vector3(rayDistance, 0, 0)).normalized * sideRayDistance, Color.green);


Conditional compilation fix

Conditional compilation fix

--- TestRunner/Program.cs
+++ TestRunner/Program.cs
@@ -306,7 +306,7 @@
             // Empty
         }

-#if GREATERTHAN_NETCOREAPP11 || NETSTANDARD2_0 || TARGETS_NET
+#if GREATERTHAN_NETCOREAPP11 || GREATERTHAN_NETSTANDARD16 || TARGETS_NET

         private AssertionFailedException(global::System.Runtime.Serialization.SerializationInfo serializationInfo, global::System.Runtime.Serialization.StreamingContext streamingContext)
             : base(serializationInfo, streamingContext)


Fix Hue might get negative

Fix Hue might get negative

In some rare cases Hue might get negative. The resulting Color is still correct, but we should nevertheless avoid this due to the defined Range from 0 to 360


Revert change to make and make DefaultTargetFrameworkVersion public.

--HG--
extra : rebase_source : 082d5f16f64530e1286ccaf14eafe384427c7444

--- src/Core/Utility/VersionUtility.cs
+++ src/Core/Utility/VersionUtility.cs
@@ -42,7 +42,7 @@
             { "CompactFramework", "cf" }
         };

-        private static Version DefaultTargetFrameworkVersion {
+        public static Version DefaultTargetFrameworkVersion {
             get {
                 // We need to parse the version name out from the mscorlib's assembly name since
                 // we can't call GetName() in medium trust


Update App.xaml.cs

Update App.xaml.cs

--- src/Core2D.UI.Avalonia/App.xaml.cs
+++ src/Core2D.UI.Avalonia/App.xaml.cs
@@ -159,6 +159,7 @@
                 var renderingSubsystemName = AvaloniaLocator.Current.GetService<IPlatformRenderInterface>().GetType().Name;
                 var aboutInfo = CreateAboutInfo(runtimeInfo, windowingSubsystemName, renderingSubsystemName);
                 editor.AboutInfo = aboutInfo;
+
                 var mainWindow = serviceProvider.GetService<Windows.MainWindow>();

                 mainWindow.DataContext = editor;


UI_DATE_FORMAT is now configurable.

UI_DATE_FORMAT is now configurable.

--- src/DynamicRepository/DataPager.cs
+++ src/DynamicRepository/DataPager.cs
@@ -22,9 +22,29 @@
     public class DataPager<Key, Entity> where Entity : class, new()
     {
         /// <summary>
-        /// TODO: Change this to be a plugin setting.
-        /// </summary>
-        private const string DATE_FORMAT = "dd/MM/yyyy";
+        /// This is the date time format that will be sent to the pager on datetime filters.
+        /// If your UI has a different date formatt, you can override this by this class constructor.
+        /// </summary>
+        private string UI_DATE_FORMAT = "dd/MM/yyyy";
+
+        /// <summary>
+        /// Default class construcotr.
+        /// </summary>
+        public DataPager()
+        {
+        }
+
+        /// <summary>
+        /// Class constructor.
+        /// </summary>
+        /// <param name="dateFormat">
+        /// Set a DateTime mask format (Same as .NET patterns) to be used when filtering datetime properties.
+        /// This identifies how the value will come by your API, MVC Controller, etc.
+        /// </param>
+        public DataPager(string dateFormat)
+        {
+            this.UI_DATE_FORMAT = dateFormat;
+        }

         /// <summary>
         /// Returns a collection of data results that can be paged.
@@ -108,7 +128,7 @@
                             {
                                 // Applies filter do DateTime properties
                                 DateTime castedDateTime;
-                                if (DateTime.TryParseExact(pFilter.Value, DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
+                                if (DateTime.TryParseExact(pFilter.Value, UI_DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
                                 {
                                     // Successfully casted the value to a datetime.
                                     queryLinq += (firstExecution ? string.Empty : " " + pFilter.Conjunction + " ") + "DbFunctions.TruncateTime(" + pFilter.Property + nullableValueOperator + ") == @" + paramValues.Count;
@@ -141,7 +161,7 @@
                             if (propInfo.PropertyType.IsAssignableFrom(typeof(DateTime)))
                             {
                                 DateTime castedDateTime;
-                                if (DateTime.TryParseExact(pFilter.Value, DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
+                                if (DateTime.TryParseExact(pFilter.Value, UI_DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
                                 {
                                     // Successfully casted the value to a datetime.
                                     queryLinq += (firstExecution ? string.Empty : " " + pFilter.Conjunction + " ") + navigationPropertyCollection + ".Where(DbFunctions.TruncateTime(" + pFilter.Property.Remove(0, navigationPropertyCollection.Length + 1) + nullableValueOperator + ") == @" + paramValues.Count + ").Count() > 0";
@@ -363,7 +383,7 @@
                                     {
                                         // Applies filter do DateTime properties
                                         DateTime castedDateTime;
-                                        if (DateTime.TryParseExact(pFilter.Value, DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
+                                        if (DateTime.TryParseExact(pFilter.Value, UI_DATE_FORMAT, CultureInfo.InvariantCulture, DateTimeStyles.None, out castedDateTime))
                                         {
                                             // Successfully casted the value to a datetime.
                                             queryLinq += (!piped ? string.Empty : " OR ") + pipeProperty + nullableValueOperator + ".Date == @" + paramValues.Count;


claim type typo

claim type typo

--- source/AspNetIdentityUserService/AspNetIdentityUserService.cs
+++ source/AspNetIdentityUserService/AspNetIdentityUserService.cs
@@ -145,7 +145,7 @@
             {
                 var roleClaims =
                     from role in await userManager.GetRolesAsync(user.Id)
-                    select new Claim(ClaimTypes.Role, role);
+                    select new Claim(Thinktecture.IdentityServer.Core.Constants.ClaimTypes.Role, role);
                 claims.AddRange(roleClaims);
             }


Refactor all renaming pass declaration checking into IsRenameableDecl.

--- src/Generator/Passes/RenamePass.cs
+++ src/Generator/Passes/RenamePass.cs
@@ -74,29 +74,59 @@

         public bool IsRenameableDecl(Declaration decl)
         {
-            if (decl is Class) return true;
+            if (decl is Class)
+                return true;
+
+            var method = decl as Method;
+            if (method != null)
+            {
+                return Targets.HasFlag(RenameTargets.Method) &&
+                    method.Kind == CXXMethodKind.Normal;
+            }
+
             var function = decl as Function;
             if (function != null)
             {
-                // special case the IDisposable.Dispose that could be added later
-                return !function.IsOperator && function.Name != "dispose";
-            }
-            if (decl is Parameter) return true;
-            if (decl is Enumeration) return true;
+                // Special case the IDisposable.Dispose method.
+                return Targets.HasFlag(RenameTargets.Function) &&
+                    (!function.IsOperator && function.Name != "dispose");
+            }
+
+            if (decl is Parameter)
+                return Targets.HasFlag(RenameTargets.Parameter);
+
+            if (decl is Enumeration.Item)
+                return Targets.HasFlag(RenameTargets.EnumItem);
+
+            if (decl is Enumeration)
+                return Targets.HasFlag(RenameTargets.Enum);
+
             var property = decl as Property;
-            if (property != null) return !property.IsIndexer;
-            if (decl is Event) return true;
-            if (decl is TypedefDecl) return true;
+            if (property != null)
+                return Targets.HasFlag(RenameTargets.Property) && !property.IsIndexer;
+
+            if (decl is Event)
+                return Targets.HasFlag(RenameTargets.Event);
+
+            if (decl is TypedefDecl)
+                return Targets.HasFlag(RenameTargets.Delegate);
+
             if (decl is Namespace && !(decl is TranslationUnit)) return true;
-            if (decl is Variable) return true;
+
+            if (decl is Variable)
+                return Targets.HasFlag(RenameTargets.Variable);
+
             var field = decl as Field;
             if (field != null)
             {
+                if (!Targets.HasFlag(RenameTargets.Field))
+                    return false;
                 var fieldProperty = ((Class) field.Namespace).Properties.FirstOrDefault(
                     p => p.Field == field);
                 return (fieldProperty != null &&
                     fieldProperty.IsInRefTypeAndBackedByValueClassField());
             }
+
             return false;
         }

@@ -119,6 +149,7 @@
             string newName;
             if (Rename(decl, out newName) && !AreThereConflicts(decl, newName))
                 decl.Name = newName;
+
             return true;
         }

@@ -128,6 +159,7 @@
             declarations.AddRange(decl.Namespace.Classes.Where(c => !c.IsIncomplete));
             declarations.AddRange(decl.Namespace.Enums);
             declarations.AddRange(decl.Namespace.Events);
+
             var function = decl as Function;
             if (function != null && function.SynthKind != FunctionSynthKind.AdjustedMethod)
             {
@@ -137,11 +169,13 @@
             }
             else
                 declarations.AddRange(decl.Namespace.Functions);
+
             declarations.AddRange(decl.Namespace.Variables);
             declarations.AddRange(from typedefDecl in decl.Namespace.Typedefs
                                   let pointerType = typedefDecl.Type.Desugar() as PointerType
                                   where pointerType != null && pointerType.GetFinalPointee() is FunctionType
                                   select typedefDecl);
+
             var specialization = decl as ClassTemplateSpecialization;
             if (specialization != null)
                 declarations.RemoveAll(d => specialization.TemplatedDecl.TemplatedDecl == d);
@@ -177,21 +211,6 @@
                 f => !f.Ignore && f.Parameters.SequenceEqual(function.Parameters, new ParameterComparer()));
         }

-        public override bool VisitEnumItemDecl(Enumeration.Item item)
-        {
-            if (!Targets.HasFlag(RenameTargets.EnumItem))
-                return false;
-
-            string newName;
-            if (Rename(item, out newName))
-            {
-                item.Name = newName;
-                return true;
-            }
-
-            return true;
-        }
-
         public override bool VisitClassDecl(Class @class)
         {
             var result = base.VisitClassDecl(@class);
@@ -203,73 +222,6 @@
                 VisitMethodDecl(method);

             return result;
-        }
-
-        public override bool VisitFieldDecl(Field field)
-        {
-            if (!Targets.HasFlag(RenameTargets.Field))
-                return false;
-
-            return base.VisitFieldDecl(field);
-        }
-
-        public override bool VisitProperty(Property property)
-        {
-            if (!Targets.HasFlag(RenameTargets.Property))
-                return false;
-
-            return base.VisitProperty(property);
-        }
-
-        public override bool VisitTypedefDecl(TypedefDecl typedef)
-        {
-            if (!Targets.HasFlag(RenameTargets.Delegate))
-                return false;
-
-            return base.VisitTypedefDecl(typedef);
-        }
-
-        public override bool VisitMethodDecl(Method method)
-        {
-            if (!Targets.HasFlag(RenameTargets.Method))
-                return false;
-
-            if (method.Kind != CXXMethodKind.Normal)
-                return false;
-
-            return base.VisitMethodDecl(method);
-        }
-
-        public override bool VisitFunctionDecl(Function function)
-        {
-            if (!Targets.HasFlag(RenameTargets.Function))
-                return false;
-
-            return base.VisitFunctionDecl(function);
-        }
-
-        public override bool VisitParameterDecl(Parameter parameter)
-        {
-            if (!Targets.HasFlag(RenameTargets.Parameter))
-                return false;
-
-            return base.VisitParameterDecl(parameter);
-        }
-
-        public override bool VisitEvent(Event @event)
-        {
-            if (!Targets.HasFlag(RenameTargets.Event))
-                return false;
-
-            return base.VisitEvent(@event);
-        }
-
-        public override bool VisitVariableDecl(Variable variable)
-        {
-            if (!Targets.HasFlag(RenameTargets.Variable))
-                return false;
-
-            return base.VisitVariableDecl(variable);
         }
     }

@@ -313,7 +265,8 @@

         public override bool Rename(Declaration decl, out string newName)
         {
-            if (base.Rename(decl, out newName)) return true;
+            if (base.Rename(decl, out newName))
+                return true;

             var replace = Regex.Replace(decl.Name, Pattern, Replacement);

@@ -335,7 +288,7 @@
     }

     /// <summary>
-    /// Renames a declaration based on a regular expression pattern.
+    /// Renames a declaration based on a pre-defined pattern.
     /// </summary>
     public class CaseRenamePass : RenamePass
     {
@@ -349,7 +302,8 @@

         public override bool Rename(Declaration decl, out string newName)
         {
-            if (base.Rename(decl, out newName)) return true;
+            if (base.Rename(decl, out newName))
+                return true;

             newName = ConvertCaseString(decl, Pattern);
             return true;


update in processing data

update in processing data

--- ocr_demo/MyOCRData.cs
+++ ocr_demo/MyOCRData.cs
@@ -31,14 +31,11 @@
         public string date { get; set; }
         public string type { get; set; }

-
-
         private static string[] topicKeywords = { "subject" };
         private static string[] toKeywords = { "dear", "customer name" };
         private static string[] typeKeywords = { "invoice", "order" };
         private static string[] dateKeywords = { "/", "january", "february", "march", "april", "may", "june", "july", "august", "september", "october", "november", "december" };
         private static string[] greetingsKeywords = { "Best regards", "Sincerely", "Yours faithfully" };
-

         // regular expressions for dates
         private string datePattern1 = "(0?[1-9]|[12][0-9]|3[01])/(0?[1-9]|1[012])/((19|20)\\d\\d)";
@@ -73,6 +70,7 @@
             date = "";
             type = "";
         }
+
         public void doOCR(string filePath)
         {
             List<string> lines = new List<string>();
@@ -90,7 +88,11 @@
                 do
                 {
                     string s = iter.GetText(PageIteratorLevel.TextLine);
-                    lines.Add(s);
+                    if(s != null)
+                    {
+                        lines.Add(removeLineEndings(s));
+                    }
+
                 } while (iter.Next(PageIteratorLevel.TextLine));
             }
             catch (Exception e)
@@ -98,102 +100,85 @@
                 throw new System.Exception("OCR Parsing Error", e);
             }

-            processDocumentLines(lines);
-        }
-
-        private void processDocumentLines(List<string> source)
-        {
-            bool contains = false;
-            bool hasType = false;
-            bool hasDate = false;
-            bool hasTopic = false;
-            bool hasFrom = false;
-            bool hasTo = false;
-            int index = 0;
-
-            // remove empty lines
+            processDocument(lines);
+        }
+
+        private void processDocument(List<string> source)
+        {
             var lines = source.Where(str => !string.IsNullOrWhiteSpace(str)).Distinct().ToList();

-            foreach (var line in lines)
-            {
-                contains = false;
-
-                // search for type
-                if (!hasType)
-                {
-                    foreach (var kw in typeKeywords)
-                    {
-                        if (contains = line.Contains(kw, StringComparison.OrdinalIgnoreCase))
-                        {
-                            type = kw;
-                            hasType = true;
-                            break;
-                        }
-                    }
-                }
-
-                // search for dates
-                if (!hasDate)
-                {
-                    foreach (var kw in dateKeywords)
-                    {
-                        if (contains = line.Contains(kw, StringComparison.OrdinalIgnoreCase))
-                        {
-                            if (getDate(removeLineEndings(line)))
-                            {
-                                hasDate = true;
-                            }
-                        }
-                    }
-
-                    // if no relevant date has been found
-                    if(!hasDate) this.date = "";
-                }
-
-                // search for greetings
-                if (!hasFrom)
-                {
-                    foreach (var kw in greetingsKeywords)
-                    {
-                        if (contains = line.Contains(kw, StringComparison.OrdinalIgnoreCase))
-                        {
-                            string l = lines.ElementAt(index + 1);
-                            this.from = removeLineEndings(l);
-                            hasFrom = true;
-                        }
-                    }
-                }
-
-                // search To
-                if(!hasTo)
-                {
-                    foreach (var kw in toKeywords)
-                    {
-                        if (contains = line.Contains(kw, StringComparison.OrdinalIgnoreCase))
-                        {
-                            this.to = removeLineEndings(getName(line, kw));
-                            hasTo = true;
-                        }
-                    }
-                }
-
-                // search topic
-                if (!hasTopic)
-                {
-                    foreach (var kw in topicKeywords)
-                    {
-                        if (contains = line.Contains(kw, StringComparison.OrdinalIgnoreCase))
-                        {
-                            this.topic = removeLineEndings(getName(line, kw));
-                            hasTopic = true;
-                        }
-                    }
-                }
-
-                index++;
-            }
-        }
-
+            string result = "";
+
+            foreach (var kw in topicKeywords)
+            {
+                if (findInDocument(lines, kw, out result))
+                {
+                    this.topic = result;
+                    break;
+                }
+            }
+
+            foreach (var kw in dateKeywords)
+            {
+                if (findInDocument(lines, kw, out result))
+                {
+                    if(getDate(result)) break;
+                }
+            }
+            foreach (var kw in toKeywords)
+            {
+                if (findInDocument(lines, kw, out result))
+                {
+                    this.to = result;
+                    break;
+                }
+            }
+            foreach (var kw in greetingsKeywords)
+            {
+                if (findInDocument(lines, kw, out result))
+                {
+                    int idx = (lines == null ? -1 : lines.IndexOf(result));
+
+                    this.from = lines.ElementAt(idx + 1); ;
+                    break;
+                }
+            }
+            foreach (var kw in typeKeywords)
+            {
+                if (findInDocument(lines, kw, out result))
+                {
+                    this.type = kw;
+                    break;
+                }
+            }
+        }
+
+        private bool findInDocument(List<string> source, string keyword, out string output)
+        {
+            IEnumerable<string> results;
+
+            try
+            {
+                results = source.Where(s => s.Contains(keyword, StringComparison.OrdinalIgnoreCase));
+            }
+            catch (Exception e)
+            {
+                output = null;
+                return false;
+            }
+
+            if (results != null && results.Any())
+            {
+                output = results.First();
+                return true;
+            }
+            else
+            {
+                output = "";
+                return false;
+            }
+        }
+
         private string removeLineEndings(string line)
         {
             return Regex.Replace(line, @"\t|\n|\r", "");


CR: Refactor MergeMessage to remove private property setters

--- src/GitVersionCore/MergeMessage.cs
+++ src/GitVersionCore/MergeMessage.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Text.RegularExpressions;

 namespace GitVersion
@@ -22,56 +23,43 @@
             if (mergeMessage == null)
                 throw new NullReferenceException();

-            foreach(var entry in config.MergeMessageFormats)
+            // Concat config messages with the defaults.
+            // Ensure configs are processed first.
+            var allPatterns = config.MergeMessageFormats
+                .Select(x => Pattern(x.Key, x.Value))
+                .Concat(DefaultPatterns);
+
+            foreach (var pattern in allPatterns)
             {
-                var pattern = Pattern(entry.Key, entry.Value);
-                if (ApplyPattern(mergeMessage, config.TagPrefix, pattern))
+                var match = pattern.Value.Match(mergeMessage);
+                if (match.Success)
                 {
-                    return;
-                }
-            }
+                    MatchDefinition = pattern.Key;
+                    MergedBranch = match.Groups["SourceBranch"].Value;

-            foreach (var pattern in DefaultPatterns)
-            {
-                if (ApplyPattern(mergeMessage, config.TagPrefix, pattern))
-                {
-                    return;
+                    if (match.Groups["TargetBranch"].Success)
+                    {
+                        TargetBranch = match.Groups["TargetBranch"].Value;
+                    }
+
+                    if (int.TryParse(match.Groups["PullRequestNumber"].Value, out var pullNumber))
+                    {
+                        PullRequestNumber = pullNumber;
+                    }
+
+                    Version = ParseVersion(MergedBranch, config.TagPrefix);
+
+                    break;
                 }
             }
         }

-        public string MatchDefinition { get; private set; }
-        public string TargetBranch { get; private set; }
-        public string MergedBranch { get; private set; } = "";
+        public string MatchDefinition { get; }
+        public string TargetBranch { get; }
+        public string MergedBranch { get; } = "";
         public bool IsMergedPullRequest => PullRequestNumber != null;
-        public int? PullRequestNumber { get; private set; }
-        public SemanticVersion Version { get; private set; }
-
-        private bool ApplyPattern(string mergeMessage, string tagPrefix, KeyValuePair<string, Regex> pattern)
-        {
-            var match = pattern.Value.Match(mergeMessage);
-            if (match.Success)
-            {
-                MatchDefinition = pattern.Key;
-                MergedBranch = match.Groups["SourceBranch"].Value;
-
-                if (match.Groups["TargetBranch"].Success)
-                {
-                    TargetBranch = match.Groups["TargetBranch"].Value;
-                }
-
-                if (int.TryParse(match.Groups["PullRequestNumber"].Value, out var pullNumber))
-                {
-                    PullRequestNumber = pullNumber;
-                }
-
-                Version = ParseVersion(MergedBranch, tagPrefix);
-
-                return true;
-            }
-
-            return false;
-        }
+        public int? PullRequestNumber { get; }
+        public SemanticVersion Version { get; }

         private SemanticVersion ParseVersion(string branchName, string tagPrefix)
         {


use file name from dialog

use file name from dialog

--- UI/MainWindow.xaml.cs
+++ UI/MainWindow.xaml.cs
@@ -88,7 +88,7 @@
             bool? result = fileDialog.ShowDialog(this);
             if (result.Value)
             {
-                new DataFile(Settings.Default.FileName).Save(App.CurrentApp.IRCodes, App.CurrentApp.Rules);
+                new DataFile(fileDialog.FileName).Save(App.CurrentApp.IRCodes, App.CurrentApp.Rules);

                 Settings.Default.FileName = fileDialog.FileName;
                 Settings.Default.Save();


Beginning of of the Binsor 2.0 extension mechanism with the Kernels ComponentRegistration model to unify registration.

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

--- rhino-commons/Rhino.Commons/Binsor/Component.cs
+++ rhino-commons/Rhino.Commons/Binsor/Component.cs
@@ -38,6 +38,7 @@
 namespace Rhino.Commons.Binsor
 {
 	using System.Collections.Generic;
+	using Castle.MicroKernel.Registration;

 	public class Component : IQuackFu, INeedSecondPassRegistration, IConfigurationFormatter
 	{
@@ -136,14 +137,18 @@
 				kernel.ConfigurationStore.AddComponentConfiguration(_name, _configuration);
 			}

+			ComponentRegistration<object> component = new ComponentRegistration(_service)
+				.Named(_name).ImplementedBy(_impl)
+				.CustomDependencies(_dependencies);
+
 			if (_lifestyle.HasValue)
 			{
-				kernel.AddComponent(_name, _service, _impl, _lifestyle.Value);
-			}
-			else
-			{
-				kernel.AddComponent(_name, _service, _impl);
-			}
+				component.LifeStyle.Is(_lifestyle.Value);
+			}
+
+			kernel.Register(component);
+
+			_dependencies.Clear();

         	return this;
 		}
@@ -162,7 +167,7 @@

 		public void RegisterSecondPass()
         {
-            kernel.RegisterCustomDependencies(_name, _dependencies);
+			kernel.RegisterCustomDependencies(_name, _dependencies);
         }

 		public object QuackGet(string name, object[] property_dependencies)


Add back incorrectly removed parameter

Add back incorrectly removed parameter

--- osu.Framework/Host.cs
+++ osu.Framework/Host.cs
@@ -16,13 +16,13 @@
             switch (RuntimeInfo.OS)
             {
                 case RuntimeInfo.Platform.macOS:
-                    return new MacOSGameHost(gameName, bindIPC);
+                    return new MacOSGameHost(gameName, bindIPC, portableInstallation);

                 case RuntimeInfo.Platform.Linux:
-                    return new LinuxGameHost(gameName, bindIPC);
+                    return new LinuxGameHost(gameName, bindIPC, portableInstallation);

                 case RuntimeInfo.Platform.Windows:
-                    return new WindowsGameHost(gameName, bindIPC);
+                    return new WindowsGameHost(gameName, bindIPC, portableInstallation);

                 default:
                     throw new InvalidOperationException($"Could not find a suitable host for the selected operating system ({Enum.GetName(typeof(RuntimeInfo.Platform), RuntimeInfo.OS)}).");


no endpoint name

no endpoint name

--- samples/unobtrusive/Version_5/Client/Program.cs
+++ samples/unobtrusive/Version_5/Client/Program.cs
@@ -5,8 +5,6 @@
     public static void Main()
     {
         BusConfiguration busConfiguration = new BusConfiguration();
-
-        busConfiguration.EndpointName("Samples.Unobtrusive.Client");

         busConfiguration.EnableInstallers();
         busConfiguration.UsePersistence<InMemoryPersistence>();


only for the full framework

only for the full framework

--- src/AutoMapper/AssemblyInfo.cs
+++ src/AutoMapper/AssemblyInfo.cs
@@ -2,8 +2,8 @@
 using System.Security;

 [assembly:CLSCompliant(true)]
+#if NETSTANDARD1_3
 [assembly: AllowPartiallyTrustedCallers]
 [assembly: SecurityTransparent]
-#if NETSTANDARD1_3
 [assembly: SecurityRules(SecurityRuleSet.Level2, SkipVerificationInFullTrust = true)]
 #endif


Allow vertical scroll positioning with pixel accuracy #190

https://github.com/icsharpcode/AvalonEdit/pull/190 (commented out)

--- src/AvaloniaEdit/TextEditor.cs
+++ src/AvaloniaEdit/TextEditor.cs
@@ -1119,57 +1119,77 @@
         /// </summary>
         public void ScrollTo(int line, int column)
         {
-            //const double MinimumScrollPercentage = 0.3;
-
-            //TextView textView = textArea.TextView;
-            //TextDocument document = textView.Document;
-            //if (scrollViewer != null && document != null)
-            //{
-            //    if (line < 1)
-            //        line = 1;
-            //    if (line > document.LineCount)
-            //        line = document.LineCount;
-
-            //    IScrollInfo scrollInfo = textView;
-            //    if (!scrollInfo.CanHorizontallyScroll)
-            //    {
-            //        // Word wrap is enabled. Ensure that we have up-to-date info about line height so that we scroll
-            //        // to the correct position.
-            //        // This avoids that the user has to repeat the ScrollTo() call several times when there are very long lines.
-            //        VisualLine vl = textView.GetOrConstructVisualLine(document.GetLineByNumber(line));
-            //        double remainingHeight = scrollViewer.Viewport.Height / 2;
-            //        while (remainingHeight > 0)
-            //        {
-            //            DocumentLine prevLine = vl.FirstDocumentLine.PreviousLine;
-            //            if (prevLine == null)
-            //                break;
-            //            vl = textView.GetOrConstructVisualLine(prevLine);
-            //            remainingHeight -= vl.Height;
-            //        }
-            //    }
-
-            //    Point p = textArea.TextView.GetVisualPosition(new TextViewPosition(line, Math.Max(1, column)), VisualYPosition.LineMiddle);
-            //    double verticalPos = p.Y - scrollViewer.ViewportHeight / 2;
-            //    if (Math.Abs(verticalPos - scrollViewer.VerticalOffset) > MinimumScrollPercentage * scrollViewer.ViewportHeight)
-            //    {
-            //        scrollViewer.ScrollToVerticalOffset(Math.Max(0, verticalPos));
-            //    }
-            //    if (column > 0)
-            //    {
-            //        if (p.X > scrollViewer.ViewportWidth - Caret.MinimumDistanceToViewBorder * 2)
-            //        {
-            //            double horizontalPos = Math.Max(0, p.X - scrollViewer.ViewportWidth / 2);
-            //            if (Math.Abs(horizontalPos - scrollViewer.HorizontalOffset) > MinimumScrollPercentage * scrollViewer.ViewportWidth)
-            //            {
-            //                scrollViewer.ScrollToHorizontalOffset(horizontalPos);
-            //            }
-            //        }
-            //        else
-            //        {
-            //            scrollViewer.ScrollToHorizontalOffset(0);
-            //        }
-            //    }
-            //}
+            //const double MinimumScrollFraction = 0.3;
+            //ScrollTo(line, column, VisualYPosition.LineMiddle,
+            //    null != scrollViewer ? scrollViewer.ViewportHeight / 2 : 0.0, MinimumScrollFraction);
+        }
+
+        /// <summary>
+        /// Scrolls to the specified line/column.
+        /// This method requires that the TextEditor was already assigned a size (WPF layout must have run prior).
+        /// </summary>
+        /// <param name="line">Line to scroll to.</param>
+        /// <param name="column">Column to scroll to (important if wrapping is 'on', and for the horizontal scroll position).</param>
+        /// <param name="yPositionMode">The mode how to reference the Y position of the line.</param>
+        /// <param name="referencedVerticalViewPortOffset">Offset from the top of the viewport to where the referenced line/column should be positioned.</param>
+        /// <param name="minimumScrollFraction">The minimum vertical and/or horizontal scroll offset, expressed as fraction of the height or width of the viewport window, respectively.</param>
+        public void ScrollTo(int line, int column, VisualYPosition yPositionMode,
+            double referencedVerticalViewPortOffset, double minimumScrollFraction)
+        {
+            /*TextView textView = textArea.TextView;
+            TextDocument document = textView.Document;
+            if (scrollViewer != null && document != null)
+            {
+                if (line < 1)
+                    line = 1;
+                if (line > document.LineCount)
+                    line = document.LineCount;
+
+                IScrollInfo scrollInfo = textView;
+                if (!scrollInfo.CanHorizontallyScroll)
+                {
+                    // Word wrap is enabled. Ensure that we have up-to-date info about line height so that we scroll
+                    // to the correct position.
+                    // This avoids that the user has to repeat the ScrollTo() call several times when there are very long lines.
+                    VisualLine vl = textView.GetOrConstructVisualLine(document.GetLineByNumber(line));
+                    double remainingHeight = referencedVerticalViewPortOffset;
+
+                    while (remainingHeight > 0)
+                    {
+                        DocumentLine prevLine = vl.FirstDocumentLine.PreviousLine;
+                        if (prevLine == null)
+                            break;
+                        vl = textView.GetOrConstructVisualLine(prevLine);
+                        remainingHeight -= vl.Height;
+                    }
+                }
+
+                Point p = textArea.TextView.GetVisualPosition(new TextViewPosition(line, Math.Max(1, column)),
+                    yPositionMode);
+                double verticalPos = p.Y - referencedVerticalViewPortOffset;
+                if (Math.Abs(verticalPos - scrollViewer.VerticalOffset) >
+                    minimumScrollFraction * scrollViewer.ViewportHeight)
+                {
+                    scrollViewer.ScrollToVerticalOffset(Math.Max(0, verticalPos));
+                }
+
+                if (column > 0)
+                {
+                    if (p.X > scrollViewer.ViewportWidth - Caret.MinimumDistanceToViewBorder * 2)
+                    {
+                        double horizontalPos = Math.Max(0, p.X - scrollViewer.ViewportWidth / 2);
+                        if (Math.Abs(horizontalPos - scrollViewer.HorizontalOffset) >
+                            minimumScrollFraction * scrollViewer.ViewportWidth)
+                        {
+                            scrollViewer.ScrollToHorizontalOffset(horizontalPos);
+                        }
+                    }
+                    else
+                    {
+                        scrollViewer.ScrollToHorizontalOffset(0);
+                    }
+                }
+            }*/
         }
     }
 }


Extraction requested in review

Extraction requested in review

--- src/Analyzers/Core/Analyzers/SimplifyInterpolation/Helpers.cs
+++ src/Analyzers/Core/Analyzers/SimplifyInterpolation/Helpers.cs
@@ -100,7 +100,7 @@
                 !invocation.Instance.Type!.IsRefLikeType)
             {
                 if (invocation.Arguments.Length == 1
-                    || (invocation.Arguments.Length == 2 && IsInvariantCultureReference(invocation.Arguments[1].Value) && IsInsideFormattableStringInvariant(invocation)))
+                    || (invocation.Arguments.Length == 2 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 1)))
                 {
                     if (invocation.Arguments[0].Value is ILiteralOperation { ConstantValue: { HasValue: true, Value: string value } } literal &&
                        invocation.SemanticModel!.Compilation.GetTypeByMetadataName(typeof(System.IFormattable).FullName!) is { } systemIFormattable &&
@@ -118,7 +118,7 @@
                 }

                 if (IsObjectToStringOverride(invocation.TargetMethod)
-                    || (invocation.Arguments.Length == 1 && IsInvariantCultureReference(invocation.Arguments[0].Value) && IsInsideFormattableStringInvariant(invocation)))
+                    || (invocation.Arguments.Length == 1 && UsesInvariantCultureReferenceInsideFormattableStringInvariant(invocation, formatProviderArgumentIndex: 0)))
                 {
                     // A call to `.ToString()` at the end of the interpolation.  This is unnecessary.
                     // Just remove entirely.
@@ -143,6 +143,12 @@

             return method.ContainingType.SpecialType == SpecialType.System_Object
                 && method.Name == nameof(ToString);
+        }
+
+        private static bool UsesInvariantCultureReferenceInsideFormattableStringInvariant(IInvocationOperation invocation, int formatProviderArgumentIndex)
+        {
+            return IsInvariantCultureReference(invocation.Arguments[formatProviderArgumentIndex].Value)
+                && IsInsideFormattableStringInvariant(invocation);
         }

         private static bool IsInvariantCultureReference(IOperation operation)


Add tests: ExtendedSearchContext_Get_Hidden, ExtendedSearchContext_Get_OfAnyVisibility and ExtendedSearchContext_Get_Timeout_ButHidden

--- src/Atata.WebDriverExtras.Tests/ExtendedSearchContextTests.cs
+++ src/Atata.WebDriverExtras.Tests/ExtendedSearchContextTests.cs
@@ -44,6 +44,30 @@
         }

         [Test]
+        public void ExtendedSearchContext_Get_Hidden()
+        {
+            GoTo("static");
+
+            using (StopwatchAsserter.Within(.2, .2))
+            {
+                IWebElement element = Driver.Get(By.Id("hidden-input").Hidden());
+                Assert.That(element, Is.Not.Null);
+            }
+        }
+
+        [Test]
+        public void ExtendedSearchContext_Get_OfAnyVisibility()
+        {
+            GoTo("static");
+
+            using (StopwatchAsserter.Within(.2, .2))
+            {
+                IWebElement element = Driver.Get(By.Id("hidden-input").OfAnyVisibility());
+                Assert.That(element, Is.Not.Null);
+            }
+        }
+
+        [Test]
         public void ExtendedSearchContext_Get_Timeout()
         {
             GoTo("static");
@@ -51,6 +75,16 @@
             using (StopwatchAsserter.Within(3, .2))
                 Assert.Throws<NoSuchElementException>(() =>
                     Driver.Get(By.Id("unknown").Within(TimeSpan.FromSeconds(3))));
+        }
+
+        [Test]
+        public void ExtendedSearchContext_Get_Timeout_ButHidden()
+        {
+            GoTo("static");
+
+            using (StopwatchAsserter.Within(3, .2))
+                Assert.Throws<NoSuchElementException>(() =>
+                    Driver.Get(By.Id("hidden-input").Within(TimeSpan.FromSeconds(3))));
         }

         [Test]


Removed unused using

Removed unused using

--- src/AvaloniaEdit/Rendering/SingleCharacterElementGenerator.cs
+++ src/AvaloniaEdit/Rendering/SingleCharacterElementGenerator.cs
@@ -18,7 +18,6 @@

 using System;
 using System.Diagnostics.CodeAnalysis;
-using System.Runtime.CompilerServices;

 using Avalonia;
 using Avalonia.Media;


Test case: multiple interfaces containing the same method name

--- examples/TestExportInterface.cs
+++ examples/TestExportInterface.cs
@@ -19,7 +19,7 @@
 		IDemoObject demo;

 		if (bus.NameHasOwner (myNameReq)) {
-			demo = bus.GetObject<IDemoObject> (myNameReq, myOpath);
+			demo = bus.GetObject<IDemo> (myNameReq, myOpath);
 		} else {
 			demo = new DemoObject ();
 			bus.Register (myNameReq, myOpath, demo);
@@ -56,6 +56,9 @@

 		Console.WriteLine ();

+		demo.Say2 ("demo.Say2");
+		((IDemoObjectTwo)demo).Say2 ("((IDemoObjectTwo)demo).Say2");
+
 		demo.ThrowSomeException ();
 	}

@@ -76,6 +79,7 @@
 	event SomeEventHandler SomeEvent;
 	void FireOffSomeEvent ();
 	void Say (object var);
+	void Say2 (string str);
 	object GetSomeVariant ();
 	void ThrowSomeException ();
 }
@@ -84,9 +88,14 @@
 public interface IDemoObjectTwo
 {
 	int Say (string str);
+	void Say2 (string str);
 }

-public class DemoObject : IDemoObject, IDemoObjectTwo
+public interface IDemo : IDemoObject, IDemoObjectTwo
+{
+}
+
+public class DemoObject : IDemo
 {
 	public event SomeEventHandler SomeEvent;

@@ -99,6 +108,16 @@
 	{
 		Console.WriteLine ("string: " + str);
 		return str.Length;
+	}
+
+	public void Say2 (string str)
+	{
+		Console.WriteLine ("IDemoObject.Say2: " + str);
+	}
+
+	void IDemoObjectTwo.Say2 (string str)
+	{
+		Console.WriteLine ("IDemoObjectTwo.Say2: " + str);
 	}

 	public void FireOffSomeEvent ()


ProtoBuf serializer performance optimizations

--- src/CacheManager.Serialization.ProtoBuf/ProtoBufSerializer.cs
+++ src/CacheManager.Serialization.ProtoBuf/ProtoBufSerializer.cs
@@ -9,19 +9,34 @@
 {
     public class ProtoBufSerializer : ICacheSerializer
     {
+        private static readonly Type cacheItemType = typeof(ProtoBufCacheItem);
+
         public ProtoBufSerializer()
         {
         }

         public object Deserialize(byte[] data, Type target)
         {
-            var stream = new MemoryStream(data.Skip(1).ToArray());
-            return pb.Serializer.Deserialize(target, stream);
+            byte[] destination;
+            if (data.Length == 0)
+            {
+                destination = data;
+            }
+            else
+            {
+                destination = new byte[data.Length - 1];
+                Array.Copy(data, 1, destination, 0, data.Length - 1);
+            }
+
+            using (var stream = new MemoryStream(destination))
+            {
+                return pb.Serializer.Deserialize(target, stream);
+            }
         }

         public CacheItem<T> DeserializeCacheItem<T>(byte[] value, Type valueType)
         {
-            var item = (ProtoBufCacheItem)Deserialize(value, typeof(ProtoBufCacheItem));
+            var item = (ProtoBufCacheItem)Deserialize(value, cacheItemType);
             if (item == null)
             {
                 throw new Exception("Unable to deserialize the CacheItem");