Add a short option `-q` for rcheckin quick

--- GitTfs/Commands/Rcheckin.cs
+++ GitTfs/Commands/Rcheckin.cs
@@ -35,7 +35,7 @@
             {
                 return new OptionSet
                     {
-                        { "no-rebase|quick", "omit rebases (faster)\nNote: this can lead to problems if someone checks something in while the command is running.",
+                        { "q|no-rebase|quick", "omit rebases (faster)\nNote: this can lead to problems if someone checks something in while the command is running.",
                         v => Quick = v != null },
                         {"a|autorebase", "continue and rebase if new TFS changesets found", v => AutoRebase = v != null},
                     }.Merge(_checkinOptions.OptionSet);


Used the wrong remote for the prefix in GetPathInGitRepo

Signed-off-by: Gordon Burgett <0ab9b91f17f8f1ab634a7a9996d127f82f66d1d1@gmail.com>

--- GitTfs/Core/GitTfsRemote.cs
+++ GitTfs/Core/GitTfsRemote.cs
@@ -259,7 +259,7 @@
                 while (tfsPath.StartsWith("/"))
                     tfsPath = tfsPath.Substring(1);

-                tfsPath = Path.Combine(this.Prefix, tfsPath);
+                tfsPath = Path.Combine(p.Prefix, tfsPath);
             }

             while (tfsPath.StartsWith("/"))


fixing log message

fixing log message

--- NTumbleBit/ClassicTumbler/Client/PaymentStateMachine.cs
+++ NTumbleBit/ClassicTumbler/Client/PaymentStateMachine.cs
@@ -305,7 +305,7 @@

 							if(tumblerTx != null && tumblerTx.Confirmations >= cycle.SafetyPeriodDuration)
 							{
-								Logs.Client.LogInformation($"Client escrow reached {cycle.SafetyPeriodDuration} confirmations");
+								Logs.Client.LogInformation($"Tumbler escrow reached {cycle.SafetyPeriodDuration} confirmations");

 								if(SolverClientSession.Status == SolverClientStates.WaitingGeneratePuzzles)
 								{


Write informational output to stderr

Write informational output to stderr

--- NuGit/Infrastructure/ConsoleApplicationTraceListener.cs
+++ NuGit/Infrastructure/ConsoleApplicationTraceListener.cs
@@ -9,13 +9,13 @@
     ///
     /// <remarks>
     /// <para>
-    /// <see cref="Trace.WriteLine(string)"/> is output to stdout as-is.
+    /// <see cref="Trace.WriteLine(string)"/> is output to stderr as-is.
     /// </para>
     /// <para>
-    /// <see cref="Trace.TraceInformation(string)"/> is output to stdout as-is, if not <see cref="Quiet"/>.
+    /// <see cref="Trace.TraceInformation(string)"/> is output to stderr as-is, if not <see cref="Quiet"/>.
     /// </para>
     /// <para>
-    /// <see cref="Trace.TraceWarning(string)"/> and <see cref="Trace.TraceError(string)"/> are output to stdout in the
+    /// <see cref="Trace.TraceWarning(string)"/> and <see cref="Trace.TraceError(string)"/> are output to stderr in the
     /// format <c>[<severity>] <message></c>.
     /// </para>
     /// </remarks>
@@ -25,7 +25,7 @@
     {

         public ConsoleApplicationTraceListener()
-            : base()
+            : base(true)
         {
             Quiet = false;
         }


Related to previous commits: fixed namespace.

--- OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs
+++ OpenSim/ApplicationPlugins/LoadRegions/IRegionLoader.cs
@@ -26,8 +26,9 @@
  */

 using Nini.Config;
+using OpenSim.Framework;

-namespace OpenSim.Framework
+namespace OpenSim.ApplicationPlugins.LoadRegions
 {
     public interface IRegionLoader
     {


* Fix a null ref error in /..../OpenSim/Region/ClientStack/Linden/Caps/GetMeshModule.cs:339

--- OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -64,6 +64,7 @@
             ret["keepalive"] = false;
             ret["reusecontext"] = false;
             ret["int_bytes"] = 0;
+            ret["int_lod"] = 0;
             string MeshStr = (string)request["mesh_id"];

@@ -100,6 +101,8 @@
             responsedata["keepalive"] = false;
             responsedata["str_response_string"] = "Request wasn't what was expected";
             responsedata["reusecontext"] = false;
+            responsedata["int_lod"] = 0;
+            responsedata["int_bytes"] = 0;

             string meshStr = string.Empty;


* Fixes mesh loading issues in last commit.

--- OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
+++ OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
@@ -99,6 +99,7 @@
             responsedata["content_type"] = "text/plain";
             responsedata["keepalive"] = false;
             responsedata["str_response_string"] = "Request wasn't what was expected";
+            responsedata["reusecontext"] = false;

             string meshStr = string.Empty;

@@ -114,6 +115,7 @@
                     responsedata["content_type"] = "text/plain";
                     responsedata["keepalive"] = false;
                     responsedata["str_response_string"] = "The asset service is unavailable.  So is your mesh.";
+                    responsedata["reusecontext"] = false;
                     return responsedata;
                 }

@@ -149,6 +151,7 @@
                                     responsedata["content_type"] = "text/plain";
                                     responsedata["keepalive"] = false;
                                     responsedata["str_response_string"] = "This range doesnt exist.";
+                                    responsedata["reusecontext"] = false;
                                     return responsedata;
                                 }
                                 else
@@ -166,6 +169,7 @@
                                         responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK;
                                         responsedata["bin_response_data"] = mesh.Data;
                                         responsedata["int_bytes"] = mesh.Data.Length;
+                                        responsedata["reusecontext"] = false;
                                     }
                                     else
                                     {
@@ -178,6 +182,7 @@
                                         Array.Copy(mesh.Data, start, d, 0, len);
                                         responsedata["bin_response_data"] = d;
                                         responsedata["int_bytes"] = len;
+                                        responsedata["reusecontext"] = false;
                                     }
                                 }
                             }
@@ -187,6 +192,7 @@
                                 responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
                                 responsedata["content_type"] = "application/vnd.ll.mesh";
                                 responsedata["int_response_code"] = 200;
+                                responsedata["reusecontext"] = false;
                             }
                         }
                         else
@@ -194,6 +200,7 @@
                             responsedata["str_response_string"] = Convert.ToBase64String(mesh.Data);
                             responsedata["content_type"] = "application/vnd.ll.mesh";
                             responsedata["int_response_code"] = 200;
+                            responsedata["reusecontext"] = false;
                         }
                     }
                     // Optionally add additional mesh types here
@@ -203,6 +210,7 @@
                         responsedata["content_type"] = "text/plain";
                         responsedata["keepalive"] = false;
                         responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh.";
+                        responsedata["reusecontext"] = false;
                         return responsedata;
                     }
                 }
@@ -212,6 +220,7 @@
                     responsedata["content_type"] = "text/plain";
                     responsedata["keepalive"] = false;
                     responsedata["str_response_string"] = "Your Mesh wasn't found.  Sorry!";
+                    responsedata["reusecontext"] = false;
                     return responsedata;
                 }
             }


Fix a bug with round-robining URLs after the first update.

--- OpenSim/Services/GridService/GridRegistrationService.cs
+++ OpenSim/Services/GridService/GridRegistrationService.cs
@@ -246,7 +246,7 @@
                         if (url.URLS.ContainsKey(module.UrlName))//Make sure it exists
                         {
                             int i = 0;
-                            if(url.HostNames.Type == OSDType.Array)
+                            if (url.HostNames[module.UrlName].Type == OSDType.Array)
                                 foreach (OSD o in (OSDArray)url.URLS[module.UrlName])
                                     module.AddExistingUrlForClient(url.SessionID, ((OSDArray)url.URLS[module.UrlName])[i], ((OSDArray)url.Ports[module.UrlName])[i++]);
                             else


[Modify] Polish it

[Modify] Polish it

--- websocket-sharp/Server/HttpServer.cs
+++ websocket-sharp/Server/HttpServer.cs
@@ -205,7 +205,8 @@
     public HttpServer (int port, bool secure)
     {
       if (!port.IsPortNumber ()) {
-        var msg = "Less than 1 or greater than 65535.";
+        var msg = "It is less than 1 or greater than 65535.";
+
         throw new ArgumentOutOfRangeException ("port", msg);
       }


Make sure last applied theme is fully loaded

--- PathfinderAPI/BaseGameFixes/Performance/ThemeCaching.cs
+++ PathfinderAPI/BaseGameFixes/Performance/ThemeCaching.cs
@@ -132,7 +132,13 @@
             if (theme == OSTheme.Custom)
             {
                 // just dont question it
-                CachedThemes.BackingListHead?.Value?.ApplyTo((OS)osObject);
+                var lastTheme = CachedThemes.BackingListHead?.Value;
+                if (lastTheme != null)
+                {
+                    if (!lastTheme.Loaded)
+                        lastTheme.Load(true);
+                    lastTheme.ApplyTo((OS)osObject);
+                }
                 return false;
             }


Removed a comment.

Removed a comment.

not really necessary.

--- Pulsar4X/Pulsar4X.Lib/Entities/Components/OrdnanceTN.cs
+++ Pulsar4X/Pulsar4X.Lib/Entities/Components/OrdnanceTN.cs
@@ -1707,12 +1707,6 @@
                     /// </summary>
                     Intercept = GameState.SE.FinalDefensiveFire(GameState.Instance.Factions, Missiles[loop], RNG);

-
-
-                    /// <summary>
-                    /// How do I handle FDF? final defensive fire will always be done, no matter what unless faction of pd ship = faction of missile.
-                    /// </summary>
-
                     /// <summary>
                     /// if the missile was intercepted then it obviously did not go on to hit the ship.
                     /// </summary>


added br to groups list

added br to groups list

--- ITSWebMgmt/UserInfo.aspx.cs
+++ ITSWebMgmt/UserInfo.aspx.cs
@@ -113,7 +113,7 @@
                  var split = adpath.Split(',');
                  var groupname = split[0].Replace("CN=","");

-                 sb.Append(String.Format("{1}", HttpUtility.UrlEncode("LDAP://"+adpath), groupname));
+                 sb.Append(String.Format("{1}
", HttpUtility.UrlEncode("LDAP://"+adpath), groupname));
                  //sb.Append(adpath + "
");
                  //sb.Append(groupname + "
");
                  //sb.Append("");
@@ -139,7 +139,7 @@
                  {
                      //This is a group access group
                      var groupname = split[0].Replace("CN=", "");
-                     sb.Append(String.Format("{1}", HttpUtility.UrlEncode("LDAP://" + group), groupname));
+                     sb.Append(String.Format("{1}
", HttpUtility.UrlEncode("LDAP://" + group), groupname));
                      //sb.Append(groupname + "
");
                  }
              }


Update Startup.cs

Update Startup.cs

--- src/BackEnd/Startup.cs
+++ src/BackEnd/Startup.cs
@@ -76,9 +76,11 @@
                 return Task.CompletedTask;
             });

-            // Comment out the following line to avoid resetting the database each time
-            var loader = new DevIntersectionLoader(app.ApplicationServices);
-            loader.LoadData("DevIntersection_Vegas_2017.json", "DevIntersection Vegas 2017");
+            if (Configuration["RESET_DB"] != null && Configuration["RESET_DB"] == "1")
+            {
+              var loader = new DevIntersectionLoader(app.ApplicationServices);
+              loader.LoadData("DevIntersection_Vegas_2017.json", "DevIntersection Vegas 2017");
+            }
         }
     }
 }


Minor style cleanup

Minor style cleanup

--- LBi.LostDoc/DocGenerator.cs
+++ LBi.LostDoc/DocGenerator.cs
@@ -402,27 +402,20 @@
         {
             Assembly asm = (Assembly)context.AssetResolver.Resolve(assetId);

-            var ret = new XElement("assembly",
-                                   new XAttribute("name", asm.GetName().Name),
-                                   new XAttribute("filename", asm.ManifestModule.Name),
-                                   new XAttribute("assetId", assetId),
-                                   new XAttribute("phase", context.Phase),
-                                   asm.GetReferencedAssemblies().Select(
-                                                                        an =>
-                                                                        new XElement("references",
-                                                                                new XAttribute("assembly",
-                                                                                AssetIdentifier.
-                                                                                FromAssembly(
-                                                                                Assembly
-                                                                                .
-                                                                                ReflectionOnlyLoad
-                                                                                (an
-                                                                                .
-                                                                                FullName))))));
-
+            IEnumerable<XElement> references =
+                asm.GetReferencedAssemblies()
+                   .Select(an => new XElement("references",
+                                              new XAttribute("assembly",
+                                                             AssetIdentifier.FromAssembly(context.AssemblyLoader.Load(an.FullName)))));
+
+            XElement ret = new XElement("assembly",
+                                        new XAttribute("name", asm.GetName().Name),
+                                        new XAttribute("filename", asm.ManifestModule.Name),
+                                        new XAttribute("assetId", assetId),
+                                        new XAttribute("phase", context.Phase),
+                                        references);

             context.Element.Add(ret);
-

             foreach (IEnricher enricher in this._enrichers)
                 enricher.EnrichAssembly(context.Clone(ret), asm);
@@ -555,7 +548,6 @@

         private void GenerateTypeParamElement(IProcessingContext context, MemberInfo mInfo, Type tp)
         {
-            // AssetIdentifier assetId = AssetIdentifier.FromType(mInfo, tp);
             var tpElem = new XElement("typeparam",
                                       new XAttribute("name", tp.Name));

@@ -688,13 +680,13 @@
                 if (baseMethod.ReflectedType.IsGenericType)
                 {
                     Type realTypeBase = baseMethod.ReflectedType.GetGenericTypeDefinition();
-                    MethodInfo[] allMethods =
-                        realTypeBase.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |
-                                                BindingFlags.Static);
-                    baseMethod =
-                        allMethods.Single(
-                                          m =>
-                                          m.Module == baseMethod.Module && m.MetadataToken == baseMethod.MetadataToken);
+                    MethodInfo[] allMethods = realTypeBase.GetMethods(BindingFlags.Public |
+                                                                      BindingFlags.NonPublic |
+                                                                      BindingFlags.Instance |
+                                                                      BindingFlags.Static);
+
+                    baseMethod = allMethods.Single(m => m.Module == baseMethod.Module &&
+                                                        m.MetadataToken == baseMethod.MetadataToken);
                 }

                 declaredAs = AssetIdentifier.FromMemberInfo(baseMethod);
@@ -731,7 +723,6 @@

                 ret.Add(retElem);
             }
-

             return ret;
         }
@@ -755,9 +746,8 @@
                     if (ifMap.TargetType != declaringType)
                         continue;

-                    var targetMethod =
-                        ifMap.TargetMethods.SingleOrDefault(mi => mi.MetadataToken == mInfo.MetadataToken &&
-                                                                  mi.Module == mInfo.Module);
+                    var targetMethod = ifMap.TargetMethods.SingleOrDefault(mi => mi.MetadataToken == mInfo.MetadataToken &&
+                                                                                mi.Module == mInfo.Module);

                     if (targetMethod != null)
                     {
@@ -767,14 +757,15 @@
                         if (ifMap.InterfaceMethods[mIx].DeclaringType.IsGenericType)
                         {
                             Type declType = ifMap.InterfaceMethods[mIx].DeclaringType.GetGenericTypeDefinition();
-                            MethodInfo[] allMethods =
-                                declType.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |
-                                                    BindingFlags.Static);
-
-                            miAid =
-                                AssetIdentifier.FromMemberInfo(allMethods.Single(mi =>
-                                                                                mi.MetadataToken == ifMap.InterfaceMethods[mIx].MetadataToken &&
-                                                                                mi.Module == ifMap.InterfaceMethods[mIx].Module));
+                            MethodInfo[] allMethods = declType.GetMethods(BindingFlags.Public |
+                                                                          BindingFlags.NonPublic |
+                                                                          BindingFlags.Instance |
+                                                                          BindingFlags.Static);
+
+                            MethodInfo memberInfo = allMethods.Single(mi =>
+                                                                      mi.MetadataToken == ifMap.InterfaceMethods[mIx].MetadataToken &&
+                                                                      mi.Module == ifMap.InterfaceMethods[mIx].Module);
+                            miAid = AssetIdentifier.FromMemberInfo(memberInfo);
                         }
                         else
                         {
@@ -880,7 +871,6 @@

             ParameterInfo[] methodParams = constructorInfo.GetParameters();
             this.GenerateParameterElements(context.Clone(ret), methodParams);
-

             return ret;
         }
@@ -1009,7 +999,6 @@
             const int C_INTERNAL_AND_PROTECTED = 2;
             const int C_PRIVATE = 0;

-
             int leastRestrictiveAccessModifier;

             if (setMethod != null && setMethod.IsPublic || getMethod != null && getMethod.IsPublic)
@@ -1117,8 +1106,6 @@
             }
         }

-
-
         ~DocGenerator()
         {
             this.Dispose(false);


"Listening on port" message always showed default port, even if it was listening on a different port specified in the Server config.

--- WebServer.cs
+++ WebServer.cs
@@ -97,7 +97,7 @@
 				}
 				foreach (int port in ports) {
 					_listener.Prefixes.Add("http://+:" + port + "/");
-					Log("Listening on port {0}", Config.Default.Port);
+					Log("Listening on port {0}", port);
 				}
 				_sessions = new Dictionary<string, Session>();
 				_empty = new Session(null);


Remove, usings

Remove, usings

--- Retry/RunResults.cs
+++ Retry/RunResults.cs
@@ -1,8 +1,5 @@
 using System;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;

 namespace Retry
 {


Fix launcher crashing on a clean install.

It was trying to move the original launcher to a non-existent backup folder.

--- Launcher/MainWindow.xaml.cs
+++ Launcher/MainWindow.xaml.cs
@@ -125,8 +125,8 @@
                 }
             }
             new Thread(delegate ()
-
-            {
+            {
+                Directory.CreateDirectory(H2Ek_install_path + "backup");
                 ForceMove(H2Ek_install_path + "Halo_2_Map_Editor_Launcher.exe", H2Ek_install_path + "backup\\Halo_2_Map_Editor_Launcher.exe");
                 file_list files_to_patch = file_list.none;
                 if (!check_files(ref files_to_patch))
@@ -231,7 +231,6 @@

         private void ApplyPatches(file_list files_to_patch, WebClient wc)
         {
-            Directory.CreateDirectory(H2Ek_install_path + "backup");
             if (files_to_patch.HasFlag(file_list.tool))
                 patch_file("h2tool.exe", wc);
             if (files_to_patch.HasFlag(file_list.guerilla))


add System.Threading using statement

add System.Threading using statement

--- Retry/Devlights.Samples.Retry.Tests/RetryHandlerTest.cs
+++ Retry/Devlights.Samples.Retry.Tests/RetryHandlerTest.cs
@@ -2,6 +2,7 @@
 {
   using System;
   using System.Collections.Generic;
+  using System.Threading;
   using Microsoft.VisualStudio.TestTools.UnitTesting;

   [TestClass]


Update URL of JIRA

Update URL of JIRA

--- SIL.Windows.Forms/Reporting/ExceptionReportingDialog.cs
+++ SIL.Windows.Forms/Reporting/ExceptionReportingDialog.cs
@@ -867,7 +867,7 @@

 		public static string PrivacyNotice = @"If you don't care who reads your bug report, you can skip this notice.

-When you submit a crash report or other issue, the contents of your email go in our issue tracking system, ""jira"", which is available via the web at http://jira.palaso.org/issues. This is the normal way to handle issues in an open-source project.
+When you submit a crash report or other issue, the contents of your email go in our issue tracking system, ""jira"", which is available via the web at https://jira.sil.org/issues. This is the normal way to handle issues in an open-source project.

 Our issue-tracking system is not searchable by those without an account. Therefore, someone searching via Google will not find your bug reports.


Fixed order of text info

Fixed order of text info

--- ScanMonitorApp/ScanMonitorApp/PdfTextAndLocExtractor.cs
+++ ScanMonitorApp/ScanMonitorApp/PdfTextAndLocExtractor.cs
@@ -316,7 +316,7 @@
                     List<ScanDocAllInfo.ScanTextElem> scanTextElems = new List<ScanDocAllInfo.ScanTextElem>();
                     foreach (LocationTextExtractionStrategyEx.TextInfo txtInfo in pageInfo)
                     {
-                        ScanDocAllInfo.ScanTextElem sti = new ScanDocAllInfo.ScanTextElem(txtInfo.Text, CoordStr(txtInfo.TopLeft) + "," + CoordStr(txtInfo.BottomRight));
+                        ScanDocAllInfo.ScanTextElem sti = new ScanDocAllInfo.ScanTextElem(CoordStr(txtInfo.TopLeft) + "," + CoordStr(txtInfo.BottomRight), txtInfo.Text);
                         scanTextElems.Add(sti);
                     }
                     ScanDocAllInfo.ScanPageText spt = new ScanDocAllInfo.ScanPageText(scanTextElems);


remove old stomt handling

remove old stomt handling

--- Scripts/StomtAPI.cs
+++ Scripts/StomtAPI.cs
@@ -11,8 +11,6 @@

 namespace Stomt
 {
-
-
     /// <summary>
     /// A single stomt-track.
     /// </summary>
@@ -100,738 +98,6 @@
 		/// </summary>
         public string TargetImageURL { get; set; }

-
-
-		/// <summary>
-		/// Creates a new anonymous stomt on the game's target.
-		/// </summary>
-		/// <param name="positive">The stomt type. True for "I like" and false for "I wish".</param>
-		/// <param name="text">The stomt message.</param>
-		public void CreateStomt(bool positive, string text)
-		{
-			CreateStomt(positive, _targetId, text);
-		}
-
-		/// <summary>
-		/// Creates a new anonymous stomt on the specified target.
-		/// </summary>
-		/// <param name="positive">The stomt type. True for "I like" and false for "I wish".</param>
-		/// <param name="target">The target to post the stomt to.</param>
-		/// <param name="text">The stomt message.</param>
-		public void CreateStomt(bool positive, string target, string text)
-		{
-			var json = new StringBuilder();
-			var writer = new LitJson.JsonWriter(json);
-
-			writer.WriteObjectStart();
-			writer.WritePropertyName("anonym");
-			writer.Write(true);
-			writer.WritePropertyName("positive");
-			writer.Write(positive);
-			writer.WritePropertyName("target_id");
-			writer.Write(target);
-			writer.WritePropertyName("text");
-			writer.Write(text);
-			writer.WriteObjectEnd();
-
-			StartCoroutine(CreateStomtAsync(json.ToString()));
-		}
-
-        public void CreateStomtWidthFile(bool positive, string text, string file, string fileTag)
-        {
-            CreateStomtWidthFile(positive, this.TargetID, text, file, fileTag);
-        }
-
-        public void CreateStomtWidthFile(bool positive, string target, string text, string file, string fileTag)
-        {
-            StartCoroutine(CreateStomtWidthFileAsync(positive, target, text, file, fileTag));
-        }
-
-        IEnumerator CreateStomtWidthFileAsync(bool positive, string target, string text, string file, string fileTag)
-        {
-            if (string.IsNullOrEmpty(file))
-            {
-                CreateStomt(positive, target, text);
-                yield break;
-            }
-
-            string jsonFileUpload = ConstructFileUploadAsJson(file, fileTag);
-
-            string jsonStomt = ConstructStomtWidthFileAsJson(positive, target, text, "{file_uid}");
-
-            StartCoroutine(CreateStomtWithFileAsync(jsonFileUpload, jsonStomt));
-        }
-
-        public void CreateStomtWidthImageAndFile(bool positive, string text, Texture2D image, string file, string fileTag)
-        {
-            this.CreateStomtWidthImageAndFile(positive, this.TargetID, text, image, file, fileTag);
-        }
-
-        public void CreateStomtWidthImageAndFile(bool positive, string target, string text, Texture2D image, string file, string fileTag)
-        {
-            StartCoroutine(CreateStomtWidthImageAndFileAsync(positive, target, text, image, file, fileTag));
-        }
-
-        IEnumerator CreateStomtWidthImageAndFileAsync(bool positive, string target, string text, Texture2D image, string file, string fileTag)
-        {
-            if (image == null && string.IsNullOrEmpty(file) )
-            {
-                CreateStomt(positive, target, text);
-                yield break;
-            }
-
-            string jsonImageUpload = ConstructImageUploadAsJson(image);
-            string jsonFileUpload = ConstructFileUploadAsJson(file, fileTag);
-
-            string jsonStomt = ConstructStomtWithImageAndFileAsJson(positive, target, text, "{img_name}", "{file_uid}");
-
-
-            StartCoroutine(CreateStomtWithImageAndFileAsync(jsonImageUpload, jsonFileUpload, jsonStomt));
-        }
-
-		/// <summary>
-		/// Creates a new anonymous stomt on the game's target with an image attached to it.
-		/// </summary>
-		/// <param name="positive">The stomt type. True for "I like" and false for "I wish".</param>
-		/// <param name="text">The stomt message.</param>
-		/// <param name="image">The image texture to upload and attach to the stomt.</param>
-		public void CreateStomtWithImage(bool positive, string text, Texture2D image)
-		{
-			CreateStomtWithImage(positive, _targetId, text, image);
-		}
-
-		/// <summary>
-		/// Creates a new anonymous stomt on the specified target with an image attached to it.
-		/// </summary>
-		/// <param name="positive">The stomt type. True for "I like" and false for "I wish".</param>
-		/// <param name="target">The target to post the stomt to.</param>
-		/// <param name="text">The stomt message.</param>
-		/// <param name="image">The image texture to upload and attach to the stomt.</param>
-		public void CreateStomtWithImage(bool positive, string target, string text, Texture2D image)
-		{
-			if (image == null)
-			{
-				CreateStomt(positive, target, text);
-				return;
-			}
-
-			byte[] imageBytes = image.EncodeToPNG();
-
-			if (imageBytes == null)
-			{
-				return;
-			}
-
-			var jsonImage = new StringBuilder();
-			var writerImage = new LitJson.JsonWriter(jsonImage);
-
-			writerImage.WriteObjectStart();
-			writerImage.WritePropertyName("images");
-			writerImage.WriteObjectStart();
-			writerImage.WritePropertyName("stomt");
-			writerImage.WriteArrayStart();
-			writerImage.WriteObjectStart();
-			writerImage.WritePropertyName("data");
-			writerImage.Write(Convert.ToBase64String(imageBytes));
-			writerImage.WriteObjectEnd();
-			writerImage.WriteArrayEnd();
-			writerImage.WriteObjectEnd();
-			writerImage.WriteObjectEnd();
-
-			var jsonStomt = new StringBuilder();
-			var writerStomt = new LitJson.JsonWriter(jsonStomt);
-
-			writerStomt.WriteObjectStart();
-			writerStomt.WritePropertyName("anonym");
-			writerStomt.Write(true);
-			writerStomt.WritePropertyName("positive");
-			writerStomt.Write(positive);
-			writerStomt.WritePropertyName("target_id");
-			writerStomt.Write(target);
-			writerStomt.WritePropertyName("text");
-			writerStomt.Write(text);
-			writerStomt.WritePropertyName("img_name");
-			writerStomt.Write("{img_name}");
-			writerStomt.WriteObjectEnd();
-
-			StartCoroutine(CreateStomtWithImageAsync(jsonImage.ToString(), jsonStomt.ToString()));
-		}
-
-        public string ConstructFileUploadAsJson(string file, string fileNameOrTag)
-        {
-            if (string.IsNullOrEmpty(file))
-            {
-                Debug.Log(" file IsNullOrEmpty");
-                return "";
-            }
-
-            // Convert to Base64
-            var plainTextBytes = System.Text.Encoding.UTF8.GetBytes(file);
-            file = System.Convert.ToBase64String(plainTextBytes);
-
-            var jsonFileUpload = new StringBuilder();
-            var writerImage = new LitJson.JsonWriter(jsonFileUpload);
-
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("files");
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("stomt");
-            writerImage.WriteArrayStart();
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("data");
-            writerImage.Write(file);
-            writerImage.WritePropertyName("filename");
-            writerImage.Write(fileNameOrTag);
-            writerImage.WriteObjectEnd();
-            writerImage.WriteArrayEnd();
-            writerImage.WriteObjectEnd();
-            writerImage.WriteObjectEnd();
-
-            return jsonFileUpload.ToString();
-        }
-
-        public string ConstructImageUploadAsJson(Texture2D image)
-        {
-            byte[] imageBytes = image.EncodeToPNG();
-
-            if (imageBytes == null)
-            {
-                return "";
-            }
-
-            var jsonImage = new StringBuilder();
-            var writerImage = new LitJson.JsonWriter(jsonImage);
-
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("images");
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("stomt");
-            writerImage.WriteArrayStart();
-            writerImage.WriteObjectStart();
-            writerImage.WritePropertyName("data");
-            writerImage.Write(Convert.ToBase64String(imageBytes));
-            writerImage.WriteObjectEnd();
-            writerImage.WriteArrayEnd();
-            writerImage.WriteObjectEnd();
-            writerImage.WriteObjectEnd();
-
-            return jsonImage.ToString();
-        }
-
-        public string ConstructStomtWithImageAsJson(bool positive, string target, string text, string img_name)
-        {
-            var jsonStomt = new StringBuilder();
-            var writerStomt = new LitJson.JsonWriter(jsonStomt);
-
-            writerStomt.WriteObjectStart();
-            writerStomt.WritePropertyName("anonym");
-            writerStomt.Write(true);
-            writerStomt.WritePropertyName("positive");
-            writerStomt.Write(positive);
-            writerStomt.WritePropertyName("target_id");
-            writerStomt.Write(target);
-            writerStomt.WritePropertyName("text");
-            writerStomt.Write(text);
-            writerStomt.WritePropertyName("img_name");
-            writerStomt.Write("{img_name}");
-            writerStomt.WriteObjectEnd();
-
-            return jsonStomt.ToString();
-        }
-
-        private string ConstructStomtWidthOptFileImageAsJson(bool positive, string target, string text, string img_name, string file_uid)
-        {
-            var jsonStomt = new StringBuilder();
-            var writerStomt = new LitJson.JsonWriter(jsonStomt);
-
-            writerStomt.WriteObjectStart();
-            writerStomt.WritePropertyName("anonym");
-            writerStomt.Write(true);
-            writerStomt.WritePropertyName("positive");
-            writerStomt.Write(positive);
-            writerStomt.WritePropertyName("target_id");
-            writerStomt.Write(target);
-            writerStomt.WritePropertyName("text");
-            writerStomt.Write(text);
-
-            if(!string.IsNullOrEmpty(img_name))
-            {
-                writerStomt.WritePropertyName("img_name");
-                writerStomt.Write("{img_name}");
-            }
-
-            if(!string.IsNullOrEmpty(file_uid))
-            {
-                writerStomt.WritePropertyName("files");
-                writerStomt.WriteObjectStart();
-
-                writerStomt.WritePropertyName("stomt");
-                writerStomt.WriteObjectStart();
-
-                writerStomt.WritePropertyName("file_uid");
-                writerStomt.Write(file_uid);
-
-                writerStomt.WriteObjectEnd();
-                writerStomt.WriteObjectEnd();
-            }
-
-            writerStomt.WriteObjectEnd();
-
-            return jsonStomt.ToString();
-        }
-
-        public string ConstructStomtWidthFileAsJson(bool positive, string target, string text, string file_uid)
-        {
-            return ConstructStomtWidthOptFileImageAsJson(positive, target, text, "", file_uid);
-        }
-
-        public string ConstructStomtWithImageAndFileAsJson(bool positive, string target, string text, string img_name, string file_uid)
-        {
-            return ConstructStomtWidthOptFileImageAsJson(positive, target, text, img_name, file_uid);
-        }
-
-        public string ConstructStomtAsJson(bool positive, string target, string text)
-        {
-            var jsonStomt = new StringBuilder();
-            var writerStomt = new LitJson.JsonWriter(jsonStomt);
-
-            writerStomt.WriteObjectStart();
-            writerStomt.WritePropertyName("anonym");
-            writerStomt.Write(true);
-            writerStomt.WritePropertyName("positive");
-            writerStomt.Write(positive);
-            writerStomt.WritePropertyName("target_id");
-            writerStomt.Write(target);
-            writerStomt.WritePropertyName("text");
-            writerStomt.Write(text);
-            writerStomt.WriteObjectEnd();
-
-            return jsonStomt.ToString();
-        }
-
-		IEnumerator CreateStomtAsync(string json)
-		{
-			var data = Encoding.UTF8.GetBytes(json);
-
-			HttpWebRequest request = WebRequest("POST", string.Format("{0}/stomts", restServerURL));
-			request.ContentLength = data.Length;
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			//////////////////////////////////////////////////////////////////
-			// Send request
-			//////////////////////////////////////////////////////////////////
-
-			var async1 = request.BeginGetRequestStream(null, null);
-
-			while (!async1.IsCompleted)
-			{
-				yield return null;
-			}
-
-			try
-			{
-				using (var requestStream = request.EndGetRequestStream(async1))
-				{
-					requestStream.Write(data, 0, data.Length);
-				}
-			}
-			catch (WebException ex)
-			{
-				Debug.LogException(ex);
-				yield break;
-			}
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			// Wait for response
-			var async2 = request.BeginGetResponse(null, null);
-
-			while (!async2.IsCompleted)
-			{
-				yield return null;
-			}
-
-			HttpWebResponse response;
-			var responseDataText = string.Empty;
-
-			try
-			{
-				response = (HttpWebResponse)request.EndGetResponse(async2);
-				this.NetworkError = false;
-			}
-			catch (WebException ex)
-			{
-				this.NetworkError = true;
-				Debug.LogWarning("Could not send stomt: " + ex.ToString());
-				yield break;
-
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Read response stream
-			//////////////////////////////////////////////////////////////////
-
-			using (var responseStream = response.GetResponseStream())
-			{
-				if (responseStream == null)
-				{
-					yield break;
-				}
-
-				var buffer = new byte[2048];
-				int length;
-
-				while ((length = responseStream.Read(buffer, 0, buffer.Length)) > 0)
-				{
-					responseDataText += Encoding.UTF8.GetString(buffer, 0, length);
-				}
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Analyze JSON data
-			//////////////////////////////////////////////////////////////////
-
-			LitJson.JsonData responseData = LitJson.JsonMapper.ToObject(responseDataText);
-
-			if (responseData.Keys.Contains("error"))
-			{
-				Debug.LogError((string)responseData["error"]["msg"]);
-				yield break;
-			}
-
-			// Store access token
-			if (responseData.Keys.Contains("meta"))
-			{
-				string accesstoken = (string)responseData["meta"]["accesstoken"];
-				this.config.SetAccessToken(accesstoken);
-			}
-
-			string stomt_id = (string)responseData["data"]["id"];
-
-			this.SendTrack(this.CreateTrack("stomt", "submit", stomt_id));
-
-		}
-
-		IEnumerator CreateStomtWithImageAsync(string jsonImage, string jsonStomt)
-		{
-			var data = Encoding.UTF8.GetBytes(jsonImage);
-
-			HttpWebRequest request = WebRequest("POST", string.Format("{0}/images", restServerURL));
-			request.ContentLength = data.Length;
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			//////////////////////////////////////////////////////////////////
-			// Send request
-			//////////////////////////////////////////////////////////////////
-
-			var async1 = request.BeginGetRequestStream(null, null);
-
-			while (!async1.IsCompleted)
-			{
-				yield return null;
-			}
-
-			try
-			{
-				using (var requestStream = request.EndGetRequestStream(async1))
-				{
-					requestStream.Write(data, 0, data.Length);
-				}
-			}
-			catch (WebException ex)
-			{
-				Debug.LogException(ex);
-				yield break;
-			}
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			// Wait for response
-			var async2 = request.BeginGetResponse(null, null);
-
-			while (!async2.IsCompleted)
-			{
-				yield return null;
-			}
-
-			HttpWebResponse response;
-			var responseDataText = string.Empty;
-
-			try
-			{
-				response = (HttpWebResponse)request.EndGetResponse(async2);
-				this.NetworkError = false;
-			}
-			catch (WebException ex)
-			{
-				this.NetworkError = true;
-				Debug.LogException(ex);
-				yield break;
-
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Read response stream
-			//////////////////////////////////////////////////////////////////
-
-			using (var responseStream = response.GetResponseStream())
-			{
-				if (responseStream == null)
-				{
-					yield break;
-				}
-
-				var buffer = new byte[2048];
-				int length;
-
-				while ((length = responseStream.Read(buffer, 0, buffer.Length)) > 0)
-				{
-					responseDataText += Encoding.UTF8.GetString(buffer, 0, length);
-				}
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Analyze JSON data
-			//////////////////////////////////////////////////////////////////
-
-			LitJson.JsonData responseData = LitJson.JsonMapper.ToObject(responseDataText);
-
-			if (responseData.Keys.Contains("error"))
-			{
-				Debug.LogError((string)responseData["error"]["msg"]);
-				yield break;
-			}
-
-			// Store access token
-			if(responseData.Keys.Contains("meta"))
-			{
-				string accesstoken = (string)responseData["meta"]["accesstoken"];
-				this.config.SetAccessToken(accesstoken);
-			}
-
-			var imagename = (string)responseData["data"]["images"]["stomt"]["name"];
-
-			yield return StartCoroutine(CreateStomtAsync(jsonStomt.Replace("{img_name}", imagename)));
-		}
-
-		IEnumerator CreateStomtWithFileAsync(string jsonFile, string jsonStomt)
-		{
-			var data = Encoding.UTF8.GetBytes(jsonFile);
-
-			HttpWebRequest request = WebRequest("POST", string.Format("{0}/files", restServerURL));
-			request.ContentLength = data.Length;
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			//////////////////////////////////////////////////////////////////
-			// Send request
-			//////////////////////////////////////////////////////////////////
-
-			var async1 = request.BeginGetRequestStream(null, null);
-
-			while (!async1.IsCompleted)
-			{
-				yield return null;
-			}
-
-			try
-			{
-				using (var requestStream = request.EndGetRequestStream(async1))
-				{
-					requestStream.Write(data, 0, data.Length);
-				}
-			}
-			catch (WebException ex)
-			{
-				Debug.LogException(ex);
-				yield break;
-			}
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			// Wait for response
-			var async2 = request.BeginGetResponse(null, null);
-
-			while (!async2.IsCompleted)
-			{
-				yield return null;
-			}
-
-			HttpWebResponse response;
-			var responseDataText = string.Empty;
-
-			try
-			{
-				response = (HttpWebResponse)request.EndGetResponse(async2);
-				this.NetworkError = false;
-			}
-			catch (WebException ex)
-			{
-				this.NetworkError = true;
-				Debug.LogException(ex);
-				yield break;
-
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Read response stream
-			//////////////////////////////////////////////////////////////////
-
-			using (var responseStream = response.GetResponseStream())
-			{
-				if (responseStream == null)
-				{
-					yield break;
-				}
-
-				var buffer = new byte[2048];
-				int length;
-
-				while ((length = responseStream.Read(buffer, 0, buffer.Length)) > 0)
-				{
-					responseDataText += Encoding.UTF8.GetString(buffer, 0, length);
-				}
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Analyze JSON data
-			//////////////////////////////////////////////////////////////////
-
-			LitJson.JsonData responseData = LitJson.JsonMapper.ToObject(responseDataText);
-
-			if (responseData.Keys.Contains("error"))
-			{
-				Debug.LogError((string)responseData["error"]["msg"]);
-				yield break;
-			}
-
-			// Store access token
-			if (responseData.Keys.Contains("meta"))
-			{
-				string accesstoken = (string)responseData["meta"]["accesstoken"];
-				this.config.SetAccessToken(accesstoken);
-			}
-
-			var filename = (string)responseData["data"]["files"]["stomt"]["file_uid"];
-
-			yield return StartCoroutine(CreateStomtAsync(jsonStomt.Replace("{file_uid}", filename)));
-		}
-
-		IEnumerator CreateStomtWithImageAndFileAsync(string jsonImage, string jsonFile, string jsonStomt)
-		{
-			var data = Encoding.UTF8.GetBytes(jsonFile);
-
-			HttpWebRequest request = WebRequest("POST", string.Format("{0}/files", restServerURL));
-			request.ContentLength = data.Length;
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			//////////////////////////////////////////////////////////////////
-			// Send request
-			//////////////////////////////////////////////////////////////////
-
-			var async1 = request.BeginGetRequestStream(null, null);
-
-			while (!async1.IsCompleted)
-			{
-				yield return null;
-			}
-
-			try
-			{
-				using (var requestStream = request.EndGetRequestStream(async1))
-				{
-					requestStream.Write(data, 0, data.Length);
-				}
-			}
-			catch (WebException ex)
-			{
-				Debug.LogException(ex);
-				yield break;
-			}
-
-			// Workaround for certificate problem
-			ServicePointManager.ServerCertificateValidationCallback = RemoteCertificateValidationCallback;
-
-			// Wait for response
-			var async2 = request.BeginGetResponse(null, null);
-
-			while (!async2.IsCompleted)
-			{
-				yield return null;
-			}
-
-			HttpWebResponse response;
-			var responseDataText = string.Empty;
-
-			try
-			{
-				response = (HttpWebResponse)request.EndGetResponse(async2);
-				this.NetworkError = false;
-			}
-			catch (WebException ex)
-			{
-				this.NetworkError = true;
-				Debug.LogException(ex);
-				StartCoroutine(CreateStomtAsync(jsonStomt));
-				yield break;
-
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Read response stream
-			//////////////////////////////////////////////////////////////////
-
-			using (var responseStream = response.GetResponseStream())
-			{
-				if (responseStream == null)
-				{
-					yield break;
-				}
-
-				var buffer = new byte[2048];
-				int length;
-
-				while ((length = responseStream.Read(buffer, 0, buffer.Length)) > 0)
-				{
-					responseDataText += Encoding.UTF8.GetString(buffer, 0, length);
-				}
-			}
-
-			//////////////////////////////////////////////////////////////////
-			// Analyze JSON data
-			//////////////////////////////////////////////////////////////////
-
-			LitJson.JsonData responseData = LitJson.JsonMapper.ToObject(responseDataText);
-
-			if (responseData.Keys.Contains("error"))
-			{
-				Debug.LogError((string)responseData["error"]["msg"]);
-				yield break;
-			}
-
-			// Store access token
-			if (responseData.Keys.Contains("meta"))
-			{
-				string accesstoken = (string)responseData["meta"]["accesstoken"];
-				this.config.SetAccessToken(accesstoken);
-			}
-
-			var filename = (string)responseData["data"]["files"]["stomt"]["file_uid"];
-
-			yield return StartCoroutine(CreateStomtWithImageAsync(jsonImage, jsonStomt.Replace("{file_uid}", filename)));
-		}
-
-

         void Awake()
         {


RemoveNullify  DurationExpression

RemoveNullify  DurationExpression

--- Signum.Entities.Extensions/Operations/LogOperationDN.cs
+++ Signum.Entities.Extensions/Operations/LogOperationDN.cs
@@ -5,6 +5,7 @@
 using Signum.Entities.Authorization;
 using Signum.Utilities;
 using Signum.Entities.Logging;
+using System.Linq.Expressions;

 namespace Signum.Entities.Operations
 {
@@ -50,6 +51,14 @@
             set { Set(ref end, value, () => End); }
         }

+
+        static Expression<Func<OperationLogDN, double?>> DurationExpression =
+            log => (double?)(log.End - log.Start).Value.TotalMilliseconds;
+        public double? Duration
+        {
+            get { return end == null ? null : DurationExpression.Evaluate(this); }
+        }
+
         Lite<ExceptionDN> exception;
         public Lite<ExceptionDN> Exception
         {


add consumeAlert optional parameter in ExecuteSubmit

--- Signum.Web.Extensions.Selenium/EntityButtonContainer.cs
+++ Signum.Web.Extensions.Selenium/EntityButtonContainer.cs
@@ -96,10 +96,12 @@
             container.Selenium.Wait(() => container.TestTicks().Let(t => t != null && t != ticks));
         }

-        public static void ExecuteSubmit<T>(this NormalPage<T> container, ExecuteSymbol<T> symbol)
+        public static void ExecuteSubmit<T>(this NormalPage<T> container, ExecuteSymbol<T> symbol, bool consumeAlert = false)
               where T : Entity
         {
             container.OperationClick(symbol);
+            if (consumeAlert)
+                container.Selenium.ConsumeAlert();
             container.WaitLoadedAndId();
         }


fix game precis mapping

fix game precis mapping

--- src/BeyondEarthApp.Web.Api/AutoMappingConfiguration/Precis/GameConfigurator.cs
+++ src/BeyondEarthApp.Web.Api/AutoMappingConfiguration/Precis/GameConfigurator.cs
@@ -8,7 +8,12 @@
         public void Configure(IAutoMapper mapper)
         {
             mapper.CreateMap<Game, Models.Precis.GamePrecis>()
-                .ForMember(x => x.Links, opts => opts.Ignore());
+                .ForMember(x => x.Links, opts => opts.Ignore())
+                //TODO: dummy data
+                .ForMember(x => x.CitiesCount, opts => opts.UseValue<int>(10))
+                .ForMember(x => x.Supremacy, opts => opts.UseValue<short>(12))
+                .ForMember(x => x.Harmony, opts => opts.UseValue<short>(3))
+                .ForMember(x => x.Purity, opts => opts.UseValue<short>(7));
         }
     }
 }


AutoScroll behavior is only available for WPF


Make Params required (not default)

Make Params required (not default)

--- Tailor/Options.cs
+++ Tailor/Options.cs
@@ -10,13 +10,13 @@
 {
     public class Options
     {
-        [Option('a', "appDir", DefaultValue = "app", HelpText = "Directory app is placed in")]
+        [Option('a', "appDir", Required = true, HelpText = "Directory app is placed in")]
         public string AppDir { get; set; }

-        [Option('d', "outputDroplet", DefaultValue = "app", HelpText = "the output droplet")]
+        [Option('d', "outputDroplet", Required = true, HelpText = "the output droplet")]
         public string OutputDroplet { get; set; }

-        [Option('m', "outputMetadata", DefaultValue = "app", HelpText = "Directory to the output metadata json file")]
+        [Option('m', "outputMetadata", Required = true, HelpText = "Directory to the output metadata json file")]
         public string OutputMetadata { get; set; }

         [HelpOption]


ThickClient: simplify FilteredListSourceContents::Layout(bool)

Check the top parameter just once at the beginning of the method, no need
to check three times.

--- src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs
+++ src/Core/Banshee.ThickClient/Banshee.Sources.Gui/FilteredListSourceContents.cs
@@ -228,6 +228,8 @@
             //Hyena.Log.Information ("ListBrowser LayoutLeft");
             Reset ();

+            SchemaEntry<int> current_entry = top ? pane_top_position : pane_left_position;
+
             container = GetPane (!top);
             Paned filter_box = GetPane (top);
             filter_box.PositionSet = true;
@@ -258,12 +260,12 @@
             container.Pack2 (main_scrolled_window, true, false);
             browser_container = filter_box;

-            if ((top && pane_top_position.Equals (SchemaEntry<int>.Zero)) || (!top && pane_left_position.Equals (SchemaEntry<int>.Zero))) {
+            if (current_entry.Equals (SchemaEntry<int>.Zero)) {
                 throw new InvalidOperationException (String.Format ("No SchemaEntry found for {0} position of {1}",
                                                                     top.ToString (), this.GetType ().FullName));
             }
-            container.Position = top ? pane_top_position.DefaultValue : pane_left_position.DefaultValue;
-            PersistentPaneController.Control (container, top ? pane_top_position : pane_left_position);
+            container.Position = current_entry.DefaultValue;
+            PersistentPaneController.Control (container, current_entry);
             ShowPack ();
         }


No need for this to be partial anymore

No need for this to be partial anymore

--- TellCoreClient.cs
+++ TellCoreClient.cs
@@ -6,7 +6,7 @@
     public delegate void DeviceStateChangedHandler(object sender, DeviceStateChangedEventArgs e);
     public delegate void RawDeviceEventHandler(object sender, RawDeviceEventArgs e);

-    public partial class TellCoreClient : IDisposable
+    public class TellCoreClient : IDisposable
     {
         int? deviceChangedCallbackId;
         int? deviceStateChangedCallbackId;


fix: Update ChannelCreateAuditLogData.cs (#1195)

--- src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs
+++ src/Discord.Net.Rest/Entities/AuditLogs/DataTypes/ChannelCreateAuditLogData.cs
@@ -33,10 +33,10 @@

             foreach (var overwrite in overwritesModel.NewValue)
             {
-                var deny = overwrite.Value<ulong>("deny");
-                var permType = overwrite.Value<PermissionTarget>("type");
-                var id = overwrite.Value<ulong>("id");
-                var allow = overwrite.Value<ulong>("allow");
+                var deny = overwrite["deny"].ToObject<ulong>(discord.ApiClient.Serializer);
+                var permType = overwrite["type"].ToObject<PermissionTarget>(discord.ApiClient.Serializer);
+                var id = overwrite["id"].ToObject<ulong>(discord.ApiClient.Serializer);
+                var allow = overwrite["allow"].ToObject<ulong>(discord.ApiClient.Serializer);

                 overwrites.Add(new Overwrite(id, permType, new OverwritePermissions(allow, deny)));
             }


Cancel out of notifications if they are not enabled.

--- src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs
+++ src/Foundatio.Repositories.Elasticsearch/Repositories/ElasticRepositoryBase.cs
@@ -966,6 +966,9 @@
         }

         protected virtual Task PublishChangeTypeMessageAsync(ChangeType changeType, string id, IDictionary<string, object> data = null, TimeSpan? delay = null) {
+            if (!NotificationsEnabled)
+                return Task.CompletedTask;
+
             return PublishMessageAsync(new EntityChanged {
                 ChangeType = changeType,
                 Id = id,
@@ -975,7 +978,7 @@
         }

         protected virtual async Task PublishMessageAsync(EntityChanged message, TimeSpan? delay = null) {
-            if (_messagePublisher == null)
+            if (!NotificationsEnabled || _messagePublisher == null)
                 return;

             if (BeforePublishEntityChanged != null) {


1) Cleaned up CLContext

1) Cleaned up CLContext

--- scallion/CLContext.cs
+++ scallion/CLContext.cs
@@ -36,11 +36,11 @@
 		}
 		public CLKernel CreateKernel(IntPtr programId, string kernelName)
 		{
-			return new CLKernel(DeviceId, Device.Is64Bit, ContextId, CommandQueueId, programId, kernelName);
+			return new CLKernel(DeviceId, ContextId, CommandQueueId, programId, kernelName);
 		}
 		public CLBuffer<T> CreateBuffer<T>(MemFlags memFlags, T[] data) where T : struct
 		{
-			return new CLBuffer<T>(Device.Is64Bit, ContextId, CommandQueueId, memFlags, data);
+			return new CLBuffer<T>(ContextId, CommandQueueId, memFlags, data);
 		}
 	}
 	public unsafe class CLBuffer<T> : IDisposable where T : struct
@@ -50,9 +50,8 @@
 		public readonly IntPtr CommandQueueId;
 		public readonly bool IsDevice64Bit;
 		public readonly int BufferSize;
-		public CLBuffer(bool isDevice64Bit, IntPtr contextId, IntPtr commandQueueId, MemFlags memFlags, T[] data)
+		public CLBuffer(IntPtr contextId, IntPtr commandQueueId, MemFlags memFlags, T[] data)
 		{
-			IsDevice64Bit = isDevice64Bit;
 			CommandQueueId = commandQueueId;
 			Handle = GCHandle.Alloc(data, GCHandleType.Pinned);
 			ErrorCode error = ErrorCode.Success;
@@ -71,12 +70,6 @@

 		public void EnqueueRead()
 		{
-			/*
-			error = (ErrorCode)CL.EnqueueReadBuffer(hCmdQueue, hDeviceMemC, true, IntPtr.Zero,
-	  new IntPtr(cnDimension.ToInt32() * sizeof(float)),
-	  new IntPtr(pC), 0, null, (IntPtr[])null);
-			*/
-
 			ErrorCode error;
 			error = (ErrorCode)CL.EnqueueReadBuffer(CommandQueueId, BufferId, true, new IntPtr(0), new IntPtr(BufferSize),
 				Handle.AddrOfPinnedObject(), 0, (IntPtr*)IntPtr.Zero.ToPointer(), (IntPtr*)IntPtr.Zero.ToPointer());
@@ -111,12 +104,10 @@
 		public readonly IntPtr CommandQueueId;
 		public readonly IntPtr ProgramId;
 		public readonly string KernelName;
-		public readonly bool Is64BitDevice;
 		public readonly IntPtr DeviceId;
-		public CLKernel(IntPtr deviceId, bool is64BitDevice, IntPtr contextId, IntPtr commandQueueId, IntPtr programId, string kernelName)
+		public CLKernel(IntPtr deviceId, IntPtr contextId, IntPtr commandQueueId, IntPtr programId, string kernelName)
 		{
 			DeviceId = deviceId;
-			Is64BitDevice = is64BitDevice;
 			ContextId = contextId;
 			CommandQueueId = commandQueueId;
 			ProgramId = programId;
@@ -125,31 +116,27 @@
 			ErrorCode error;
 			KernelId = CL.CreateKernel(ProgramId, KernelName, out error);
 			if (error != ErrorCode.Success) throw new System.InvalidOperationException("Error calling CreateKernel");
-
-			//error = (ErrorCode)CL.EnqueueNDRangeKernel(hCmdQueue, hKernel, 1, null, &cnDimension, null, 0, null, null);
-			//if (error != ErrorCode.Success)
-			//    throw new Exception(error.ToString());
 		}
-		public void EnqueueNDRangeKernel()
+		public void EnqueueNDRangeKernel(int globalWorkSize, int localWorkSize)
 		{
 			ErrorCode error;
-			error = (ErrorCode)CL.EnqueueNDRangeKernel(CommandQueueId, KernelId, 1, null,
-				(IntPtr*)((IntPtr)new SizeT(1024*1024, Is64BitDevice)).ToPointer(),
-				(IntPtr*)((IntPtr)new SizeT(128, Is64BitDevice)).ToPointer(), 0, null, null);
+			IntPtr pglobalWorkSize = new IntPtr(globalWorkSize);
+			IntPtr plocalWorkSize = new IntPtr(localWorkSize);
+			error = (ErrorCode)CL.EnqueueNDRangeKernel(CommandQueueId, KernelId, 1, null, &pglobalWorkSize, &plocalWorkSize, 0, null, null);
 			if (error != ErrorCode.Success) throw new System.InvalidOperationException("Error calling EnqueueNDRangeKernel");
 		}
-		public void SetKernelArgLocal(int argIndex, ulong size)
+		public void SetKernelArgLocal(int argIndex, int size)
 		{
 			ErrorCode error;
-			error = (ErrorCode)CL.SetKernelArg(KernelId, argIndex, new SizeT(size, Is64BitDevice), IntPtr.Zero);
+			error = (ErrorCode)CL.SetKernelArg(KernelId, argIndex, new IntPtr(size), IntPtr.Zero);
 			if (error != ErrorCode.Success) throw new System.InvalidOperationException("Error calling SetKernelArg");
 		}
 		public void SetKernelArg<T>(int argIndex, T value) where T : struct
 		{
 			ErrorCode error;
 			var handle = GCHandle.Alloc(value, GCHandleType.Pinned);
-			ulong size = (ulong)Marshal.SizeOf(typeof(T));
-			error = (ErrorCode)CL.SetKernelArg(KernelId, argIndex, new SizeT(size, Is64BitDevice), handle.AddrOfPinnedObject());
+			int size = Marshal.SizeOf(typeof(T));
+			error = (ErrorCode)CL.SetKernelArg(KernelId, argIndex, new IntPtr(size), handle.AddrOfPinnedObject());
 			handle.Free();
 			if (error != ErrorCode.Success) throw new System.InvalidOperationException("Error calling SetKernelArg");
 		}
@@ -165,38 +152,11 @@
 			get
 			{
 				ErrorCode error;
-				SizeT ret = new SizeT(0, Is64BitDevice);
-				error = (ErrorCode)CL.GetKernelWorkGroupInfo(KernelId, DeviceId, KernelWorkGroupInfo.KernelPreferredWorkGroupSizeMultiple, new SizeT(ret.Size, Is64BitDevice), ret, (IntPtr*)IntPtr.Zero.ToPointer());
+				ulong ret = 0;
+				error = (ErrorCode)CL.GetKernelWorkGroupInfo(KernelId, DeviceId, KernelWorkGroupInfo.KernelPreferredWorkGroupSizeMultiple, new IntPtr(sizeof(IntPtr)), ref ret, (IntPtr*)IntPtr.Zero.ToPointer());
 				if (error != ErrorCode.Success) throw new System.InvalidOperationException("Error calling GetKernelWorkGroupInfo");
-				return ret.Value;
+				return ret;
 			}
 		}
 	}
-	public unsafe struct SizeT
-	{
-		public SizeT(ulong value, bool is64Bit)
-		{
-			_valueULong = value;
-			_valueUInt = unchecked((uint)value);
-			_is64Bit = is64Bit;
-		}
-		public ulong Value { get { return _valueULong; } }
-		public bool Is64Bit { get { return _is64Bit; } }
-		private ulong _valueULong;
-		private uint _valueUInt;
-		private bool _is64Bit;
-		public ulong Size
-		{
-			get { return _is64Bit ? (ulong)8 : (ulong)4; }
-		}
-		public static implicit operator ulong(SizeT sizeT)
-		{
-			return sizeT._valueULong;
-		}
-		public static implicit operator IntPtr(SizeT sizeT)
-		{
-			if (sizeT._is64Bit) return new IntPtr(&sizeT._valueULong);
-			else return new IntPtr(&sizeT._valueUInt);
-		}
-	}
 }


Make sure buffer size shows

Make sure buffer size shows

--- SlicerConfiguration/SlicerMapping/SliceEngineMapping.cs
+++ SlicerConfiguration/SlicerMapping/SliceEngineMapping.cs
@@ -102,6 +102,7 @@
 			SettingsKey.max_velocity,
 			SettingsKey.jerk_velocity,
 			SettingsKey.print_time_estimate_multiplier,
+			SettingsKey.gcode_buffer_size,
 			SettingsKey.max_acceleration,
 			SettingsKey.ip_address,
 			SettingsKey.ip_port,


Added tests for json document serialization / deserialization

--- src/Lime.Protocol.UnitTests/Serialization/Newtonsoft/JsonNetSerializerTests.cs
+++ src/Lime.Protocol.UnitTests/Serialization/Newtonsoft/JsonNetSerializerTests.cs
@@ -902,7 +902,6 @@
             var json = serializer.Serialize(command);
             var deserializedCommand = (Command)serializer.Deserialize(json);
         }
-

         #endregion

@@ -2124,6 +2123,53 @@
             select.Options[0].Value.ShouldBeNull();
         }

+        [Test]
+        [Category("Deserialize")]
+        public void Deserialize_RawJsonMessage_ReturnsJsonDocument()
+        {
+            // Arrange
+            var json =
+                "{\"id\":\"1\",\"to\":\"destination@limeprotocol.org\",\"type\":\"application\\/json\",\"content\":{\"expectUserResponse\":true,\"expectedInputs\":[{\"inputPrompt\":{\"richInitialPrompt\":{\"items\":[{\"simpleResponse\":{\"textToSpeech\":\"Which of these looks good?\"}}]}},\"possibleIntents\":[{\"intent\":\"actions.intent.OPTION\",\"inputValueData\":{\"@type\":\"type.googleapis.com\\/google.actions.v2.OptionValueSpec\",\"listSelect\":{\"items\":[{\"optionInfo\":{\"key\":\"first\",\"synonyms\":[\"synonym of KEY_ONE 1\",\"synonym of KEY_ONE 2\"]},\"description\":\"y\",\"title\":\"Number one\"},{\"optionInfo\":{\"key\":\"second\",\"synonyms\":[\"synonym of KEY_TWO 1\",\"synonym of KEY_TWO 2\"]},\"description\":\"x\",\"title\":\"Number two\"},{\"optionInfo\":{\"key\":\"third\",\"synonyms\":[\"synonym of KEY_THREE 1\",\"synonym of KEY_THREE 3\"]},\"description\":\"x\",\"title\":\"Number three\"}]}}}]}],\"conversationToken\":\"{\\\"data\\\":{}}\",\"userStorage\":\"{\\\"data\\\":{}}\"}}";
+            var target = GetTarget();
+
+            // Act
+            var actual = target.Deserialize(json);
+
+            // Assert
+            var actualMessage = actual.ShouldBeOfType<Message>();
+            var jsonDocument = actualMessage.Content.ShouldBeOfType<JsonDocument>();
+            var expectUserResponse = jsonDocument["expectUserResponse"].ShouldBeOfType<bool>();
+            expectUserResponse.ShouldBeTrue();
+            var array = jsonDocument["expectedInputs"].ShouldBeAssignableTo<JArray>();
+            array.Count.ShouldBe(1);
+            var jObject = array[0];
+            jObject["inputPrompt"].ShouldBeOfType<JObject>();
+        }
+
         #endregion
+
+        [Test]
+        [Category("Serialize")]
+        [Category("Deserialize")]
+        public void DeserializeAndSerialize_JsonDocument_ShouldReturnValidDocument()
+        {
+            // Arrange
+            var json =
+                "{\"id\":\"1\",\"to\":\"destination@limeprotocol.org\",\"type\":\"application\\/json\",\"content\":{\"expectUserResponse\":true,\"expectedInputs\":[{\"inputPrompt\":{\"richInitialPrompt\":{\"items\":[{\"simpleResponse\":{\"textToSpeech\":\"Which of these looks good?\"}}]}},\"possibleIntents\":[{\"intent\":\"actions.intent.OPTION\",\"inputValueData\":{\"@type\":\"type.googleapis.com\\/google.actions.v2.OptionValueSpec\",\"listSelect\":{\"items\":[{\"optionInfo\":{\"key\":\"first\",\"synonyms\":[\"synonym of KEY_ONE 1\",\"synonym of KEY_ONE 2\"]},\"description\":\"y\",\"title\":\"Number one\"},{\"optionInfo\":{\"key\":\"second\",\"synonyms\":[\"synonym of KEY_TWO 1\",\"synonym of KEY_TWO 2\"]},\"description\":\"x\",\"title\":\"Number two\"},{\"optionInfo\":{\"key\":\"third\",\"synonyms\":[\"synonym of KEY_THREE 1\",\"synonym of KEY_THREE 3\"]},\"description\":\"x\",\"title\":\"Number three\"}]}}}]}],\"conversationToken\":\"{\\\"data\\\":{}}\",\"userStorage\":\"{\\\"data\\\":{}}\"}}";
+            var target = GetTarget();
+
+            // Act
+            var actualDocument = target.Deserialize(target.Serialize(target.Deserialize(json)));
+
+            // Assert
+            var actualMessage = actualDocument.ShouldBeOfType<Message>();
+            var jsonDocument = actualMessage.Content.ShouldBeOfType<JsonDocument>();
+            var expectUserResponse = jsonDocument["expectUserResponse"].ShouldBeOfType<bool>();
+            expectUserResponse.ShouldBeTrue();
+            var array = jsonDocument["expectedInputs"].ShouldBeAssignableTo<JArray>();
+            array.Count.ShouldBe(1);
+            var jObject = array[0];
+            jObject["inputPrompt"].ShouldBeOfType<JObject>();
+        }
     }
 }


Unit test toevoegen volledig nieuwe graaf nu ook succesvol.

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

--- Solution/Cg2.EfWrapper/Entity/ObjectContextExtension.cs
+++ Solution/Cg2.EfWrapper/Entity/ObjectContextExtension.cs
@@ -518,8 +518,12 @@
                     toremove.Add(sourcelist[i]);
                     targetlist.PublicInvokeMethod("Remove", sourcelist[i]);
                 }
-                else if (sourcelist[i].ID != 0)
+                else
                 {
+                    // Zou ik moeten checken of sourcelist[i] al voorkomt
+                    // in targetlist? In het beste geval negeert EF
+                    // automatisch dubbele add's...
+
                     targetlist.PublicInvokeMethod("Add", sourcelist[i]);
                 }
             }


matching TakeItems stackSize default value up to other emotes (#2607)

--- Source/ACE.Server/WorldObjects/Managers/EmoteManager.cs
+++ Source/ACE.Server/WorldObjects/Managers/EmoteManager.cs
@@ -1062,17 +1062,17 @@
                     if (player != null)
                     {
                         var weenieItemToTake = emote.WeenieClassId ?? 0;
-                        var amountToTake = emote.StackSize ?? 0;
+                        var amountToTake = emote.StackSize ?? 1;

                         if (weenieItemToTake == 0)
                         {
-                            log.Warn($"EmoteManager.Excute: 0x{WorldObject.Guid} {WorldObject.Name} ({WorldObject.WeenieClassId}) EmoteType.TakeItems has invalid emote.WeenieClassId: {weenieItemToTake}");
+                            log.Warn($"EmoteManager.Execute: 0x{WorldObject.Guid} {WorldObject.Name} ({WorldObject.WeenieClassId}) EmoteType.TakeItems has invalid emote.WeenieClassId: {weenieItemToTake}");
                             break;
                         }

                         if (amountToTake < -1 || amountToTake == 0)
                         {
-                            log.Warn($"EmoteManager.Excute: 0x{WorldObject.Guid} {WorldObject.Name} ({WorldObject.WeenieClassId}) EmoteType.TakeItems has invalid emote.StackSize: {amountToTake}");
+                            log.Warn($"EmoteManager.Execute: 0x{WorldObject.Guid} {WorldObject.Name} ({WorldObject.WeenieClassId}) EmoteType.TakeItems has invalid emote.StackSize: {amountToTake}");
                             break;
                         }


refactoring and code cleanup

refactoring and code cleanup


{compile warning fix}

{compile warning fix}

git-tfs-id: [http://falcon:8080/tfs/Projects]$/Phalanger/Main;C2618

--- Source/Core/Info.cs
+++ Source/Core/Info.cs
@@ -702,7 +702,7 @@
     public static class PhalangerVersion
     {
         /// <summary>
-        /// Current Phalanger version obtained from <see cref="AssemblyFileVersionAttribute"/> or <see cref="AssemblyVersionAtribute"/> of this assembly.
+        /// Current Phalanger version obtained from <see cref="AssemblyFileVersionAttribute"/> or version of this assembly.
         /// </summary>
         public static readonly string/*!*/Current;


askud

askud


want protected set

want protected set


reformat

reformat


Use ManualResetEvent to signal writer in ThreadSafeEnumeration test rather than timing

--- List/ThreadSafeListSpecs.cs
+++ List/ThreadSafeListSpecs.cs
@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Threading;
 using System.Threading.Tasks;
 using FluentAssertions;
 using Xbehave;
@@ -67,7 +68,7 @@
         [Scenario]
         [Example(typeof (SimpleLockList<int>), 1000)]
         [Example(typeof (ReaderWriterLockList<int>), 1000)]
-        public void ThreadSafeEnumeration(Type listType, int expected, int actual, IList<int> sut)
+        public void ThreadSafeEnumeration(Type listType, int expected, int actual, ManualResetEventSlim signal, IList<int> sut)
         {
             "Given a {0}".f(() =>
             {
@@ -75,21 +76,27 @@
                 for (var i = 0; i < expected; i++)
                     sut.Add(i);
             });
+            "And a ManualResetEvent".f(() => signal = new ManualResetEventSlim(false));
             "When I start enumerating the list before another thread begins adding items".f(() =>
             {
-                Task.Run(() =>
+                var tasks = new List<Task>();
+                tasks.Add(Task.Run(() =>
                 {
                     // ReSharper disable once LoopCanBeConvertedToQuery
                     // ReSharper disable once UnusedVariable
                     foreach (var item in sut)
+                    {
+                        if (!signal.IsSet) signal.Set();
                         actual++;
-                });
-
-                Task.Delay(1).ContinueWith(t =>
+                    }
+                }));
+                tasks.Add(Task.Run(() =>
                 {
+                    signal.Wait();
                     for (var i = 0; i < expected; i++)
                         sut.Add(i);
-                }).Wait();
+                }));
+                Task.WaitAll(tasks.ToArray());
             });
             "Then the list should contain {1} items".f(() => actual.Should().Be(expected));
         }


メソッドをUIスレッド上で実行させるメソッドにオプションを追加しました。これにより元々そのスレッド上で動いているときも即実行するのではなく、必ずキューイングさせることができるようになりました。


Fixes #179

Fixes #179

--- source/Pulsar/Mediator.cs
+++ source/Pulsar/Mediator.cs
@@ -148,7 +148,7 @@
         /// Adds a message to the queue
         /// </summary>
         /// <param name="msg">Message to add in the queue</param>
-        public void QueueEvent(Message msg)
+        public void Queue(Message msg)
         {
             List<IEventHandler> listeners;
             _eventListenersMap.TryGetValue(msg.Event.EventHash, out listeners);


FindStructOrNullがStructSpecializationを返していたのをIStructBodyに変更 ISpecializationがジェネリック関数でない場合があるため、一旦ジェネリック変数のカウントで判断

--- src/Compiler/Lookup.cs
+++ src/Compiler/Lookup.cs
@@ -406,13 +406,14 @@
             g.Each(kv => mapper[kv.Key] = Typing.CreateVariableDetail(kv.Key.Name, kv.Value, VariableType.TypeParameter));
         }

-        public static StructSpecialization? FindStructOrNull(INamespace ns, string[] name, List<IStructBody> args)
+        public static IStructBody? FindStructOrNull(INamespace ns, string[] name, List<IStructBody> args)
         {
             if (ns is INamespaceBody nsb)
             {
                 foreach (var x in nsb.Structs.Where(x => TypeNameEquals(x, name)))
                 {
-                    if (x is ISpecialization g)
+                    //ToDo: g.Generics.Count > 0 ExternStruct patch
+                    if (x is ISpecialization g && g.Generics.Count > 0)
                     {
                         if (g.Generics.Count != args.Count) continue;
                         var gens = new GenericsMapper();
@@ -422,7 +423,7 @@
                     }
                     else
                     {
-                        return new StructSpecialization(x, new GenericsMapper());
+                        return x;
                     }
                 }
             }
@@ -459,7 +460,7 @@
             return null;
         }

-        public static IStructBody LoadStruct(INamespace ns, string[] name) => FindStructOrNull(ns, name, new List<IStructBody>())?.Body ?? throw new Exception();
+        public static IStructBody LoadStruct(INamespace ns, string[] name) => FindStructOrNull(ns, name, new List<IStructBody>()) ?? throw new Exception();

         public static IStructBody LoadStruct(INamespace ns, string name) => LoadStruct(ns, new string[] { name });


Remove unnecessary code from TestCase.

Remove unnecessary code from TestCase.

--- osu.Framework.Testing/TestCase.cs
+++ osu.Framework.Testing/TestCase.cs
@@ -2,7 +2,6 @@
 // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu-framework/master/LICENCE

 using System;
-using osu.Framework.Allocation;
 using osu.Framework.Extensions.TypeExtensions;
 using osu.Framework.Graphics;
 using osu.Framework.Graphics.Containers;
@@ -20,13 +19,9 @@

         public FillFlowContainer<StepButton> StepsContainer;

-        // TODO: Figure out how to make this private (e.g. through reflection).
-        //       Right now this is required for DrawVis to inspect the Drawable tree.
-        public Container Contents;
+        private Container content;

-        protected override Container<Drawable> Content => Contents;
-
-        protected DependencyContainer Dependencies { get; private set; }
+        protected override Container<Drawable> Content => content;

         protected TestCase()
         {
@@ -36,18 +31,12 @@
             Masking = true;
         }

-        [BackgroundDependencyLoader]
-        private void load(DependencyContainer deps)
-        {
-            Dependencies = deps;
-        }
-
         private const float steps_width = 180;
         private const float padding = 10;

         public virtual void Reset()
         {
-            if (Contents == null)
+            if (content == null)
             {
                 InternalChildren = new Drawable[]
                 {
@@ -66,7 +55,7 @@
                         AutoSizeAxes = Axes.Y,
                         Width = steps_width,
                     },
-                    Contents = new Container
+                    content = new Container
                     {
                         Padding = new MarginPadding
                         {
@@ -81,7 +70,7 @@
             }
             else
             {
-                Contents.Clear();
+                content.Clear();
                 StepsContainer.Clear();
             }
         }


Separate blocks with regions

Separate blocks with regions

--- src/Mages.Core/Ast/ExpressionParser.cs
+++ src/Mages.Core/Ast/ExpressionParser.cs
@@ -8,7 +8,13 @@

     sealed class ExpressionParser : IParser
     {
+        #region Fields
+
         private readonly AbstractScopeStack _scopes;
+
+        #endregion
+
+        #region ctor

         public ExpressionParser()
         {
@@ -16,6 +22,10 @@
             _scopes = new AbstractScopeStack(root);
         }

+        #endregion
+
+        #region Methods
+
         public List<IStatement> ParseStatements(IEnumerator<IToken> tokens)
         {
             return ParseNextStatements(tokens.NextNonIgnorable());
@@ -38,6 +48,10 @@

             return expr;
         }
+
+        #endregion
+
+        #region Statements

         private List<IStatement> ParseNextStatements(IEnumerator<IToken> tokens)
         {
@@ -250,6 +264,10 @@

             return ParseNextStatement(tokens);
         }
+
+        #endregion
+
+        #region Expressions

         private List<IExpression> ParseExpressions(IEnumerator<IToken> tokens)
         {
@@ -894,6 +912,10 @@
             return expr;
         }

+        #endregion
+
+        #region Helpers
+
         private static ParameterExpression GetParameters(IExpression x)
         {
             var args = x as ArgumentsExpression;
@@ -944,5 +966,7 @@
                 expr = new BinaryExpression.Multiply(expr, invalid);
             }
         }
+
+        #endregion
     }
 }


Add watcher for changing the windsor config file.

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

--- rhino-commons/Rhino.Commons/HttpModules/UnitOfWorkApplication.cs
+++ rhino-commons/Rhino.Commons/HttpModules/UnitOfWorkApplication.cs
@@ -40,6 +40,7 @@
 	public class UnitOfWorkApplication : HttpApplication, IContainerAccessor
 	{
 		private static IWindsorContainer windsorContainer;
+		private FileSystemWatcher watcher;

 		public UnitOfWorkApplication()
 		{
@@ -94,6 +95,8 @@
 		{
 			BeginRequest -= new EventHandler(UnitOfWorkApplication_BeginRequest);
 			EndRequest -= new EventHandler(UnitOfWorkApplication_EndRequest);
+			if(watcher!=null)
+				watcher.Dispose();
 		}

 		protected virtual void CreateContainer()
@@ -104,8 +107,17 @@
 				//In ASP.Net apps, the current directory and the base path are NOT the same.
 				windsorConfig = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, windsorConfig);
 			}
+			FileSystemEventHandler resetIoC = delegate { IoC.Reset(); };
+			watcher = new FileSystemWatcher(Path.GetDirectoryName(windsorConfig));
+			watcher.Filter = Path.GetFileName(windsorConfig);
+			watcher.Created += resetIoC;
+			watcher.Changed += resetIoC;
+			watcher.Deleted += resetIoC;
+
 			windsorContainer = new RhinoContainer(windsorConfig);
 			IoC.Initialize(windsorContainer);
+
+			watcher.EnableRaisingEvents = true;
 		}
 	}
 }


Style fix

Style fix

--- osu.Framework.Tests/MathUtils/TestInterpolation.cs
+++ osu.Framework.Tests/MathUtils/TestInterpolation.cs
@@ -20,8 +20,8 @@
         [Test]
         public void TestLagrange()
         {
-            double[] x = new double[] {0, 0.5, 1};
-            double[] y = new double[] {0, 0.35, 1};
+            double[] x = {0, 0.5, 1};
+            double[] y = {0, 0.35, 1};

             // lagrange of (0,0) (0.5,0.35) (1,1) is equal to 0.6x*x + 0.4x


Fix IC issues

Fix IC issues

--- osu.Framework/Graphics/Visualisation/ToolWindow.cs
+++ osu.Framework/Graphics/Visualisation/ToolWindow.cs
@@ -26,7 +26,7 @@

         private readonly FillFlowContainer header;

-        private float lastHeaderHeight = 0;
+        private float lastHeaderHeight;

         protected ToolWindow(string title, string keyHelpText)
         {
@@ -106,11 +106,6 @@
             });
         }

-        protected override void LoadComplete()
-        {
-            base.LoadComplete();
-        }
-
         protected override void PopIn() => this.FadeIn(100);

         protected override void PopOut() => this.FadeOut(100);
@@ -118,6 +113,7 @@
         protected override void UpdateAfterChildren()
         {
             base.UpdateAfterChildren();
+
             float headerH = header.LayoutSize.Y;
             if (lastHeaderHeight != headerH)
             {


Windows: Always use synchronization context to Invoke/AsyncInvoke, e.g. when main form is closed, causes issues

--- Source/Eto.Platform.Windows/Forms/ApplicationHandler.cs
+++ Source/Eto.Platform.Windows/Forms/ApplicationHandler.cs
@@ -169,34 +169,14 @@

 		public void Invoke(Action action)
 		{
-			if (Widget.MainForm != null)
-			{
-				var window = Widget.MainForm.GetContainerControl() ?? swf.Form.ActiveForm;
-
-				if (window != null && window.InvokeRequired)
-				{
-					window.Invoke(action);
-					return;
-				}
-			}
 			if (Thread.CurrentThread == mainThread)
 				action();
 			else if (context != null)
-				context.Post(state => action(), null);
+				context.Send(state => action(), null);
 		}

 		public void AsyncInvoke(Action action)
 		{
-			if (Widget.MainForm != null)
-			{
-				var window = Widget.MainForm.GetContainerControl() ?? swf.Form.ActiveForm;
-
-				if (window != null && window.InvokeRequired)
-				{
-					window.BeginInvoke(action);
-					return;
-				}
-			}
 			if (context != null)
 				context.Post(state => action(), null);
 		}


Disable SendAsync_SlowServerRespondsAfterDefaultReceiveTimeout_ThrowsHttpRequestException test

#17234

--- src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs
+++ src/System.Net.Http.WinHttpHandler/tests/FunctionalTests/WinHttpHandlerTest.cs
@@ -96,6 +96,7 @@
             }
         }

+        [ActiveIssue(17234)]
         [OuterLoop] // TODO: Issue #11345
         [Fact]
         [OuterLoop]


Use default hover sample instead of song-ping (they're the same sample anyway)

--- osu.Game/Screens/Select/Carousel/CarouselHeader.cs
+++ osu.Game/Screens/Select/Carousel/CarouselHeader.cs
@@ -113,7 +113,7 @@
                     RelativeSizeAxes = Axes.Both,
                 };

-                sampleHover = audio.Samples.Get("SongSelect/song-ping");
+                sampleHover = audio.Samples.Get("UI/default-hover");
             }

             public bool InsetForBorder


Add get best id method for user.

Add get best id method for user.

--- Source/Lib/TraktApiSharp/Objects/Get/Users/TraktUser.cs
+++ Source/Lib/TraktApiSharp/Objects/Get/Users/TraktUser.cs
@@ -3,38 +3,50 @@
     using Newtonsoft.Json;
     using System;

+    /// A Trakt user.
     public class TraktUser
     {
+        /// Gets or sets the user's username.
         [JsonProperty(PropertyName = "username")]
         public string Username { get; set; }

+        /// Gets or sets the user's privacy status.
         [JsonProperty(PropertyName = "private")]
         public bool? Private { get; set; }

+        /// Gets or sets the user's name.
         [JsonProperty(PropertyName = "name")]
         public string Name { get; set; }

+        /// Gets or sets the user's VIP status.
         [JsonProperty(PropertyName = "vip")]
         public bool? VIP { get; set; }

+        /// Gets or sets the user's VIP EP status.
         [JsonProperty(PropertyName = "vip_ep")]
         public bool? VIP_EP { get; set; }

+        /// Gets or sets the UTC datetime when the user joined Trakt.
         [JsonProperty(PropertyName = "joined_at")]
         public DateTime? JoinedAt { get; set; }

+        /// Gets or sets the user's location.
         [JsonProperty(PropertyName = "location")]
         public string Location { get; set; }

+        /// Gets or sets the user's about information.
         [JsonProperty(PropertyName = "about")]
         public string About { get; set; }

+        /// Gets or sets the user's gender.
         [JsonProperty(PropertyName = "gender")]
         public string Gender { get; set; }

+        /// Gets or sets the user's age.
         [JsonProperty(PropertyName = "age")]
         public int? Age { get; set; }

+        /// Gets or sets the collection of images for the user.
         [JsonProperty(PropertyName = "images")]
         public TraktUserImages Images { get; set; }
     }


Make method into a delegate.

Make method into a delegate.

--- src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder.cs
+++ src/Workspaces/Core/Portable/FindSymbols/FindReferences/DependentTypeFinder.cs
@@ -484,10 +484,8 @@
                 cancellationToken: cancellationToken);
         }

-        private static bool IsInterfaceOrNonSealedClass(INamedTypeSymbol t)
-        {
-            return t.TypeKind == TypeKind.Interface || IsNonSealedClass(t);
-        }
+        private static readonly Func<INamedTypeSymbol, bool> IsInterfaceOrNonSealedClass =
+            t => t.TypeKind == TypeKind.Interface || IsNonSealedClass(t);

         private static Task<IEnumerable<INamedTypeSymbol>> TransitivelyFindDerivedSourceClassesInProjectAsync(
             HashSet<INamedTypeSymbol> sourceAndMetadataTypes,


GSF.TimeSeries: Added a SystemSetting that allows the use of the new RouteMappingHighLatencyLowCpu routing method. You can consider using this routing method if you have high CPU utilization and do not have many cascading dependencies. This method adds mandatory wait times in the routing table so multiple frames can be routed together instead of one frame at a time.

--- Source/Libraries/GSF.TimeSeries/Adapters/IaonSession.cs
+++ Source/Libraries/GSF.TimeSeries/Adapters/IaonSession.cs
@@ -24,6 +24,7 @@
 //******************************************************************************************************

 using System;
+using System.Collections.Generic;
 using System.Data;
 using System.Linq;
 using System.Runtime.CompilerServices;
@@ -31,6 +32,7 @@
 using GSF.Annotations;
 using GSF.Collections;
 using GSF.Configuration;
+using GSF.Diagnostics;

 namespace GSF.TimeSeries.Adapters
 {
@@ -155,22 +157,65 @@
             m_defaultSampleSizeWarningThreshold = thresholdSettings["DefaultSampleSizeWarningThreshold"].ValueAsInt32();

             // Create a new set of routing tables
+            systemSettings.Add("RoutingTableConnectionString", "Method=Default", "Specifies the configuration options for the routing table");
+            string setting = systemSettings["RoutingTableConnectionString"].ValueAsString("");

             try
             {
-                if (System.IO.File.Exists(@"d:\Program Files\openPDC\UseNewRoutingAdapter.txt"))
+                Dictionary<string, string> routingTableConnectionString = setting.ParseKeyValuePairs();
+
+                if (routingTableConnectionString.ContainsKey("Method"))
                 {
-                    int delay = int.Parse(System.IO.File.ReadAllText(@"d:\Program Files\openPDC\UseNewRoutingAdapter.txt"));
-                    m_routingTables = new RoutingTables(new RouteMappingHighLatencyLowCpu(delay));
+                    string method = routingTableConnectionString["Method"];
+                    if (method.Equals("RouteMappingHighLatencyLowCpu", StringComparison.CurrentCultureIgnoreCase))
+                    {
+                        int latency = -1;
+
+                        if (routingTableConnectionString.ContainsKey("RouteLatencyMS"))
+                        {
+                            string latencyString = routingTableConnectionString["RouteLatencyMS"];
+                            if (int.TryParse(latencyString, out latency))
+                            {
+                                if (latency < 1 || latency > 500)
+                                {
+                                    Log.Publish(MessageLevel.Info, "Routing Table", "Invalid range of routing latency. Defaulting to 10 ms. (Range: 1ms to 500ms)", "Value: " + latencyString);
+                                    latency = 10;
+                                }
+                            }
+                            else
+                            {
+                                Log.Publish(MessageLevel.Info, "Routing Table", "Could not parse latency value. Defaulting to 10 ms.", "Value: " + latencyString);
+                                latency = 10;
+                            }
+                        }
+                        else
+                        {
+                            latency = 10;
+                        }
+
+                        Log.Publish(MessageLevel.Info, "Routing Table", "Using the default routing table.", "Latency: " + latency.ToString());
+                        m_routingTables = new RoutingTables(new RouteMappingHighLatencyLowCpu(latency));
+                    }
+                    else if (method.Equals("Default", StringComparison.CurrentCultureIgnoreCase))
+                    {
+                        Log.Publish(MessageLevel.Info, "Routing Table", "Using the default routing table.");
+                        m_routingTables = new RoutingTables();
+                    }
+                    else
+                    {
+                        Log.Publish(MessageLevel.Warning, "Routing Table", "Specified routing method is not recognized. The default will be used.", "Value: " + method);
+                        m_routingTables = new RoutingTables();
+                    }
                 }
                 else
                 {
+                    Log.Publish(MessageLevel.Info, "Routing Table", "Method not specified, using the default routing table.");
                     m_routingTables = new RoutingTables();
                 }
             }
             catch (Exception ex)
             {
-                System.IO.File.AppendAllText(@"d:\Program Files\openPDC\UseNewRoutingAdapterError.txt", ex.ToString());
+                Log.Publish(MessageLevel.Warning, "Routing Table", "Could not parse the routing table connection string. The default will be used.", "Value: " + setting, ex);
                 m_routingTables = new RoutingTables();
             }

@@ -885,6 +930,7 @@
         #region [ Static ]

         // Static Fields
+        private static readonly LogPublisher Log = Logger.CreatePublisher(typeof(IaonSession), MessageClass.Framework);
         private static DataSet s_currentRealTimeConfiguration;
         private static DataSet s_currentTemporalConfiguration;


Fix for #3248 - use the correct plugin to sing out (#3253)

* Fix for #3248 - use the correct plugin to sing out

* fix

* Comments

--- src/client/Microsoft.Identity.Client/Platforms/Features/WamBroker/WamBroker.cs
+++ src/client/Microsoft.Identity.Client/Platforms/Features/WamBroker/WamBroker.cs
@@ -868,9 +868,11 @@
             string homeTenantId = account?.HomeAccountId?.TenantId;
             if (!string.IsNullOrEmpty(homeTenantId))
             {
+                // If it's an AAD account, only the AAD plugin should remove it
+                // If it's an MSA account - MSA plugin should remove it, but in MSA-PT scenarios it's still the AAD plugin
                 bool isMsaRequest = await IsMsaRequestAsync(
                    appConfig.Authority,
-                   appConfig.TenantId,
+                   homeTenantId,
                    _wamOptions.MsaPassthrough).ConfigureAwait(false);

                 IWamPlugin wamPlugin = isMsaRequest ? _msaPlugin : _aadPlugin;


tag defName with module name

tag defName with module name

--- Source/MoonSpeak.cs
+++ Source/MoonSpeak.cs
@@ -15,10 +15,10 @@
     {
         public void LoadDataFromXmlCustom(System.Xml.XmlNode node)
         {
+            var targetMod = node.Attributes["Module"].Value;
             // Game complains if we don't have a defName
-            defName = "moonspeakmodule";
+            defName = "moonspeakmodule_" + targetMod;

-            var targetMod = node.Attributes["Module"].Value;
             Log.Message("Loading MoonSpeak Module " + targetMod);
             foreach (var mod in LoadedModManager.RunningMods)
             {