allow_url_fopen

allow_url_fopen

+ memory opt

--- src/Peachpie.Library/Options.cs
+++ src/Peachpie.Library/Options.cs
@@ -95,12 +95,14 @@
                 DefaultValue;
         }

-        static readonly GetSetDelegate EmptyGsr = new GetSetDelegate((ctx, s, name, value, action) => PhpValue.Null);
+        static readonly GetSetDelegate s_emptyGsr = new GetSetDelegate((ctx, s, name, value, action) => PhpValue.Null);

         static PhpValue GsrCore(Context ctx, IPhpConfigurationService config, string option, PhpValue value, IniAction action)
         {
             switch (option.ToLowerInvariant())
             {
+                case "allow_url_fopen":
+                    return (PhpValue)GetSet(ref config.Core.AllowUrlFopen, true, value, action);
                 case "include_path":
                     return (PhpValue)GetSet(ref config.Core.IncludePaths, ".", value, action);

@@ -157,107 +159,114 @@

         static void RegisterStandard()
         {
-            Register("allow_call_time_pass_reference", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("allow_url_fopen", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("allow_webdav_methods", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("always_populate_raw_post_data", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("arg_separator.input", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("arg_separator.output", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("asp_tags", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("assert.active", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("assert.bail", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("assert.callback", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("assert.quiet_eval", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("assert.warning", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("async_send", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("auto_append_file", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("auto_detect_line_endings", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("auto_prepend_file", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("browscap", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("cgi.force_redirect", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("cgi.redirect_status_env", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("cgi.rfc2616_headers", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("child_terminate", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("debugger.enabled", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("debugger.host", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("debugger.port", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("default_charset", IniFlags.Supported | IniFlags.Local | IniFlags.Http, EmptyGsr);
-            Register("default_mimetype", IniFlags.Supported | IniFlags.Local | IniFlags.Http, EmptyGsr);
-            Register("default_socket_timeout", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("define_syslog_variables", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("disable_classes", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("disable_functions", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("display_errors", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("display_startup_errors", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("doc_root", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("enable_dl", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("engine", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("error_append_string", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("error_log", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("error_prepend_string", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("error_reporting", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("expose_php", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("extension_dir", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("fastcgi.impersonate", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("file_uploads", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("from", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("gpc_order", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("html_errors", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("ignore_repeated_errors", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("ignore_repeated_source", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("ignore_user_abort", IniFlags.Supported | IniFlags.Local | IniFlags.Http, EmptyGsr);
-            Register("implicit_flush", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("include_path", IniFlags.Supported | IniFlags.Local, GsrCore);
-            Register("last_modified", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("log_errors", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("log_errors_max_len", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("magic_quotes_gpc", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("magic_quotes_runtime", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("magic_quotes_sybase", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("max_execution_time", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("max_input_time", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("memory_limit", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("mime_magic.magicfile", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("open_basedir", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("output_buffering", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("output_handler", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("post_max_size", IniFlags.Supported | IniFlags.Global | IniFlags.Http, GsrCore);
-            Register("precision", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("register_argc_argv", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("register_globals", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("register_long_arrays", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("report_memleaks", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode_allowed_env_vars", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode_exec_dir", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode_gid", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode_include_dir", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("safe_mode_protected_env_vars", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("session.auto_start", IniFlags.Supported | IniFlags.Global | IniFlags.Http, EmptyGsr);
-            Register("session.save_handler", IniFlags.Supported | IniFlags.Local | IniFlags.Http, EmptyGsr);
-            Register("session.serialize_handler", IniFlags.Supported | IniFlags.Local | IniFlags.Http, GsrSession);
-            Register("session.name", IniFlags.Supported | IniFlags.Global | IniFlags.Http, GsrSession);
-            Register("short_open_tag", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("sql.safe_mode", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("track_errors", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("unserialize_callback_func", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("upload_max_filesize", IniFlags.Supported | IniFlags.Global | IniFlags.Http, GsrCore);
-            Register("upload_tmp_dir", IniFlags.Supported | IniFlags.Global, EmptyGsr);
-            Register("url_rewriter.tags", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("user_agent", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("user_dir", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("variables_order", IniFlags.Supported | IniFlags.Local, EmptyGsr);
-            Register("warn_plus_overloading", IniFlags.Unsupported | IniFlags.Global, EmptyGsr);
-            Register("xbithack", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("y2k_compliance", IniFlags.Unsupported | IniFlags.Local, EmptyGsr);
-            Register("zend.ze1_compatibility_mode", IniFlags.Supported | IniFlags.Local, EmptyGsr);
+            // single instances of the delegate:
+            var gsrcore = new GetSetDelegate(GsrCore);
+            var gsrsession = new GetSetDelegate(GsrSession);
+            var gsrmail = new GetSetDelegate(GsrMail);
+
+            //
+
+            Register("allow_call_time_pass_reference", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("allow_url_fopen", IniFlags.Supported | IniFlags.Local, gsrcore);
+            Register("allow_webdav_methods", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("always_populate_raw_post_data", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("arg_separator.input", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("arg_separator.output", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("asp_tags", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("assert.active", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("assert.bail", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("assert.callback", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("assert.quiet_eval", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("assert.warning", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("async_send", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("auto_append_file", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("auto_detect_line_endings", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("auto_prepend_file", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("browscap", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("cgi.force_redirect", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("cgi.redirect_status_env", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("cgi.rfc2616_headers", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("child_terminate", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("debugger.enabled", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("debugger.host", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("debugger.port", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("default_charset", IniFlags.Supported | IniFlags.Local | IniFlags.Http, s_emptyGsr);
+            Register("default_mimetype", IniFlags.Supported | IniFlags.Local | IniFlags.Http, s_emptyGsr);
+            Register("default_socket_timeout", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("define_syslog_variables", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("disable_classes", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("disable_functions", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("display_errors", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("display_startup_errors", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("doc_root", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("enable_dl", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("engine", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("error_append_string", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("error_log", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("error_prepend_string", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("error_reporting", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("expose_php", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("extension_dir", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("fastcgi.impersonate", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("file_uploads", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("from", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("gpc_order", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("html_errors", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("ignore_repeated_errors", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("ignore_repeated_source", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("ignore_user_abort", IniFlags.Supported | IniFlags.Local | IniFlags.Http, s_emptyGsr);
+            Register("implicit_flush", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("include_path", IniFlags.Supported | IniFlags.Local, gsrcore);
+            Register("last_modified", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("log_errors", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("log_errors_max_len", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("magic_quotes_gpc", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("magic_quotes_runtime", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("magic_quotes_sybase", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("max_execution_time", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("max_input_time", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("memory_limit", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("mime_magic.magicfile", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("open_basedir", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("output_buffering", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("output_handler", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("post_max_size", IniFlags.Supported | IniFlags.Global | IniFlags.Http, gsrcore);
+            Register("precision", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("register_argc_argv", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("register_globals", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("register_long_arrays", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("report_memleaks", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode_allowed_env_vars", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode_exec_dir", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode_gid", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode_include_dir", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("safe_mode_protected_env_vars", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("session.auto_start", IniFlags.Supported | IniFlags.Global | IniFlags.Http, s_emptyGsr);
+            Register("session.save_handler", IniFlags.Supported | IniFlags.Local | IniFlags.Http, s_emptyGsr);
+            Register("session.serialize_handler", IniFlags.Supported | IniFlags.Local | IniFlags.Http, gsrsession);
+            Register("session.name", IniFlags.Supported | IniFlags.Global | IniFlags.Http, gsrsession);
+            Register("short_open_tag", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("sql.safe_mode", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("track_errors", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("unserialize_callback_func", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("upload_max_filesize", IniFlags.Supported | IniFlags.Global | IniFlags.Http, gsrcore);
+            Register("upload_tmp_dir", IniFlags.Supported | IniFlags.Global, s_emptyGsr);
+            Register("url_rewriter.tags", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("user_agent", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("user_dir", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("variables_order", IniFlags.Supported | IniFlags.Local, s_emptyGsr);
+            Register("warn_plus_overloading", IniFlags.Unsupported | IniFlags.Global, s_emptyGsr);
+            Register("xbithack", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("y2k_compliance", IniFlags.Unsupported | IniFlags.Local, s_emptyGsr);
+            Register("zend.ze1_compatibility_mode", IniFlags.Supported | IniFlags.Local, s_emptyGsr);

             // mail
-            Register("SMTP", IniFlags.Supported | IniFlags.Local, GsrMail);
-            Register("smtp_port", IniFlags.Supported | IniFlags.Local, GsrMail);
-            Register("sendmail_from", IniFlags.Supported | IniFlags.Local, GsrMail);
-            Register("mail.add_x_header", IniFlags.Supported | IniFlags.Local, GsrMail);
-            Register("mail.force_extra_parameters", IniFlags.Supported | IniFlags.Local, GsrMail);
+            Register("SMTP", IniFlags.Supported | IniFlags.Local, gsrmail);
+            Register("smtp_port", IniFlags.Supported | IniFlags.Local, gsrmail);
+            Register("sendmail_from", IniFlags.Supported | IniFlags.Local, gsrmail);
+            Register("mail.add_x_header", IniFlags.Supported | IniFlags.Local, gsrmail);
+            Register("mail.force_extra_parameters", IniFlags.Supported | IniFlags.Local, gsrmail);
         }

         /// <summary>


Fix requsetFeature in EmailViewRenderer

Fix requsetFeature in EmailViewRenderer

--- src/Postal/EmailViewRenderer.cs
+++ src/Postal/EmailViewRenderer.cs
@@ -100,9 +100,9 @@
             FeatureCollection featureCollection = new FeatureCollection();
             var requsetFeature_local = new HttpRequestFeature();
             requsetFeature_local.Method = "GET";
-            requsetFeature_local.Protocol = requsetFeature.Protocol;
-            requsetFeature_local.PathBase = requsetFeature.PathBase;
-            requsetFeature_local.Scheme = requsetFeature.Scheme;
+            requsetFeature_local.Protocol = request.Protocol;
+            requsetFeature_local.PathBase = request.PathBase;
+            requsetFeature_local.Scheme = request.Scheme;
             featureCollection.Set<IHttpRequestFeature>(requsetFeature_local);
             featureCollection.Set<IHttpResponseFeature>(new HttpResponseFeature());
             var httpContext = new DefaultHttpContext(featureCollection);


Removed uses of reflection for enumeration of enum members

--- src/ProtocolBuffers/EnumLite.cs
+++ src/ProtocolBuffers/EnumLite.cs
@@ -93,51 +93,28 @@
             }
         }

-        private readonly SortedList<int, IEnumLite> items;
-
-        public EnumLiteMap()
-        {
-            items = new SortedList<int, IEnumLite>();
-#if SILVERLIGHT || COMPACT_FRAMEWORK
-    // Silverlight doesn't support Enum.GetValues
-    // TODO(jonskeet): Validate that this reflection is permitted, e.g. in Windows Phone 7
-            foreach (System.Reflection.FieldInfo fi in typeof(TEnum).GetFields(System.Reflection.BindingFlags.Static | System.Reflection.BindingFlags.Public))
-            {
-                TEnum evalue = (TEnum) fi.GetValue(null);
-                items.Add(Convert.ToInt32(evalue), new EnumValue(evalue));
-            }
-#else
-            foreach (TEnum evalue in Enum.GetValues(typeof(TEnum)))
-            {
-                items.Add(Convert.ToInt32(evalue), new EnumValue(evalue));
-            }
-#endif
-        }
-
-        IEnumLite IEnumLiteMap.FindValueByNumber(int number)
-        {
-            return FindValueByNumber(number);
-        }
-
         public IEnumLite FindValueByNumber(int number)
         {
-            IEnumLite val;
-            return items.TryGetValue(number, out val) ? val : null;
+            if (Enum.IsDefined(typeof(TEnum), number))
+            {
+                return new EnumValue((TEnum)(object)number);
+            }
+            return null;
         }

         public IEnumLite FindValueByName(string name)
         {
-            IEnumLite val;
             if (Enum.IsDefined(typeof(TEnum), name))
             {
-                return items.TryGetValue((int) Enum.Parse(typeof(TEnum), name, false), out val) ? val : null;
+                object evalue = Enum.Parse(typeof(TEnum), name, false);
+                return new EnumValue((TEnum)evalue);
             }
             return null;
         }

         public bool IsValidValue(IEnumLite value)
         {
-            return items.ContainsKey(value.Number);
+            return Enum.IsDefined(typeof(TEnum), value.Number);
         }
     }
 }


change port to 3002

change port to 3002

--- IoT-Core/Program.cs
+++ IoT-Core/Program.cs
@@ -17,6 +17,7 @@
                 .UseContentRoot(Directory.GetCurrentDirectory())
                 .UseIISIntegration()
                 .UseStartup<Startup>()
+                .UseUrls("http://localhost:3002/")
                 .UseApplicationInsights()
                 .Build();


:+1:  给用户全称属性设置一个默认值。 :deciduous_tree:

:+1:  给用户全称属性设置一个默认值。 :deciduous_tree:

--- src/Security/Membership/User.cs
+++ src/Security/Membership/User.cs
@@ -79,7 +79,7 @@
 				throw new ArgumentNullException("name");

 			_userId = userId;
-			_name = name.Trim();
+			_name = _fullName = name.Trim();
 			_namespace = @namespace;
 			_createdTime = DateTime.Now;
 			_approved = true;


More commands

More commands

--- KraxbotOSS/Form1.cs
+++ KraxbotOSS/Form1.cs
@@ -527,6 +527,68 @@
                         }
                     }
                 }
+                else if (message.StartsWith("!yt ") && chatRoom.Search)
+                {
+                    // TODO: Same as !games
+                }
+            }
+
+            // User commands
+            if (chatRoom.Commands)
+            {
+                if (message == "!help")
+                    SendChatMessage(chatRoomID, "Check https://github.com/KraXarN/KraxbotOSS/wiki/Commands for all commands and how to use them");
+                else if (message == "!bday")
+                {
+                    // TODO: Make this once we can enter API keys
+                }
+                else if (message == "!users")
+                {
+                    // TODO: Make this once we can get all users in a chatroom
+                }
+                else if (message == "!invited")
+                    SendChatMessage(chatRoomID, chatRoom.InvitedName + " invited me to this chat");
+                else if (message == "!name")
+                {
+                    // TODO: Same as !bday
+                }
+                else if (message == "!ver")
+                    SendChatMessage(chatRoomID, string.Format("KraxbotOSS {0} by Kraxie / KraXarN", version));
+                else if (message == "!id")
+                    SendChatMessage(chatRoomID, string.Format("{0}'s SteamID is {1}", name, userID));
+                else if (message == "!chatid")
+                    SendChatMessage(chatRoomID, "This chat's SteamID is " + chatRoomID);
+                else if (message.StartsWith("!8ball"))
+                {
+                    string[] words = {
+                        "It is certain", "It is decidedly so", "Without a doubt",
+                        "Yes definitely", "You may rely on it", "As I see it, yes",
+                        "Most likely", "Outlook good", "Yes", "Signs point to yes",
+                        "Reply hazy try again", "Ask again later", "Better not tell you now",
+                        "Cannot predict now", "Concentrate and ask again", "Do not count on it",
+                        "My reply is no", "My sources say no", "Outlook not so good", "Very doubtful"
+                    };
+                    SendChatMessage(chatRoomID, words[new Random().Next(words.Length)]);
+                }
+                else if (message == "!time")
+                    SendChatMessage(chatRoomID, "Current time is " + DateTime.Now.ToShortTimeString());
+                else if (message.StartsWith("!roll"))
+                {
+                    int max = 100;
+                    int.TryParse(message.Split(' ')[1], out max);
+                    SendChatMessage(chatRoomID, "Your number is " + new Random().Next(0, max));
+                }
+                else if (message.StartsWith("!math "))
+                    SendChatMessage(chatRoomID, "=" + new DataTable().Compute(message.Substring(6), null).ToString());
+                else if (message.StartsWith("!players "))
+                {
+                    // TODO: Same as !bday
+                    // TODO: Also make !players if user is currently playing a game
+                }
+                else if (message.StartsWith("!weather "))
+                {
+                    // TODO: Same as !bday
+                }
             }
         }


Renaming

Renaming

--- NiceRegex.UnitTests/Methods/ThenTests.cs
+++ NiceRegex.UnitTests/Methods/ThenTests.cs
@@ -33,7 +33,7 @@
         [InlineData('+')]
         [InlineData('?')]
         [InlineData('\\')]
-        public void EscapesSpecialCharacters(char specialCharacter)
+        public void EscapesSpecialCharacter(char specialCharacter)
         {
             var niceRegex = RegularExpression.New().Then(specialCharacter);
             string escaped = Regex.Escape(specialCharacter.ToString());


Why waste time loading prims for an offline region?

At least at the moment.  In the future that might change.

--- Source/DataReader/RDBMap.cs
+++ Source/DataReader/RDBMap.cs
@@ -324,6 +324,15 @@
 								if (!MAP.TryGetValue(region_id, out region)) {
 									// The prims table on one of the rdb hosts has an entry for a region id that does not exist in the estates, regionsettings, and terrain tables.
 									// Or the DB has entries for both the domain AND the IP that domain points to.
+									continue;
+								}
+
+								if (!region.HasKnownCoordinates()) {
+									// Hey, the region is KNOWN to not have any clue as to where it is located.  Skippage.
+
+									// ISSUE: since the region location info is pulled from disk sometime much later this will result in offline regions that don't have their prim data.
+									// Not an issue ATM, but at some point offline with prims will be wanted.
+
 									continue;
 								}


indent away

indent away

--- samples/Playground/Program.cs
+++ samples/Playground/Program.cs
@@ -22,18 +22,25 @@
             {
                 var categories = foursquareContext.Categories.Get().Result;

-                PrintCategory(categories);
+                PrintCategory(categories, 0);
             }
         }

-        private static void PrintCategory(IReadOnlyCollection<VenueCategory> categories)
+        private static void PrintCategory(IReadOnlyCollection<VenueCategory> categories, int indentCount)
         {
             if (categories.Any())
             {
                 foreach (var venueCategory in categories)
                 {
-                    Console.WriteLine("{0}: {1}", venueCategory.Id, venueCategory.Name);
-                    PrintCategory(new ReadOnlyCollection<VenueCategory>(venueCategory.Categories.ToList()));
+                    for (int i = 0; i < indentCount; i++)
+                    {
+                        Console.Write("\t");
+                    }
+
+                    Console.Write("{0}: {1}", venueCategory.Id, venueCategory.Name);
+                    Console.Write(Environment.NewLine);
+
+                    PrintCategory(new ReadOnlyCollection<VenueCategory>(venueCategory.Categories.ToList()), indentCount + 1);
                 }
             }
         }


Refactor harcoded constant checks

Refactor harcoded constant checks

--- LifeDISA/Program.cs
+++ LifeDISA/Program.cs
@@ -203,7 +203,7 @@
 						string paramB = evalvar();

 						string paramAShort = paramA.Split('.').Last();
-						if(paramAShort == "INHAND" || paramAShort == "COL_BY" || paramAShort == "HIT_BY" || paramAShort == "HIT" || paramAShort == "COLLIDING_ACTOR")
+						if(isTargetingObject(paramAShort))
 							paramB = objectsByIndex[int.Parse(paramB)];

 						if(paramAShort == "ANIM")
@@ -528,10 +528,9 @@
 						pos +=2;

 						string lastSwitchVar = switchEvalVar[pos-4].Split('.').Last();
-						if(lastSwitchVar == "INHAND" || lastSwitchVar == "COL_BY" || lastSwitchVar == "HIT_BY"
-						   || lastSwitchVar == "HIT" || lastSwitchVar == "COLLIDING_ACTOR")
+						if(isTargetingObject(lastSwitchVar))
 							writer.Write("{0}", objectsByIndex[curr]);
-						else if (lastSwitchVar == "ACTION")
+						else if (isTargetingAction(lastSwitchVar))
 							writer.Write("{0}", getActionName(curr));
 						else if (lastSwitchVar == "ANIM")
 							writer.Write("{0}", vars.GetText("ANIMS", curr));
@@ -559,10 +558,9 @@
 							curr = ReadShort(allBytes[pos+0], allBytes[pos+1]);
 							pos += 2;

-							if(lastSwitchVarb == "INHAND" || lastSwitchVarb == "COL_BY" || lastSwitchVarb == "HIT_BY"
-							   || lastSwitchVarb == "HIT" || lastSwitchVarb == "COLLIDING_ACTOR")
+							if(isTargetingObject(lastSwitchVarb))
 								writer.Write("{0}", objectsByIndex[curr]);
-							else if (lastSwitchVarb == "ACTION")
+							else if (isTargetingAction(lastSwitchVarb))
 								writer.Write("{0}", getActionName(curr));
 							else if (lastSwitchVarb == "ANIM")
 								writer.Write("{0}", vars.GetText("ANIMS", curr));
@@ -812,6 +810,21 @@
 			string eval = evalvarImpl(out actor);
 			if(actor != -1) eval = objectsByIndex[actor] + "." + eval;
 			return eval;
+		}
+
+		public static bool isTargetingAction(string varName)
+		{
+			return varName == "ACTION"
+				|| varName == "player_current_action";
+		}
+
+		public static bool isTargetingObject(string varName)
+		{
+			return varName == "INHAND"
+				|| varName == "COL_BY"
+				|| varName == "HIT_BY"
+				|| varName == "HIT"
+				|| varName == "ACTOR_COLLIDER";
 		}

 		public static string evalvarImpl(out int actor)


Fix iOS app entry for raw keyboard input

--- osu.iOS/Application.cs
+++ osu.iOS/Application.cs
@@ -9,7 +9,7 @@
     {
         public static void Main(string[] args)
         {
-            UIApplication.Main(args, null, "AppDelegate");
+            UIApplication.Main(args, "GameUIApplication", "AppDelegate");
         }
     }
 }


CW6Device: correctly encode multipart field/file names

--- OceColorWave6x0HealthModule/CW6Device.cs
+++ OceColorWave6x0HealthModule/CW6Device.cs
@@ -177,7 +177,7 @@
                 return JsonConvert.DeserializeObject<T>(docString);
             }
         }
-
+
         public void Update()
         {
             var statusObject = FetchJson<CW6JsonStatus.Status>(StatusEndpoint);
@@ -335,7 +335,7 @@
             var innerContent = new StringContent(value, PrinterHealthUtils.Utf8NoBom);
             innerContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
             {
-                Name = name
+                Name = $"\"{name}\""
             };
             mfdc.Add(innerContent);
         }
@@ -345,8 +345,8 @@
             var innerContent = new ByteArrayContent(content);
             innerContent.Headers.ContentDisposition = new ContentDispositionHeaderValue("form-data")
             {
-                Name = fieldName,
-                FileName = fileName
+                Name = $"\"{fieldName}\"",
+                FileName = $"\"{fileName}\""
             };
             innerContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream");
             mfdc.Add(innerContent);


adjustable countdown duration

adjustable countdown duration

--- OnlyT.CountdownTimer/CountdownControl.cs
+++ OnlyT.CountdownTimer/CountdownControl.cs
@@ -223,6 +223,11 @@
             _secondsBall.Width = (double)_innerCircleRadius / 6;
             _secondsBall.Height = (double)_innerCircleRadius / 6;

+            if (_countdownDurationMins == 1)
+            {
+                _secondsBall.Visibility = Visibility.Hidden;
+            }
+
             _time.Text = GetTimeText();

             var sz = GetTextSize(_time.Text, useExtent: true);


Upped VERSION_NUMBER in master to 0.7.2.

--- OpenSim/Framework/Servers/VersionInfo.cs
+++ OpenSim/Framework/Servers/VersionInfo.cs
@@ -29,7 +29,7 @@
 {
     public class VersionInfo
     {
-        private const string VERSION_NUMBER = "0.7.1";
+        private const string VERSION_NUMBER = "0.7.2";
         private const Flavour VERSION_FLAVOUR = Flavour.Dev;

         public enum Flavour


[Modify] Remove it

[Modify] Remove it

--- websocket-sharp/Net/HttpListener.cs
+++ websocket-sharp/Net/HttpListener.cs
@@ -516,24 +516,6 @@
       }
     }

-    private void sendServiceUnavailable ()
-    {
-      HttpListenerContext[] ctxs = null;
-      lock (_ctxQueueSync) {
-        if (_ctxQueue.Count == 0)
-          return;
-
-        ctxs = _ctxQueue.ToArray ();
-        _ctxQueue.Clear ();
-      }
-
-      foreach (var ctx in ctxs) {
-        var res = ctx.Response;
-        res.StatusCode = (int) HttpStatusCode.ServiceUnavailable;
-        res.Close ();
-      }
-    }
-
     #endregion

     #region Internal Methods


Fixes Mantis #3032. The VersionInfo.cs file was not updated from 0.6.1 to 0.6.2 with the last minor release and shows incorrectly on the console. This will resolve itself on the next svn update.

--- OpenSim/Framework/Servers/VersionInfo.cs
+++ OpenSim/Framework/Servers/VersionInfo.cs
@@ -32,7 +32,7 @@
         /// <value>
         /// This is the OpenSim version string.  Change this if you are releasing a new OpenSim version.
         /// </value>
-        public readonly static string Version = "OpenSimulator Server  0.6.1";  // stay with 27 chars (used in regioninfo)
+        public readonly static string Version = "OpenSimulator Server  0.6.2";  // stay with 27 chars (used in regioninfo)

         /// <value>
         /// This is the external interface version.  It is separate from the OpenSimulator project version.


[Modify] 2021

[Modify] 2021

--- websocket-sharp/Net/HttpListener.cs
+++ websocket-sharp/Net/HttpListener.cs
@@ -8,7 +8,7 @@
  * The MIT License
  *
  * Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
- * Copyright (c) 2012-2016 sta.blockhead
+ * Copyright (c) 2012-2021 sta.blockhead
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal


Add some console debug to help fix a threadlock issue.

--- OpenSim/Region/Framework/Scenes/Scene.cs
+++ OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3335,7 +3335,9 @@
                         m_sceneGridService.SendCloseChildAgentConnections(agentID, regions);

                     }
+                    m_log.Debug("[Scene] Beginning ClientClosed");
                     m_eventManager.TriggerClientClosed(agentID, this);
+                    m_log.Debug("[Scene] Finished ClientClosed");
                 }
                 catch (NullReferenceException)
                 {
@@ -3343,7 +3345,9 @@
                     // Avatar is already disposed :/
                 }

+                m_log.Debug("[Scene] Beginning OnRemovePresence");
                 m_eventManager.TriggerOnRemovePresence(agentID);
+                m_log.Debug("[Scene] Finished OnRemovePresence");
                 ForEachClient(
                     delegate(IClientAPI client)
                     {
@@ -3359,8 +3363,11 @@
                 }

                 // Remove the avatar from the scene
+                m_log.Debug("[Scene] Begin RemoveScenePresence");
                 m_sceneGraph.RemoveScenePresence(agentID);
+                m_log.Debug("[Scene] Finished RemoveScenePresence. Removing the client manager");
                 m_clientManager.Remove(agentID);
+                m_log.Debug("[Scene] Removed the client manager. Firing avatar.close");

                 try
                 {
@@ -3374,9 +3381,9 @@
                 {
                     m_log.Error("[SCENE] Scene.cs:RemoveClient exception: " + e.ToString());
                 }
-
+                m_log.Debug("[Scene] Done. Firing RemoveCircuit");
                 m_authenticateHandler.RemoveCircuit(avatar.ControllingClient.CircuitCode);
-
+                m_log.Debug("[Scene] The avatar has left the building");
                 //m_log.InfoFormat("[SCENE] Memory pre  GC {0}", System.GC.GetTotalMemory(false));
                 //m_log.InfoFormat("[SCENE] Memory post GC {0}", System.GC.GetTotalMemory(true));
             }


final final edit

final final edit

but a different one at that

--- CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs
+++ CompatBot/Utils/ResultFormatters/LogParserResultFormatter.cs
@@ -44,7 +44,7 @@
                     state.PiracyContext = state.PiracyContext.Sanitize();
                     var msg = $"{message.Author.Mention}, you are being denied further support until you legally dump the game.\n" +
                               "Please note that the RPCS3 community and its developers do not support piracy.\n" +
-                              "Most of the issues caused by pirated dumps is because they have been tampered with in some way " +
+                              "Most of the issues with pirated dumps are because they have been tampered with in some way " +
                               "and therefore act unpredictably on RPCS3.\n" +
                               "If you need help obtaining legal dumps, please read <https://rpcs3.net/quickstart>";
                     builder.WithColor(Config.Colors.LogAlert)


Homepage redirect changed - in debug mode redirects to Debug page (home/index.cshtml view), in release mode redirects to Game

--- GameUi/Controllers/HomeController.cs
+++ GameUi/Controllers/HomeController.cs
@@ -36,8 +36,12 @@
         {
             ViewBag.Message = "Welcome";

+            //in debug mode redirects to Debug page (home/index.cshtml view), in release mode redirects to Game
+#if DEBUG
+            return View();
+#else
             return RedirectToAction("Index", "Default", new { Area = "Game" });
-            //return View();
+#endif
         }

         [AllowAnonymous]


Started to fix a problem with the wrong position / land parcel checked on avatar crossing when seated, but we shouldn't check at all for root agents or seated avatars.

--- OpenSim/Region/Framework/Scenes/Scene.cs
+++ OpenSim/Region/Framework/Scenes/Scene.cs
@@ -4280,18 +4280,31 @@
                     return ChildAgentUpdate2Response.Error;
                 }

+                if (!SP.IsChildAgent)
+                {
+                    // Just ignore it (but no error)
+                    reason = "authorized";
+                    return ChildAgentUpdate2Response.Ok;
+                }
+
                 if (!AuthorizeUserInRegion(data.AgentID, SP.Firstname, SP.Lastname, null, out reason))
                 {
                     SP.ControllingClient.SendAlertMessage("Could not enter region '" + RegionInfo.RegionName + "': " + reason);
                     return ChildAgentUpdate2Response.AccessDenied;
                 }

-                ILandObject land = LandChannel.GetLandObject(data.Position.X, data.Position.Y);
-                if (!AuthorizeUserInParcel(data.AgentID, SP.Firstname, SP.Lastname, land, data.Position, out reason))
-                {
-                    SP.ControllingClient.SendAlertMessage("Could not enter region '" + RegionInfo.RegionName + "': " + reason);
-                    return ChildAgentUpdate2Response.AccessDenied;
-                }
+                if (data.SatOnGroup == null)
+                {
+                    // In this case, data.Position is good.
+                    ILandObject land = LandChannel.GetLandObject(data.Position.X, data.Position.Y);
+                    if (!AuthorizeUserInParcel(data.AgentID, SP.Firstname, SP.Lastname, land, data.Position, out reason))
+                    {
+                        SP.ControllingClient.SendAlertMessage("Could not enter region '" + RegionInfo.RegionName + "': " + reason);
+                        return ChildAgentUpdate2Response.AccessDenied;
+                    }
+                }
+                // else data.Position is no good when seated, would use this:
+                // Vector3 pos = GetSceneObjectPart(data.SatOnPrim).AbsolutePosition + data.SatOnPrimOffset;

                 reason = "authorized";
                 SP.ChildAgentDataUpdate2(data);


Fixed minor bug in diff parser

Fixed minor bug in diff parser

--- GitMind/Git/Private/GitDiffParser.cs
+++ GitMind/Git/Private/GitDiffParser.cs
@@ -1,3 +1,4 @@
+using System;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
@@ -220,6 +221,9 @@
 				if (startIndex > -1 && startIndex < endIndex)
 				{
 					int index = line.IndexOf(",", startIndex);
+					int stopIndex = line.IndexOf(" ", startIndex);
+
+					index = Math.Min(index, stopIndex);

 					if (index > -1 && index < endIndex)
 					{
@@ -228,13 +232,13 @@
 						int row = int.Parse(part);

 						int count = 0;
-						int stopIndex = line.IndexOf(" ", index);
-
-						if (stopIndex > -1)
+
+						if (stopIndex > -1 && stopIndex > index)
 						{
 							string countPart = line.Substring(index + 1, stopIndex - (index + 1));
 							count = int.Parse(countPart);
 						}
+
 						return new RowInfo(row, count);
 					}
 				}


Add metadata param to redirect flow creation endpoint

--- GoCardless/Resources/RedirectFlow.cs
+++ GoCardless/Resources/RedirectFlow.cs
@@ -84,6 +84,13 @@
         /// </summary>
         [JsonProperty("links")]
         public RedirectFlowLinks Links { get; set; }
+
+        /// <summary>
+        /// Key-value store of custom data. Up to 3 keys are permitted, with key
+        /// names up to 50 characters and values up to 500 characters.
+        /// </summary>
+        [JsonProperty("metadata")]
+        public IDictionary<string, string> Metadata { get; set; }

         /// <summary>
         /// The URL of the hosted payment pages for this redirect flow. This is


Some small refactorings

Some small refactorings

Change-Id: I8d9d166469b51ea9de626635c4a1c5015d83b982

--- Palaso/Reporting/ConsoleErrorReporter.cs
+++ Palaso/Reporting/ConsoleErrorReporter.cs
@@ -16,27 +16,22 @@
 			WriteExceptionToConsole(error, null, Severity.Fatal);
 		}

-		public ErrorResult NotifyUserOfProblem(IRepeatNoticePolicy policy, string alternateButton1Label, ErrorResult resultIfAlternateButtonPressed, string message)
+		public ErrorResult NotifyUserOfProblem(IRepeatNoticePolicy policy, string alternateButton1Label,
+			ErrorResult resultIfAlternateButtonPressed, string message)
 		{
 			if (!policy.ShouldShowMessage(message))
 			{
 				return ErrorResult.OK;
 			}

-
 			if (ErrorReport.IsOkToInteractWithUser)
 			{
-				if (ErrorReport.IsOkToInteractWithUser)
-				{
-					Console.WriteLine(message);
-					Console.WriteLine(policy.ReoccurenceMessage);
-				}
+				Console.WriteLine(message);
+				Console.WriteLine(policy.ReoccurenceMessage);
 				return ErrorResult.OK;
 			}
-			else
-			{
-				throw new ErrorReport.ProblemNotificationSentToUserException(message);
-			}
+
+			throw new ErrorReport.ProblemNotificationSentToUserException(message);
 		}

 		public void ReportNonFatalException(Exception exception, IRepeatNoticePolicy policy)


FileConfigProvider: dispose and shutdown logic updated for use in multithreaded scenarios

--- CustomBlocks/Config/FileConfigProvider/FileConfigProvider.cs
+++ CustomBlocks/Config/FileConfigProvider/FileConfigProvider.cs
@@ -51,6 +51,12 @@
 		private IConfigStorageBackend backend;
 		private ConfigProviderState state = ConfigProviderState.Offline;

+		// IConfigProviderController's owner may use it in multithreaded scenarios, and share same instance between multiple threads
+		// so, add some protection for simultaneous and multiple dispose call, because dispose should be robust.
+		// see https://msdn.microsoft.com/en-us/library/ms182334.aspx for more details (information about CA2202 warning)
+		private readonly object disposeLock;
+		private bool isDisposed;
+
 		private FileConfigProvider() {}

 		/// <summary>
@@ -60,7 +66,7 @@
 		public FileConfigProvider(ISerializationHelper<CFG> serializer, IConfigStorageBackend backend)
 		{
 			this.serializer=serializer;
-			this.fileId=null;
+			this.fileId=new ConfigFileId("test","test");
 			this.bkIsExt=true;
 			this.backend=backend;
 			this.state=ConfigProviderState.Init;
@@ -70,8 +76,10 @@
 			#else
 			var ev=new SafeEvent<ConfigProviderStateEventArgs>();
 			#endif
-			stateEventCtl=ev;
-			stateEvent=ev;
+			this.stateEventCtl=ev;
+			this.stateEvent=ev;
+			this.disposeLock=new object();
+			this.isDisposed=false;
 		}

 		/// <summary>
@@ -97,8 +105,10 @@
 			#else
 			var ev=new SafeEvent<ConfigProviderStateEventArgs>();
 			#endif
-			stateEventCtl=ev;
-			stateEvent=ev;
+			this.stateEventCtl=ev;
+			this.stateEvent=ev;
+			this.disposeLock=new object();
+			this.isDisposed=false;
 		}

 		#region IConfigProviderController
@@ -132,7 +142,9 @@
 						}
 						state = ConfigProviderState.Online;
 						return new ConfigProviderStateEventArgs(ConfigProviderState.Online, backend.IsWriteAllowed);
-					} catch (Exception ex) {
+					}
+					catch (Exception ex)
+					{
 						opLock.ExitWriteLock();
 						throw ex;
 					}
@@ -145,35 +157,39 @@

 		public void Shutdown()
 		{
-			Exception backendEx=null;
-			stateEventCtl.Raise
+			try
+			{
+				Exception backendEx=null;
+				stateEventCtl.Raise
 				(this, () => {
-				opLock.EnterWriteLock();
-				try
-				{
-					if (state == ConfigProviderState.Offline)
-						throw new FileConfigProviderDeinitException(fileId.actualFilename, state, "This FileConfigProvider is already offline, create new object", null);
-					state = ConfigProviderState.Offline;
-					try
+					opLock.EnterWriteLock();
+					try
 					{
-						if (!bkIsExt && backend != null)
-							FileConfigStorageBackendManager.FlushBackend(backend);
+						if (state == ConfigProviderState.Offline)
+							throw new InitCancelledException();
+						state = ConfigProviderState.Offline;
+						try
+						{
+							if (!bkIsExt && backend != null)
+								FileConfigStorageBackendManager.FlushBackend(backend);
+						}
+						catch (Exception ex)
+						{
+							backendEx = ex;
+						}
+						backend = null;
+						return new ConfigProviderStateEventArgs(ConfigProviderState.Offline, false);
 					}
 					catch (Exception ex)
 					{
-						backendEx = ex;
+						opLock.ExitWriteLock();
+						throw ex;
 					}
-					backend = null;
-					return new ConfigProviderStateEventArgs(ConfigProviderState.Offline, false);
-				}
-				catch (Exception ex)
-				{
-					opLock.ExitWriteLock();
-					throw ex;
-				}
-			}, opLock.ExitWriteLock);
-			if(backendEx!=null)
-				throw new FileConfigProviderDeinitException(fileId.actualFilename, state, "Backend failed to deinitialize", backendEx);
+				}, opLock.ExitWriteLock);
+				if(backendEx!=null)
+					throw new FileConfigProviderDeinitException(fileId.actualFilename, state, "Backend failed to deinitialize", backendEx);
+			}
+			catch(InitCancelledException) {}
 		}

 		public IConfigProvider<CFG> GetProvider()
@@ -188,8 +204,14 @@

 		public void Dispose()
 		{
-			Shutdown();
-			stateEventCtl.Dispose();
+			lock(disposeLock)
+			{
+				if(isDisposed)
+					return;
+				isDisposed=true;
+				Shutdown();
+				stateEventCtl.Dispose();
+			}
 		}

 		#endregion


hopefully this further fixes what I broke with the git commit


Added missing 'Preset' label for terrain material.

--- Editor/AGXUnityEditor/Tools/DeformableTerrainMaterialTool.cs
+++ Editor/AGXUnityEditor/Tools/DeformableTerrainMaterialTool.cs
@@ -27,7 +27,7 @@
       using ( new InspectorGUI.IndentScope( ( InspectorGUI.IndentScope.Level > 0 ? -1 : 0 ) ) ) {
         var resetButtonWidth = EditorGUIUtility.singleLineHeight;
         var rect             = EditorGUILayout.GetControlRect();
-        rect.width          -= resetButtonWidth;
+        var totalRectWidth   = rect.width;

         var availablePresets = DeformableTerrainMaterial.GetAvailablePresets().ToArray();
         var presetIndex      = FindPresetIndex( availablePresets,
@@ -36,6 +36,12 @@
         EditorGUI.showMixedValue = mixedPreset || invalidPreset;
         if ( invalidPreset )
           InspectorGUI.WarningLabel( $"Material preset name {refMaterial.PresetName} doesn't exist in the material presets library." );
+
+        rect.width = EditorGUIUtility.labelWidth;
+        EditorGUI.PrefixLabel( rect, GUI.MakeLabel( "Preset" ), InspectorEditor.Skin.Label );
+
+        rect.x    += rect.width;
+        rect.width = totalRectWidth - EditorGUIUtility.labelWidth - resetButtonWidth;
         EditorGUI.BeginChangeCheck();
         var newPresetIndex = EditorGUI.Popup( rect, Mathf.Max( presetIndex, 0 ), availablePresets, InspectorEditor.Skin.Popup );
         if ( EditorGUI.EndChangeCheck() && invalidPreset )


atempt 3rd time to fix appveior uning stringbuilder on the expected outcome this time

--- test/indice.Edi.Tests/SerializerTests.cs
+++ test/indice.Edi.Tests/SerializerTests.cs
@@ -23,89 +23,85 @@
             }

-            var expected = withCompression ?
+            var expected = new StringBuilder();
+            if (withCompression) {
+                #region ...compressed output...
+                expected.AppendLine("UNA:+.? '");
+                expected.AppendLine("UNB+UNOC:3+1234567891123:14+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'");
+                expected.AppendLine("UNH+1+QUOTES:D:96A:UN:EDIEL2+S'");
+                expected.AppendLine("BGM+310+2010101900026812+9+AB'");
+                expected.AppendLine("DTM+137:201010191104:203'");
+                expected.AppendLine("DTM+163:201010192300:203'");
+                expected.AppendLine("DTM+164:201010202300:203'");
+                expected.AppendLine("DTM+:1:805'");
+                expected.AppendLine("CUX+2:SEK'");
+                expected.AppendLine("NAD+FR+1234567891123::9'");
+                expected.AppendLine("NAD+DO+7080005059275::9'");
+                expected.AppendLine("LOC+105+SE1::SM'");
+                expected.AppendLine("LIN+1++1420:::SM'");
+                expected.AppendLine("DTM+324:201010192300201010200000:013'");
+                expected.AppendLine("PRI+CAL:-2100'");
+                expected.AppendLine("RNG+4+1:-0.1'");
+                expected.AppendLine("PRI+CAL:21000'");
+                expected.AppendLine("RNG+4+1:-0.1'");
+                expected.AppendLine("LIN+2++1420:::SM'");
+                expected.AppendLine("DTM+324:201010200000201010200100:013'");
+                expected.AppendLine("PRI+CAL:-2100'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("PRI+CAL:21000'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("LIN+3++1420:::SM'");
+                expected.AppendLine("DTM+324:201010200100201010200200:013'");
+                expected.AppendLine("PRI+CAL:-2100'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("PRI+CAL:21000'");
+                expected.AppendLine("UNS+S'");
+                expected.AppendLine("UNT+158+1'");
+                expected.AppendLine("UNZ+1+20101000064507'");
+            }
+            #endregion
+            else {
+                #region ...uncompressed output...
+                expected.AppendLine("UNA:+.? '");
+                expected.AppendLine("UNB+UNOC:3+1234567891123:14:+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'");
+                expected.AppendLine("UNH+1+QUOTES:D:96A:UN:EDIEL2+S'");
+                expected.AppendLine("BGM+310+2010101900026812+9+AB'");
+                expected.AppendLine("DTM+137:201010191104:203'");
+                expected.AppendLine("DTM+163:201010192300:203'");
+                expected.AppendLine("DTM+164:201010202300:203'");
+                expected.AppendLine("DTM+:1:805'");
+                expected.AppendLine("CUX+2:SEK'");
+                expected.AppendLine("NAD+FR+1234567891123::9'");
+                expected.AppendLine("NAD+DO+7080005059275::9'");
+                expected.AppendLine("LOC+105+SE1::SM'");
+                expected.AppendLine("LIN+1++1420:::SM'");
+                expected.AppendLine("DTM+324:201010192300201010200000:013'");
+                expected.AppendLine("PRI+CAL:-2100:'");
+                expected.AppendLine("RNG+4+1:-0.1'");
+                expected.AppendLine("PRI+CAL:21000:'");
+                expected.AppendLine("RNG+4+1:-0.1'");
+                expected.AppendLine("LIN+2++1420:::SM'");
+                expected.AppendLine("DTM+324:201010200000201010200100:013'");
+                expected.AppendLine("PRI+CAL:-2100:'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("PRI+CAL:21000:'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("LIN+3++1420:::SM'");
+                expected.AppendLine("DTM+324:201010200100201010200200:013'");
+                expected.AppendLine("PRI+CAL:-2100:'");
+                expected.AppendLine("RNG+4+1:0'");
+                expected.AppendLine("PRI+CAL:21000:'");
+                expected.AppendLine("UNS+S'");
+                expected.AppendLine("UNT+158+1'");
+                expected.AppendLine("UNZ+1+20101000064507'");
+                #endregion
+            }

-            #region ...compressed output...
-@"UNA:+.? '
-UNB+UNOC:3+1234567891123:14+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'
-UNH+1+QUOTES:D:96A:UN:EDIEL2+S'
-BGM+310+2010101900026812+9+AB'
-DTM+137:201010191104:203'
-DTM+163:201010192300:203'
-DTM+164:201010202300:203'
-DTM+:1:805'
-CUX+2:SEK'
-NAD+FR+1234567891123::9'
-NAD+DO+7080005059275::9'
-LOC+105+SE1::SM'
-LIN+1++1420:::SM'
-DTM+324:201010192300201010200000:013'
-PRI+CAL:-2100'
-RNG+4+1:-0.1'
-PRI+CAL:21000'
-RNG+4+1:-0.1'
-LIN+2++1420:::SM'
-DTM+324:201010200000201010200100:013'
-PRI+CAL:-2100'
-RNG+4+1:0'
-PRI+CAL:21000'
-RNG+4+1:0'
-LIN+3++1420:::SM'
-DTM+324:201010200100201010200200:013'
-PRI+CAL:-2100'
-RNG+4+1:0'
-PRI+CAL:21000'
-UNS+S'
-UNT+158+1'
-UNZ+1+20101000064507'
-"
-            #endregion
-            :
-            #region ...uncompressed output...
-            @"UNA:+.? '
-UNB+UNOC:3+1234567891123:14:+7080005059275:14:SPOTMARKED+101012:1104+HBQ001++++1'
-UNH+1+QUOTES:D:96A:UN:EDIEL2+S'
-BGM+310+2010101900026812+9+AB'
-DTM+137:201010191104:203'
-DTM+163:201010192300:203'
-DTM+164:201010202300:203'
-DTM+:1:805'
-CUX+2:SEK'
-NAD+FR+1234567891123::9'
-NAD+DO+7080005059275::9'
-LOC+105+SE1::SM'
-LIN+1++1420:::SM'
-DTM+324:201010192300201010200000:013'
-PRI+CAL:-2100:'
-RNG+4+1:-0.1'
-PRI+CAL:21000:'
-RNG+4+1:-0.1'
-LIN+2++1420:::SM'
-DTM+324:201010200000201010200100:013'
-PRI+CAL:-2100:'
-RNG+4+1:0'
-PRI+CAL:21000:'
-RNG+4+1:0'
-LIN+3++1420:::SM'
-DTM+324:201010200100201010200200:013'
-PRI+CAL:-2100:'
-RNG+4+1:0'
-PRI+CAL:21000:'
-UNS+S'
-UNT+158+1'
-UNZ+1+20101000064507'
-";
-            #endregion
-            var newLine = new StringBuilder().AppendLine().ToString();
-            if (!"\r\n".Equals(newLine)) {
-                expected = expected.Replace("\r\n", newLine);
-            }
-
             var output = new StringBuilder();
             using (var writer = new EdiTextWriter(new StringWriter(output), grammar)) {
                 new EdiSerializer() { EnableCompression = withCompression }.Serialize(writer, interchange);
             }
-            Assert.Equal(expected, output.ToString());
+            Assert.Equal(expected.ToString(), output.ToString());
         }

         [Fact, Trait(Traits.Tag, "Writer"), Trait(Traits.Bug, "#74")]
@@ -154,6 +150,6 @@
             Assert.True(ElmPos >= 0);
             Assert.True(GrpPos < ElmPos);
         }
-
+
     }
 }


FreeEmployees logic fixed

FreeEmployees logic fixed

--- EmployeesTree/EmployeeTree.Web/Controllers/TeamController.cs
+++ EmployeesTree/EmployeeTree.Web/Controllers/TeamController.cs
@@ -336,7 +336,8 @@
         /// </summary>
         private void fillTheViewBags()
         {
-            var freeLeaders = context.Employees.Where(e => e.Position >= Position.TeamLeader).ToList();
+            var freeLeaders = context.Employees.Where(e => e.Position > Position.TeamLeader ||
+                                                            (e.Teams.Count == 0 && e.Position == Position.TeamLeader)).ToList();
             var freeEmployees = context.Employees.Where(e => e.Position > Position.TeamLeader ||
                                                             (e.Teams.Count == 0 && e.Position <= Position.TeamLeader)).ToList();

@@ -350,7 +351,8 @@
         /// </summary>
         private void fillTheViewBagsWithSelected(TeamWithEmployeesViewModel teamView)
         {
-            var freeLeaders = context.Employees.Where(e => e.Position >= Position.TeamLeader).ToList();
+            var freeLeaders = context.Employees.Where(e => e.Position >= Position.TeamLeader ||
+                                                            (e.Teams.Count == 0 && e.Position == Position.TeamLeader)).ToList();
             var freeEmployees = context.Employees.Where(e => e.Position > Position.TeamLeader ||
                                                             (e.Teams.Count == 0 && e.Position <= Position.TeamLeader)).ToList();


Corrected a comment.

Corrected a comment.

--- RPi.AdDaBoard/RPi.AdDaBoard/InputGain.cs
+++ RPi.AdDaBoard/RPi.AdDaBoard/InputGain.cs
@@ -39,7 +39,7 @@
         Gain32,

         /// <summary>
-        /// Output0 gain amplification of 64; the full-scale input voltage Vin = ±78.125 V when Vref = 2.5 V.
+        /// Output0 gain amplification of 64; the full-scale input voltage Vin = ±78.125 mV when Vref = 2.5 V.
         /// </summary>
         Gain64
     }


Update SetTrueTypeFontsFolder.cs

Update SetTrueTypeFontsFolder.cs

--- Examples/CSharp/Rendering-Printing/SetTrueTypeFontsFolder.cs
+++ Examples/CSharp/Rendering-Printing/SetTrueTypeFontsFolder.cs
@@ -21,7 +21,7 @@
             // Note that this setting will override any default font sources that are being searched by default. Now only these folders will be searched for
             // Fonts when rendering or embedding fonts. To add an extra font source while keeping system font sources then use both FontSettings.GetFontSources and
             // FontSettings.SetFontSources instead.
-            FontSettings.SetFontsFolder(@"C:MyFonts\", false);
+            FontSettings.SetFontsFolder(@"C:\MyFonts\", false);
             // Set font settings
             doc.FontSettings = FontSettings;
             dataDir = dataDir + "Rendering.SetFontsFolder_out.pdf";


adding support for Thai script.

adding support for Thai script.

Here is Unicode reference about Thai script http://www.unicode.org/charts/PDF/U0E00.pdf.

--- RdlEngine/Render/RenderPdf_iTextSharp.cs
+++ RdlEngine/Render/RenderPdf_iTextSharp.cs
@@ -368,6 +368,7 @@
             {
                 asian |= text[i].Any(c => (c >= 0x3040 && c <= 0x309f) || //Hiragana
                                           (c >= 0x30a0 && c <= 0x30ff) || //Katanka
+                                          (c >= 0xE00 && c <= 0xE7F) || //Thai
                                            c >= 0x4e00);
                 if (asian)
                 {


[SharpDX] Fix issue #199. Plane intersection in Collision.RayIntersectsPlane was invalid

--- Source/SharpDX/Collision.cs
+++ Source/SharpDX/Collision.cs
@@ -520,7 +520,7 @@

             float position;
             Vector3.Dot(ref plane.Normal, ref ray.Position, out position);
-            distance = (plane.D - position) / direction;
+            distance = (-plane.D - position) / direction;

             if (distance < 0f)
             {


Playing about

Playing about

--- src/SnivellingGit/EntryPoint.cs
+++ src/SnivellingGit/EntryPoint.cs
@@ -1,6 +1,7 @@
 namespace SnivellingGit
 {
     using System;
+    using System.Collections.Generic;
     using System.IO.Abstractions;
     using System.Linq;
     using LibGit2Sharp;
@@ -26,8 +27,9 @@
         /// </summary>
         public void Run()
         {
-            //using (var repo = new Repository(@"C:\Gits\VsVim"))
-            using (var repo = new Repository(@"C:\Gits\SnivellingGit"))
+            var table = new CommitTable();
+            using (var repo = new Repository(@"C:\Gits\VsVim"))
+            //using (var repo = new Repository(@"C:\Gits\SnivellingGit"))
             {
                 Console.WriteLine("That repo has " + repo.Commits.Count() + " commits");
                 Console.WriteLine("  with branches " + string.Join(", ", repo.Branches.Select(b => b.CanonicalName)));
@@ -35,15 +37,63 @@
                 Console.WriteLine("  tags: " + string.Join(", ", repo.Tags.Select(t => t.Name)));
                 Console.WriteLine();

-                //repo.Branches.Where(b=>!b.IsRemote).Select
+                foreach (var branch in repo.Branches.Where(b=>!b.IsRemote))
+                {
+                    table.AddBranch(branch.Tip.Sha, branch.CanonicalName);
+                }

                 foreach (var commit in repo.Commits)
                 {
-                    Console.WriteLine(commit.Sha + " " + commit.Author.Name + " -> " + commit.Message.Replace("\r", "").Replace("\n", " "));
-                    Console.WriteLine("   " + string.Join(", ", commit.Parents.Select(p => p.Sha)));
+                    table.AddCommit(commit.Author.When, commit.Author.Name, commit.Message, commit.Sha, commit.Parents.Select(p => p.Sha).ToArray());
+
+                    Console.WriteLine(commit.Author.Name + " -> " + commit.Message.Replace("\r", "").Replace("\n", " "));
                 }
             }
         }
     }

+    /// <summary>
+    /// Experimental
+    /// </summary>
+    public class CommitTable
+    {
+        /// <summary>
+        /// Add a branch column
+        /// </summary>
+        /// <param name="tipSha1">sha1 hash of the branch tip. Should be child-less</param>
+        /// <param name="name">Name of the branch</param>
+        public void AddBranch(string tipSha1, string name)
+        {
+            /*
+             * The plan:
+             *
+             * Each commit is a column. Remotes not shown by default.
+             * Local-only branches should be picked out visually.
+             * We also want a 'tide-line' showing where the tracking remote ends --
+             *   anything ahead of the tide line is safe and won't require a force-push.
+             *   Anything behind it is tricky, rebases, splits and squashes will need to be forced,
+             *   and should not be handled in the first version
+             */
+        }
+
+        /// <summary>
+        /// Add a commit to the table rows
+        /// </summary>
+        /// <param name="when">Date of commit</param>
+        /// <param name="who">author name</param>
+        /// <param name="what">commit short message</param>
+        /// <param name="sha1">Hash of this commit</param>
+        /// <param name="parents">Parents of this commit</param>
+        public void AddCommit(DateTimeOffset when, string who, string what, string sha1, string[] parents)
+        {
+            /*
+             * The plan:
+             *
+             * Visually, we want the childless commits at the top, then a table of children going down.
+             * Each branch should have its own column (we might not show all of them)
+             * Ignore orphaned commits at the moment -- we should pick these up later
+             */
+        }
+    }
+
 }


Relink generic parameter constraints properly

--- MonoMod/MonoModExt.cs
+++ MonoMod/MonoModExt.cs
@@ -238,8 +238,15 @@
 				throw new InvalidOperationException($"MonoMod can't handle TypeSpecification: {type.FullName} ({type.GetType()})");
             }

-            if (type.IsGenericParameter)
-                return context.GetGenericParameter(((GenericParameter) type).Name);
+            if (type.IsGenericParameter) {
+                if (context is MethodDefinition && ((MethodDefinition) context).Name == "AddHook")
+                    System.Diagnostics.Debugger.Break();
+                GenericParameter genParam = context.GetGenericParameter(((GenericParameter) type).Name);
+                for (int i = 0; i < genParam.Constraints.Count; i++)
+                    if (!genParam.Constraints[i].IsGenericInstance) // That is somehow possible and causes a stack overflow.
+                        genParam.Constraints[i] = genParam.Constraints[i].Relink(relinker, context);
+                return genParam;
+            }

             return (TypeReference) relinker(type, context);
         }
@@ -249,7 +256,7 @@
                 GenericInstanceMethod methodg = ((GenericInstanceMethod) method);
                 GenericInstanceMethod gim = new GenericInstanceMethod(methodg.ElementMethod.Relink(relinker, context));
                 foreach (TypeReference arg in methodg.GenericArguments)
-                    // Generic arguments for the generic instance are often given by the next higher provider
+                    // Generic arguments for the generic instance are often given by the next higher provider.
                     gim.GenericArguments.Add(arg.Relink(relinker, context));

                 return (MethodReference) relinker(gim, context);


Nested types in existing types were ignored

--- MonoMod/MonoModder.cs
+++ MonoMod/MonoModder.cs
@@ -418,7 +418,10 @@
             TypeReference type;
             if ((type = main.GetType(fullName, false)) != null)
                 return type;
-            if (crawled.Contains(main)) return null;
+            if (fullName.StartsWith("<PrivateImplementationDetails>/"))
+                return null;
+            if (crawled.Contains(main))
+                return null;
             crawled.Push(main);
             foreach (ModuleDefinition dep in DependencyMap[main])
                 if ((type = FindType(dep, fullName, crawled)) != null)
@@ -466,7 +469,12 @@
             TypeDefinition targetTypeDef = targetType?.Resolve();
             if (targetType != null) {
                 if (targetTypeDef != null && (type.Name.StartsWith("remove_") || type.HasMMAttribute("Remove")))
-                    Module.Types.Remove(targetTypeDef);
+                    if (targetTypeDef.DeclaringType == null)
+                        Module.Types.Remove(targetTypeDef);
+                    else
+                        targetTypeDef.DeclaringType.Resolve().NestedTypes.Remove(targetTypeDef);
+                else
+                    PrePatchNested(type);
                 return;
             }


Add Transition.ToString()

Add Transition.ToString()

--- src/StateMechanic/Transition.cs
+++ src/StateMechanic/Transition.cs
@@ -178,6 +178,15 @@
             var transitionInfo = new TransitionInfo<TState>(this.From, this.To, this.Event, this.IsInnerTransition);
             return this.innerTransition.TryInvoke(transitionInfo);
         }
+
+        /// <summary>
+        /// Returns a string that represents the current object.
+        /// </summary>
+        /// <returns>A string that represents the current object</returns>
+        public override string ToString()
+        {
+            return String.Format("<Transition From={0} To={1} Event={2}{3}>", this.From.Name, this.To.Name, this.Event.Name, this.IsInnerTransition ? " IsInnerTransition" : "");
+        }
     }

     /// <summary>
@@ -260,6 +269,15 @@
             var transitionInfo = new TransitionInfo<TState, TEventData>(this.From, this.To, this.Event, eventData, this.IsInnerTransition);
             return this.innerTransition.TryInvoke(transitionInfo);
         }
+
+        /// <summary>
+        /// Returns a string that represents the current object.
+        /// </summary>
+        /// <returns>A string that represents the current object</returns>
+        public override string ToString()
+        {
+            return String.Format("<Transition From={0} To={1} Event={2}{3}>", this.From.Name, this.To.Name, this.Event.Name, this.IsInnerTransition ? " IsInnerTransition" : "");
+        }
     }

     internal static class Transition


Remove stub comment

Remove stub comment

--- NFig/NFigAppClient.cs
+++ NFig/NFigAppClient.cs
@@ -289,7 +289,5 @@
             var meta = new SubAppMetadata<TTier, TDataCenter>(AppName, null, null, defaults);
             Store.UpdateSubAppsInternal(AppName, meta);
         }
-
-//        Dictionary<int, TSettings> Get
     }
 }


add enum test

add enum test

--- NOpt.Test/EnumTest.cs
+++ NOpt.Test/EnumTest.cs
@@ -28,6 +28,8 @@
             {
                 Options opt = NOpt.Parse<Options>(new string[] { "WRITE" });
                 Assert.Equal(Options.Actions.WRITE, opt.actions);
+
+                Assert.Throws<FormatException>(() => NOpt.Parse<Options>(new string[] { "QQQ" }));
             }
         }
     }


fleshing out new interface.

fleshing out new interface.

--- NetworkAPI/Network.cs
+++ NetworkAPI/Network.cs
@@ -2,6 +2,8 @@
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
+
+using System.ComponentModel;

 using Newtonsoft.Json;

@@ -133,6 +135,9 @@
             }

             // set the value of the object if it exists
+            if (obj.Value != null)
+            {
+            }

             return retObj;
         }
@@ -141,5 +146,23 @@
         {
             return Assembly.Load(assemblyName).GetType(typeName);
         }
+
+        public void SetValueFromString(object target, string propertyName, string propertyValue)
+        {
+            PropertyInfo pi = target.GetType().GetProperty(propertyName);
+            Type t = pi.PropertyType;
+
+            if (t.IsGenericType &&
+                t.GetGenericTypeDefinition().Equals(typeof(Nullable<>)))
+            {
+                if (propertyValue == null)
+                {
+                    pi.SetValue(target, null, null);
+                    return;
+                }
+                t = new NullableConverter(pi.PropertyType).UnderlyingType;
+            }
+            pi.SetValue(target, Convert.ChangeType(propertyValue, t), null);
+        }
     }
 }


Was not loading keys from config

Was not loading keys from config

--- HighScoreApi/HighScoreApi/Controllers/HighScoreController.cs
+++ HighScoreApi/HighScoreApi/Controllers/HighScoreController.cs
@@ -13,9 +13,10 @@
         readonly IDocumentStore _store;
         readonly HighScoreSettings _highScoreSettings;

-        public HighScoreController(IDocumentStore store)
+        public HighScoreController(IDocumentStore store, HighScoreSettings highScoreSettings)
         {
             _store = store;
+            _highScoreSettings = highScoreSettings;
         }

         [HttpGet]


Misc This callback should always arrive with update, so we don't need read overhead

--- ArchiSteamFarm/Bot.cs
+++ ArchiSteamFarm/Bot.cs
@@ -1580,8 +1580,7 @@
 				return;
 			}

-			HashSet<uint> ownedPackageIDs = new HashSet<uint>(callback.LicenseList.Select(license => license.PackageID));
-			OwnedPackageIDs.ReplaceIfNeededWith(ownedPackageIDs);
+			OwnedPackageIDs.ReplaceWith(callback.LicenseList.Select(license => license.PackageID));

 			await Task.Delay(1000).ConfigureAwait(false); // Wait a second for eventual PlayingSessionStateCallback or SharedLibraryLockStatusCallback


Languageの指定を削除しdbの規定値を挿入する仕様に変更。

Languageの指定を削除しdbの規定値を挿入する仕様に変更。

--- Implem.Pleasanter/Libraries/Initializers/UsersInitializer.cs
+++ Implem.Pleasanter/Libraries/Initializers/UsersInitializer.cs
@@ -40,7 +40,6 @@
                         .Password(password)
                         .LastName(string.Empty)
                         .FirstName(name)
-                        .Language("en")
                         .DeptId(0)
                         .FirstAndLastNameOrder(1)
                         .PasswordExpirationTime(


no longer need to validate selected units

--- Assets/Scripts/App.cs
+++ Assets/Scripts/App.cs
@@ -925,7 +925,7 @@
 				makeUnitScrollPos = GUILayout.BeginScrollView (makeUnitScrollPos);
 				foreach (UnitType unitT in g.unitT) {
 					foreach (Path path in curSelPaths.Keys) {
-						if (timeGame >= path.moves[0].timeStart && path.canMakeUnitType (timeGame, unitT)) { // ISSUE #22: sometimes canMake check should use existing selected units in path
+						if (path.canMakeUnitType (timeGame, unitT)) { // ISSUE #22: sometimes canMake check should use existing selected units in path
 							bool enoughRsc = true;
 							tooltip = "Costs ";
 							for (int i = 0; i < g.rscNames.Length; i++) {
@@ -1112,15 +1112,10 @@
 	/// </summary>
 	private Dictionary<Unit, int> selUnits() {
 		Dictionary<Unit, int> ret = new Dictionary<Unit, int>();
-		foreach (KeyValuePair<Path, List<Unit>> paths in curSelPaths) {
-			Segment segment = paths.Key.activeSegment (timeGame);
-			if (segment != null) {
-				foreach (Unit unit in paths.Value) {
-					if (segment.units.Contains (unit)) {
-						if (!ret.ContainsKey (unit)) ret.Add (unit, 0);
-						ret[unit]++;
-					}
-				}
+		foreach (List<Unit> units in curSelPaths.Values) {
+			foreach (Unit unit in units) {
+				if (!ret.ContainsKey (unit)) ret.Add (unit, 0);
+				ret[unit]++;
 			}
 		}
 		return ret;
@@ -1219,7 +1214,7 @@
 		if (curSelPaths.Count > 0) {
 			Dictionary<int, FP.Vector> pos = new Dictionary<int, FP.Vector>();
 			foreach (KeyValuePair<Path, List<Unit>> path in curSelPaths) {
-				if (timeGame >= path.Key.segments[0].timeStart) pos[path.Key.id] = makePathMovePos(timeGame, path.Key, path.Value);
+				pos[path.Key.id] = makePathMovePos(timeGame, path.Key, path.Value);
 			}
 			g.cmdPending.add(new MakePathCmdEvt(g.timeSim, newCmdTime(), UnitCmdEvt.argFromPathDict(curSelPaths), pos));
 		}


maybe the rainbow is more legible now?

maybe the rainbow is more legible now?

--- Assets/Scripts/yml.cs
+++ Assets/Scripts/yml.cs
@@ -161,19 +161,19 @@
             .Replace("</warn>","</color>")
             .Replace("<cost>","<color=#FFDBBB>")
             .Replace("</cost>","</color>")
-            .Replace("<red>","<color=#ff0000>")
+            .Replace("<red>","<color=#f26a6a>")
             .Replace("</red>","</color>")
-            .Replace("<orange>", "<color=#ff9a00>")
+            .Replace("<orange>", "<color=#f6a72e>")
             .Replace("</orange>", "</color>")
-            .Replace("<yellow>", "<color=#f0f218>")
+            .Replace("<yellow>", "<color=#fff16b>")
             .Replace("</yellow>", "</color>")
-            .Replace("<green>", "<color=#00a947>")
+            .Replace("<green>", "<color=#73d279>")
             .Replace("</green>", "</color>")
-            .Replace("<blue>", "<color=#183df2>")
+            .Replace("<blue>", "<color=#73aed2>")
             .Replace("</blue>", "</color>")
-            .Replace("<indigo>", "<color=#8e18f2")
+            .Replace("<indigo>", "<color=#b695ea")
             .Replace("</indigo>", "</color>")
-            .Replace("<violet>", "<color=#cc09d8>")
+            .Replace("<violet>", "<color=#d495ea>")
             .Replace("</violet>", "</color>")
             .ToString();
     }


Fix: version seperator issue

Fix: version seperator issue

--- HotChocolatey/Model/ChocoExecutor.cs
+++ HotChocolatey/Model/ChocoExecutor.cs
@@ -75,7 +75,7 @@

         private void UpdateLocalPackage(string chocoOutput)
         {
-            var tmp = chocoOutput.Split('|');
+            var tmp = chocoOutput.Split(' ');
             var p = repo.GetPackage(tmp[0]);
             p.InstalledVersion = new SemanticVersion(tmp[1]);
             LocalPackages.Add(p);


Fixing test break

Fixing test break

--- src/Test/L0/Listener/AgentL0.cs
+++ src/Test/L0/Listener/AgentL0.cs
@@ -15,6 +15,7 @@
     public sealed class AgentL0
     {
         private Mock<IConfigurationManager> _configurationManager;
+        private Mock<IJobNotification> _jobNotification;
         private Mock<IMessageListener> _messageListener;
         private Mock<IPromptManager> _promptManager;
         private Mock<IJobDispatcher> _jobDispatcher;
@@ -24,6 +25,7 @@
         public AgentL0()
         {
             _configurationManager = new Mock<IConfigurationManager>();
+            _jobNotification = new Mock<IJobNotification>();
             _messageListener = new Mock<IMessageListener>();
             _promptManager = new Mock<IPromptManager>();
             _jobDispatcher = new Mock<IJobDispatcher>();
@@ -61,6 +63,7 @@
                 var agent = new Agent.Listener.Agent();
                 agent.TokenSource = tokenSource;
                 hc.SetSingleton<IConfigurationManager>(_configurationManager.Object);
+                hc.SetSingleton<IJobNotification>(_jobNotification.Object);
                 hc.SetSingleton<IMessageListener>(_messageListener.Object);
                 hc.SetSingleton<IPromptManager>(_promptManager.Object);
                 hc.SetSingleton<IAgentServer>(_agentServer.Object);
@@ -118,6 +121,11 @@
                    {
                        return Task.CompletedTask;
                    });
+                _jobNotification.Setup(x => x.StartClient(It.IsAny<String>(), It.IsAny<CancellationToken>()))
+                    .Callback(() =>
+                    {
+
+                    });

                 hc.EnqueueInstance<IJobDispatcher>(_jobDispatcher.Object);


updated ViewPort error handling

updated ViewPort error handling

--- BCad.Core/ViewPort.cs
+++ BCad.Core/ViewPort.cs
@@ -29,8 +29,8 @@
                 throw new ArgumentOutOfRangeException("Sight vector cannot be zero.");
             if (up == Vector.Zero)
                 throw new ArgumentOutOfRangeException("Up vector cannot be zero.");
-            if (double.IsInfinity(viewHeight) || double.IsNaN(viewHeight) || viewHeight == 0.0)
-                throw new ArgumentOutOfRangeException("ViewHeight must have a non-zero, real value.");
+            if (double.IsInfinity(viewHeight) || double.IsNaN(viewHeight) || viewHeight <= 0.0)
+                throw new ArgumentOutOfRangeException("ViewHeight must have a positive, real value.");
             this.bottomLeft = bottomLeft;
             this.sight = sight;
             this.up = up;


Don't create an Image object if we don't have a background.gif to load into it

--- src/Update/AnimatedGifWindow.cs
+++ src/Update/AnimatedGifWindow.cs
@@ -21,19 +21,17 @@
     {
         public AnimatedGifWindow()
         {
-            var img = new Image();
-            var src = default(BitmapImage);
-
             var source = Path.Combine(
                 Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location),
                 "background.gif");

             if (File.Exists(source)) {
-                src = new BitmapImage();
+                var src = new BitmapImage();
                 src.BeginInit();
                 src.StreamSource = File.OpenRead(source);
                 src.EndInit();
-
+
+                var img = new Image();
                 ImageBehavior.SetAnimatedSource(img, src);
                 this.Content = img;
                 this.Width = src.Width;


Open sign up page in browser

Open sign up page in browser

--- SparklrWP/LoginPage.xaml.cs
+++ SparklrWP/LoginPage.xaml.cs
@@ -10,6 +10,7 @@
 using System.Text;
 using System.IO;
 using SparklrLib;
+using Microsoft.Phone.Tasks;

 namespace SparklrWP
 {
@@ -60,14 +61,15 @@

         private void Signup_click(object sender, System.Windows.RoutedEventArgs e)
         {
-            MessageBox.Show("Go to Sparklr.me On Your Browser to Sign Up", "SparklrWP", MessageBoxButton.OK);
-
+            if (MessageBox.Show("Sparklr.me home page where you can sign up will opened in a browser", "SparklrWP", MessageBoxButton.OKCancel) == MessageBoxResult.OK)
+            {
+                new WebBrowserTask() { Uri = new Uri("http://sparklr.me") }.Show();
+            }
         }

         private void about_Click(object sender, System.Windows.RoutedEventArgs e)
         {
             MessageBox.Show("Sparklr Branding (C) Jonathan Warner \n\n Application Development Team: Marocco2, jessenic, EaterOfCorpses And TheInterframe\n\n Big Thanks to Jonathan!", "About Sparklr WP V1.0", MessageBoxButton.OK);
-
         }
     }
 }


Use expressions to create and invoke the razor views. This looks like a reasonable approximation of how asp.net handles razor views.

--- Src/Veil.Benchmark/Razor.cs
+++ Src/Veil.Benchmark/Razor.cs
@@ -3,6 +3,7 @@
 using System.ComponentModel;
 using System.Globalization;
 using System.IO;
+using System.Linq.Expressions;
 using System.Reflection;
 using System.Web.Razor;

@@ -43,12 +44,21 @@

                 if (compileResult.Errors.HasErrors) throw new InvalidOperationException(compileResult.Errors[0].ErrorText);

-                return (writer, model) =>
-                {
-                    var view = (IView)compileResult.CompiledAssembly.CreateInstance("VeilRazor.Template");
-                    view.Initialize(writer, model);
-                    view.Execute();
-                };
+                var viewType = compileResult.CompiledAssembly.GetType("VeilRazor.Template");
+                var view = Expression.Variable(viewType, "view");
+                var init = viewType.GetMethod("Initialize");
+                var exec = viewType.GetMethod("Execute");
+                var writer = Expression.Parameter(typeof(TextWriter));
+                var model = Expression.Parameter(typeof(T));
+
+                return Expression.Lambda<Action<TextWriter, T>>(Expression.Block(
+                    new[] { view },
+                    new Expression[] {
+                        Expression.Assign(view, Expression.New(viewType)),
+                        Expression.Call(view, init, writer, model),
+                        Expression.Call(view, exec)
+                    }
+                ), writer, model).Compile();
             }
         }


Added this.close() and had it check for ok instead of yes on the messagebox.

--- SuperPutty/frmSuperPutty.cs
+++ SuperPutty/frmSuperPutty.cs
@@ -220,8 +220,9 @@

         private void toolStripMenuItem2_Click(object sender, EventArgs e)
         {
-            if (MessageBox.Show("Exit SuperPuTTY?", "Confirm Exit", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
-            {
+            if (MessageBox.Show("Exit SuperPuTTY?", "Confirm Exit", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
+            {
+            	this.Close();
                 System.Environment.Exit(0);
             }
         }


Increasing version

Increasing version

--- src/ADAL.Common/CommonAssemblyInfo.cs
+++ src/ADAL.Common/CommonAssemblyInfo.cs
@@ -27,11 +27,11 @@
 [assembly: AssemblyCopyright("Copyright (c) Microsoft Open Technologies. All rights reserved.")]
 [assembly: AssemblyTrademark("")]

-[assembly: AssemblyVersion("2.15.0.0")]
+[assembly: AssemblyVersion("2.16.0.0")]

 // Keep major and minor versions in AssemblyFileVersion in sync with AssemblyVersion.
 // Build and revision numbers are replaced on build machine for official builds.
-[assembly: AssemblyFileVersion("2.15.00000.0000")]
+[assembly: AssemblyFileVersion("2.16.00000.0000")]
 // On official build, attribute AssemblyInformationalVersionAttribute is added as well
 // with its value equal to the hash of the last commit to the git branch.
 // e.g.: [assembly: AssemblyInformationalVersionAttribute("4392c9835a38c27516fc0cd7bad7bccdcaeab161")]


uri fix

uri fix

--- src/Aditi.Scheduler/ScheduledTasks.cs
+++ src/Aditi.Scheduler/ScheduledTasks.cs
@@ -25,7 +25,7 @@
         //TODO: Change this to production URL when deploying? Can this be taken from any configuration file.
         //for local
 #if !(DEBUG_BUILD || RELEASE_BUILD)
-        public const string SchedulerTaskUri = "http://127.0.0.2/api/task/";
+        public const string SchedulerTaskUri = "http://127.0.0.2/";
 #endif
         //dev test
 #if DEBUG_BUILD


Updated: 24 hour date fomat while serialization to Json.

--- src/Aditi.Scheduler/ScheduledTasks.cs
+++ src/Aditi.Scheduler/ScheduledTasks.cs
@@ -26,6 +26,7 @@
         public const string TaskRelativePath = "/api/task/";
         public const string StatusRelativePath = "/api/Status/";
         public const string HistoryRelativePath = "/History/";
+        public const string IsoDateFormat = "yyyy-MM-dd HH:mm:ss";

         //TODO: Change this to production URL when deploying? Can this be taken from any configuration file.
         //for local
@@ -267,7 +268,7 @@
             var request = CreateWebApiRequest(SchedulerConstants.TaskRelativePath);
             request.Method = HttpMethod.Post.Method;

-            string json = JsonConvert.SerializeObject(task, new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });
+            string json = JsonConvert.SerializeObject(task, new IsoDateTimeConverter() { DateTimeFormat = SchedulerConstants.IsoDateFormat });

             try
             {
@@ -334,7 +335,7 @@
             var request = CreateWebApiRequest(SchedulerConstants.TaskRelativePath + task.Id.ToString());
             request.Method = HttpMethod.Put.Method;

-            string json = JsonConvert.SerializeObject(task, new IsoDateTimeConverter() { DateTimeFormat = "yyyy-MM-dd hh:mm:ss" });
+            string json = JsonConvert.SerializeObject(task, new IsoDateTimeConverter() { DateTimeFormat = SchedulerConstants.IsoDateFormat });

             try
             {


Clarify HelpCommand description

Clarify HelpCommand description

--- src/AppHarbor/Commands/HelpCommand.cs
+++ src/AppHarbor/Commands/HelpCommand.cs
@@ -3,7 +3,7 @@

 namespace AppHarbor.Commands
 {
-	[CommandHelp("Display help summary or help for a specific command", "[COMMAND]")]
+	[CommandHelp("Display help summary")]
 	public class HelpCommand : ICommand
 	{
 		private readonly IEnumerable<Type> _commandTypes;


Discard unused value.

Discard unused value.

--- src/Avalonia.Controls/Shapes/Shape.cs
+++ src/Avalonia.Controls/Shapes/Shape.cs
@@ -261,7 +261,7 @@
             {
                 // This should probably use GetRenderBounds(strokeThickness) but then the calculations
                 // will multiply the stroke thickness as well, which isn't correct.
-                var (size, transform) = CalculateSizeAndTransform(finalSize, DefiningGeometry.Bounds, Stretch);
+                var (_, transform) = CalculateSizeAndTransform(finalSize, DefiningGeometry.Bounds, Stretch);

                 if (_transform != transform)
                 {


(GH-22) Fixing </summary> xml document tag

--- src/Cake.Fastlane/FastlaneProvider.cs
+++ src/Cake.Fastlane/FastlaneProvider.cs
@@ -28,6 +28,7 @@
         /// <inheritdoc />
         /// <summary>
         /// Delivers the specified deliver configuration.
+        /// </summary>
         /// <example>
         ///     <code>
         ///         var configuration = new FastlaneDeliverConfiguration
@@ -40,7 +41,6 @@
         ///         Fastlane.Deliver(configuration);
         ///     </code>
         /// </example>
-        /// </summary>
         /// <param name="deliverConfiguration">The fastlane deliver configuration.</param>
         [CakeAliasCategory("Deliver")]
         public void Deliver(FastlaneDeliverConfiguration deliverConfiguration = null)


Added readonly property and fixed not passing the correct file attributes to create.

--- NtApiDotNet/NtFile.cs
+++ NtApiDotNet/NtFile.cs
@@ -382,7 +382,7 @@
         {
             IoStatus iostatus = new IoStatus();
             byte[] buffer = ea_buffer?.ToByteArray();
-            return NtSystemCalls.NtCreateFile(out SafeKernelObjectHandle handle, desired_access, obj_attributes, iostatus, allocation_size.ToLargeInteger(), FileAttributes.Normal,
+            return NtSystemCalls.NtCreateFile(out SafeKernelObjectHandle handle, desired_access, obj_attributes, iostatus, allocation_size.ToLargeInteger(), file_attributes,
                 share_access, disposition, open_options,
                 buffer, buffer != null ? buffer.Length : 0).CreateResult(throw_on_error, () => CreateFileObject(handle, iostatus));
         }
@@ -3543,6 +3543,31 @@
         /// </summary>
         public override bool IsContainer => IsDirectory;

+        /// <summary>
+        /// Get or set the read only status of the file.
+        /// </summary>
+        public bool ReadOnly
+        {
+            get => (FileAttributes & FileAttributes.ReadOnly) != 0;
+            set
+            {
+                var current_attributes = FileAttributes;
+                if (value)
+                {
+                    current_attributes |= FileAttributes.ReadOnly;
+                }
+                else
+                {
+                    current_attributes &= ~FileAttributes.ReadOnly;
+                    if (current_attributes == 0)
+                    {
+                        current_attributes = FileAttributes.Normal;
+                    }
+                }
+                FileAttributes = current_attributes;
+            }
+        }
+
         #endregion
     }
 }


Add isStarted property to Milestone class

--- TestRail/Types/Milestone.cs
+++ TestRail/Types/Milestone.cs
@@ -18,6 +18,9 @@

         /// true if the milestone is completed
         public bool? IsCompleted { get; set; }
+
+        /// true if the milestone is started
+        public bool? IsStarted { get; set; }

         /// date on which the milestone is due
         public DateTime? DueOn { get; set; }
@@ -52,6 +55,7 @@
                 Name = (string)json["name"],
                 Description = (string)json["description"],
                 IsCompleted = (bool?)json["is_completed"],
+                IsStarted = (bool?)json["is_started"],
                 DueOn = null == (int?)json["due_on"] ? (DateTime?)null : new DateTime(1970, 1, 1).AddSeconds((int)json["due_on"]),
                 CompletedOn = null == (int?)json["completed_on"] ? (DateTime?)null : new DateTime(1970, 1, 1).AddSeconds((int)json["completed_on"]),
                 ProjectID = (ulong)json["project_id"],


Aaaand I introduced a new bug there, too!

--- UIconEdit.Core/IconEntry.cs
+++ UIconEdit.Core/IconEntry.cs
@@ -336,7 +336,7 @@
         public bool IsQuantized
         {
             get { return _isQuantized; }
-            private set { _changeValue(_isQuantized, ref _isQuantized, "IsQuantized"); }
+            private set { _changeValue(value, ref _isQuantized, "IsQuantized"); }
         }
         #endregion


Improving grid images download performance

--- UWPHook/GamesWindow.xaml.cs
+++ UWPHook/GamesWindow.xaml.cs
@@ -183,29 +183,33 @@
                 var heroes = await gameHeroes;
                 var logos = await gameLogos;

+                List<Task> saveImagesTasks = new List<Task>();
+
                 if (gridsHorizontal != null && gridsHorizontal.Length > 0)
                 {
                     var grid = gridsHorizontal[0];
-                    await SaveImage(grid.Url, $"{gridDirectory}\\{gameId}.png", ImageFormat.Png);
+                    saveImagesTasks.Add(SaveImage(grid.Url, $"{gridDirectory}\\{gameId}.png", ImageFormat.Png));
                 }

                 if (gridsVertical != null && gridsVertical.Length > 0)
                 {
                     var grid = gridsVertical[0];
-                    await SaveImage(grid.Url, $"{gridDirectory}\\{gameId}p.png", ImageFormat.Png);
+                    saveImagesTasks.Add(SaveImage(grid.Url, $"{gridDirectory}\\{gameId}p.png", ImageFormat.Png));
                 }

                 if (heroes != null && heroes.Length > 0)
                 {
                     var hero = heroes[0];
-                    await SaveImage(hero.Url, $"{gridDirectory}\\{gameId}_hero.png", ImageFormat.Png);
+                    saveImagesTasks.Add(SaveImage(hero.Url, $"{gridDirectory}\\{gameId}_hero.png", ImageFormat.Png));
                 }

                 if (logos != null && logos.Length > 0)
                 {
                     var logo = logos[0];
-                    await SaveImage(logo.Url, $"{gridDirectory}\\{gameId}_logo.png", ImageFormat.Png);
-                }
+                    saveImagesTasks.Add(SaveImage(logo.Url, $"{gridDirectory}\\{gameId}_logo.png", ImageFormat.Png));
+                }
+
+                await Task.WhenAll(saveImagesTasks);

             }
         }
@@ -244,6 +248,9 @@

                         if (shortcuts != null)
                         {
+                            List<Task> gridImagesDownloadTasks = new List<Task>();
+                            bool downloadGridImages = !String.IsNullOrEmpty(Properties.Settings.Default.SteamGridDbApiKey);
+
                             foreach (var app in selected_apps)
                             {
                                 string appTarget = @"""" + System.Reflection.Assembly.GetExecutingAssembly().Location + @""" " + app.Aumid;
@@ -269,9 +276,9 @@
                                 Array.Resize(ref shortcuts, shortcuts.Length + 1);
                                 shortcuts[shortcuts.Length - 1] = newApp;

-                                if (!String.IsNullOrEmpty(Properties.Settings.Default.SteamGridDbApiKey))
+                                if (downloadGridImages)
                                 {
-                                    await DownloadGridImages(user, app.Name, appTarget);
+                                    gridImagesDownloadTasks.Add(DownloadGridImages(user, app.Name, appTarget));
                                 }
                             }

@@ -283,6 +290,11 @@
                                 }
                                 //Write the file with all the shortcuts
                                 File.WriteAllBytes(user + @"\\config\\shortcuts.vdf", VDFSerializer.Serialize(shortcuts));
+
+                                if (gridImagesDownloadTasks.Count > 0)
+                                {
+                                    await Task.WhenAll(gridImagesDownloadTasks);
+                                }
                             }
                             catch (Exception ex)
                             {


Fixed initial display value of FoatController

--- Unity/UI/FloatController.cs
+++ Unity/UI/FloatController.cs
@@ -33,11 +33,11 @@
         {
             input.contentType = InputField.ContentType.DecimalNumber;
             input.onEndEdit.AddListener(parse);
-            input.text = "0";
             if(decimals >= 0)
                 format = string.Format("F{0}", decimals);
             else
                 format = "R";
+            input.text = value.ToString(format);
             if(step.Equals(0))
             {
                 incrementButton.gameObject.SetActive(false);


Unnecessary argument in `catch` removed.

--- Parser/ParseHelper.cs
+++ Parser/ParseHelper.cs
@@ -33,7 +33,7 @@
                     value = Enum.Parse(type, str, true);
                     return true;
                 }
-                catch(ArgumentException e)
+                catch(ArgumentException)
                 {
                     value = null;
                     return false;


Update comment

Update comment

--- Kentico.Kontent.Delivery.Abstractions/IDeliveryHttpClient.cs
+++ Kentico.Kontent.Delivery.Abstractions/IDeliveryHttpClient.cs
@@ -11,7 +11,7 @@
         /// <summary>
         /// Returns a response message from Kentico Kontent Delivery API.
         /// </summary>
-        /// <param name="message"></param>
+        /// <param name="message">HttpRequestMessage instance represents the request message</param>
         /// <returns></returns>
         Task<HttpResponseMessage> SendHttpMessageAsync(HttpRequestMessage message);
     }


Add support for running packages that have a __main__.py script from the command line as scripts.

Fixes #30023.

--- Languages/IronPython/IronPython/Hosting/PythonCommandLine.cs
+++ Languages/IronPython/IronPython/Hosting/PythonCommandLine.cs
@@ -179,6 +179,10 @@
                     Options.FileName = "<stdin>";
                 } else {
 #if !SILVERLIGHT
+                    if (Directory.Exists(Options.FileName)) {
+                        Options.FileName = Path.Combine(Options.FileName, "__main__.py");
+                    }
+
                     if (!File.Exists(Options.FileName)) {
                         Console.WriteLine(
                             String.Format(


Deal with multipart/related

Deal with multipart/related

--- InternetSeparationAdapter/Program.cs
+++ InternetSeparationAdapter/Program.cs
@@ -62,10 +62,17 @@
         var message = new Message(messageRequest.Execute());
         Console.WriteLine($"From: {message.From}");
         Console.WriteLine($"Subject: {message.Subject}");
-        var body = message.Body;
-        if (body.HasValue)
+        try
         {
-          Console.WriteLine($"Body: {body.Value.Value}");
+          var body = message.Body;
+          if (body.HasValue)
+          {
+            Console.WriteLine($"Body: {body.Value.Value}");
+          }
+        }
+        catch (NotImplementedException)
+        {
+          Console.WriteLine("Body: mutlipart/related");
         }
       }